diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionsOperations.cs index 88d7bdac32888..819118f069668 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionsOperations.cs @@ -155,7 +155,7 @@ internal ApplicationGatewayPrivateEndpointConnectionsOperations(NetworkManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal ApplicationGatewayPrivateEndpointConnectionsOperations(NetworkManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal ApplicationGatewayPrivateEndpointConnectionsOperations(NetworkManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -742,7 +742,7 @@ internal ApplicationGatewayPrivateEndpointConnectionsOperations(NetworkManagemen { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewayPrivateLinkResourcesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewayPrivateLinkResourcesOperations.cs index 4fdff88d7f990..97778780e3611 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewayPrivateLinkResourcesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewayPrivateLinkResourcesOperations.cs @@ -94,7 +94,7 @@ internal ApplicationGatewayPrivateLinkResourcesOperations(NetworkManagementClien { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewaysOperations.cs index 3ab3ef666548d..3c59d8d1edf86 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationGatewaysOperations.cs @@ -116,7 +116,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -342,7 +342,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -536,7 +536,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -714,7 +714,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -991,7 +991,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1162,7 +1162,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1333,7 +1333,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1504,7 +1504,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1680,7 +1680,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1856,7 +1856,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2039,7 +2039,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "predefinedPolicyName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2228,7 +2228,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2415,7 +2415,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2631,7 +2631,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2804,7 +2804,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2985,7 +2985,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3196,7 +3196,7 @@ internal ApplicationGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "probeRequest"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationSecurityGroupsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationSecurityGroupsOperations.cs index 05ec8a2a1cdb9..4f6fd2c8bc8a4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationSecurityGroupsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ApplicationSecurityGroupsOperations.cs @@ -116,7 +116,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -343,7 +343,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -530,7 +530,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -713,7 +713,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -902,7 +902,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1086,7 +1086,7 @@ internal ApplicationSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableDelegationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableDelegationsOperations.cs index eac4eb134930e..ad9e8778c198c 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableDelegationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableDelegationsOperations.cs @@ -88,7 +88,7 @@ internal AvailableDelegationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableEndpointServicesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableEndpointServicesOperations.cs index 6fa6f583cce7a..90c47b042140f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableEndpointServicesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableEndpointServicesOperations.cs @@ -87,7 +87,7 @@ internal AvailableEndpointServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperations.cs index 29d7c376a4ad7..fbbf35ab669a2 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailablePrivateEndpointTypesOperations.cs @@ -88,7 +88,7 @@ internal AvailablePrivateEndpointTypesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -281,7 +281,7 @@ internal AvailablePrivateEndpointTypesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupDelegationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupDelegationsOperations.cs index 3d1c5d0ea45aa..106005f53c8b4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupDelegationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableResourceGroupDelegationsOperations.cs @@ -95,7 +95,7 @@ internal AvailableResourceGroupDelegationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableServiceAliasesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableServiceAliasesOperations.cs index 44f6364ab5d97..eb43c2425d60a 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableServiceAliasesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AvailableServiceAliasesOperations.cs @@ -87,7 +87,7 @@ internal AvailableServiceAliasesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -279,7 +279,7 @@ internal AvailableServiceAliasesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallFqdnTagsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallFqdnTagsOperations.cs index 00f47f9b85791..4f465c5263933 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallFqdnTagsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallFqdnTagsOperations.cs @@ -80,7 +80,7 @@ internal AzureFirewallFqdnTagsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperations.cs index 057211c6aad80..d6af1eb1dd0f5 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/AzureFirewallsOperations.cs @@ -116,7 +116,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -353,7 +353,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -531,7 +531,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -718,7 +718,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -912,7 +912,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1138,7 +1138,7 @@ internal AzureFirewallsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BastionHostsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BastionHostsOperations.cs index 2ab804b29bbae..28e19e72f24d1 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BastionHostsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BastionHostsOperations.cs @@ -116,7 +116,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -321,7 +321,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -504,7 +504,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -693,7 +693,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -876,7 +876,7 @@ internal BastionHostsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BgpServiceCommunitiesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BgpServiceCommunitiesOperations.cs index 1991a08afa2e0..3b0ea74add2e7 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BgpServiceCommunitiesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/BgpServiceCommunitiesOperations.cs @@ -80,7 +80,7 @@ internal BgpServiceCommunitiesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ConnectionMonitorsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ConnectionMonitorsOperations.cs index f30c5b3f689fd..2037d8029e75e 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ConnectionMonitorsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ConnectionMonitorsOperations.cs @@ -129,7 +129,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -359,7 +359,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -632,7 +632,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -839,7 +839,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1059,7 +1059,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1236,7 +1236,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1413,7 +1413,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1593,7 +1593,7 @@ internal ConnectionMonitorsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/CustomIPPrefixesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/CustomIPPrefixesOperations.cs new file mode 100644 index 0000000000000..db279724572fb --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/CustomIPPrefixesOperations.cs @@ -0,0 +1,1617 @@ +// +// 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; + + /// + /// CustomIPPrefixesOperations operations. + /// + internal partial class CustomIPPrefixesOperations : IServiceOperations, ICustomIPPrefixesOperations + { + /// + /// Initializes a new instance of the CustomIPPrefixesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal CustomIPPrefixesOperations(NetworkManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the NetworkManagementClient + /// + public NetworkManagementClient Client { get; private set; } + + /// + /// Deletes the specified custom IP prefix. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the CustomIpPrefix. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string customIpPrefixName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, customIpPrefixName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the specified custom IP prefix in a specified resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Expands referenced resources. + /// + /// + /// 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 customIpPrefixName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (customIpPrefixName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "customIpPrefixName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("customIpPrefixName", customIpPrefixName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("expand", expand); + 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/customIpPrefixes/{customIpPrefixName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{customIpPrefixName}", System.Uri.EscapeDataString(customIpPrefixName)); + _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 (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } + 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 updates a custom IP prefix. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to the create or update custom IP prefix operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, customIpPrefixName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates custom IP prefix tags. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to update custom IP prefix tags. + /// + /// + /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string customIpPrefixName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (customIpPrefixName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "customIpPrefixName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("customIpPrefixName", customIpPrefixName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", 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/customIpPrefixes/{customIpPrefixName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{customIpPrefixName}", System.Uri.EscapeDataString(customIpPrefixName)); + _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("PATCH"); + _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) + { + 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 custom IP prefixes 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-06-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/customIpPrefixes").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; + } + + /// + /// Gets all custom IP prefixes in 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-06-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/customIpPrefixes").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; + } + + /// + /// Deletes the specified custom IP prefix. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the CustomIpPrefix. + /// + /// + /// 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 customIpPrefixName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (customIpPrefixName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "customIpPrefixName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("customIpPrefixName", customIpPrefixName); + 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/customIpPrefixes/{customIpPrefixName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{customIpPrefixName}", System.Uri.EscapeDataString(customIpPrefixName)); + _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; + } + + /// + /// Creates or updates a custom IP prefix. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to the create or update custom IP prefix 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (customIpPrefixName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "customIpPrefixName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("customIpPrefixName", customIpPrefixName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + 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/customIpPrefixes/{customIpPrefixName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{customIpPrefixName}", System.Uri.EscapeDataString(customIpPrefixName)); + _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; + } + + /// + /// Gets all the custom IP prefixes 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; + } + + /// + /// Gets all custom IP prefixes in 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; + } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/CustomIPPrefixesOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/CustomIPPrefixesOperationsExtensions.cs new file mode 100644 index 0000000000000..54e20dfe38fcb --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/CustomIPPrefixesOperationsExtensions.cs @@ -0,0 +1,413 @@ +// +// 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 CustomIPPrefixesOperations. + /// + public static partial class CustomIPPrefixesOperationsExtensions + { + /// + /// Deletes the specified custom IP prefix. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the CustomIpPrefix. + /// + public static void Delete(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName) + { + operations.DeleteAsync(resourceGroupName, customIpPrefixName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified custom IP prefix. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the CustomIpPrefix. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, customIpPrefixName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the specified custom IP prefix in a specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Expands referenced resources. + /// + public static CustomIpPrefix Get(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, string expand = default(string)) + { + return operations.GetAsync(resourceGroupName, customIpPrefixName, expand).GetAwaiter().GetResult(); + } + + /// + /// Gets the specified custom IP prefix in a specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Expands referenced resources. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, customIpPrefixName, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a custom IP prefix. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to the create or update custom IP prefix operation. + /// + public static CustomIpPrefix CreateOrUpdate(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, customIpPrefixName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a custom IP prefix. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to the create or update custom IP prefix operation. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, customIpPrefixName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates custom IP prefix tags. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to update custom IP prefix tags. + /// + public static CustomIpPrefix UpdateTags(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, TagsObject parameters) + { + return operations.UpdateTagsAsync(resourceGroupName, customIpPrefixName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates custom IP prefix tags. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to update custom IP prefix tags. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateTagsAsync(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, TagsObject parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, customIpPrefixName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all the custom IP prefixes in a subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage ListAll(this ICustomIPPrefixesOperations operations) + { + return operations.ListAllAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets all the custom IP prefixes in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAllAsync(this ICustomIPPrefixesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all custom IP prefixes in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + public static IPage List(this ICustomIPPrefixesOperations operations, string resourceGroupName) + { + return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Gets all custom IP prefixes in 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 ICustomIPPrefixesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes the specified custom IP prefix. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the CustomIpPrefix. + /// + public static void BeginDelete(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName) + { + operations.BeginDeleteAsync(resourceGroupName, customIpPrefixName).GetAwaiter().GetResult(); + } + + /// + /// Deletes the specified custom IP prefix. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the CustomIpPrefix. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, customIpPrefixName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Creates or updates a custom IP prefix. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to the create or update custom IP prefix operation. + /// + public static CustomIpPrefix BeginCreateOrUpdate(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, customIpPrefixName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a custom IP prefix. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to the create or update custom IP prefix operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, customIpPrefixName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all the custom IP prefixes in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListAllNext(this ICustomIPPrefixesOperations operations, string nextPageLink) + { + return operations.ListAllNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all the custom IP prefixes in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAllNextAsync(this ICustomIPPrefixesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all custom IP prefixes in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this ICustomIPPrefixesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all custom IP prefixes in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this ICustomIPPrefixesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosCustomPoliciesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosCustomPoliciesOperations.cs index de46bd3b9ab4b..ead3d313c62f4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosCustomPoliciesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosCustomPoliciesOperations.cs @@ -116,7 +116,7 @@ internal DdosCustomPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -342,7 +342,7 @@ internal DdosCustomPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -540,7 +540,7 @@ internal DdosCustomPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -723,7 +723,7 @@ internal DdosCustomPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosProtectionPlansOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosProtectionPlansOperations.cs index 4a05b69c1421a..455c70b0f86bd 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosProtectionPlansOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DdosProtectionPlansOperations.cs @@ -116,7 +116,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -342,7 +342,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -529,7 +529,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -712,7 +712,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -901,7 +901,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1084,7 +1084,7 @@ internal DdosProtectionPlansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DefaultSecurityRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DefaultSecurityRulesOperations.cs index d89a104512c09..ac94b869beedc 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DefaultSecurityRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DefaultSecurityRulesOperations.cs @@ -94,7 +94,7 @@ internal DefaultSecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal DefaultSecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DscpConfigurationOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DscpConfigurationOperations.cs new file mode 100644 index 0000000000000..32a9c9eb5692c --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DscpConfigurationOperations.cs @@ -0,0 +1,1401 @@ +// +// 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; + + /// + /// DscpConfigurationOperations operations. + /// + internal partial class DscpConfigurationOperations : IServiceOperations, IDscpConfigurationOperations + { + /// + /// Initializes a new instance of the DscpConfigurationOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal DscpConfigurationOperations(NetworkManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the NetworkManagementClient + /// + public NetworkManagementClient Client { get; private set; } + + /// + /// Creates or updates a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// Parameters supplied to the create or update dscp configuration operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string dscpConfigurationName, DscpConfiguration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, dscpConfigurationName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string dscpConfigurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, dscpConfigurationName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// 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 dscpConfigurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (dscpConfigurationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dscpConfigurationName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("dscpConfigurationName", dscpConfigurationName); + 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/dscpConfigurations/{dscpConfigurationName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{dscpConfigurationName}", System.Uri.EscapeDataString(dscpConfigurationName)); + _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 a DSCP Configuration. + /// + /// + /// 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-06-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/dscpConfigurations").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 dscp configurations 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-06-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/dscpConfigurations").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; + } + + /// + /// Creates or updates a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// Parameters supplied to the create or update dscp configuration 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string dscpConfigurationName, DscpConfiguration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (dscpConfigurationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dscpConfigurationName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("dscpConfigurationName", dscpConfigurationName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + 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/dscpConfigurations/{dscpConfigurationName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{dscpConfigurationName}", System.Uri.EscapeDataString(dscpConfigurationName)); + _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 a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// 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 dscpConfigurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (dscpConfigurationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dscpConfigurationName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("dscpConfigurationName", dscpConfigurationName); + 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/dscpConfigurations/{dscpConfigurationName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{dscpConfigurationName}", System.Uri.EscapeDataString(dscpConfigurationName)); + _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; + } + + /// + /// Gets a DSCP Configuration. + /// + /// + /// 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 dscp configurations 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/DscpConfigurationOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DscpConfigurationOperationsExtensions.cs new file mode 100644 index 0000000000000..d7ddef3964dbc --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/DscpConfigurationOperationsExtensions.cs @@ -0,0 +1,361 @@ +// +// 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 DscpConfigurationOperations. + /// + public static partial class DscpConfigurationOperationsExtensions + { + /// + /// Creates or updates a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// Parameters supplied to the create or update dscp configuration operation. + /// + public static DscpConfiguration CreateOrUpdate(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName, DscpConfiguration parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, dscpConfigurationName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// Parameters supplied to the create or update dscp configuration operation. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName, DscpConfiguration parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, dscpConfigurationName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + public static void Delete(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName) + { + operations.DeleteAsync(resourceGroupName, dscpConfigurationName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, dscpConfigurationName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + public static DscpConfiguration Get(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName) + { + return operations.GetAsync(resourceGroupName, dscpConfigurationName).GetAwaiter().GetResult(); + } + + /// + /// Gets a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, dscpConfigurationName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + public static IPage List(this IDscpConfigurationOperations operations, string resourceGroupName) + { + return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Gets a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IDscpConfigurationOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all dscp configurations in a subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage ListAll(this IDscpConfigurationOperations operations) + { + return operations.ListAllAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets all dscp configurations in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAllAsync(this IDscpConfigurationOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// Parameters supplied to the create or update dscp configuration operation. + /// + public static DscpConfiguration BeginCreateOrUpdate(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName, DscpConfiguration parameters) + { + return operations.BeginCreateOrUpdateAsync(resourceGroupName, dscpConfigurationName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// Parameters supplied to the create or update dscp configuration operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateOrUpdateAsync(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName, DscpConfiguration parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, dscpConfigurationName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + public static void BeginDelete(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName) + { + operations.BeginDeleteAsync(resourceGroupName, dscpConfigurationName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IDscpConfigurationOperations operations, string resourceGroupName, string dscpConfigurationName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, dscpConfigurationName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IDscpConfigurationOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a DSCP Configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IDscpConfigurationOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets all dscp configurations in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListAllNext(this IDscpConfigurationOperations operations, string nextPageLink) + { + return operations.ListAllNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets all dscp configurations in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAllNextAsync(this IDscpConfigurationOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitAuthorizationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitAuthorizationsOperations.cs index 1b6525bbff56b..8deff3840f758 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitAuthorizationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitAuthorizationsOperations.cs @@ -127,7 +127,7 @@ internal ExpressRouteCircuitAuthorizationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -352,7 +352,7 @@ internal ExpressRouteCircuitAuthorizationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -551,7 +551,7 @@ internal ExpressRouteCircuitAuthorizationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -744,7 +744,7 @@ internal ExpressRouteCircuitAuthorizationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitConnectionsOperations.cs index e91d6310bbb3c..cf03d5f2340f7 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitConnectionsOperations.cs @@ -138,7 +138,7 @@ internal ExpressRouteCircuitConnectionsOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -377,7 +377,7 @@ internal ExpressRouteCircuitConnectionsOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -585,7 +585,7 @@ internal ExpressRouteCircuitConnectionsOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -788,7 +788,7 @@ internal ExpressRouteCircuitConnectionsOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitPeeringsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitPeeringsOperations.cs index 87e54d58fddd7..7e2bd5c305591 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitPeeringsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitPeeringsOperations.cs @@ -126,7 +126,7 @@ internal ExpressRouteCircuitPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal ExpressRouteCircuitPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal ExpressRouteCircuitPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -746,7 +746,7 @@ internal ExpressRouteCircuitPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitsOperations.cs index 5afd689b1616a..91311d52c9412 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCircuitsOperations.cs @@ -116,7 +116,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -343,7 +343,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -631,7 +631,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -832,7 +832,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1021,7 +1021,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1199,7 +1199,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1386,7 +1386,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1570,7 +1570,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1804,7 +1804,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2017,7 +2017,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2230,7 +2230,7 @@ internal ExpressRouteCircuitsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteConnectionsOperations.cs index 61c50b8426ad2..965e06992d4e9 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteConnectionsOperations.cs @@ -130,7 +130,7 @@ internal ExpressRouteConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal ExpressRouteConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -564,7 +564,7 @@ internal ExpressRouteConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -789,7 +789,7 @@ internal ExpressRouteConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionPeeringsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionPeeringsOperations.cs index 0dcab363330f3..879f9bd12e886 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionPeeringsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionPeeringsOperations.cs @@ -94,7 +94,7 @@ internal ExpressRouteCrossConnectionPeeringsOperations(NetworkManagementClient c { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -320,7 +320,7 @@ internal ExpressRouteCrossConnectionPeeringsOperations(NetworkManagementClient c { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal ExpressRouteCrossConnectionPeeringsOperations(NetworkManagementClient c { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -746,7 +746,7 @@ internal ExpressRouteCrossConnectionPeeringsOperations(NetworkManagementClient c { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionsOperations.cs index bf43d599c5c92..7071ad779ef12 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteCrossConnectionsOperations.cs @@ -80,7 +80,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -263,7 +263,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -455,7 +455,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -681,7 +681,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -976,7 +976,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1192,7 +1192,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1405,7 +1405,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1618,7 +1618,7 @@ internal ExpressRouteCrossConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteGatewaysOperations.cs index 08f0b5ccbeb01..7f36110dc5833 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteGatewaysOperations.cs @@ -80,7 +80,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -263,7 +263,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -480,7 +480,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -709,7 +709,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -927,7 +927,7 @@ internal ExpressRouteGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteLinksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteLinksOperations.cs index 3721b80ff9bdf..998d3da6af6fb 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteLinksOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteLinksOperations.cs @@ -101,7 +101,7 @@ internal ExpressRouteLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "linkName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -298,7 +298,7 @@ internal ExpressRouteLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "expressRoutePortName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsLocationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsLocationsOperations.cs index 74bf6e7fd8c88..25a298509dc3c 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsLocationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsLocationsOperations.cs @@ -82,7 +82,7 @@ internal ExpressRoutePortsLocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -266,7 +266,7 @@ internal ExpressRoutePortsLocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "locationName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperations.cs index 72f85a9cb0d8a..3a062eb763565 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperations.cs @@ -116,7 +116,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "expressRoutePortName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -342,7 +342,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -536,7 +536,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -714,7 +714,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -860,6 +860,219 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) return _result; } + /// + /// Generate a letter of authorization for the requested ExpressRoutePort + /// resource. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of ExpressRoutePort. + /// + /// + /// Request parameters supplied to generate a letter of authorization. + /// + /// + /// 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> GenerateLOAWithHttpMessagesAsync(string resourceGroupName, string expressRoutePortName, GenerateExpressRoutePortsLOARequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (expressRoutePortName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "expressRoutePortName"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + string apiVersion = "2020-06-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("resourceGroupName", resourceGroupName); + tracingParameters.Add("expressRoutePortName", expressRoutePortName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GenerateLOA", 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/expressRoutePorts/{expressRoutePortName}/generateLoa").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{expressRoutePortName}", System.Uri.EscapeDataString(expressRoutePortName)); + 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("POST"); + _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(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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) + { + 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; + } + /// /// Deletes the specified ExpressRoutePort resource. /// @@ -901,7 +1114,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "expressRoutePortName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1084,7 +1297,7 @@ internal ExpressRoutePortsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperationsExtensions.cs index 70cc03bacfc4c..ef2f3e4d6a244 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRoutePortsOperationsExtensions.cs @@ -252,6 +252,54 @@ public static IPage List(this IExpressRoutePortsOperations ope } } + /// + /// Generate a letter of authorization for the requested ExpressRoutePort + /// resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of ExpressRoutePort. + /// + /// + /// Request parameters supplied to generate a letter of authorization. + /// + public static GenerateExpressRoutePortsLOAResult GenerateLOA(this IExpressRoutePortsOperations operations, string resourceGroupName, string expressRoutePortName, GenerateExpressRoutePortsLOARequest request) + { + return operations.GenerateLOAAsync(resourceGroupName, expressRoutePortName, request).GetAwaiter().GetResult(); + } + + /// + /// Generate a letter of authorization for the requested ExpressRoutePort + /// resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of ExpressRoutePort. + /// + /// + /// Request parameters supplied to generate a letter of authorization. + /// + /// + /// The cancellation token. + /// + public static async Task GenerateLOAAsync(this IExpressRoutePortsOperations operations, string resourceGroupName, string expressRoutePortName, GenerateExpressRoutePortsLOARequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GenerateLOAWithHttpMessagesAsync(resourceGroupName, expressRoutePortName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Deletes the specified ExpressRoutePort resource. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteServiceProvidersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteServiceProvidersOperations.cs index f5a2701da36c9..404d32e53fada 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteServiceProvidersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ExpressRouteServiceProvidersOperations.cs @@ -80,7 +80,7 @@ internal ExpressRouteServiceProvidersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FirewallPoliciesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FirewallPoliciesOperations.cs index 7648a0b116dc7..a2b68fc3517df 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FirewallPoliciesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FirewallPoliciesOperations.cs @@ -119,7 +119,7 @@ internal FirewallPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -336,7 +336,7 @@ internal FirewallPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -514,7 +514,7 @@ internal FirewallPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -701,7 +701,7 @@ internal FirewallPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -884,7 +884,7 @@ internal FirewallPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FirewallPolicyRuleCollectionGroupsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FirewallPolicyRuleCollectionGroupsOperations.cs index 02f69d011bca3..2956fbab15a6b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FirewallPolicyRuleCollectionGroupsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FirewallPolicyRuleCollectionGroupsOperations.cs @@ -126,7 +126,7 @@ internal FirewallPolicyRuleCollectionGroupsOperations(NetworkManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal FirewallPolicyRuleCollectionGroupsOperations(NetworkManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal FirewallPolicyRuleCollectionGroupsOperations(NetworkManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -746,7 +746,7 @@ internal FirewallPolicyRuleCollectionGroupsOperations(NetworkManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FlowLogsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FlowLogsOperations.cs index 91d58d1a596a6..b0fc59de2e3ce 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FlowLogsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FlowLogsOperations.cs @@ -78,6 +78,218 @@ internal FlowLogsOperations(NetworkManagementClient client) return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Update tags of the specified flow log. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the network watcher. + /// + /// + /// The name of the flow log. + /// + /// + /// Parameters supplied to update flow log tags. + /// + /// + /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string networkWatcherName, string flowLogName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (networkWatcherName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "networkWatcherName"); + } + if (flowLogName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "flowLogName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("networkWatcherName", networkWatcherName); + tracingParameters.Add("flowLogName", flowLogName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", 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/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{networkWatcherName}", System.Uri.EscapeDataString(networkWatcherName)); + _url = _url.Replace("{flowLogName}", System.Uri.EscapeDataString(flowLogName)); + _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("PATCH"); + _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) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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 a flow log resource by name. /// @@ -129,7 +341,7 @@ internal FlowLogsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -345,7 +557,7 @@ internal FlowLogsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -552,7 +764,7 @@ internal FlowLogsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -772,7 +984,7 @@ internal FlowLogsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FlowLogsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FlowLogsOperationsExtensions.cs index 7fcf020320571..3ac73c636340b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FlowLogsOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/FlowLogsOperationsExtensions.cs @@ -73,6 +73,58 @@ public static FlowLog CreateOrUpdate(this IFlowLogsOperations operations, string } } + /// + /// Update tags of the specified flow log. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the network watcher. + /// + /// + /// The name of the flow log. + /// + /// + /// Parameters supplied to update flow log tags. + /// + public static FlowLog UpdateTags(this IFlowLogsOperations operations, string resourceGroupName, string networkWatcherName, string flowLogName, TagsObject parameters) + { + return operations.UpdateTagsAsync(resourceGroupName, networkWatcherName, flowLogName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Update tags of the specified flow log. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the network watcher. + /// + /// + /// The name of the flow log. + /// + /// + /// Parameters supplied to update flow log tags. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateTagsAsync(this IFlowLogsOperations operations, string resourceGroupName, string networkWatcherName, string flowLogName, TagsObject parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, networkWatcherName, flowLogName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets a flow log resource by name. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubRouteTablesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubRouteTablesOperations.cs index 9f364924d11cf..eb595b348bcc6 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubRouteTablesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubRouteTablesOperations.cs @@ -130,7 +130,7 @@ internal HubRouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "routeTableName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal HubRouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -560,7 +560,7 @@ internal HubRouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "routeTableParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -785,7 +785,7 @@ internal HubRouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "routeTableName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubVirtualNetworkConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubVirtualNetworkConnectionsOperations.cs index d17ba5edf2cde..b0db616aa45e8 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubVirtualNetworkConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/HubVirtualNetworkConnectionsOperations.cs @@ -155,7 +155,7 @@ internal HubVirtualNetworkConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal HubVirtualNetworkConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -560,7 +560,7 @@ internal HubVirtualNetworkConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "hubVirtualNetworkConnectionParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -785,7 +785,7 @@ internal HubVirtualNetworkConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ICustomIPPrefixesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ICustomIPPrefixesOperations.cs new file mode 100644 index 0000000000000..6aa9604e6c014 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ICustomIPPrefixesOperations.cs @@ -0,0 +1,270 @@ +// +// 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; + + /// + /// CustomIPPrefixesOperations operations. + /// + public partial interface ICustomIPPrefixesOperations + { + /// + /// Deletes the specified custom IP prefix. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the CustomIpPrefix. + /// + /// + /// 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 customIpPrefixName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the specified custom IP prefix in a specified resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Expands referenced resources. + /// + /// + /// 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 customIpPrefixName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a custom IP prefix. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to the create or update custom IP prefix + /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates custom IP prefix tags. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to update custom IP prefix tags. + /// + /// + /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string customIpPrefixName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all the custom IP prefixes 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)); + /// + /// Gets all custom IP prefixes in 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)); + /// + /// Deletes the specified custom IP prefix. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the CustomIpPrefix. + /// + /// + /// 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 customIpPrefixName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a custom IP prefix. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the custom IP prefix. + /// + /// + /// Parameters supplied to the create or update custom IP prefix + /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets all the custom IP prefixes 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)); + /// + /// Gets all custom IP prefixes in 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)); + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IDscpConfigurationOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IDscpConfigurationOperations.cs new file mode 100644 index 0000000000000..4c9282dd01d46 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IDscpConfigurationOperations.cs @@ -0,0 +1,239 @@ +// +// 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; + + /// + /// DscpConfigurationOperations operations. + /// + public partial interface IDscpConfigurationOperations + { + /// + /// Creates or updates a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// Parameters supplied to the create or update dscp configuration + /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string dscpConfigurationName, DscpConfiguration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// 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 dscpConfigurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// 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 dscpConfigurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a DSCP Configuration. + /// + /// + /// 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 dscp configurations 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)); + /// + /// Creates or updates a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// Parameters supplied to the create or update dscp configuration + /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string dscpConfigurationName, DscpConfiguration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a DSCP Configuration. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the resource. + /// + /// + /// 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 dscpConfigurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a DSCP Configuration. + /// + /// + /// 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 dscp configurations 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/IExpressRoutePortsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IExpressRoutePortsOperations.cs index 6ee3c892cbc3f..f043ed7c5088d 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IExpressRoutePortsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IExpressRoutePortsOperations.cs @@ -170,6 +170,35 @@ public partial interface IExpressRoutePortsOperations /// Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Generate a letter of authorization for the requested + /// ExpressRoutePort resource. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of ExpressRoutePort. + /// + /// + /// Request parameters supplied to generate a letter of authorization. + /// + /// + /// 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> GenerateLOAWithHttpMessagesAsync(string resourceGroupName, string expressRoutePortName, GenerateExpressRoutePortsLOARequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Deletes the specified ExpressRoutePort resource. /// /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IFlowLogsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IFlowLogsOperations.cs index a12c822bdb07b..8973716521859 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IFlowLogsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IFlowLogsOperations.cs @@ -56,6 +56,37 @@ public partial interface IFlowLogsOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkWatcherName, string flowLogName, FlowLog parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Update tags of the specified flow log. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the network watcher. + /// + /// + /// The name of the flow log. + /// + /// + /// Parameters supplied to update flow log tags. + /// + /// + /// 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> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string networkWatcherName, string flowLogName, TagsObject parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets a flow log resource by name. /// /// 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..825e4f8e6baf2 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/INetworkManagementClient.cs @@ -125,6 +125,11 @@ public partial interface INetworkManagementClient : System.IDisposable /// IBastionHostsOperations BastionHosts { get; } + /// + /// Gets the ICustomIPPrefixesOperations. + /// + ICustomIPPrefixesOperations CustomIPPrefixes { get; } + /// /// Gets the IDdosCustomPoliciesOperations. /// @@ -135,6 +140,11 @@ public partial interface INetworkManagementClient : System.IDisposable /// IDdosProtectionPlansOperations DdosProtectionPlans { get; } + /// + /// Gets the IDscpConfigurationOperations. + /// + IDscpConfigurationOperations DscpConfiguration { get; } + /// /// Gets the IAvailableEndpointServicesOperations. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IP2sVpnGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IP2sVpnGatewaysOperations.cs index d61bbf1e4b48c..936fbd8b47c29 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IP2sVpnGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IP2sVpnGatewaysOperations.cs @@ -170,6 +170,32 @@ public partial interface IP2sVpnGatewaysOperations /// Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Resets the primary of the p2s vpn gateway in the specified resource + /// group. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// 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> ResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Generates VPN profile for P2S client of the P2SVpnGateway in the /// specified resource group. /// @@ -312,6 +338,34 @@ public partial interface IP2sVpnGatewaysOperations /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string gatewayName, P2SVpnGateway p2SVpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Updates virtual wan p2s vpn gateway tags. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Parameters supplied to update a virtual wan p2s vpn gateway tags. + /// + /// + /// 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> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string gatewayName, TagsObject p2SVpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Deletes a virtual wan p2s vpn gateway. /// /// @@ -334,6 +388,32 @@ public partial interface IP2sVpnGatewaysOperations /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Resets the primary of the p2s vpn gateway in the specified resource + /// group. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// 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> BeginResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Generates VPN profile for P2S client of the P2SVpnGateway in the /// specified resource group. /// 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 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIpAddressesOperations.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/IPublicIPAddressesOperations.cs 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/IVpnConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnConnectionsOperations.cs index ce5b073bdb8ae..dc28c8693abe7 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnConnectionsOperations.cs @@ -109,6 +109,72 @@ public partial interface IVpnConnectionsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Starts packet capture on Vpn connection in the specified resource + /// group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to start packet + /// capture on gateway connection. + /// + /// + /// 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> StartPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStartParameters parameters = default(VpnConnectionPacketCaptureStartParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops packet capture on Vpn connection in the specified resource + /// group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to stop packet + /// capture on gateway connection. + /// + /// + /// 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> StopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Retrieves all vpn connections for a particular virtual wan vpn /// gateway. /// @@ -192,6 +258,72 @@ public partial interface IVpnConnectionsOperations /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string connectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Starts packet capture on Vpn connection in the specified resource + /// group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to start packet + /// capture on gateway connection. + /// + /// + /// 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> BeginStartPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStartParameters parameters = default(VpnConnectionPacketCaptureStartParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops packet capture on Vpn connection in the specified resource + /// group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to stop packet + /// capture on gateway connection. + /// + /// + /// 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> BeginStopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Retrieves all vpn connections for a particular virtual wan vpn /// gateway. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnGatewaysOperations.cs index 075057df1d9eb..67c06d83b238d 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnGatewaysOperations.cs @@ -154,6 +154,66 @@ public partial interface IVpnGatewaysOperations /// Task> ResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Starts packet capture on vpn gateway in the specified resource + /// group. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to start packet + /// capture on vpn gateway. + /// + /// + /// 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> StartPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStartParameters parameters = default(VpnGatewayPacketCaptureStartParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops packet capture on vpn gateway in the specified resource + /// group. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to stop packet + /// capture on vpn gateway. + /// + /// + /// 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> StopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Lists all the VpnGateways in a resource group. /// /// @@ -224,6 +284,34 @@ public partial interface IVpnGatewaysOperations /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGateway vpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Updates virtual wan vpn gateway tags. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Parameters supplied to update a virtual wan vpn gateway tags. + /// + /// + /// 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> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string gatewayName, TagsObject vpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Deletes a virtual wan vpn gateway. /// /// @@ -272,6 +360,66 @@ public partial interface IVpnGatewaysOperations /// Task> BeginResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Starts packet capture on vpn gateway in the specified resource + /// group. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to start packet + /// capture on vpn gateway. + /// + /// + /// 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> BeginStartPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStartParameters parameters = default(VpnGatewayPacketCaptureStartParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops packet capture on vpn gateway in the specified resource + /// group. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to stop packet + /// capture on vpn gateway. + /// + /// + /// 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> BeginStopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Lists all the VpnGateways in a resource group. /// /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnLinkConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnLinkConnectionsOperations.cs index b0cecc0a4aa82..d7e9cd499c530 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnLinkConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IVpnLinkConnectionsOperations.cs @@ -28,7 +28,7 @@ public partial interface IVpnLinkConnectionsOperations /// wan vpn gateway vpn connection. /// /// - /// The resource group name of the VpnGateway. + /// The resource group name of the vpn gateway. /// /// /// The name of the gateway. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/InboundNatRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/InboundNatRulesOperations.cs index 339bb404ca748..d221a71cd0da1 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/InboundNatRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/InboundNatRulesOperations.cs @@ -94,7 +94,7 @@ internal InboundNatRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -323,7 +323,7 @@ internal InboundNatRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -556,7 +556,7 @@ internal InboundNatRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -748,7 +748,7 @@ internal InboundNatRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IpAllocationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IpAllocationsOperations.cs index 4dd28a1a16a25..5ed6d35a6e936 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IpAllocationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IpAllocationsOperations.cs @@ -119,7 +119,7 @@ internal IpAllocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal IpAllocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal IpAllocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -720,7 +720,7 @@ internal IpAllocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal IpAllocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1092,7 +1092,7 @@ internal IpAllocationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IpGroupsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IpGroupsOperations.cs index 697920c972790..b8d85f8cbae55 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IpGroupsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/IpGroupsOperations.cs @@ -98,7 +98,7 @@ internal IpGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -324,7 +324,7 @@ internal IpGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -535,7 +535,7 @@ internal IpGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -708,7 +708,7 @@ internal IpGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -900,7 +900,7 @@ internal IpGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1111,7 +1111,7 @@ internal IpGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerBackendAddressPoolsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerBackendAddressPoolsOperations.cs index c493da6f92431..7e967962fe1bc 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerBackendAddressPoolsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerBackendAddressPoolsOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerBackendAddressPoolsOperations(NetworkManagementClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerBackendAddressPoolsOperations(NetworkManagementClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -560,7 +560,7 @@ internal LoadBalancerBackendAddressPoolsOperations(NetworkManagementClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -785,7 +785,7 @@ internal LoadBalancerBackendAddressPoolsOperations(NetworkManagementClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerFrontendIPConfigurationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerFrontendIPConfigurationsOperations.cs index 38e9f079f7ef6..47a42700b943b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerFrontendIPConfigurationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerFrontendIPConfigurationsOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerFrontendIPConfigurationsOperations(NetworkManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerFrontendIPConfigurationsOperations(NetworkManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerLoadBalancingRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerLoadBalancingRulesOperations.cs index 2d3e28b757a9d..1bc1e9d748242 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerLoadBalancingRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerLoadBalancingRulesOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerLoadBalancingRulesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerLoadBalancingRulesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerNetworkInterfacesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerNetworkInterfacesOperations.cs index f967bbdcf0937..9a0015b1b54c3 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerNetworkInterfacesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerNetworkInterfacesOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerNetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerOutboundRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerOutboundRulesOperations.cs index 191734660c795..6c6e589849fb9 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerOutboundRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerOutboundRulesOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerOutboundRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerOutboundRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerProbesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerProbesOperations.cs index 06e998270ecb4..d3094452beeba 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerProbesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancerProbesOperations.cs @@ -94,7 +94,7 @@ internal LoadBalancerProbesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal LoadBalancerProbesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancersOperations.cs index fa84d98a66eac..260a6de8b3cb3 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LoadBalancersOperations.cs @@ -119,7 +119,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -720,7 +720,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1092,7 +1092,7 @@ internal LoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LocalNetworkGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LocalNetworkGatewaysOperations.cs index a268611c19a08..b80d734d8ece4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LocalNetworkGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/LocalNetworkGatewaysOperations.cs @@ -127,7 +127,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -357,7 +357,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -551,7 +551,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -762,7 +762,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -985,7 +985,7 @@ internal LocalNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGateway.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGateway.cs index bdba84ed40ad6..94a7a423c1fb8 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGateway.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGateway.cs @@ -56,6 +56,10 @@ public ApplicationGateway() /// the application gateway resource. For default limits, see /// [Application Gateway /// limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + /// Trusted client certificates + /// of the application gateway resource. For default limits, see + /// [Application Gateway + /// limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). /// SSL certificates of the application /// gateway resource. For default limits, see [Application Gateway /// limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). @@ -79,6 +83,9 @@ public ApplicationGateway() /// Http listeners of the application /// gateway resource. For default limits, see [Application Gateway /// limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + /// SSL profiles of the application gateway + /// resource. For default limits, see [Application Gateway + /// limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). /// URL path map of the application gateway /// resource. For default limits, see [Application Gateway /// limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). @@ -120,7 +127,7 @@ public ApplicationGateway() /// resource needs to come from. /// The identity of the application gateway, if /// configured. - public ApplicationGateway(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ApplicationGatewaySku sku = default(ApplicationGatewaySku), ApplicationGatewaySslPolicy sslPolicy = default(ApplicationGatewaySslPolicy), string operationalState = default(string), IList gatewayIPConfigurations = default(IList), IList authenticationCertificates = default(IList), IList trustedRootCertificates = default(IList), IList sslCertificates = default(IList), IList frontendIPConfigurations = default(IList), IList frontendPorts = default(IList), IList probes = default(IList), IList backendAddressPools = default(IList), IList backendHttpSettingsCollection = default(IList), IList httpListeners = default(IList), IList urlPathMaps = default(IList), IList requestRoutingRules = default(IList), IList rewriteRuleSets = default(IList), IList redirectConfigurations = default(IList), ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration = default(ApplicationGatewayWebApplicationFirewallConfiguration), SubResource firewallPolicy = default(SubResource), bool? enableHttp2 = default(bool?), bool? enableFips = default(bool?), ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration = default(ApplicationGatewayAutoscaleConfiguration), IList privateLinkConfigurations = default(IList), IList privateEndpointConnections = default(IList), string resourceGuid = default(string), string provisioningState = default(string), IList customErrorConfigurations = default(IList), bool? forceFirewallPolicyAssociation = default(bool?), string etag = default(string), IList zones = default(IList), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) + public ApplicationGateway(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ApplicationGatewaySku sku = default(ApplicationGatewaySku), ApplicationGatewaySslPolicy sslPolicy = default(ApplicationGatewaySslPolicy), string operationalState = default(string), IList gatewayIPConfigurations = default(IList), IList authenticationCertificates = default(IList), IList trustedRootCertificates = default(IList), IList trustedClientCertificates = default(IList), IList sslCertificates = default(IList), IList frontendIPConfigurations = default(IList), IList frontendPorts = default(IList), IList probes = default(IList), IList backendAddressPools = default(IList), IList backendHttpSettingsCollection = default(IList), IList httpListeners = default(IList), IList sslProfiles = default(IList), IList urlPathMaps = default(IList), IList requestRoutingRules = default(IList), IList rewriteRuleSets = default(IList), IList redirectConfigurations = default(IList), ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration = default(ApplicationGatewayWebApplicationFirewallConfiguration), SubResource firewallPolicy = default(SubResource), bool? enableHttp2 = default(bool?), bool? enableFips = default(bool?), ApplicationGatewayAutoscaleConfiguration autoscaleConfiguration = default(ApplicationGatewayAutoscaleConfiguration), IList privateLinkConfigurations = default(IList), IList privateEndpointConnections = default(IList), string resourceGuid = default(string), string provisioningState = default(string), IList customErrorConfigurations = default(IList), bool? forceFirewallPolicyAssociation = default(bool?), string etag = default(string), IList zones = default(IList), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) : base(id, name, type, location, tags) { Sku = sku; @@ -129,6 +136,7 @@ public ApplicationGateway() GatewayIPConfigurations = gatewayIPConfigurations; AuthenticationCertificates = authenticationCertificates; TrustedRootCertificates = trustedRootCertificates; + TrustedClientCertificates = trustedClientCertificates; SslCertificates = sslCertificates; FrontendIPConfigurations = frontendIPConfigurations; FrontendPorts = frontendPorts; @@ -136,6 +144,7 @@ public ApplicationGateway() BackendAddressPools = backendAddressPools; BackendHttpSettingsCollection = backendHttpSettingsCollection; HttpListeners = httpListeners; + SslProfiles = sslProfiles; UrlPathMaps = urlPathMaps; RequestRoutingRules = requestRoutingRules; RewriteRuleSets = rewriteRuleSets; @@ -206,6 +215,14 @@ public ApplicationGateway() [JsonProperty(PropertyName = "properties.trustedRootCertificates")] public IList TrustedRootCertificates { get; set; } + /// + /// Gets or sets trusted client certificates of the application gateway + /// resource. For default limits, see [Application Gateway + /// limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + /// + [JsonProperty(PropertyName = "properties.trustedClientCertificates")] + public IList TrustedClientCertificates { get; set; } + /// /// Gets or sets SSL certificates of the application gateway resource. /// For default limits, see [Application Gateway @@ -260,6 +277,14 @@ public ApplicationGateway() [JsonProperty(PropertyName = "properties.httpListeners")] public IList HttpListeners { get; set; } + /// + /// Gets or sets SSL profiles of the application gateway resource. For + /// default limits, see [Application Gateway + /// limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + /// + [JsonProperty(PropertyName = "properties.sslProfiles")] + public IList SslProfiles { get; set; } + /// /// Gets or sets URL path map of the application gateway resource. For /// default limits, see [Application Gateway diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.cs new file mode 100644 index 0000000000000..e5977eb081815 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.cs @@ -0,0 +1,55 @@ +// +// 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.Linq; + + /// + /// Application gateway client authentication configuration. + /// + public partial class ApplicationGatewayClientAuthConfiguration + { + /// + /// Initializes a new instance of the + /// ApplicationGatewayClientAuthConfiguration class. + /// + public ApplicationGatewayClientAuthConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ApplicationGatewayClientAuthConfiguration class. + /// + /// Verify client certificate + /// issuer name on the application gateway. + public ApplicationGatewayClientAuthConfiguration(bool? verifyClientCertIssuerDN = default(bool?)) + { + VerifyClientCertIssuerDN = verifyClientCertIssuerDN; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets verify client certificate issuer name on the + /// application gateway. + /// + [JsonProperty(PropertyName = "verifyClientCertIssuerDN")] + public bool? VerifyClientCertIssuerDN { get; set; } + + } +} 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/ApplicationGatewayHttpListener.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayHttpListener.cs index 5763b4ed62120..064e3a05d8afb 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayHttpListener.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayHttpListener.cs @@ -46,6 +46,8 @@ public ApplicationGatewayHttpListener() /// Host name of HTTP listener. /// SSL certificate resource of an /// application gateway. + /// SSL profile resource of the application + /// gateway. /// Applicable only if /// protocol is https. Enables SNI for multi-hosting. /// The provisioning state of the HTTP @@ -62,7 +64,7 @@ public ApplicationGatewayHttpListener() /// A unique read-only string that changes whenever /// the resource is updated. /// Type of the resource. - public ApplicationGatewayHttpListener(string id = default(string), SubResource frontendIPConfiguration = default(SubResource), SubResource frontendPort = default(SubResource), string protocol = default(string), string hostName = default(string), SubResource sslCertificate = default(SubResource), bool? requireServerNameIndication = default(bool?), string provisioningState = default(string), IList customErrorConfigurations = default(IList), SubResource firewallPolicy = default(SubResource), IList hostNames = default(IList), string name = default(string), string etag = default(string), string type = default(string)) + public ApplicationGatewayHttpListener(string id = default(string), SubResource frontendIPConfiguration = default(SubResource), SubResource frontendPort = default(SubResource), string protocol = default(string), string hostName = default(string), SubResource sslCertificate = default(SubResource), SubResource sslProfile = default(SubResource), bool? requireServerNameIndication = default(bool?), string provisioningState = default(string), IList customErrorConfigurations = default(IList), SubResource firewallPolicy = default(SubResource), IList hostNames = default(IList), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { FrontendIPConfiguration = frontendIPConfiguration; @@ -70,6 +72,7 @@ public ApplicationGatewayHttpListener() Protocol = protocol; HostName = hostName; SslCertificate = sslCertificate; + SslProfile = sslProfile; RequireServerNameIndication = requireServerNameIndication; ProvisioningState = provisioningState; CustomErrorConfigurations = customErrorConfigurations; @@ -118,6 +121,12 @@ public ApplicationGatewayHttpListener() [JsonProperty(PropertyName = "properties.sslCertificate")] public SubResource SslCertificate { get; set; } + /// + /// Gets or sets SSL profile resource of the application gateway. + /// + [JsonProperty(PropertyName = "properties.sslProfile")] + public SubResource SslProfile { get; set; } + /// /// Gets or sets applicable only if protocol is https. Enables SNI for /// multi-hosting. 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/ApplicationGatewaySslProfile.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewaySslProfile.cs new file mode 100644 index 0000000000000..852340d444017 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewaySslProfile.cs @@ -0,0 +1,120 @@ +// +// 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; + + /// + /// SSL profile of an application gateway. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApplicationGatewaySslProfile : SubResource + { + /// + /// Initializes a new instance of the ApplicationGatewaySslProfile + /// class. + /// + public ApplicationGatewaySslProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApplicationGatewaySslProfile + /// class. + /// + /// Resource ID. + /// Array of references to + /// application gateway trusted client certificates. + /// SSL policy of the application gateway + /// resource. + /// Client authentication + /// configuration of the application gateway resource. + /// The provisioning state of the HTTP + /// listener resource. Possible values include: 'Succeeded', + /// 'Updating', 'Deleting', 'Failed' + /// Name of the SSL profile that is unique within an + /// Application Gateway. + /// A unique read-only string that changes whenever + /// the resource is updated. + /// Type of the resource. + public ApplicationGatewaySslProfile(string id = default(string), IList trustedClientCertificates = default(IList), ApplicationGatewaySslPolicy sslPolicy = default(ApplicationGatewaySslPolicy), ApplicationGatewayClientAuthConfiguration clientAuthConfiguration = default(ApplicationGatewayClientAuthConfiguration), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) + : base(id) + { + TrustedClientCertificates = trustedClientCertificates; + SslPolicy = sslPolicy; + ClientAuthConfiguration = clientAuthConfiguration; + ProvisioningState = provisioningState; + Name = name; + Etag = etag; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets array of references to application gateway trusted + /// client certificates. + /// + [JsonProperty(PropertyName = "properties.trustedClientCertificates")] + public IList TrustedClientCertificates { get; set; } + + /// + /// Gets or sets SSL policy of the application gateway resource. + /// + [JsonProperty(PropertyName = "properties.sslPolicy")] + public ApplicationGatewaySslPolicy SslPolicy { get; set; } + + /// + /// Gets or sets client authentication configuration of the application + /// gateway resource. + /// + [JsonProperty(PropertyName = "properties.clientAuthConfiguration")] + public ApplicationGatewayClientAuthConfiguration ClientAuthConfiguration { get; set; } + + /// + /// Gets the provisioning state of the HTTP listener resource. Possible + /// values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets or sets name of the SSL profile that is unique within an + /// Application Gateway. + /// + [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 type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.cs new file mode 100644 index 0000000000000..070e449852285 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.cs @@ -0,0 +1,98 @@ +// +// 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 client certificates of an application gateway. + /// + [Rest.Serialization.JsonTransformation] + public partial class ApplicationGatewayTrustedClientCertificate : SubResource + { + /// + /// Initializes a new instance of the + /// ApplicationGatewayTrustedClientCertificate class. + /// + public ApplicationGatewayTrustedClientCertificate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ApplicationGatewayTrustedClientCertificate class. + /// + /// Resource ID. + /// Certificate public data. + /// The provisioning state of the + /// trusted client certificate resource. Possible values include: + /// 'Succeeded', 'Updating', 'Deleting', 'Failed' + /// Name of the trusted client certificate that is + /// unique within an Application Gateway. + /// A unique read-only string that changes whenever + /// the resource is updated. + /// Type of the resource. + public ApplicationGatewayTrustedClientCertificate(string id = default(string), string data = default(string), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) + : base(id) + { + Data = data; + ProvisioningState = provisioningState; + Name = name; + Etag = etag; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets certificate public data. + /// + [JsonProperty(PropertyName = "properties.data")] + public string Data { get; set; } + + /// + /// Gets the provisioning state of the trusted client certificate + /// resource. Possible values include: 'Succeeded', 'Updating', + /// 'Deleting', 'Failed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets or sets name of the trusted client certificate that is unique + /// within an Application Gateway. + /// + [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 type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} 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/CommissionedState.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CommissionedState.cs new file mode 100644 index 0000000000000..18221cba3e9d5 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CommissionedState.cs @@ -0,0 +1,26 @@ +// +// 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 CommissionedState. + /// + public static class CommissionedState + { + public const string Provisioning = "Provisioning"; + public const string Provisioned = "Provisioned"; + public const string Commissioning = "Commissioning"; + public const string Commissioned = "Commissioned"; + public const string Decommissioning = "Decommissioning"; + public const string Deprovisioning = "Deprovisioning"; + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpoint.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpoint.cs index 295357bb33ce1..4fa629ec143b1 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpoint.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpoint.cs @@ -32,18 +32,28 @@ public ConnectionMonitorEndpoint() /// /// The name of the connection monitor /// endpoint. + /// The endpoint type. Possible values include: + /// 'AzureVM', 'AzureVNet', 'AzureSubnet', 'ExternalAddress', + /// 'MMAWorkspaceMachine', 'MMAWorkspaceNetwork' /// Resource ID of the connection monitor /// endpoint. /// Address of the connection monitor endpoint /// (IP or domain name). /// Filter for sub-items within the /// endpoint. - public ConnectionMonitorEndpoint(string name, string resourceId = default(string), string address = default(string), ConnectionMonitorEndpointFilter filter = default(ConnectionMonitorEndpointFilter)) + /// Endpoint scope. + /// Test coverage for the endpoint. + /// Possible values include: 'Default', 'Low', 'BelowAverage', + /// 'Average', 'AboveAverage', 'Full' + public ConnectionMonitorEndpoint(string name, string type = default(string), string resourceId = default(string), string address = default(string), ConnectionMonitorEndpointFilter filter = default(ConnectionMonitorEndpointFilter), ConnectionMonitorEndpointScope scope = default(ConnectionMonitorEndpointScope), string coverageLevel = default(string)) { Name = name; + Type = type; ResourceId = resourceId; Address = address; Filter = filter; + Scope = scope; + CoverageLevel = coverageLevel; CustomInit(); } @@ -58,6 +68,14 @@ public ConnectionMonitorEndpoint() [JsonProperty(PropertyName = "name")] public string Name { get; set; } + /// + /// Gets or sets the endpoint type. Possible values include: 'AzureVM', + /// 'AzureVNet', 'AzureSubnet', 'ExternalAddress', + /// 'MMAWorkspaceMachine', 'MMAWorkspaceNetwork' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + /// /// Gets or sets resource ID of the connection monitor endpoint. /// @@ -77,6 +95,20 @@ public ConnectionMonitorEndpoint() [JsonProperty(PropertyName = "filter")] public ConnectionMonitorEndpointFilter Filter { get; set; } + /// + /// Gets or sets endpoint scope. + /// + [JsonProperty(PropertyName = "scope")] + public ConnectionMonitorEndpointScope Scope { get; set; } + + /// + /// Gets or sets test coverage for the endpoint. Possible values + /// include: 'Default', 'Low', 'BelowAverage', 'Average', + /// 'AboveAverage', 'Full' + /// + [JsonProperty(PropertyName = "coverageLevel")] + public string CoverageLevel { get; set; } + /// /// Validate the object. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpointScope.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpointScope.cs new file mode 100644 index 0000000000000..530599545f24b --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpointScope.cs @@ -0,0 +1,67 @@ +// +// 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; + + /// + /// Describes the connection monitor endpoint scope. + /// + public partial class ConnectionMonitorEndpointScope + { + /// + /// Initializes a new instance of the ConnectionMonitorEndpointScope + /// class. + /// + public ConnectionMonitorEndpointScope() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConnectionMonitorEndpointScope + /// class. + /// + /// List of items which needs to be included to + /// the endpoint scope. + /// List of items which needs to be excluded from + /// the endpoint scope. + public ConnectionMonitorEndpointScope(IList include = default(IList), IList exclude = default(IList)) + { + Include = include; + Exclude = exclude; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of items which needs to be included to the + /// endpoint scope. + /// + [JsonProperty(PropertyName = "include")] + public IList Include { get; set; } + + /// + /// Gets or sets list of items which needs to be excluded from the + /// endpoint scope. + /// + [JsonProperty(PropertyName = "exclude")] + public IList Exclude { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.cs new file mode 100644 index 0000000000000..813ebe3edd797 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.cs @@ -0,0 +1,55 @@ +// +// 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.Linq; + + /// + /// Describes the connection monitor endpoint scope item. + /// + public partial class ConnectionMonitorEndpointScopeItem + { + /// + /// Initializes a new instance of the + /// ConnectionMonitorEndpointScopeItem class. + /// + public ConnectionMonitorEndpointScopeItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ConnectionMonitorEndpointScopeItem class. + /// + /// The address of the endpoint item. Supported + /// types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address. + public ConnectionMonitorEndpointScopeItem(string address = default(string)) + { + Address = address; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the address of the endpoint item. Supported types are + /// IPv4/IPv6 subnet mask or IPv4/IPv6 IP address. + /// + [JsonProperty(PropertyName = "address")] + public string Address { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.cs index aacca86413377..4eb367cbdcd15 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.cs @@ -34,10 +34,13 @@ public ConnectionMonitorTcpConfiguration() /// The port to connect to. /// Value indicating whether path /// evaluation with trace route should be disabled. - public ConnectionMonitorTcpConfiguration(int? port = default(int?), bool? disableTraceRoute = default(bool?)) + /// Destination port behavior. + /// Possible values include: 'None', 'ListenIfAvailable' + public ConnectionMonitorTcpConfiguration(int? port = default(int?), bool? disableTraceRoute = default(bool?), string destinationPortBehavior = default(string)) { Port = port; DisableTraceRoute = disableTraceRoute; + DestinationPortBehavior = destinationPortBehavior; CustomInit(); } @@ -59,5 +62,12 @@ public ConnectionMonitorTcpConfiguration() [JsonProperty(PropertyName = "disableTraceRoute")] public bool? DisableTraceRoute { get; set; } + /// + /// Gets or sets destination port behavior. Possible values include: + /// 'None', 'ListenIfAvailable' + /// + [JsonProperty(PropertyName = "destinationPortBehavior")] + public string DestinationPortBehavior { get; set; } + } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CoverageLevel.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CoverageLevel.cs new file mode 100644 index 0000000000000..47aaf660d4adf --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CoverageLevel.cs @@ -0,0 +1,26 @@ +// +// 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 CoverageLevel. + /// + public static class CoverageLevel + { + public const string Default = "Default"; + public const string Low = "Low"; + public const string BelowAverage = "BelowAverage"; + public const string Average = "Average"; + public const string AboveAverage = "AboveAverage"; + public const string Full = "Full"; + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CustomIpPrefix.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CustomIpPrefix.cs new file mode 100644 index 0000000000000..788d78abf62fd --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/CustomIpPrefix.cs @@ -0,0 +1,128 @@ +// +// 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; + + /// + /// Custom IP prefix resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class CustomIpPrefix : Resource + { + /// + /// Initializes a new instance of the CustomIpPrefix class. + /// + public CustomIpPrefix() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomIpPrefix class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource location. + /// Resource tags. + /// The prefix range in CIDR notation. Should + /// include the start address and the prefix length. + /// The commissioned state of the + /// Custom IP Prefix. Possible values include: 'Provisioning', + /// 'Provisioned', 'Commissioning', 'Commissioned', 'Decommissioning', + /// 'Deprovisioning' + /// The list of all referenced + /// PublicIpPrefixes. + /// The resource GUID property of the custom + /// IP prefix resource. + /// The provisioning state of the + /// custom IP prefix resource. Possible values include: 'Succeeded', + /// 'Updating', 'Deleting', 'Failed' + /// A unique read-only string that changes whenever + /// the resource is updated. + /// A list of availability zones denoting the IP + /// allocated for the resource needs to come from. + public CustomIpPrefix(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string cidr = default(string), string commissionedState = default(string), IList publicIpPrefixes = default(IList), string resourceGuid = default(string), string provisioningState = default(string), string etag = default(string), IList zones = default(IList)) + : base(id, name, type, location, tags) + { + Cidr = cidr; + CommissionedState = commissionedState; + PublicIpPrefixes = publicIpPrefixes; + ResourceGuid = resourceGuid; + ProvisioningState = provisioningState; + Etag = etag; + Zones = zones; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the prefix range in CIDR notation. Should include the + /// start address and the prefix length. + /// + [JsonProperty(PropertyName = "properties.cidr")] + public string Cidr { get; set; } + + /// + /// Gets or sets the commissioned state of the Custom IP Prefix. + /// Possible values include: 'Provisioning', 'Provisioned', + /// 'Commissioning', 'Commissioned', 'Decommissioning', + /// 'Deprovisioning' + /// + [JsonProperty(PropertyName = "properties.commissionedState")] + public string CommissionedState { get; set; } + + /// + /// Gets the list of all referenced PublicIpPrefixes. + /// + [JsonProperty(PropertyName = "properties.publicIpPrefixes")] + public IList PublicIpPrefixes { get; private set; } + + /// + /// Gets the resource GUID property of the custom IP prefix resource. + /// + [JsonProperty(PropertyName = "properties.resourceGuid")] + public string ResourceGuid { get; private set; } + + /// + /// Gets the provisioning state of the custom IP prefix resource. + /// Possible values include: 'Succeeded', 'Updating', 'Deleting', + /// 'Failed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { 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; } + + /// + /// Gets or sets a list of availability zones denoting the IP allocated + /// for the resource needs to come from. + /// + [JsonProperty(PropertyName = "zones")] + public IList Zones { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/DestinationPortBehavior.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/DestinationPortBehavior.cs new file mode 100644 index 0000000000000..70212ba85a103 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/DestinationPortBehavior.cs @@ -0,0 +1,22 @@ +// +// 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 DestinationPortBehavior. + /// + public static class DestinationPortBehavior + { + public const string None = "None"; + public const string ListenIfAvailable = "ListenIfAvailable"; + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/DscpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/DscpConfiguration.cs new file mode 100644 index 0000000000000..6cec06b0fc219 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/DscpConfiguration.cs @@ -0,0 +1,157 @@ +// +// 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; + + /// + /// DSCP Configuration in a resource group. + /// + [Rest.Serialization.JsonTransformation] + public partial class DscpConfiguration : Resource + { + /// + /// Initializes a new instance of the DscpConfiguration class. + /// + public DscpConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DscpConfiguration class. + /// + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource location. + /// Resource tags. + /// List of markings to be used in the + /// configuration. + /// Source IP ranges. + /// Destination IP ranges. + /// Sources port ranges. + /// Destination port + /// ranges. + /// RNM supported protocol types. Possible + /// values include: 'DoNotUse', 'Icmp', 'Tcp', 'Udp', 'Gre', 'Esp', + /// 'Ah', 'Vxlan', 'All' + /// Qos Collection ID generated by + /// RNM. + /// Associated Network + /// Interfaces to the DSCP Configuration. + /// The resource GUID property of the DSCP + /// Configuration resource. + /// The provisioning state of the DSCP + /// Configuration resource. Possible values include: 'Succeeded', + /// 'Updating', 'Deleting', 'Failed' + /// A unique read-only string that changes whenever + /// the resource is updated. + public DscpConfiguration(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), IList markings = default(IList), IList sourceIpRanges = default(IList), IList destinationIpRanges = default(IList), IList sourcePortRanges = default(IList), IList destinationPortRanges = default(IList), string protocol = default(string), string qosCollectionId = default(string), IList associatedNetworkInterfaces = default(IList), string resourceGuid = default(string), string provisioningState = default(string), string etag = default(string)) + : base(id, name, type, location, tags) + { + Markings = markings; + SourceIpRanges = sourceIpRanges; + DestinationIpRanges = destinationIpRanges; + SourcePortRanges = sourcePortRanges; + DestinationPortRanges = destinationPortRanges; + Protocol = protocol; + QosCollectionId = qosCollectionId; + AssociatedNetworkInterfaces = associatedNetworkInterfaces; + ResourceGuid = resourceGuid; + ProvisioningState = provisioningState; + Etag = etag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of markings to be used in the configuration. + /// + [JsonProperty(PropertyName = "properties.markings")] + public IList Markings { get; set; } + + /// + /// Gets or sets source IP ranges. + /// + [JsonProperty(PropertyName = "properties.sourceIpRanges")] + public IList SourceIpRanges { get; set; } + + /// + /// Gets or sets destination IP ranges. + /// + [JsonProperty(PropertyName = "properties.destinationIpRanges")] + public IList DestinationIpRanges { get; set; } + + /// + /// Gets or sets sources port ranges. + /// + [JsonProperty(PropertyName = "properties.sourcePortRanges")] + public IList SourcePortRanges { get; set; } + + /// + /// Gets or sets destination port ranges. + /// + [JsonProperty(PropertyName = "properties.destinationPortRanges")] + public IList DestinationPortRanges { get; set; } + + /// + /// Gets or sets RNM supported protocol types. Possible values include: + /// 'DoNotUse', 'Icmp', 'Tcp', 'Udp', 'Gre', 'Esp', 'Ah', 'Vxlan', + /// 'All' + /// + [JsonProperty(PropertyName = "properties.protocol")] + public string Protocol { get; set; } + + /// + /// Gets qos Collection ID generated by RNM. + /// + [JsonProperty(PropertyName = "properties.qosCollectionId")] + public string QosCollectionId { get; private set; } + + /// + /// Gets associated Network Interfaces to the DSCP Configuration. + /// + [JsonProperty(PropertyName = "properties.associatedNetworkInterfaces")] + public IList AssociatedNetworkInterfaces { get; private set; } + + /// + /// Gets the resource GUID property of the DSCP Configuration resource. + /// + [JsonProperty(PropertyName = "properties.resourceGuid")] + public string ResourceGuid { get; private set; } + + /// + /// Gets the provisioning state of the DSCP Configuration resource. + /// Possible values include: 'Succeeded', 'Updating', 'Deleting', + /// 'Failed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { 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; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/EndpointType.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/EndpointType.cs new file mode 100644 index 0000000000000..d7ccb50533169 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/EndpointType.cs @@ -0,0 +1,26 @@ +// +// 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 EndpointType. + /// + public static class EndpointType + { + public const string AzureVM = "AzureVM"; + public const string AzureVNet = "AzureVNet"; + public const string AzureSubnet = "AzureSubnet"; + public const string ExternalAddress = "ExternalAddress"; + public const string MMAWorkspaceMachine = "MMAWorkspaceMachine"; + public const string MMAWorkspaceNetwork = "MMAWorkspaceNetwork"; + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteCrossConnection.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteCrossConnection.cs index 2c7a4f2bd3d4b..ebe40b3cdb252 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteCrossConnection.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteCrossConnection.cs @@ -104,16 +104,16 @@ public ExpressRouteCrossConnection() public int? STag { get; private set; } /// - /// Gets or sets the peering location of the ExpressRoute circuit. + /// Gets the peering location of the ExpressRoute circuit. /// [JsonProperty(PropertyName = "properties.peeringLocation")] - public string PeeringLocation { get; set; } + public string PeeringLocation { get; private set; } /// - /// Gets or sets the circuit bandwidth In Mbps. + /// Gets the circuit bandwidth In Mbps. /// [JsonProperty(PropertyName = "properties.bandwidthInMbps")] - public int? BandwidthInMbps { get; set; } + public int? BandwidthInMbps { get; private set; } /// /// Gets or sets the ExpressRouteCircuit. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecCipher.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecCipher.cs index b22508cef22ef..8beb4832ee15c 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecCipher.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecCipher.cs @@ -16,7 +16,9 @@ namespace Microsoft.Azure.Management.Network.Models /// public static class ExpressRouteLinkMacSecCipher { - public const string GcmAes128 = "gcm-aes-128"; - public const string GcmAes256 = "gcm-aes-256"; + public const string GcmAes256 = "GcmAes256"; + public const string GcmAes128 = "GcmAes128"; + public const string GcmAesXpn128 = "GcmAesXpn128"; + public const string GcmAesXpn256 = "GcmAesXpn256"; } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.cs index 8b4b8636e5e64..18310880be87a 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.cs @@ -39,12 +39,15 @@ public ExpressRouteLinkMacSecConfig() /// Keyvault Secret Identifier URL /// containing Mac security CAK key. /// Mac security cipher. Possible values include: - /// 'gcm-aes-128', 'gcm-aes-256' - public ExpressRouteLinkMacSecConfig(string cknSecretIdentifier = default(string), string cakSecretIdentifier = default(string), string cipher = default(string)) + /// 'GcmAes256', 'GcmAes128', 'GcmAesXpn128', 'GcmAesXpn256' + /// Sci mode enabled/disabled. Possible values + /// include: 'Disabled', 'Enabled' + public ExpressRouteLinkMacSecConfig(string cknSecretIdentifier = default(string), string cakSecretIdentifier = default(string), string cipher = default(string), string sciState = default(string)) { CknSecretIdentifier = cknSecretIdentifier; CakSecretIdentifier = cakSecretIdentifier; Cipher = cipher; + SciState = sciState; CustomInit(); } @@ -69,10 +72,17 @@ public ExpressRouteLinkMacSecConfig() /// /// Gets or sets mac security cipher. Possible values include: - /// 'gcm-aes-128', 'gcm-aes-256' + /// 'GcmAes256', 'GcmAes128', 'GcmAesXpn128', 'GcmAesXpn256' /// [JsonProperty(PropertyName = "cipher")] public string Cipher { get; set; } + /// + /// Gets or sets sci mode enabled/disabled. Possible values include: + /// 'Disabled', 'Enabled' + /// + [JsonProperty(PropertyName = "sciState")] + public string SciState { 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/ExpressRouteLinkMacSecSciState.cs similarity index 82% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyIntrusionSystemMode.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecSciState.cs index 859b77200b7d7..f8ec4246ea011 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/FirewallPolicyIntrusionSystemMode.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ExpressRouteLinkMacSecSciState.cs @@ -12,11 +12,11 @@ namespace Microsoft.Azure.Management.Network.Models { /// - /// Defines values for FirewallPolicyIntrusionSystemMode. + /// Defines values for ExpressRouteLinkMacSecSciState. /// - public static class FirewallPolicyIntrusionSystemMode + public static class ExpressRouteLinkMacSecSciState { - public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; + public const string Enabled = "Enabled"; } } 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/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/GenerateExpressRoutePortsLOARequest.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/GenerateExpressRoutePortsLOARequest.cs new file mode 100644 index 0000000000000..7c1c8c97a42a6 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/GenerateExpressRoutePortsLOARequest.cs @@ -0,0 +1,67 @@ +// +// 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; + + /// + /// The customer name to be printed on a letter of authorization. + /// + public partial class GenerateExpressRoutePortsLOARequest + { + /// + /// Initializes a new instance of the + /// GenerateExpressRoutePortsLOARequest class. + /// + public GenerateExpressRoutePortsLOARequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// GenerateExpressRoutePortsLOARequest class. + /// + /// The customer name. + public GenerateExpressRoutePortsLOARequest(string customerName) + { + CustomerName = customerName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the customer name. + /// + [JsonProperty(PropertyName = "customerName")] + public string CustomerName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CustomerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CustomerName"); + } + } + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/GenerateExpressRoutePortsLOAResult.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/GenerateExpressRoutePortsLOAResult.cs new file mode 100644 index 0000000000000..977f46d9d80bb --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/GenerateExpressRoutePortsLOAResult.cs @@ -0,0 +1,54 @@ +// +// 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.Linq; + + /// + /// Response for GenerateExpressRoutePortsLOA API service call. + /// + public partial class GenerateExpressRoutePortsLOAResult + { + /// + /// Initializes a new instance of the + /// GenerateExpressRoutePortsLOAResult class. + /// + public GenerateExpressRoutePortsLOAResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// GenerateExpressRoutePortsLOAResult class. + /// + /// The content as a base64 encoded + /// string. + public GenerateExpressRoutePortsLOAResult(string encodedContent = default(string)) + { + EncodedContent = encodedContent; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the content as a base64 encoded string. + /// + [JsonProperty(PropertyName = "encodedContent")] + public string EncodedContent { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HopLink.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HopLink.cs index cb8b113376e1b..6dad06307919c 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HopLink.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HopLink.cs @@ -43,9 +43,10 @@ public HopLink() /// Maximum roundtrip time in /// milliseconds. /// List of issues. - /// Provides additional context on links. + /// Provides additional context on the + /// issue. /// Resource ID. - public HopLink(string nextHopId = default(string), string linkType = default(string), int? roundTripTimeMin = default(int?), int? roundTripTimeAvg = default(int?), int? roundTripTimeMax = default(int?), IList issues = default(IList), IDictionary context = default(IDictionary), string resourceId = default(string)) + public HopLink(string nextHopId = default(string), string linkType = default(string), int? roundTripTimeMin = default(int?), int? roundTripTimeAvg = default(int?), int? roundTripTimeMax = default(int?), IList issues = default(IList), IList> context = default(IList>), string resourceId = default(string)) { NextHopId = nextHopId; LinkType = linkType; @@ -100,10 +101,10 @@ public HopLink() public IList Issues { get; private set; } /// - /// Gets provides additional context on links. + /// Gets provides additional context on the issue. /// [JsonProperty(PropertyName = "context")] - public IDictionary Context { get; private set; } + public IList> Context { get; private set; } /// /// Gets resource ID. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HubPublicIPAddresses.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HubPublicIPAddresses.cs index 5670ead8303ba..613fba8f9cad8 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HubPublicIPAddresses.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HubPublicIPAddresses.cs @@ -31,10 +31,10 @@ public HubPublicIPAddresses() /// /// Initializes a new instance of the HubPublicIPAddresses class. /// - /// The number of Public IP addresses - /// associated with azure firewall. - /// Private IP Address associated with azure - /// firewall. + /// The list of Public IP addresses associated + /// with azure firewall or IP addresses to be retained. + /// The number of Public IP addresses associated + /// with azure firewall. public HubPublicIPAddresses(IList addresses = default(IList), int? count = default(int?)) { Addresses = addresses; @@ -48,14 +48,15 @@ public HubPublicIPAddresses() partial void CustomInit(); /// - /// Gets or sets the number of Public IP addresses associated with - /// azure firewall. + /// Gets or sets the list of Public IP addresses associated with azure + /// firewall or IP addresses to be retained. /// [JsonProperty(PropertyName = "addresses")] public IList Addresses { get; set; } /// - /// Gets or sets private IP Address associated with azure firewall. + /// Gets or sets the number of Public IP addresses associated with + /// azure firewall. /// [JsonProperty(PropertyName = "count")] public int? Count { get; set; } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HubRouteTable.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HubRouteTable.cs index 6af63b5da34f6..f4d6fae1faa83 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HubRouteTable.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/HubRouteTable.cs @@ -51,7 +51,7 @@ public HubRouteTable() /// A unique read-only string that changes whenever /// the resource is updated. /// Resource type. - public HubRouteTable(string id = default(string), IList routes = default(IList), IList labels = default(IList), IList associatedConnections = default(IList), IList propagatingConnections = default(IList), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) + public HubRouteTable(string id = default(string), IList routes = default(IList), IList labels = default(IList), IList associatedConnections = default(IList), IList propagatingConnections = default(IList), string provisioningState = default(string), string name = default(string), string etag = default(string), string type = default(string)) : base(id) { Routes = routes; @@ -86,13 +86,13 @@ public HubRouteTable() /// Gets list of all connections associated with this route table. /// [JsonProperty(PropertyName = "properties.associatedConnections")] - public IList AssociatedConnections { get; private set; } + public IList AssociatedConnections { get; private set; } /// /// Gets list of all connections that advertise to this route table. /// [JsonProperty(PropertyName = "properties.propagatingConnections")] - public IList PropagatingConnections { get; private set; } + public IList PropagatingConnections { get; private set; } /// /// Gets the provisioning state of the RouteTable resource. Possible 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/NetworkInterface.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterface.cs index dea89967e1294..b1c7113641828 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterface.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkInterface.cs @@ -61,6 +61,8 @@ public NetworkInterface() /// enabled on this network interface. /// A list of references to linked /// BareMetal resources. + /// A reference to the dscp + /// configuration to which the network interface is linked. /// The resource GUID property of the /// network interface resource. /// The provisioning state of the @@ -68,7 +70,7 @@ public NetworkInterface() /// 'Updating', 'Deleting', 'Failed' /// A unique read-only string that changes whenever /// the resource is updated. - public NetworkInterface(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualMachine = default(SubResource), NetworkSecurityGroup networkSecurityGroup = default(NetworkSecurityGroup), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), IList ipConfigurations = default(IList), IList tapConfigurations = default(IList), NetworkInterfaceDnsSettings dnsSettings = default(NetworkInterfaceDnsSettings), string macAddress = default(string), bool? primary = default(bool?), bool? enableAcceleratedNetworking = default(bool?), bool? enableIPForwarding = default(bool?), IList hostedWorkloads = default(IList), string resourceGuid = default(string), string provisioningState = default(string), string etag = default(string)) + public NetworkInterface(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualMachine = default(SubResource), NetworkSecurityGroup networkSecurityGroup = default(NetworkSecurityGroup), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), IList ipConfigurations = default(IList), IList tapConfigurations = default(IList), NetworkInterfaceDnsSettings dnsSettings = default(NetworkInterfaceDnsSettings), string macAddress = default(string), bool? primary = default(bool?), bool? enableAcceleratedNetworking = default(bool?), bool? enableIPForwarding = default(bool?), IList hostedWorkloads = default(IList), SubResource dscpConfiguration = default(SubResource), string resourceGuid = default(string), string provisioningState = default(string), string etag = default(string)) : base(id, name, type, location, tags) { VirtualMachine = virtualMachine; @@ -82,6 +84,7 @@ public NetworkInterface() EnableAcceleratedNetworking = enableAcceleratedNetworking; EnableIPForwarding = enableIPForwarding; HostedWorkloads = hostedWorkloads; + DscpConfiguration = dscpConfiguration; ResourceGuid = resourceGuid; ProvisioningState = provisioningState; Etag = etag; @@ -163,6 +166,13 @@ public NetworkInterface() [JsonProperty(PropertyName = "properties.hostedWorkloads")] public IList HostedWorkloads { get; private set; } + /// + /// Gets a reference to the dscp configuration to which the network + /// interface is linked. + /// + [JsonProperty(PropertyName = "properties.dscpConfiguration")] + public SubResource DscpConfiguration { get; private set; } + /// /// Gets the resource GUID property of the network interface resource. /// 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/NetworkVirtualAppliance.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkVirtualAppliance.cs index 50de7f52ed240..5ecf2f94923a4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkVirtualAppliance.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/NetworkVirtualAppliance.cs @@ -40,6 +40,7 @@ public NetworkVirtualAppliance() /// Resource location. /// Resource tags. /// Network Virtual Appliance SKU. + /// Address Prefix. /// BootStrapConfigurationBlobs /// storage URLs. @@ -62,10 +63,11 @@ public NetworkVirtualAppliance() /// to cloud-init and config blob. /// A unique read-only string that changes whenever /// the resource is updated. - public NetworkVirtualAppliance(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), VirtualApplianceSkuProperties nvaSku = default(VirtualApplianceSkuProperties), IList bootStrapConfigurationBlobs = default(IList), SubResource virtualHub = default(SubResource), IList cloudInitConfigurationBlobs = default(IList), string cloudInitConfiguration = default(string), long? virtualApplianceAsn = default(long?), IList virtualApplianceNics = default(IList), IList virtualApplianceSites = default(IList), string provisioningState = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), string etag = default(string)) + public NetworkVirtualAppliance(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), VirtualApplianceSkuProperties nvaSku = default(VirtualApplianceSkuProperties), string addressPrefix = default(string), IList bootStrapConfigurationBlobs = default(IList), SubResource virtualHub = default(SubResource), IList cloudInitConfigurationBlobs = default(IList), string cloudInitConfiguration = default(string), long? virtualApplianceAsn = default(long?), IList virtualApplianceNics = default(IList), IList virtualApplianceSites = default(IList), string provisioningState = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), string etag = default(string)) : base(id, name, type, location, tags) { NvaSku = nvaSku; + AddressPrefix = addressPrefix; BootStrapConfigurationBlobs = bootStrapConfigurationBlobs; VirtualHub = virtualHub; CloudInitConfigurationBlobs = cloudInitConfigurationBlobs; @@ -90,6 +92,12 @@ public NetworkVirtualAppliance() [JsonProperty(PropertyName = "properties.nvaSku")] public VirtualApplianceSkuProperties NvaSku { get; set; } + /// + /// Gets address Prefix. + /// + [JsonProperty(PropertyName = "properties.addressPrefix")] + public string AddressPrefix { get; private set; } + /// /// Gets or sets bootStrapConfigurationBlobs storage URLs. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/O365BreakOutCategoryPolicies.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/O365BreakOutCategoryPolicies.cs new file mode 100644 index 0000000000000..3281a1c1a04d0 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/O365BreakOutCategoryPolicies.cs @@ -0,0 +1,70 @@ +// +// 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.Linq; + + /// + /// Office365 breakout categories. + /// + public partial class O365BreakOutCategoryPolicies + { + /// + /// Initializes a new instance of the O365BreakOutCategoryPolicies + /// class. + /// + public O365BreakOutCategoryPolicies() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the O365BreakOutCategoryPolicies + /// class. + /// + /// Flag to control allow category. + /// Flag to control optimize category. + /// Flag to control default + /// category. + public O365BreakOutCategoryPolicies(bool? allow = default(bool?), bool? optimize = default(bool?), bool? defaultProperty = default(bool?)) + { + Allow = allow; + Optimize = optimize; + DefaultProperty = defaultProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets flag to control allow category. + /// + [JsonProperty(PropertyName = "allow")] + public bool? Allow { get; set; } + + /// + /// Gets or sets flag to control optimize category. + /// + [JsonProperty(PropertyName = "optimize")] + public bool? Optimize { get; set; } + + /// + /// Gets or sets flag to control default category. + /// + [JsonProperty(PropertyName = "default")] + public bool? DefaultProperty { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/O365PolicyProperties.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/O365PolicyProperties.cs new file mode 100644 index 0000000000000..011a7fab3a400 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/O365PolicyProperties.cs @@ -0,0 +1,52 @@ +// +// 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.Linq; + + /// + /// The Office365 breakout policy. + /// + public partial class O365PolicyProperties + { + /// + /// Initializes a new instance of the O365PolicyProperties class. + /// + public O365PolicyProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the O365PolicyProperties class. + /// + /// Office365 breakout + /// categories. + public O365PolicyProperties(O365BreakOutCategoryPolicies breakOutCategories = default(O365BreakOutCategoryPolicies)) + { + BreakOutCategories = breakOutCategories; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets office365 breakout categories. + /// + [JsonProperty(PropertyName = "breakOutCategories")] + public O365BreakOutCategoryPolicies BreakOutCategories { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/P2SConnectionConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/P2SConnectionConfiguration.cs index 34fe2d90006e8..c1ed62f932437 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/P2SConnectionConfiguration.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/P2SConnectionConfiguration.cs @@ -39,6 +39,9 @@ public P2SConnectionConfiguration() /// The Routing Configuration /// indicating the associated and propagated route tables on this /// connection. + /// Flag indicating whether the + /// enable internet security flag is turned on for the P2S Connections + /// or not. /// The provisioning state of the /// P2SConnectionConfiguration resource. Possible values include: /// 'Succeeded', 'Updating', 'Deleting', 'Failed' @@ -47,11 +50,12 @@ public P2SConnectionConfiguration() /// resource. /// A unique read-only string that changes whenever /// the resource is updated. - public P2SConnectionConfiguration(string id = default(string), AddressSpace vpnClientAddressPool = default(AddressSpace), RoutingConfiguration routingConfiguration = default(RoutingConfiguration), string provisioningState = default(string), string name = default(string), string etag = default(string)) + public P2SConnectionConfiguration(string id = default(string), AddressSpace vpnClientAddressPool = default(AddressSpace), RoutingConfiguration routingConfiguration = default(RoutingConfiguration), bool? enableInternetSecurity = default(bool?), string provisioningState = default(string), string name = default(string), string etag = default(string)) : base(id) { VpnClientAddressPool = vpnClientAddressPool; RoutingConfiguration = routingConfiguration; + EnableInternetSecurity = enableInternetSecurity; ProvisioningState = provisioningState; Name = name; Etag = etag; @@ -77,6 +81,13 @@ public P2SConnectionConfiguration() [JsonProperty(PropertyName = "properties.routingConfiguration")] public RoutingConfiguration RoutingConfiguration { get; set; } + /// + /// Gets or sets flag indicating whether the enable internet security + /// flag is turned on for the P2S Connections or not. + /// + [JsonProperty(PropertyName = "properties.enableInternetSecurity")] + public bool? EnableInternetSecurity { get; set; } + /// /// Gets the provisioning state of the P2SConnectionConfiguration /// resource. Possible values include: 'Succeeded', 'Updating', diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ProtocolType.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ProtocolType.cs new file mode 100644 index 0000000000000..59f0b26f29d9c --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/ProtocolType.cs @@ -0,0 +1,29 @@ +// +// 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 ProtocolType. + /// + public static class ProtocolType + { + public const string DoNotUse = "DoNotUse"; + public const string Icmp = "Icmp"; + public const string Tcp = "Tcp"; + public const string Udp = "Udp"; + public const string Gre = "Gre"; + public const string Esp = "Esp"; + public const string Ah = "Ah"; + public const string Vxlan = "Vxlan"; + public const string All = "All"; + } +} 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/PublicIPPrefix.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPPrefix.cs index 767dc8fcd8310..2220e41c897a5 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPPrefix.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/PublicIPPrefix.cs @@ -52,6 +52,8 @@ public PublicIPPrefix() /// The reference to /// load balancer frontend IP configuration associated with the public /// IP prefix. + /// The customIpPrefix that this prefix is + /// associated with. /// The resource GUID property of the public /// IP prefix resource. /// The provisioning state of the @@ -61,7 +63,7 @@ public PublicIPPrefix() /// the resource is updated. /// A list of availability zones denoting the IP /// allocated for the resource needs to come from. - public PublicIPPrefix(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), PublicIPPrefixSku sku = default(PublicIPPrefixSku), string publicIPAddressVersion = default(string), IList ipTags = default(IList), int? prefixLength = default(int?), string ipPrefix = default(string), IList publicIPAddresses = default(IList), SubResource loadBalancerFrontendIpConfiguration = default(SubResource), string resourceGuid = default(string), string provisioningState = default(string), string etag = default(string), IList zones = default(IList)) + public PublicIPPrefix(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), PublicIPPrefixSku sku = default(PublicIPPrefixSku), string publicIPAddressVersion = default(string), IList ipTags = default(IList), int? prefixLength = default(int?), string ipPrefix = default(string), IList publicIPAddresses = default(IList), SubResource loadBalancerFrontendIpConfiguration = default(SubResource), SubResource customIPPrefix = default(SubResource), string resourceGuid = default(string), string provisioningState = default(string), string etag = default(string), IList zones = default(IList)) : base(id, name, type, location, tags) { Sku = sku; @@ -71,6 +73,7 @@ public PublicIPPrefix() IpPrefix = ipPrefix; PublicIPAddresses = publicIPAddresses; LoadBalancerFrontendIpConfiguration = loadBalancerFrontendIpConfiguration; + CustomIPPrefix = customIPPrefix; ResourceGuid = resourceGuid; ProvisioningState = provisioningState; Etag = etag; @@ -127,6 +130,13 @@ public PublicIPPrefix() [JsonProperty(PropertyName = "properties.loadBalancerFrontendIpConfiguration")] public SubResource LoadBalancerFrontendIpConfiguration { get; private set; } + /// + /// Gets or sets the customIpPrefix that this prefix is associated + /// with. + /// + [JsonProperty(PropertyName = "properties.customIPPrefix")] + public SubResource CustomIPPrefix { get; set; } + /// /// Gets the resource GUID property of the public IP prefix resource. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/QosIpRange.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/QosIpRange.cs new file mode 100644 index 0000000000000..159634daca03a --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/QosIpRange.cs @@ -0,0 +1,59 @@ +// +// 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.Linq; + + /// + /// Qos Traffic Profiler IP Range properties. + /// + public partial class QosIpRange + { + /// + /// Initializes a new instance of the QosIpRange class. + /// + public QosIpRange() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QosIpRange class. + /// + /// Start IP Address. + /// End IP Address. + public QosIpRange(string startIP = default(string), string endIP = default(string)) + { + StartIP = startIP; + EndIP = endIP; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets start IP Address. + /// + [JsonProperty(PropertyName = "startIP")] + public string StartIP { get; set; } + + /// + /// Gets or sets end IP Address. + /// + [JsonProperty(PropertyName = "endIP")] + public string EndIP { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/QosPortRange.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/QosPortRange.cs new file mode 100644 index 0000000000000..b2719aff4f010 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/QosPortRange.cs @@ -0,0 +1,59 @@ +// +// 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.Linq; + + /// + /// Qos Traffic Profiler Port range properties. + /// + public partial class QosPortRange + { + /// + /// Initializes a new instance of the QosPortRange class. + /// + public QosPortRange() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QosPortRange class. + /// + /// Qos Port Range start. + /// Qos Port Range end. + public QosPortRange(int? start = default(int?), int? end = default(int?)) + { + Start = start; + End = end; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets qos Port Range start. + /// + [JsonProperty(PropertyName = "start")] + public int? Start { get; set; } + + /// + /// Gets or sets qos Port Range end. + /// + [JsonProperty(PropertyName = "end")] + public int? End { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHub.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHub.cs index f08a000939a97..045a35242f976 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHub.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHub.cs @@ -71,9 +71,11 @@ public VirtualHub() /// IpConfigurations. /// VirtualRouter ASN. /// VirtualRouter IPs. + /// Flag to control + /// route propogation for VirtualRouter hub. /// A unique read-only string that changes whenever /// the resource is updated. - public VirtualHub(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualWan = default(SubResource), SubResource vpnGateway = default(SubResource), SubResource p2SVpnGateway = default(SubResource), SubResource expressRouteGateway = default(SubResource), SubResource azureFirewall = default(SubResource), SubResource securityPartnerProvider = default(SubResource), string addressPrefix = default(string), VirtualHubRouteTable routeTable = default(VirtualHubRouteTable), string provisioningState = default(string), string securityProviderName = default(string), IList virtualHubRouteTableV2s = default(IList), string sku = default(string), string routingState = default(string), IList bgpConnections = default(IList), IList ipConfigurations = default(IList), long? virtualRouterAsn = default(long?), IList virtualRouterIps = default(IList), string etag = default(string)) + public VirtualHub(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualWan = default(SubResource), SubResource vpnGateway = default(SubResource), SubResource p2SVpnGateway = default(SubResource), SubResource expressRouteGateway = default(SubResource), SubResource azureFirewall = default(SubResource), SubResource securityPartnerProvider = default(SubResource), string addressPrefix = default(string), VirtualHubRouteTable routeTable = default(VirtualHubRouteTable), string provisioningState = default(string), string securityProviderName = default(string), IList virtualHubRouteTableV2s = default(IList), string sku = default(string), string routingState = default(string), IList bgpConnections = default(IList), IList ipConfigurations = default(IList), long? virtualRouterAsn = default(long?), IList virtualRouterIps = default(IList), bool? enableVirtualRouterRoutePropogation = default(bool?), string etag = default(string)) : base(id, name, type, location, tags) { VirtualWan = virtualWan; @@ -93,6 +95,7 @@ public VirtualHub() IpConfigurations = ipConfigurations; VirtualRouterAsn = virtualRouterAsn; VirtualRouterIps = virtualRouterIps; + EnableVirtualRouterRoutePropogation = enableVirtualRouterRoutePropogation; Etag = etag; CustomInit(); } @@ -209,6 +212,13 @@ public VirtualHub() [JsonProperty(PropertyName = "properties.virtualRouterIps")] public IList VirtualRouterIps { get; set; } + /// + /// Gets or sets flag to control route propogation for VirtualRouter + /// hub. + /// + [JsonProperty(PropertyName = "properties.enableVirtualRouterRoutePropogation")] + public bool? EnableVirtualRouterRoutePropogation { get; set; } + /// /// Gets a unique read-only string that changes whenever the resource /// is updated. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHubEffectiveRouteList.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHubEffectiveRouteEffectiveRouteList.cs similarity index 74% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHubEffectiveRouteList.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHubEffectiveRouteEffectiveRouteList.cs index b3010110a689d..18b8dfa79cc17 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHubEffectiveRouteList.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualHubEffectiveRouteEffectiveRouteList.cs @@ -18,24 +18,24 @@ namespace Microsoft.Azure.Management.Network.Models /// /// EffectiveRoutes List. /// - public partial class VirtualHubEffectiveRouteList + public partial class VirtualHubEffectiveRouteEffectiveRouteList { /// - /// Initializes a new instance of the VirtualHubEffectiveRouteList - /// class. + /// Initializes a new instance of the + /// VirtualHubEffectiveRouteEffectiveRouteList class. /// - public VirtualHubEffectiveRouteList() + public VirtualHubEffectiveRouteEffectiveRouteList() { CustomInit(); } /// - /// Initializes a new instance of the VirtualHubEffectiveRouteList - /// class. + /// Initializes a new instance of the + /// VirtualHubEffectiveRouteEffectiveRouteList class. /// /// The list of effective routes configured on the /// virtual hub or the specified resource. - public VirtualHubEffectiveRouteList(IList value = default(IList)) + public VirtualHubEffectiveRouteEffectiveRouteList(IList value = default(IList)) { Value = value; CustomInit(); diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetwork.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetwork.cs index 05f88b682629e..b2016696970d6 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetwork.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetwork.cs @@ -180,6 +180,16 @@ public VirtualNetwork() /// public virtual void Validate() { + if (VirtualNetworkPeerings != null) + { + foreach (var element in VirtualNetworkPeerings) + { + if (element != null) + { + element.Validate(); + } + } + } if (BgpCommunities != null) { BgpCommunities.Validate(); 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/VirtualNetworkPeering.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkPeering.cs index f77aa0eb5e9c9..68807c1c41368 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkPeering.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VirtualNetworkPeering.cs @@ -54,6 +54,8 @@ public VirtualNetworkPeering() /// (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). /// The reference to the remote /// virtual network address space. + /// The reference to the remote + /// virtual network's Bgp Communities. /// The status of the virtual network /// peering. Possible values include: 'Initiated', 'Connected', /// 'Disconnected' @@ -65,7 +67,7 @@ public VirtualNetworkPeering() /// resource. /// A unique read-only string that changes whenever /// the resource is updated. - public VirtualNetworkPeering(string id = default(string), bool? allowVirtualNetworkAccess = default(bool?), bool? allowForwardedTraffic = default(bool?), bool? allowGatewayTransit = default(bool?), bool? useRemoteGateways = default(bool?), SubResource remoteVirtualNetwork = default(SubResource), AddressSpace remoteAddressSpace = default(AddressSpace), string peeringState = default(string), string provisioningState = default(string), string name = default(string), string etag = default(string)) + public VirtualNetworkPeering(string id = default(string), bool? allowVirtualNetworkAccess = default(bool?), bool? allowForwardedTraffic = default(bool?), bool? allowGatewayTransit = default(bool?), bool? useRemoteGateways = default(bool?), SubResource remoteVirtualNetwork = default(SubResource), AddressSpace remoteAddressSpace = default(AddressSpace), VirtualNetworkBgpCommunities remoteBgpCommunities = default(VirtualNetworkBgpCommunities), string peeringState = default(string), string provisioningState = default(string), string name = default(string), string etag = default(string)) : base(id) { AllowVirtualNetworkAccess = allowVirtualNetworkAccess; @@ -74,6 +76,7 @@ public VirtualNetworkPeering() UseRemoteGateways = useRemoteGateways; RemoteVirtualNetwork = remoteVirtualNetwork; RemoteAddressSpace = remoteAddressSpace; + RemoteBgpCommunities = remoteBgpCommunities; PeeringState = peeringState; ProvisioningState = provisioningState; Name = name; @@ -135,6 +138,13 @@ public VirtualNetworkPeering() [JsonProperty(PropertyName = "properties.remoteAddressSpace")] public AddressSpace RemoteAddressSpace { get; set; } + /// + /// Gets or sets the reference to the remote virtual network's Bgp + /// Communities. + /// + [JsonProperty(PropertyName = "properties.remoteBgpCommunities")] + public VirtualNetworkBgpCommunities RemoteBgpCommunities { get; set; } + /// /// Gets or sets the status of the virtual network peering. Possible /// values include: 'Initiated', 'Connected', 'Disconnected' @@ -164,5 +174,18 @@ public VirtualNetworkPeering() [JsonProperty(PropertyName = "etag")] public string Etag { get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RemoteBgpCommunities != null) + { + RemoteBgpCommunities.Validate(); + } + } } } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnection.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnection.cs index f8dd6273da75a..1869c81d7aa52 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnection.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnection.cs @@ -38,8 +38,8 @@ public VpnConnection() /// Id of the connected vpn site. /// Routing weight for vpn /// connection. - /// The dead peer detection timeout for - /// a vpn connection in seconds. + /// DPD timeout in seconds for vpn + /// connection. /// The connection status. Possible /// values include: 'Unknown', 'Connecting', 'Connected', /// 'NotConnected' @@ -120,8 +120,7 @@ public VpnConnection() public int? RoutingWeight { get; set; } /// - /// Gets or sets the dead peer detection timeout for a vpn connection - /// in seconds. + /// Gets or sets DPD timeout in seconds for vpn connection. /// [JsonProperty(PropertyName = "properties.dpdTimeoutSeconds")] public int? DpdTimeoutSeconds { get; set; } diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnectionPacketCaptureStartParameters.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnectionPacketCaptureStartParameters.cs new file mode 100644 index 0000000000000..4ed8ee034b34e --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnectionPacketCaptureStartParameters.cs @@ -0,0 +1,66 @@ +// +// 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; + + /// + /// Vpn Connection packet capture parameters supplied to start packet + /// capture on gateway connection. + /// + public partial class VpnConnectionPacketCaptureStartParameters + { + /// + /// Initializes a new instance of the + /// VpnConnectionPacketCaptureStartParameters class. + /// + public VpnConnectionPacketCaptureStartParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// VpnConnectionPacketCaptureStartParameters class. + /// + /// Start Packet capture parameters on vpn + /// connection. + /// List of site link connection + /// names. + public VpnConnectionPacketCaptureStartParameters(string filterData = default(string), IList linkConnectionNames = default(IList)) + { + FilterData = filterData; + LinkConnectionNames = linkConnectionNames; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets start Packet capture parameters on vpn connection. + /// + [JsonProperty(PropertyName = "filterData")] + public string FilterData { get; set; } + + /// + /// Gets or sets list of site link connection names. + /// + [JsonProperty(PropertyName = "linkConnectionNames")] + public IList LinkConnectionNames { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnectionPacketCaptureStopParameters.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnectionPacketCaptureStopParameters.cs new file mode 100644 index 0000000000000..7781b7eceeb89 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnConnectionPacketCaptureStopParameters.cs @@ -0,0 +1,66 @@ +// +// 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; + + /// + /// Vpn Connection packet capture parameters supplied to stop packet + /// capture on gateway connection. + /// + public partial class VpnConnectionPacketCaptureStopParameters + { + /// + /// Initializes a new instance of the + /// VpnConnectionPacketCaptureStopParameters class. + /// + public VpnConnectionPacketCaptureStopParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// VpnConnectionPacketCaptureStopParameters class. + /// + /// SAS url for packet capture on vpn + /// connection. + /// List of site link connection + /// names. + public VpnConnectionPacketCaptureStopParameters(string sasUrl = default(string), IList linkConnectionNames = default(IList)) + { + SasUrl = sasUrl; + LinkConnectionNames = linkConnectionNames; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SAS url for packet capture on vpn connection. + /// + [JsonProperty(PropertyName = "sasUrl")] + public string SasUrl { get; set; } + + /// + /// Gets or sets list of site link connection names. + /// + [JsonProperty(PropertyName = "linkConnectionNames")] + public IList LinkConnectionNames { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGateway.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGateway.cs index d87212c9ea99a..6b288659e1f13 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGateway.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGateway.cs @@ -50,9 +50,11 @@ public VpnGateway() /// 'Deleting', 'Failed' /// The scale unit for this vpn /// gateway. + /// List of all IPs configured on the + /// gateway. /// A unique read-only string that changes whenever /// the resource is updated. - public VpnGateway(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualHub = default(SubResource), IList connections = default(IList), BgpSettings bgpSettings = default(BgpSettings), string provisioningState = default(string), int? vpnGatewayScaleUnit = default(int?), string etag = default(string)) + public VpnGateway(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualHub = default(SubResource), IList connections = default(IList), BgpSettings bgpSettings = default(BgpSettings), string provisioningState = default(string), int? vpnGatewayScaleUnit = default(int?), IList ipConfigurations = default(IList), string etag = default(string)) : base(id, name, type, location, tags) { VirtualHub = virtualHub; @@ -60,6 +62,7 @@ public VpnGateway() BgpSettings = bgpSettings; ProvisioningState = provisioningState; VpnGatewayScaleUnit = vpnGatewayScaleUnit; + IpConfigurations = ipConfigurations; Etag = etag; CustomInit(); } @@ -100,6 +103,12 @@ public VpnGateway() [JsonProperty(PropertyName = "properties.vpnGatewayScaleUnit")] public int? VpnGatewayScaleUnit { get; set; } + /// + /// Gets list of all IPs configured on the gateway. + /// + [JsonProperty(PropertyName = "properties.ipConfigurations")] + public IList IpConfigurations { get; private set; } + /// /// Gets a unique read-only string that changes whenever the resource /// is updated. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGatewayIpConfiguration.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGatewayIpConfiguration.cs new file mode 100644 index 0000000000000..2faef676d43b9 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGatewayIpConfiguration.cs @@ -0,0 +1,71 @@ +// +// 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.Linq; + + /// + /// IP Configuration of a VPN Gateway Resource. + /// + public partial class VpnGatewayIpConfiguration + { + /// + /// Initializes a new instance of the VpnGatewayIpConfiguration class. + /// + public VpnGatewayIpConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VpnGatewayIpConfiguration class. + /// + /// The identifier of the IP configuration for a VPN + /// Gateway. + /// The public IP address of this IP + /// configuration. + /// The private IP address of this IP + /// configuration. + public VpnGatewayIpConfiguration(string id = default(string), string publicIpAddress = default(string), string privateIpAddress = default(string)) + { + Id = id; + PublicIpAddress = publicIpAddress; + PrivateIpAddress = privateIpAddress; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identifier of the IP configuration for a VPN + /// Gateway. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets or sets the public IP address of this IP configuration. + /// + [JsonProperty(PropertyName = "publicIpAddress")] + public string PublicIpAddress { get; set; } + + /// + /// Gets or sets the private IP address of this IP configuration. + /// + [JsonProperty(PropertyName = "privateIpAddress")] + public string PrivateIpAddress { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGatewayPacketCaptureStartParameters.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGatewayPacketCaptureStartParameters.cs new file mode 100644 index 0000000000000..84f09fab11300 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGatewayPacketCaptureStartParameters.cs @@ -0,0 +1,54 @@ +// +// 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.Linq; + + /// + /// Start packet capture parameters. + /// + public partial class VpnGatewayPacketCaptureStartParameters + { + /// + /// Initializes a new instance of the + /// VpnGatewayPacketCaptureStartParameters class. + /// + public VpnGatewayPacketCaptureStartParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// VpnGatewayPacketCaptureStartParameters class. + /// + /// Start Packet capture parameters on vpn + /// gateway. + public VpnGatewayPacketCaptureStartParameters(string filterData = default(string)) + { + FilterData = filterData; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets start Packet capture parameters on vpn gateway. + /// + [JsonProperty(PropertyName = "filterData")] + public string FilterData { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGatewayPacketCaptureStopParameters.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGatewayPacketCaptureStopParameters.cs new file mode 100644 index 0000000000000..d49f2bc055158 --- /dev/null +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnGatewayPacketCaptureStopParameters.cs @@ -0,0 +1,54 @@ +// +// 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.Linq; + + /// + /// Stop packet capture parameters. + /// + public partial class VpnGatewayPacketCaptureStopParameters + { + /// + /// Initializes a new instance of the + /// VpnGatewayPacketCaptureStopParameters class. + /// + public VpnGatewayPacketCaptureStopParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// VpnGatewayPacketCaptureStopParameters class. + /// + /// SAS url for packet capture on vpn + /// gateway. + public VpnGatewayPacketCaptureStopParameters(string sasUrl = default(string)) + { + SasUrl = sasUrl; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SAS url for packet capture on vpn gateway. + /// + [JsonProperty(PropertyName = "sasUrl")] + public string SasUrl { get; set; } + + } +} diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSite.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSite.cs index b1bc2be09170a..31f9661aa11e6 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSite.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Models/VpnSite.cs @@ -53,9 +53,10 @@ public VpnSite() /// 'Deleting', 'Failed' /// IsSecuritySite flag. /// List of all vpn site links. + /// Office365 Policy. /// A unique read-only string that changes whenever /// the resource is updated. - public VpnSite(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualWan = default(SubResource), DeviceProperties deviceProperties = default(DeviceProperties), string ipAddress = default(string), string siteKey = default(string), AddressSpace addressSpace = default(AddressSpace), BgpSettings bgpProperties = default(BgpSettings), string provisioningState = default(string), bool? isSecuritySite = default(bool?), IList vpnSiteLinks = default(IList), string etag = default(string)) + public VpnSite(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), SubResource virtualWan = default(SubResource), DeviceProperties deviceProperties = default(DeviceProperties), string ipAddress = default(string), string siteKey = default(string), AddressSpace addressSpace = default(AddressSpace), BgpSettings bgpProperties = default(BgpSettings), string provisioningState = default(string), bool? isSecuritySite = default(bool?), IList vpnSiteLinks = default(IList), O365PolicyProperties o365Policy = default(O365PolicyProperties), string etag = default(string)) : base(id, name, type, location, tags) { VirtualWan = virtualWan; @@ -67,6 +68,7 @@ public VpnSite() ProvisioningState = provisioningState; IsSecuritySite = isSecuritySite; VpnSiteLinks = vpnSiteLinks; + O365Policy = o365Policy; Etag = etag; CustomInit(); } @@ -132,6 +134,12 @@ public VpnSite() [JsonProperty(PropertyName = "properties.vpnSiteLinks")] public IList VpnSiteLinks { get; set; } + /// + /// Gets or sets office365 Policy. + /// + [JsonProperty(PropertyName = "properties.o365Policy")] + public O365PolicyProperties O365Policy { get; set; } + /// /// Gets a unique read-only string that changes whenever the resource /// is updated. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NatGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NatGatewaysOperations.cs index 214dd27d8b58d..878a5b985e2de 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NatGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NatGatewaysOperations.cs @@ -119,7 +119,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -720,7 +720,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1092,7 +1092,7 @@ internal NatGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceIPConfigurationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceIPConfigurationsOperations.cs index 7e99e41287b32..46f31cd68d0ca 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceIPConfigurationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceIPConfigurationsOperations.cs @@ -94,7 +94,7 @@ internal NetworkInterfaceIPConfigurationsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal NetworkInterfaceIPConfigurationsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceLoadBalancersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceLoadBalancersOperations.cs index 5cf992e0ab176..a0ba8f7f6ca4c 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceLoadBalancersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceLoadBalancersOperations.cs @@ -94,7 +94,7 @@ internal NetworkInterfaceLoadBalancersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceTapConfigurationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceTapConfigurationsOperations.cs index 1fa92defd20ad..c564d65242bfc 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceTapConfigurationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfaceTapConfigurationsOperations.cs @@ -126,7 +126,7 @@ internal NetworkInterfaceTapConfigurationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal NetworkInterfaceTapConfigurationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -548,7 +548,7 @@ internal NetworkInterfaceTapConfigurationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -740,7 +740,7 @@ internal NetworkInterfaceTapConfigurationsOperations(NetworkManagementClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfacesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfacesOperations.cs index 4d701a1981b39..d253420df478c 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfacesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkInterfacesOperations.cs @@ -119,7 +119,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -720,7 +720,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2022,7 +2022,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2205,7 +2205,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2424,7 +2424,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2618,7 +2618,7 @@ internal NetworkInterfacesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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..d351a07104177 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkManagementClient.cs @@ -128,6 +128,11 @@ public partial class NetworkManagementClient : ServiceClient public virtual IBastionHostsOperations BastionHosts { get; private set; } + /// + /// Gets the ICustomIPPrefixesOperations. + /// + public virtual ICustomIPPrefixesOperations CustomIPPrefixes { get; private set; } + /// /// Gets the IDdosCustomPoliciesOperations. /// @@ -138,6 +143,11 @@ public partial class NetworkManagementClient : ServiceClient public virtual IDdosProtectionPlansOperations DdosProtectionPlans { get; private set; } + /// + /// Gets the IDscpConfigurationOperations. + /// + public virtual IDscpConfigurationOperations DscpConfiguration { get; private set; } + /// /// Gets the IAvailableEndpointServicesOperations. /// @@ -834,8 +844,10 @@ private void Initialize() AzureFirewalls = new AzureFirewallsOperations(this); AzureFirewallFqdnTags = new AzureFirewallFqdnTagsOperations(this); BastionHosts = new BastionHostsOperations(this); + CustomIPPrefixes = new CustomIPPrefixesOperations(this); DdosCustomPolicies = new DdosCustomPoliciesOperations(this); DdosProtectionPlans = new DdosProtectionPlansOperations(this); + DscpConfiguration = new DscpConfigurationOperations(this); AvailableEndpointServices = new AvailableEndpointServicesOperations(this); ExpressRouteCircuitAuthorizations = new ExpressRouteCircuitAuthorizationsOperations(this); ExpressRouteCircuitPeerings = new ExpressRouteCircuitPeeringsOperations(this); @@ -1066,7 +1078,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "bslRequest"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1296,7 +1308,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "sessionIds"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1499,7 +1511,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1697,7 +1709,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "virtualWANName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1927,7 +1939,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "bslRequest"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2133,7 +2145,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "bslRequest"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2316,7 +2328,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2521,7 +2533,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "vpnClientParams"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperations.cs index 5b4d917f9c0e0..7b273a1ce4c60 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkProfilesOperations.cs @@ -119,7 +119,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -325,7 +325,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -551,7 +551,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -738,7 +738,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -921,7 +921,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1110,7 +1110,7 @@ internal NetworkProfilesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkSecurityGroupsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkSecurityGroupsOperations.cs index ea0974e7e0a49..4b657ba8c889b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkSecurityGroupsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkSecurityGroupsOperations.cs @@ -119,7 +119,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -352,7 +352,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -539,7 +539,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -722,7 +722,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -911,7 +911,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1096,7 +1096,7 @@ internal NetworkSecurityGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkVirtualAppliancesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkVirtualAppliancesOperations.cs index f33e48c44e525..b537543e38d7b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkVirtualAppliancesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkVirtualAppliancesOperations.cs @@ -119,7 +119,7 @@ internal NetworkVirtualAppliancesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -325,7 +325,7 @@ internal NetworkVirtualAppliancesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -544,7 +544,7 @@ internal NetworkVirtualAppliancesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -722,7 +722,7 @@ internal NetworkVirtualAppliancesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal NetworkVirtualAppliancesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1096,7 +1096,7 @@ internal NetworkVirtualAppliancesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperations.cs index 911667524656d..96ad2947ea864 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/NetworkWatchersOperations.cs @@ -101,7 +101,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -315,7 +315,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -533,7 +533,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -722,7 +722,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -895,7 +895,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1087,7 +1087,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1571,7 +1571,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1754,7 +1754,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1979,7 +1979,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2204,7 +2204,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2429,7 +2429,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2654,7 +2654,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2880,7 +2880,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3107,7 +3107,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3334,7 +3334,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3561,7 +3561,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3784,7 +3784,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4015,7 +4015,7 @@ internal NetworkWatchersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Operations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Operations.cs index df82bd0583419..3814e5e6a697d 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Operations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/Operations.cs @@ -70,7 +70,7 @@ internal Operations(NetworkManagementClient client) /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperations.cs index 5d8c07a84af17..70c2076f79906 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperations.cs @@ -94,7 +94,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -283,199 +283,16 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) /// Parameters supplied to update a virtual wan p2s vpn gateway tags. /// /// - /// Headers that will be added to request. + /// 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 - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string gatewayName, TagsObject p2SVpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (p2SVpnGatewayParameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "p2SVpnGatewayParameters"); - } - 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("gatewayName", gatewayName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("p2SVpnGatewayParameters", p2SVpnGatewayParameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", 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/p2svpnGateways/{gatewayName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); - 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("PATCH"); - _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(p2SVpnGatewayParameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(p2SVpnGatewayParameters, 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) - { - 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; + AzureOperationResponse _response = await BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -537,7 +354,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -715,7 +532,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -861,6 +678,28 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) return _result; } + /// + /// Resets the primary of the p2s vpn gateway in the specified resource group. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginResetWithHttpMessagesAsync(resourceGroupName, gatewayName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Generates VPN profile for P2S client of the P2SVpnGateway in the specified /// resource group. @@ -1015,7 +854,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "p2SVpnGatewayParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1191,7 +1030,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) } /// - /// Deletes a virtual wan p2s vpn gateway. + /// Updates virtual wan p2s vpn gateway tags. /// /// /// The resource group name of the P2SVpnGateway. @@ -1199,6 +1038,9 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) /// /// The name of the gateway. /// + /// + /// Parameters supplied to update a virtual wan p2s vpn gateway tags. + /// /// /// Headers that will be added to request. /// @@ -1208,6 +1050,9 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -1217,7 +1062,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string gatewayName, TagsObject p2SVpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1231,7 +1076,11 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2020-05-01"; + if (p2SVpnGatewayParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "p2SVpnGatewayParameters"); + } + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1242,8 +1091,9 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("gatewayName", gatewayName); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("p2SVpnGatewayParameters", p2SVpnGatewayParameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateTags", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -1263,7 +1113,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -1294,6 +1144,12 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; + if(p2SVpnGatewayParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(p2SVpnGatewayParameters, 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) { @@ -1314,7 +1170,7 @@ internal P2sVpnGatewaysOperations(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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1349,13 +1205,398 @@ internal P2sVpnGatewaysOperations(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); + } + return _result; + } + + /// + /// Deletes a virtual wan p2s vpn gateway. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// 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 gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + string apiVersion = "2020-06-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("gatewayName", gatewayName); + 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/p2svpnGateways/{gatewayName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + 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; + } + + /// + /// Resets the primary of the p2s vpn gateway in the specified resource group. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// 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> BeginResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("gatewayName", gatewayName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginReset", 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/p2svpnGateways/{gatewayName}/reset").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _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("POST"); + _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) + { + 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); @@ -1416,7 +1657,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1618,7 +1859,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1820,7 +2061,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "request"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2026,7 +2267,7 @@ internal P2sVpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "request"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperationsExtensions.cs index 44771d2222092..91bdfff5d7069 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/P2sVpnGatewaysOperationsExtensions.cs @@ -254,6 +254,46 @@ public static IPage List(this IP2sVpnGatewaysOperations operation } } + /// + /// Resets the primary of the p2s vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + public static P2SVpnGateway Reset(this IP2sVpnGatewaysOperations operations, string resourceGroupName, string gatewayName) + { + return operations.ResetAsync(resourceGroupName, gatewayName).GetAwaiter().GetResult(); + } + + /// + /// Resets the primary of the p2s vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The cancellation token. + /// + public static async Task ResetAsync(this IP2sVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ResetWithHttpMessagesAsync(resourceGroupName, gatewayName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Generates VPN profile for P2S client of the P2SVpnGateway in the specified /// resource group. @@ -487,6 +527,52 @@ public static P2SVpnGateway BeginCreateOrUpdate(this IP2sVpnGatewaysOperations o } } + /// + /// Updates virtual wan p2s vpn gateway tags. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Parameters supplied to update a virtual wan p2s vpn gateway tags. + /// + public static P2SVpnGateway BeginUpdateTags(this IP2sVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, TagsObject p2SVpnGatewayParameters) + { + return operations.BeginUpdateTagsAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters).GetAwaiter().GetResult(); + } + + /// + /// Updates virtual wan p2s vpn gateway tags. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Parameters supplied to update a virtual wan p2s vpn gateway tags. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateTagsAsync(this IP2sVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, TagsObject p2SVpnGatewayParameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Deletes a virtual wan p2s vpn gateway. /// @@ -524,6 +610,46 @@ public static void BeginDelete(this IP2sVpnGatewaysOperations operations, string (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, gatewayName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Resets the primary of the p2s vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + public static P2SVpnGateway BeginReset(this IP2sVpnGatewaysOperations operations, string resourceGroupName, string gatewayName) + { + return operations.BeginResetAsync(resourceGroupName, gatewayName).GetAwaiter().GetResult(); + } + + /// + /// Resets the primary of the p2s vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the P2SVpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The cancellation token. + /// + public static async Task BeginResetAsync(this IP2sVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginResetWithHttpMessagesAsync(resourceGroupName, gatewayName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Generates VPN profile for P2S client of the P2SVpnGateway in the specified /// resource group. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PacketCapturesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PacketCapturesOperations.cs index 896a01d07f0db..1bd4676cc2615 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PacketCapturesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PacketCapturesOperations.cs @@ -129,7 +129,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -395,7 +395,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -602,7 +602,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -804,7 +804,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -981,7 +981,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1161,7 +1161,7 @@ internal PacketCapturesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PeerExpressRouteCircuitConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PeerExpressRouteCircuitConnectionsOperations.cs index 3dac0eb3fa993..f557fbd073409 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PeerExpressRouteCircuitConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PeerExpressRouteCircuitConnectionsOperations.cs @@ -109,7 +109,7 @@ internal PeerExpressRouteCircuitConnectionsOperations(NetworkManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -315,7 +315,7 @@ internal PeerExpressRouteCircuitConnectionsOperations(NetworkManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateDnsZoneGroupsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateDnsZoneGroupsOperations.cs index 9532689a0ff62..761233312156c 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateDnsZoneGroupsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateDnsZoneGroupsOperations.cs @@ -127,7 +127,7 @@ internal PrivateDnsZoneGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -353,7 +353,7 @@ internal PrivateDnsZoneGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -546,7 +546,7 @@ internal PrivateDnsZoneGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -740,7 +740,7 @@ internal PrivateDnsZoneGroupsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperations.cs index ef90ee22a8173..6b9d24f0d2d11 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateEndpointsOperations.cs @@ -119,7 +119,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -331,7 +331,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -504,7 +504,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -686,7 +686,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -864,7 +864,7 @@ internal PrivateEndpointsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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..f862cc81d6db5 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PrivateLinkServicesOperations.cs @@ -119,7 +119,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -331,7 +331,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -504,7 +504,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -700,7 +700,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -911,7 +911,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1135,7 +1135,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -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,21 +1356,17 @@ 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"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -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,15 +1555,11 @@ 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"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -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,17 +1736,21 @@ 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) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = 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,21 +1910,25 @@ 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"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -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,11 +2139,15 @@ 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"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -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) { @@ -2288,7 +2320,7 @@ internal PrivateLinkServicesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = 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,25 +2509,25 @@ 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) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = 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..e79827cc62caf 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperations.cs @@ -119,7 +119,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -720,7 +720,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1564,7 +1564,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1747,7 +1747,7 @@ internal PublicIPAddressesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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 100% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIpAddressesOperationsExtensions.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPAddressesOperationsExtensions.cs diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPPrefixesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPPrefixesOperations.cs index 4ad1218a3ac82..c938e1b93dedd 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPPrefixesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/PublicIPPrefixesOperations.cs @@ -119,7 +119,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -720,7 +720,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1092,7 +1092,7 @@ internal PublicIPPrefixesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ResourceNavigationLinksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ResourceNavigationLinksOperations.cs index 3be21eb27dc72..fbc7b4dc61bc4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ResourceNavigationLinksOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ResourceNavigationLinksOperations.cs @@ -101,7 +101,7 @@ internal ResourceNavigationLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFilterRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFilterRulesOperations.cs index 534227d8b2ee0..d7da163098d6d 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFilterRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFilterRulesOperations.cs @@ -126,7 +126,7 @@ internal RouteFilterRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal RouteFilterRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -548,7 +548,7 @@ internal RouteFilterRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -744,7 +744,7 @@ internal RouteFilterRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFiltersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFiltersOperations.cs index a3b4276d0557c..4d3894d27f9b6 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFiltersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteFiltersOperations.cs @@ -119,7 +119,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -544,7 +544,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -722,7 +722,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1092,7 +1092,7 @@ internal RouteFiltersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteTablesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteTablesOperations.cs index fbc50e336c53f..fc896865497bc 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteTablesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RouteTablesOperations.cs @@ -119,7 +119,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -544,7 +544,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -722,7 +722,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -909,7 +909,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1092,7 +1092,7 @@ internal RouteTablesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RoutesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RoutesOperations.cs index 9e7d5776c6d96..9147e56e08750 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RoutesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/RoutesOperations.cs @@ -126,7 +126,7 @@ internal RoutesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal RoutesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -548,7 +548,7 @@ internal RoutesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -744,7 +744,7 @@ internal RoutesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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..6f11ce669d808 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 @@ -21,128 +21,120 @@ public static IEnumerable> ApiInfo_NetworkManageme { new Tuple("Compute", "NetworkInterfaces", "2018-10-01"), new Tuple("Compute", "PublicIPAddresses", "2018-10-01"), - new Tuple("Network", "ApplicationGatewayPrivateEndpointConnections", "2020-05-01"), - new Tuple("Network", "ApplicationGatewayPrivateLinkResources", "2020-05-01"), - new Tuple("Network", "ApplicationGateways", "2020-05-01"), - new Tuple("Network", "ApplicationSecurityGroups", "2020-05-01"), - new Tuple("Network", "AvailableDelegations", "2020-05-01"), - new Tuple("Network", "AvailableEndpointServices", "2020-05-01"), - new Tuple("Network", "AvailablePrivateEndpointTypes", "2020-05-01"), - new Tuple("Network", "AvailableResourceGroupDelegations", "2020-05-01"), - new Tuple("Network", "AvailableServiceAliases", "2020-05-01"), - new Tuple("Network", "AzureFirewallFqdnTags", "2020-05-01"), - new Tuple("Network", "AzureFirewalls", "2020-05-01"), - new Tuple("Network", "BastionHosts", "2020-05-01"), - new Tuple("Network", "BgpServiceCommunities", "2020-05-01"), - new Tuple("Network", "CheckDnsNameAvailability", "2020-05-01"), - new Tuple("Network", "ConnectionMonitors", "2020-05-01"), - new Tuple("Network", "DdosCustomPolicies", "2020-05-01"), - new Tuple("Network", "DdosProtectionPlans", "2020-05-01"), - new Tuple("Network", "DefaultSecurityRules", "2020-05-01"), - new Tuple("Network", "DeleteBastionShareableLink", "2020-05-01"), - new Tuple("Network", "DisconnectActiveSessions", "2020-05-01"), - new Tuple("Network", "ExpressRouteCircuitAuthorizations", "2020-05-01"), - new Tuple("Network", "ExpressRouteCircuitConnections", "2020-05-01"), - new Tuple("Network", "ExpressRouteCircuitPeerings", "2020-05-01"), - new Tuple("Network", "ExpressRouteCircuits", "2020-05-01"), - new Tuple("Network", "ExpressRouteConnections", "2020-05-01"), - new Tuple("Network", "ExpressRouteCrossConnectionPeerings", "2020-05-01"), - new Tuple("Network", "ExpressRouteCrossConnections", "2020-05-01"), - new Tuple("Network", "ExpressRouteGateways", "2020-05-01"), - new Tuple("Network", "ExpressRouteLinks", "2020-05-01"), - new Tuple("Network", "ExpressRoutePorts", "2020-05-01"), - new Tuple("Network", "ExpressRoutePortsLocations", "2020-05-01"), - new Tuple("Network", "ExpressRouteServiceProviders", "2020-05-01"), - new Tuple("Network", "FirewallPolicies", "2020-05-01"), - new Tuple("Network", "FirewallPolicyRuleCollectionGroups", "2020-05-01"), - new Tuple("Network", "FlowLogs", "2020-05-01"), - new Tuple("Network", "GetActiveSessions", "2020-05-01"), - new Tuple("Network", "GetBastionShareableLink", "2020-05-01"), - new Tuple("Network", "HubRouteTables", "2020-05-01"), - new Tuple("Network", "HubVirtualNetworkConnections", "2020-05-01"), - new Tuple("Network", "InboundNatRules", "2020-05-01"), - new Tuple("Network", "IpAllocations", "2020-05-01"), - new Tuple("Network", "IpGroups", "2020-05-01"), - new Tuple("Network", "LoadBalancerBackendAddressPools", "2020-05-01"), - new Tuple("Network", "LoadBalancerFrontendIPConfigurations", "2020-05-01"), - new Tuple("Network", "LoadBalancerLoadBalancingRules", "2020-05-01"), - new Tuple("Network", "LoadBalancerNetworkInterfaces", "2020-05-01"), - new Tuple("Network", "LoadBalancerOutboundRules", "2020-05-01"), - new Tuple("Network", "LoadBalancerProbes", "2020-05-01"), - new Tuple("Network", "LoadBalancers", "2020-05-01"), - new Tuple("Network", "LocalNetworkGateways", "2020-05-01"), - new Tuple("Network", "NatGateways", "2020-05-01"), - new Tuple("Network", "NetworkInterfaceIPConfigurations", "2020-05-01"), - new Tuple("Network", "NetworkInterfaceLoadBalancers", "2020-05-01"), - new Tuple("Network", "NetworkInterfaceTapConfigurations", "2020-05-01"), - new Tuple("Network", "NetworkInterfaces", "2020-05-01"), - new Tuple("Network", "NetworkProfiles", "2020-05-01"), - new Tuple("Network", "NetworkSecurityGroups", "2020-05-01"), - new Tuple("Network", "NetworkVirtualAppliances", "2020-05-01"), - new Tuple("Network", "NetworkWatchers", "2020-05-01"), - new Tuple("Network", "Operations", "2020-05-01"), - new Tuple("Network", "P2sVpnGateways", "2020-05-01"), - new Tuple("Network", "PacketCaptures", "2020-05-01"), - new Tuple("Network", "PeerExpressRouteCircuitConnections", "2020-05-01"), - new Tuple("Network", "PrivateDnsZoneGroups", "2020-05-01"), - new Tuple("Network", "PrivateEndpoints", "2020-05-01"), - new Tuple("Network", "PrivateLinkServices", "2020-05-01"), - new Tuple("Network", "PublicIPAddresses", "2020-05-01"), - new Tuple("Network", "PublicIPPrefixes", "2020-05-01"), - new Tuple("Network", "PutBastionShareableLink", "2020-05-01"), - new Tuple("Network", "ResourceNavigationLinks", "2020-05-01"), - new Tuple("Network", "RouteFilterRules", "2020-05-01"), - new Tuple("Network", "RouteFilters", "2020-05-01"), - new Tuple("Network", "RouteTables", "2020-05-01"), - new Tuple("Network", "Routes", "2020-05-01"), - new Tuple("Network", "SecurityPartnerProviders", "2020-05-01"), - new Tuple("Network", "SecurityRules", "2020-05-01"), - new Tuple("Network", "ServiceAssociationLinks", "2020-05-01"), - new Tuple("Network", "ServiceEndpointPolicies", "2020-05-01"), - new Tuple("Network", "ServiceEndpointPolicyDefinitions", "2020-05-01"), - new Tuple("Network", "ServiceTags", "2020-05-01"), - new Tuple("Network", "Subnets", "2020-05-01"), - new Tuple("Network", "SupportedSecurityProviders", "2020-05-01"), - new Tuple("Network", "Usages", "2020-05-01"), - new Tuple("Network", "VirtualApplianceSites", "2020-05-01"), - new Tuple("Network", "VirtualApplianceSkus", "2020-05-01"), - new Tuple("Network", "VirtualHubBgpConnection", "2020-05-01"), - new Tuple("Network", "VirtualHubBgpConnections", "2020-05-01"), - new Tuple("Network", "VirtualHubIpConfiguration", "2020-05-01"), - new Tuple("Network", "VirtualHubRouteTableV2s", "2020-05-01"), - new Tuple("Network", "VirtualHubs", "2020-05-01"), - new Tuple("Network", "VirtualNetworkGatewayConnections", "2020-05-01"), - new Tuple("Network", "VirtualNetworkGateways", "2020-05-01"), - new Tuple("Network", "VirtualNetworkPeerings", "2020-05-01"), - new Tuple("Network", "VirtualNetworkTaps", "2020-05-01"), - new Tuple("Network", "VirtualNetworks", "2020-05-01"), - new Tuple("Network", "VirtualRouterPeerings", "2020-05-01"), - new Tuple("Network", "VirtualRouters", "2020-05-01"), - new Tuple("Network", "VirtualWans", "2020-05-01"), - new Tuple("Network", "VpnConnections", "2020-05-01"), - new Tuple("Network", "VpnGateways", "2020-05-01"), - new Tuple("Network", "VpnLinkConnections", "2020-05-01"), - new Tuple("Network", "VpnServerConfigurations", "2020-05-01"), - new Tuple("Network", "VpnServerConfigurationsAssociatedWithVirtualWan", "2020-05-01"), - new Tuple("Network", "VpnSiteLinkConnections", "2020-05-01"), - 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"), + new Tuple("Network", "ApplicationGatewayPrivateEndpointConnections", "2020-06-01"), + new Tuple("Network", "ApplicationGatewayPrivateLinkResources", "2020-06-01"), + new Tuple("Network", "ApplicationGateways", "2020-06-01"), + new Tuple("Network", "ApplicationSecurityGroups", "2020-06-01"), + new Tuple("Network", "AvailableDelegations", "2020-06-01"), + new Tuple("Network", "AvailableEndpointServices", "2020-06-01"), + new Tuple("Network", "AvailablePrivateEndpointTypes", "2020-06-01"), + new Tuple("Network", "AvailableResourceGroupDelegations", "2020-06-01"), + new Tuple("Network", "AvailableServiceAliases", "2020-06-01"), + new Tuple("Network", "AzureFirewallFqdnTags", "2020-06-01"), + new Tuple("Network", "AzureFirewalls", "2020-06-01"), + new Tuple("Network", "BastionHosts", "2020-06-01"), + new Tuple("Network", "BgpServiceCommunities", "2020-06-01"), + new Tuple("Network", "CheckDnsNameAvailability", "2020-06-01"), + new Tuple("Network", "ConnectionMonitors", "2020-06-01"), + new Tuple("Network", "CustomIPPrefixes", "2020-06-01"), + new Tuple("Network", "DdosCustomPolicies", "2020-06-01"), + new Tuple("Network", "DdosProtectionPlans", "2020-06-01"), + new Tuple("Network", "DefaultSecurityRules", "2020-06-01"), + new Tuple("Network", "DeleteBastionShareableLink", "2020-06-01"), + new Tuple("Network", "DisconnectActiveSessions", "2020-06-01"), + new Tuple("Network", "DscpConfiguration", "2020-06-01"), + new Tuple("Network", "ExpressRouteCircuitAuthorizations", "2020-06-01"), + new Tuple("Network", "ExpressRouteCircuitConnections", "2020-06-01"), + new Tuple("Network", "ExpressRouteCircuitPeerings", "2020-06-01"), + new Tuple("Network", "ExpressRouteCircuits", "2020-06-01"), + new Tuple("Network", "ExpressRouteConnections", "2020-06-01"), + new Tuple("Network", "ExpressRouteCrossConnectionPeerings", "2020-06-01"), + new Tuple("Network", "ExpressRouteCrossConnections", "2020-06-01"), + new Tuple("Network", "ExpressRouteGateways", "2020-06-01"), + new Tuple("Network", "ExpressRouteLinks", "2020-06-01"), + new Tuple("Network", "ExpressRoutePorts", "2020-06-01"), + new Tuple("Network", "ExpressRoutePortsLocations", "2020-06-01"), + new Tuple("Network", "ExpressRouteServiceProviders", "2020-06-01"), + new Tuple("Network", "FirewallPolicies", "2020-06-01"), + new Tuple("Network", "FirewallPolicyRuleCollectionGroups", "2020-06-01"), + new Tuple("Network", "FlowLogs", "2020-06-01"), + new Tuple("Network", "GetActiveSessions", "2020-06-01"), + new Tuple("Network", "GetBastionShareableLink", "2020-06-01"), + new Tuple("Network", "HubRouteTables", "2020-06-01"), + new Tuple("Network", "HubVirtualNetworkConnections", "2020-06-01"), + new Tuple("Network", "InboundNatRules", "2020-06-01"), + new Tuple("Network", "IpAllocations", "2020-06-01"), + new Tuple("Network", "IpGroups", "2020-06-01"), + new Tuple("Network", "LoadBalancerBackendAddressPools", "2020-06-01"), + new Tuple("Network", "LoadBalancerFrontendIPConfigurations", "2020-06-01"), + new Tuple("Network", "LoadBalancerLoadBalancingRules", "2020-06-01"), + new Tuple("Network", "LoadBalancerNetworkInterfaces", "2020-06-01"), + new Tuple("Network", "LoadBalancerOutboundRules", "2020-06-01"), + new Tuple("Network", "LoadBalancerProbes", "2020-06-01"), + new Tuple("Network", "LoadBalancers", "2020-06-01"), + new Tuple("Network", "LocalNetworkGateways", "2020-06-01"), + new Tuple("Network", "NatGateways", "2020-06-01"), + new Tuple("Network", "NetworkInterfaceIPConfigurations", "2020-06-01"), + new Tuple("Network", "NetworkInterfaceLoadBalancers", "2020-06-01"), + new Tuple("Network", "NetworkInterfaceTapConfigurations", "2020-06-01"), + new Tuple("Network", "NetworkInterfaces", "2020-06-01"), + new Tuple("Network", "NetworkProfiles", "2020-06-01"), + new Tuple("Network", "NetworkSecurityGroups", "2020-06-01"), + new Tuple("Network", "NetworkVirtualAppliances", "2020-06-01"), + new Tuple("Network", "NetworkWatchers", "2020-06-01"), + new Tuple("Network", "Operations", "2020-06-01"), + new Tuple("Network", "P2SVpnGateways", "2020-06-01"), + new Tuple("Network", "P2sVpnGateways", "2020-06-01"), + new Tuple("Network", "PacketCaptures", "2020-06-01"), + new Tuple("Network", "PeerExpressRouteCircuitConnections", "2020-06-01"), + new Tuple("Network", "PrivateDnsZoneGroups", "2020-06-01"), + new Tuple("Network", "PrivateEndpoints", "2020-06-01"), + new Tuple("Network", "PrivateLinkServices", "2020-06-01"), + new Tuple("Network", "PublicIPAddresses", "2020-06-01"), + new Tuple("Network", "PublicIPPrefixes", "2020-06-01"), + new Tuple("Network", "PutBastionShareableLink", "2020-06-01"), + new Tuple("Network", "ResourceNavigationLinks", "2020-06-01"), + new Tuple("Network", "RouteFilterRules", "2020-06-01"), + new Tuple("Network", "RouteFilters", "2020-06-01"), + new Tuple("Network", "RouteTables", "2020-06-01"), + new Tuple("Network", "Routes", "2020-06-01"), + new Tuple("Network", "SecurityPartnerProviders", "2020-06-01"), + new Tuple("Network", "SecurityRules", "2020-06-01"), + new Tuple("Network", "ServiceAssociationLinks", "2020-06-01"), + new Tuple("Network", "ServiceEndpointPolicies", "2020-06-01"), + new Tuple("Network", "ServiceEndpointPolicyDefinitions", "2020-06-01"), + new Tuple("Network", "ServiceTags", "2020-06-01"), + new Tuple("Network", "Subnets", "2020-06-01"), + new Tuple("Network", "SupportedSecurityProviders", "2020-06-01"), + new Tuple("Network", "Usages", "2020-06-01"), + new Tuple("Network", "VirtualApplianceSites", "2020-06-01"), + new Tuple("Network", "VirtualApplianceSkus", "2020-06-01"), + new Tuple("Network", "VirtualHubBgpConnection", "2020-06-01"), + new Tuple("Network", "VirtualHubBgpConnections", "2020-06-01"), + new Tuple("Network", "VirtualHubIpConfiguration", "2020-06-01"), + new Tuple("Network", "VirtualHubRouteTableV2s", "2020-06-01"), + new Tuple("Network", "VirtualHubs", "2020-06-01"), + new Tuple("Network", "VirtualNetworkGatewayConnections", "2020-06-01"), + new Tuple("Network", "VirtualNetworkGateways", "2020-06-01"), + new Tuple("Network", "VirtualNetworkPeerings", "2020-06-01"), + new Tuple("Network", "VirtualNetworkTaps", "2020-06-01"), + new Tuple("Network", "VirtualNetworks", "2020-06-01"), + new Tuple("Network", "VirtualRouterPeerings", "2020-06-01"), + new Tuple("Network", "VirtualRouters", "2020-06-01"), + new Tuple("Network", "VirtualWans", "2020-06-01"), + new Tuple("Network", "VpnConnections", "2020-06-01"), + new Tuple("Network", "VpnGateways", "2020-06-01"), + new Tuple("Network", "VpnLinkConnections", "2020-06-01"), + new Tuple("Network", "VpnServerConfigurations", "2020-06-01"), + new Tuple("Network", "VpnServerConfigurationsAssociatedWithVirtualWan", "2020-06-01"), + new Tuple("Network", "VpnSiteLinkConnections", "2020-06-01"), + new Tuple("Network", "VpnSiteLinks", "2020-06-01"), + new Tuple("Network", "VpnSites", "2020-06-01"), + new Tuple("Network", "VpnSitesConfiguration", "2020-06-01"), + new Tuple("Network", "WebApplicationFirewallPolicies", "2020-06-01"), + new Tuple("Network", "generatevirtualwanvpnserverconfigurationvpnprofile", "2020-06-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/SecurityPartnerProvidersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityPartnerProvidersOperations.cs index 6687221820ee8..52e27f813b678 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityPartnerProvidersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityPartnerProvidersOperations.cs @@ -116,7 +116,7 @@ internal SecurityPartnerProvidersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -343,7 +343,7 @@ internal SecurityPartnerProvidersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal SecurityPartnerProvidersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -715,7 +715,7 @@ internal SecurityPartnerProvidersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -902,7 +902,7 @@ internal SecurityPartnerProvidersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1086,7 +1086,7 @@ internal SecurityPartnerProvidersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityRulesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityRulesOperations.cs index 223a1cc3d482e..dae30857c112a 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityRulesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SecurityRulesOperations.cs @@ -126,7 +126,7 @@ internal SecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal SecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal SecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -746,7 +746,7 @@ internal SecurityRulesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceAssociationLinksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceAssociationLinksOperations.cs index 751f21b790b46..61743249358b2 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceAssociationLinksOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceAssociationLinksOperations.cs @@ -101,7 +101,7 @@ internal ServiceAssociationLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPoliciesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPoliciesOperations.cs index ee60bda06d06c..c05636adad3b5 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPoliciesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPoliciesOperations.cs @@ -119,7 +119,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -538,7 +538,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -721,7 +721,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -910,7 +910,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1094,7 +1094,7 @@ internal ServiceEndpointPoliciesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPolicyDefinitionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPolicyDefinitionsOperations.cs index b21e5f245ab4e..ca7c33d51980b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPolicyDefinitionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceEndpointPolicyDefinitionsOperations.cs @@ -127,7 +127,7 @@ internal ServiceEndpointPolicyDefinitionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -353,7 +353,7 @@ internal ServiceEndpointPolicyDefinitionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -551,7 +551,7 @@ internal ServiceEndpointPolicyDefinitionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -745,7 +745,7 @@ internal ServiceEndpointPolicyDefinitionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs index bb86e0c98d853..a8fa615fc0326 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/ServiceTagsOperations.cs @@ -90,7 +90,7 @@ internal ServiceTagsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SubnetsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SubnetsOperations.cs index be3bf75c01151..81cac56688821 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SubnetsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/SubnetsOperations.cs @@ -129,7 +129,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -414,7 +414,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -612,7 +612,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -804,7 +804,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1036,7 +1036,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1232,7 +1232,7 @@ internal SubnetsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/UsagesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/UsagesOperations.cs index 3e7d176bf28fa..9600b725d4275 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/UsagesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/UsagesOperations.cs @@ -94,7 +94,7 @@ internal UsagesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualApplianceSitesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualApplianceSitesOperations.cs index b1ccf6b800baf..6c51286a07bfe 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualApplianceSitesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualApplianceSitesOperations.cs @@ -126,7 +126,7 @@ internal VirtualApplianceSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -352,7 +352,7 @@ internal VirtualApplianceSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -550,7 +550,7 @@ internal VirtualApplianceSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -743,7 +743,7 @@ internal VirtualApplianceSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualApplianceSkusOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualApplianceSkusOperations.cs index 84e5a6886812a..d3bae8521731d 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualApplianceSkusOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualApplianceSkusOperations.cs @@ -80,7 +80,7 @@ internal VirtualApplianceSkusOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -263,7 +263,7 @@ internal VirtualApplianceSkusOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "skuName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubBgpConnectionOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubBgpConnectionOperations.cs index 5df56a68abbf7..d2a23cb742ac4 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubBgpConnectionOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubBgpConnectionOperations.cs @@ -101,7 +101,7 @@ internal VirtualHubBgpConnectionOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -370,7 +370,7 @@ internal VirtualHubBgpConnectionOperations(NetworkManagementClient client) { parameters.Validate(); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -595,7 +595,7 @@ internal VirtualHubBgpConnectionOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubBgpConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubBgpConnectionsOperations.cs index 89806f75eae2e..9388809fe0a53 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubBgpConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubBgpConnectionsOperations.cs @@ -94,7 +94,7 @@ internal VirtualHubBgpConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubIpConfigurationOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubIpConfigurationOperations.cs index 6183f6e0bcc78..b0b1f2fa83450 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubIpConfigurationOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubIpConfigurationOperations.cs @@ -101,7 +101,7 @@ internal VirtualHubIpConfigurationOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "ipConfigName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal VirtualHubIpConfigurationOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -560,7 +560,7 @@ internal VirtualHubIpConfigurationOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -785,7 +785,7 @@ internal VirtualHubIpConfigurationOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "ipConfigName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubRouteTableV2sOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubRouteTableV2sOperations.cs index c0ec7a0ebcdc1..014c60e76f657 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubRouteTableV2sOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubRouteTableV2sOperations.cs @@ -101,7 +101,7 @@ internal VirtualHubRouteTableV2sOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "routeTableName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal VirtualHubRouteTableV2sOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -555,7 +555,7 @@ internal VirtualHubRouteTableV2sOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubRouteTableV2Parameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -775,7 +775,7 @@ internal VirtualHubRouteTableV2sOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "routeTableName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubsOperations.cs index 8d0574eade2af..2e41c3c4d1c35 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualHubsOperations.cs @@ -94,7 +94,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -321,7 +321,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -715,7 +715,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -943,7 +943,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { virtualHubParameters.Validate(); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1159,7 +1159,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1336,7 +1336,7 @@ internal VirtualHubsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualHubName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewayConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewayConnectionsOperations.cs index dcfc1951aa532..a590d62de34c1 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewayConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewayConnectionsOperations.cs @@ -121,7 +121,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -393,7 +393,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -581,7 +581,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -869,7 +869,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1085,7 +1085,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1268,7 +1268,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1484,7 +1484,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1718,7 +1718,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1924,7 +1924,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2129,7 +2129,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperations.cs index 814c9726a1bb4..b6f0f890069f1 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkGatewaysOperations.cs @@ -120,7 +120,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -354,7 +354,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -546,7 +546,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -893,7 +893,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1196,7 +1196,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1512,7 +1512,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1728,7 +1728,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1911,7 +1911,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2117,7 +2117,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2314,7 +2314,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2499,7 +2499,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2709,7 +2709,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2912,7 +2912,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3109,7 +3109,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3309,7 +3309,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3511,7 +3511,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3724,7 +3724,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3927,7 +3927,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4126,7 +4126,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4331,7 +4331,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4528,7 +4528,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4727,7 +4727,7 @@ internal VirtualNetworkGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "request"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkPeeringsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkPeeringsOperations.cs index 6cbf7b634eccd..12e821935e262 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkPeeringsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkPeeringsOperations.cs @@ -126,7 +126,7 @@ internal VirtualNetworkPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -351,7 +351,7 @@ internal VirtualNetworkPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -549,7 +549,7 @@ internal VirtualNetworkPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -738,11 +738,15 @@ internal VirtualNetworkPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualNetworkPeeringParameters"); } + if (virtualNetworkPeeringParameters != null) + { + virtualNetworkPeeringParameters.Validate(); + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkTapsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkTapsOperations.cs index 83a2d6e4d9b60..8643813db710b 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkTapsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworkTapsOperations.cs @@ -116,7 +116,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -342,7 +342,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -529,7 +529,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -712,7 +712,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -901,7 +901,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1084,7 +1084,7 @@ internal VirtualNetworkTapsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworksOperations.cs index 875116ed03e3f..af355df927316 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworksOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualNetworksOperations.cs @@ -119,7 +119,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -350,7 +350,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -720,7 +720,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -919,7 +919,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1118,7 +1118,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1309,7 +1309,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1496,7 +1496,7 @@ internal VirtualNetworksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualRouterPeeringsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualRouterPeeringsOperations.cs index 3b68cba01b55d..b58932d06cea6 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualRouterPeeringsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualRouterPeeringsOperations.cs @@ -126,7 +126,7 @@ internal VirtualRouterPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal VirtualRouterPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -539,7 +539,7 @@ internal VirtualRouterPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -731,7 +731,7 @@ internal VirtualRouterPeeringsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualRoutersOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualRoutersOperations.cs index d6dd2746ac9b1..f96788f29a861 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualRoutersOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualRoutersOperations.cs @@ -119,7 +119,7 @@ internal VirtualRoutersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -331,7 +331,7 @@ internal VirtualRoutersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -504,7 +504,7 @@ internal VirtualRoutersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -686,7 +686,7 @@ internal VirtualRoutersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -868,7 +868,7 @@ internal VirtualRoutersOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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 99% rename from sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs rename to sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperations.cs index 680645e956127..b275626af544e 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWANsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VirtualWansOperations.cs @@ -94,7 +94,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -321,7 +321,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "wANParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -715,7 +715,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -913,7 +913,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "wANParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1129,7 +1129,7 @@ internal VirtualWansOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "virtualWANName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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/VpnConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperations.cs index b85714471713b..bae750f4d2bbc 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperations.cs @@ -101,7 +101,7 @@ internal VpnConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -307,6 +307,64 @@ internal VpnConnectionsOperations(NetworkManagementClient client) return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Starts packet capture on Vpn connection in the specified resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to start packet capture + /// on gateway connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> StartPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStartParameters parameters = default(VpnConnectionPacketCaptureStartParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginStartPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stops packet capture on Vpn connection in the specified resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to stop packet capture on + /// gateway connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> StopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginStopPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Retrieves all vpn connections for a particular virtual wan vpn gateway. /// @@ -351,7 +409,7 @@ internal VpnConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -560,7 +618,7 @@ internal VpnConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnConnectionParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -785,7 +843,7 @@ internal VpnConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -919,6 +977,434 @@ internal VpnConnectionsOperations(NetworkManagementClient client) return _result; } + /// + /// Starts packet capture on Vpn connection in the specified resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to start packet capture + /// on gateway connection. + /// + /// + /// 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> BeginStartPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStartParameters parameters = default(VpnConnectionPacketCaptureStartParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (vpnConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vpnConnectionName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("gatewayName", gatewayName); + tracingParameters.Add("vpnConnectionName", vpnConnectionName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginStartPacketCapture", 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/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _url = _url.Replace("{vpnConnectionName}", System.Uri.EscapeDataString(vpnConnectionName)); + _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("POST"); + _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 != 202) + { + 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; + } + + /// + /// Stops packet capture on Vpn connection in the specified resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to stop packet capture on + /// gateway connection. + /// + /// + /// 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> BeginStopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (vpnConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vpnConnectionName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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("gatewayName", gatewayName); + tracingParameters.Add("vpnConnectionName", vpnConnectionName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginStopPacketCapture", 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/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _url = _url.Replace("{vpnConnectionName}", System.Uri.EscapeDataString(vpnConnectionName)); + _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("POST"); + _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 != 202) + { + 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; + } + /// /// Retrieves all vpn connections for a particular virtual wan vpn gateway. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperationsExtensions.cs index 522f89ef416cc..8a4715dbd427e 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnConnectionsOperationsExtensions.cs @@ -164,6 +164,114 @@ public static void Delete(this IVpnConnectionsOperations operations, string reso (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, gatewayName, connectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Starts packet capture on Vpn connection in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to start packet capture + /// on gateway connection. + /// + public static string StartPacketCapture(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStartParameters parameters = default(VpnConnectionPacketCaptureStartParameters)) + { + return operations.StartPacketCaptureAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Starts packet capture on Vpn connection in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to start packet capture + /// on gateway connection. + /// + /// + /// The cancellation token. + /// + public static async Task StartPacketCaptureAsync(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStartParameters parameters = default(VpnConnectionPacketCaptureStartParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.StartPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Stops packet capture on Vpn connection in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to stop packet capture on + /// gateway connection. + /// + public static string StopPacketCapture(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters)) + { + return operations.StopPacketCaptureAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Stops packet capture on Vpn connection in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to stop packet capture on + /// gateway connection. + /// + /// + /// The cancellation token. + /// + public static async Task StopPacketCaptureAsync(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.StopPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Retrieves all vpn connections for a particular virtual wan vpn gateway. /// @@ -301,6 +409,114 @@ public static void BeginDelete(this IVpnConnectionsOperations operations, string (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, gatewayName, connectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Starts packet capture on Vpn connection in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to start packet capture + /// on gateway connection. + /// + public static string BeginStartPacketCapture(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStartParameters parameters = default(VpnConnectionPacketCaptureStartParameters)) + { + return operations.BeginStartPacketCaptureAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Starts packet capture on Vpn connection in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to start packet capture + /// on gateway connection. + /// + /// + /// The cancellation token. + /// + public static async Task BeginStartPacketCaptureAsync(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStartParameters parameters = default(VpnConnectionPacketCaptureStartParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginStartPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Stops packet capture on Vpn connection in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to stop packet capture on + /// gateway connection. + /// + public static string BeginStopPacketCapture(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters)) + { + return operations.BeginStopPacketCaptureAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Stops packet capture on Vpn connection in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the gateway. + /// + /// + /// The name of the vpn connection. + /// + /// + /// Vpn Connection packet capture parameters supplied to stop packet capture on + /// gateway connection. + /// + /// + /// The cancellation token. + /// + public static async Task BeginStopPacketCaptureAsync(this IVpnConnectionsOperations operations, string resourceGroupName, string gatewayName, string vpnConnectionName, VpnConnectionPacketCaptureStopParameters parameters = default(VpnConnectionPacketCaptureStopParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginStopPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Retrieves all vpn connections for a particular virtual wan vpn gateway. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperations.cs index 408202c715848..0d769d0a7da85 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperations.cs @@ -94,7 +94,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -283,6 +283,121 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// Parameters supplied to update a virtual wan vpn gateway tags. /// /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string gatewayName, TagsObject vpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send Request + AzureOperationResponse _response = await BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnGatewayParameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a virtual wan vpn gateway. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, gatewayName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Resets the primary of the vpn gateway in the specified resource group. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginResetWithHttpMessagesAsync(resourceGroupName, gatewayName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Starts packet capture on vpn gateway in the specified resource group. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to start packet capture on + /// vpn gateway. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> StartPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStartParameters parameters = default(VpnGatewayPacketCaptureStartParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginStartPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stops packet capture on vpn gateway in the specified resource group. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to stop packet capture on + /// vpn gateway. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> StopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginStopPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Lists all the VpnGateways in a resource group. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// /// Headers that will be added to request. /// /// @@ -303,7 +418,375 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string gatewayName, TagsObject vpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + string apiVersion = "2020-06-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, "ListByResourceGroup", 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/vpnGateways").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + 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; + } + + /// + /// Lists all the VpnGateways 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>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-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, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways").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; + } + + /// + /// Creates a virtual wan vpn gateway if it doesn't exist else updates the + /// existing gateway. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Parameters supplied to create or Update a virtual wan vpn gateway. + /// + /// + /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGateway vpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -321,7 +804,11 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnGatewayParameters"); } - string apiVersion = "2020-05-01"; + if (vpnGatewayParameters != null) + { + vpnGatewayParameters.Validate(); + } + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -334,7 +821,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("vpnGatewayParameters", vpnGatewayParameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -354,7 +841,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -411,7 +898,7 @@ internal VpnGatewaysOperations(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)); try @@ -471,6 +958,24 @@ internal VpnGatewaysOperations(NetworkManagementClient client) 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); @@ -479,29 +984,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) } /// - /// Deletes a virtual wan vpn gateway. - /// - /// - /// The resource group name of the VpnGateway. - /// - /// - /// The name of the gateway. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, gatewayName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Resets the primary of the vpn gateway in the specified resource group. + /// Updates virtual wan vpn gateway tags. /// /// /// The resource group name of the VpnGateway. @@ -509,24 +992,8 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// The name of the gateway. /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginResetWithHttpMessagesAsync(resourceGroupName, gatewayName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Lists all the VpnGateways in a resource group. - /// - /// - /// The resource group name of the VpnGateway. + /// + /// Parameters supplied to update a virtual wan vpn gateway tags. /// /// /// Headers that will be added to request. @@ -549,7 +1016,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string gatewayName, TagsObject vpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -559,7 +1026,15 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2020-05-01"; + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + if (vpnGatewayParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vpnGatewayParameters"); + } + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -568,15 +1043,18 @@ internal VpnGatewaysOperations(NetworkManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("gatewayName", gatewayName); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("vpnGatewayParameters", vpnGatewayParameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateTags", 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/vpnGateways").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -589,7 +1067,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.Method = new HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -620,6 +1098,12 @@ internal VpnGatewaysOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; + if(vpnGatewayParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(vpnGatewayParameters, 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) { @@ -640,7 +1124,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -675,7 +1159,7 @@ internal VpnGatewaysOperations(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")) @@ -688,7 +1172,7 @@ internal VpnGatewaysOperations(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) { @@ -708,8 +1192,14 @@ internal VpnGatewaysOperations(NetworkManagementClient client) } /// - /// Lists all the VpnGateways in a subscription. + /// Deletes a virtual wan vpn gateway. /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// /// /// Headers that will be added to request. /// @@ -719,9 +1209,6 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -731,13 +1218,21 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (gatewayName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); + } + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -745,14 +1240,18 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("gatewayName", gatewayName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", 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/vpnGateways").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); List _queryParameters = new List(); if (apiVersion != null) { @@ -765,7 +1264,7 @@ internal VpnGatewaysOperations(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) @@ -816,7 +1315,7 @@ internal VpnGatewaysOperations(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)); try @@ -851,31 +1350,13 @@ internal VpnGatewaysOperations(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); @@ -884,8 +1365,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) } /// - /// Creates a virtual wan vpn gateway if it doesn't exist else updates the - /// existing gateway. + /// Resets the primary of the vpn gateway in the specified resource group. /// /// /// The resource group name of the VpnGateway. @@ -893,9 +1373,6 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// The name of the gateway. /// - /// - /// Parameters supplied to create or Update a virtual wan vpn gateway. - /// /// /// Headers that will be added to request. /// @@ -917,12 +1394,8 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGateway vpnGatewayParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -931,15 +1404,11 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - if (vpnGatewayParameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vpnGatewayParameters"); - } - if (vpnGatewayParameters != null) + if (Client.SubscriptionId == null) { - vpnGatewayParameters.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -950,16 +1419,15 @@ internal VpnGatewaysOperations(NetworkManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("gatewayName", gatewayName); tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("vpnGatewayParameters", vpnGatewayParameters); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginReset", 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/vpnGateways/{gatewayName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) { @@ -972,7 +1440,7 @@ internal VpnGatewaysOperations(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) @@ -1003,12 +1471,6 @@ internal VpnGatewaysOperations(NetworkManagementClient client) // Serialize Request string _requestContent = null; - if(vpnGatewayParameters != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(vpnGatewayParameters, 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) { @@ -1029,7 +1491,7 @@ internal VpnGatewaysOperations(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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1089,24 +1551,6 @@ internal VpnGatewaysOperations(NetworkManagementClient client) 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); @@ -1115,7 +1559,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) } /// - /// Deletes a virtual wan vpn gateway. + /// Starts packet capture on vpn gateway in the specified resource group. /// /// /// The resource group name of the VpnGateway. @@ -1123,6 +1567,10 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// The name of the gateway. /// + /// + /// Vpn gateway packet capture parameters supplied to start packet capture on + /// vpn gateway. + /// /// /// Headers that will be added to request. /// @@ -1132,6 +1580,9 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -1141,12 +1592,8 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginStartPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStartParameters parameters = default(VpnGatewayPacketCaptureStartParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -1155,7 +1602,11 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); } - string apiVersion = "2020-05-01"; + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1165,16 +1616,17 @@ internal VpnGatewaysOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginStartPacketCapture", 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/vpnGateways/{gatewayName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); if (apiVersion != null) { @@ -1187,7 +1639,7 @@ internal VpnGatewaysOperations(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) @@ -1218,6 +1670,12 @@ internal VpnGatewaysOperations(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) { @@ -1238,7 +1696,7 @@ internal VpnGatewaysOperations(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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1273,13 +1731,31 @@ internal VpnGatewaysOperations(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); @@ -1288,7 +1764,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) } /// - /// Resets the primary of the vpn gateway in the specified resource group. + /// Stops packet capture on vpn gateway in the specified resource group. /// /// /// The resource group name of the VpnGateway. @@ -1296,6 +1772,10 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// The name of the gateway. /// + /// + /// Vpn gateway packet capture parameters supplied to stop packet capture on + /// vpn gateway. + /// /// /// Headers that will be added to request. /// @@ -1317,7 +1797,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginResetWithHttpMessagesAsync(string resourceGroupName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginStopPacketCaptureWithHttpMessagesAsync(string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1331,7 +1811,7 @@ internal VpnGatewaysOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1341,13 +1821,14 @@ internal VpnGatewaysOperations(NetworkManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("gatewayName", gatewayName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginReset", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "BeginStopPacketCapture", 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/vpnGateways/{gatewayName}/reset").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); @@ -1394,6 +1875,12 @@ internal VpnGatewaysOperations(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) { @@ -1449,7 +1936,7 @@ internal VpnGatewaysOperations(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")) @@ -1462,7 +1949,7 @@ internal VpnGatewaysOperations(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) { diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperationsExtensions.cs index 9f5a8746b35e1..b5c0fda747049 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnGatewaysOperationsExtensions.cs @@ -232,6 +232,102 @@ public static VpnGateway Reset(this IVpnGatewaysOperations operations, string re } } + /// + /// Starts packet capture on vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to start packet capture on + /// vpn gateway. + /// + public static string StartPacketCapture(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStartParameters parameters = default(VpnGatewayPacketCaptureStartParameters)) + { + return operations.StartPacketCaptureAsync(resourceGroupName, gatewayName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Starts packet capture on vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to start packet capture on + /// vpn gateway. + /// + /// + /// The cancellation token. + /// + public static async Task StartPacketCaptureAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStartParameters parameters = default(VpnGatewayPacketCaptureStartParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.StartPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Stops packet capture on vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to stop packet capture on + /// vpn gateway. + /// + public static string StopPacketCapture(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters)) + { + return operations.StopPacketCaptureAsync(resourceGroupName, gatewayName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Stops packet capture on vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to stop packet capture on + /// vpn gateway. + /// + /// + /// The cancellation token. + /// + public static async Task StopPacketCaptureAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.StopPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Lists all the VpnGateways in a resource group. /// @@ -342,6 +438,52 @@ public static VpnGateway BeginCreateOrUpdate(this IVpnGatewaysOperations operati } } + /// + /// Updates virtual wan vpn gateway tags. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Parameters supplied to update a virtual wan vpn gateway tags. + /// + public static VpnGateway BeginUpdateTags(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, TagsObject vpnGatewayParameters) + { + return operations.BeginUpdateTagsAsync(resourceGroupName, gatewayName, vpnGatewayParameters).GetAwaiter().GetResult(); + } + + /// + /// Updates virtual wan vpn gateway tags. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Parameters supplied to update a virtual wan vpn gateway tags. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateTagsAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, TagsObject vpnGatewayParameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnGatewayParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Deletes a virtual wan vpn gateway. /// @@ -419,6 +561,102 @@ public static VpnGateway BeginReset(this IVpnGatewaysOperations operations, stri } } + /// + /// Starts packet capture on vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to start packet capture on + /// vpn gateway. + /// + public static string BeginStartPacketCapture(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStartParameters parameters = default(VpnGatewayPacketCaptureStartParameters)) + { + return operations.BeginStartPacketCaptureAsync(resourceGroupName, gatewayName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Starts packet capture on vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to start packet capture on + /// vpn gateway. + /// + /// + /// The cancellation token. + /// + public static async Task BeginStartPacketCaptureAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStartParameters parameters = default(VpnGatewayPacketCaptureStartParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginStartPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Stops packet capture on vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to stop packet capture on + /// vpn gateway. + /// + public static string BeginStopPacketCapture(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters)) + { + return operations.BeginStopPacketCaptureAsync(resourceGroupName, gatewayName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Stops packet capture on vpn gateway in the specified resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name of the VpnGateway. + /// + /// + /// The name of the gateway. + /// + /// + /// Vpn gateway packet capture parameters supplied to stop packet capture on + /// vpn gateway. + /// + /// + /// The cancellation token. + /// + public static async Task BeginStopPacketCaptureAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginStopPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Lists all the VpnGateways in a resource group. /// diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperations.cs index 115c3b9fc07ae..a14a7c2fec5e9 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperations.cs @@ -55,7 +55,7 @@ internal VpnLinkConnectionsOperations(NetworkManagementClient client) /// gateway vpn connection. /// /// - /// The resource group name of the VpnGateway. + /// The resource group name of the vpn gateway. /// /// /// The name of the gateway. @@ -102,7 +102,7 @@ internal VpnLinkConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "connectionName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperationsExtensions.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperationsExtensions.cs index 112f6855f45bc..7f4b1e85f1c17 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperationsExtensions.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnLinkConnectionsOperationsExtensions.cs @@ -29,7 +29,7 @@ public static partial class VpnLinkConnectionsOperationsExtensions /// The operations group for this extension method. /// /// - /// The resource group name of the VpnGateway. + /// The resource group name of the vpn gateway. /// /// /// The name of the gateway. @@ -50,7 +50,7 @@ public static IPage ListByVpnConnection(this IVpnLinkConn /// The operations group for this extension method. /// /// - /// The resource group name of the VpnGateway. + /// The resource group name of the vpn gateway. /// /// /// The name of the gateway. diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnServerConfigurationsAssociatedWithVirtualWanOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnServerConfigurationsAssociatedWithVirtualWanOperations.cs index 912c1d1b1c701..a29b4dc780240 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnServerConfigurationsAssociatedWithVirtualWanOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnServerConfigurationsAssociatedWithVirtualWanOperations.cs @@ -120,7 +120,7 @@ internal VpnServerConfigurationsAssociatedWithVirtualWanOperations(NetworkManage { throw new ValidationException(ValidationRules.CannotBeNull, "virtualWANName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnServerConfigurationsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnServerConfigurationsOperations.cs index d22fbb54f304f..a4a502c876913 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnServerConfigurationsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnServerConfigurationsOperations.cs @@ -94,7 +94,7 @@ internal VpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnServerConfigurationName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -321,7 +321,7 @@ internal VpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnServerConfigurationParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal VpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -715,7 +715,7 @@ internal VpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -913,7 +913,7 @@ internal VpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnServerConfigurationParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1129,7 +1129,7 @@ internal VpnServerConfigurationsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnServerConfigurationName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperations.cs index c12804b2797ba..713b3234e9a75 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinkConnectionsOperations.cs @@ -108,7 +108,7 @@ internal VpnSiteLinkConnectionsOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "linkConnectionName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperations.cs index 7c758f452eced..e449e822d1e22 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSiteLinksOperations.cs @@ -101,7 +101,7 @@ internal VpnSiteLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteLinkName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -297,7 +297,7 @@ internal VpnSiteLinksOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesConfigurationOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesConfigurationOperations.cs index 5f90e09210149..68c14061f9431 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesConfigurationOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesConfigurationOperations.cs @@ -131,7 +131,7 @@ internal VpnSitesConfigurationOperations(NetworkManagementClient client) { request.Validate(); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesOperations.cs index 071cfacd3133b..b7d9164b43b5c 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/VpnSitesOperations.cs @@ -94,7 +94,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -321,7 +321,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteParameters"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -537,7 +537,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -715,7 +715,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -917,7 +917,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { vpnSiteParameters.Validate(); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1133,7 +1133,7 @@ internal VpnSitesOperations(NetworkManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vpnSiteName"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs index c34cf8f4756a0..c12daa79e5f2f 100644 --- a/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs +++ b/sdk/network/Microsoft.Azure.Management.Network/src/Generated/WebApplicationFirewallPoliciesOperations.cs @@ -87,7 +87,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -265,7 +265,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -462,7 +462,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -675,7 +675,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { parameters.Validate(); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -920,7 +920,7 @@ internal WebApplicationFirewallPoliciesOperations(NetworkManagementClient client { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-05-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null;