Skip to content

Commit 6c7b0c9

Browse files
authored
Changes (#26073)
1 parent 5e792bf commit 6c7b0c9

File tree

6 files changed

+84
-17
lines changed

6 files changed

+84
-17
lines changed

src/Network/Network.Management.Sdk/Generated/IIpAllocationsOperations.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public partial interface IIPAllocationsOperations
3434
/// <exception cref="Microsoft.Rest.Azure.CloudException">
3535
/// Thrown when the operation returned an invalid status code
3636
/// </exception>
37-
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeleteWithHttpMessagesAsync(string resourceGroupName, string ipAllocationName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
37+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<IPAllocationsDeleteHeaders>> DeleteWithHttpMessagesAsync(string resourceGroupName, string ipAllocationName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
3838

3939
/// <summary>
4040
/// Gets the specified IpAllocation by resource group.
@@ -187,7 +187,7 @@ public partial interface IIPAllocationsOperations
187187
/// <exception cref="Microsoft.Rest.Azure.CloudException">
188188
/// Thrown when the operation returned an invalid status code
189189
/// </exception>
190-
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string ipAllocationName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
190+
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<IPAllocationsDeleteHeaders>> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string ipAllocationName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
191191

192192
/// <summary>
193193
/// Creates or updates an IpAllocation in the specified resource group.

src/Network/Network.Management.Sdk/Generated/IpAllocationsOperations.cs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ internal IPAllocationsOperations (NetworkManagementClient client)
5353
/// <param name='cancellationToken'>
5454
/// The cancellation token.
5555
/// </param>
56-
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeleteWithHttpMessagesAsync(string resourceGroupName, string ipAllocationName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
56+
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<IPAllocationsDeleteHeaders>> DeleteWithHttpMessagesAsync(string resourceGroupName, string ipAllocationName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
5757
{
5858
// Send Request
59-
Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, ipAllocationName, customHeaders, cancellationToken).ConfigureAwait(false);
59+
Microsoft.Rest.Azure.AzureOperationHeaderResponse<IPAllocationsDeleteHeaders> _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, ipAllocationName, customHeaders, cancellationToken).ConfigureAwait(false);
6060
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
6161
}
6262

@@ -945,7 +945,7 @@ internal IPAllocationsOperations (NetworkManagementClient client)
945945
/// <return>
946946
/// A response object containing the response body and response headers.
947947
/// </return>
948-
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string ipAllocationName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
948+
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<IPAllocationsDeleteHeaders>> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string ipAllocationName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
949949
{
950950

951951

@@ -1088,14 +1088,27 @@ internal IPAllocationsOperations (NetworkManagementClient client)
10881088
throw ex;
10891089
}
10901090
// Create Result
1091-
var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
1091+
var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse<IPAllocationsDeleteHeaders>();
10921092
_result.Request = _httpRequest;
10931093
_result.Response = _httpResponse;
10941094

10951095
if (_httpResponse.Headers.Contains("x-ms-request-id"))
10961096
{
10971097
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
10981098
}
1099+
try
1100+
{
1101+
_result.Headers = _httpResponse.GetHeadersAsJson().ToObject<IPAllocationsDeleteHeaders>(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings));
1102+
}
1103+
catch (Newtonsoft.Json.JsonException ex)
1104+
{
1105+
_httpRequest.Dispose();
1106+
if (_httpResponse != null)
1107+
{
1108+
_httpResponse.Dispose();
1109+
}
1110+
throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
1111+
}
10991112
if (_shouldTrace)
11001113
{
11011114
Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);

src/Network/Network.Management.Sdk/Generated/IpAllocationsOperationsExtensions.cs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public static partial class IPAllocationsOperationsExtensions
2424
/// <param name='ipAllocationName'>
2525
/// The name of the IpAllocation.
2626
/// </param>
27-
public static void Delete(this IIPAllocationsOperations operations, string resourceGroupName, string ipAllocationName)
27+
public static IPAllocationsDeleteHeaders Delete(this IIPAllocationsOperations operations, string resourceGroupName, string ipAllocationName)
2828
{
29-
((IIPAllocationsOperations)operations).DeleteAsync(resourceGroupName, ipAllocationName).GetAwaiter().GetResult();
29+
return ((IIPAllocationsOperations)operations).DeleteAsync(resourceGroupName, ipAllocationName).GetAwaiter().GetResult();
3030
}
3131

3232
/// <summary>
@@ -44,9 +44,12 @@ public static void Delete(this IIPAllocationsOperations operations, string resou
4444
/// <param name='cancellationToken'>
4545
/// The cancellation token.
4646
/// </param>
47-
public static async System.Threading.Tasks.Task DeleteAsync(this IIPAllocationsOperations operations, string resourceGroupName, string ipAllocationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
47+
public static async System.Threading.Tasks.Task<IPAllocationsDeleteHeaders> DeleteAsync(this IIPAllocationsOperations operations, string resourceGroupName, string ipAllocationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
4848
{
49-
(await operations.DeleteWithHttpMessagesAsync(resourceGroupName, ipAllocationName, null, cancellationToken).ConfigureAwait(false)).Dispose();
49+
using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, ipAllocationName, null, cancellationToken).ConfigureAwait(false))
50+
{
51+
return _result.Headers;
52+
}
5053
}
5154
/// <summary>
5255
/// Gets the specified IpAllocation by resource group.
@@ -243,9 +246,9 @@ public static Microsoft.Rest.Azure.IPage<IpAllocation> ListByResourceGroup(this
243246
/// <param name='ipAllocationName'>
244247
/// The name of the IpAllocation.
245248
/// </param>
246-
public static void BeginDelete(this IIPAllocationsOperations operations, string resourceGroupName, string ipAllocationName)
249+
public static IPAllocationsDeleteHeaders BeginDelete(this IIPAllocationsOperations operations, string resourceGroupName, string ipAllocationName)
247250
{
248-
((IIPAllocationsOperations)operations).BeginDeleteAsync(resourceGroupName, ipAllocationName).GetAwaiter().GetResult();
251+
return ((IIPAllocationsOperations)operations).BeginDeleteAsync(resourceGroupName, ipAllocationName).GetAwaiter().GetResult();
249252
}
250253

251254
/// <summary>
@@ -263,9 +266,12 @@ public static void BeginDelete(this IIPAllocationsOperations operations, string
263266
/// <param name='cancellationToken'>
264267
/// The cancellation token.
265268
/// </param>
266-
public static async System.Threading.Tasks.Task BeginDeleteAsync(this IIPAllocationsOperations operations, string resourceGroupName, string ipAllocationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
269+
public static async System.Threading.Tasks.Task<IPAllocationsDeleteHeaders> BeginDeleteAsync(this IIPAllocationsOperations operations, string resourceGroupName, string ipAllocationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
267270
{
268-
(await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, ipAllocationName, null, cancellationToken).ConfigureAwait(false)).Dispose();
271+
using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, ipAllocationName, null, cancellationToken).ConfigureAwait(false))
272+
{
273+
return _result.Headers;
274+
}
269275
}
270276
/// <summary>
271277
/// Creates or updates an IpAllocation in the specified resource group.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.Network.Models
7+
{
8+
using System.Linq;
9+
10+
public partial class IPAllocationsDeleteHeaders
11+
{
12+
/// <summary>
13+
/// Initializes a new instance of the IPAllocationsDeleteHeaders class.
14+
/// </summary>
15+
public IPAllocationsDeleteHeaders()
16+
{
17+
CustomInit();
18+
}
19+
20+
/// <summary>
21+
/// Initializes a new instance of the IPAllocationsDeleteHeaders class.
22+
/// </summary>
23+
24+
/// <param name="location">
25+
/// </param>
26+
public IPAllocationsDeleteHeaders(string location = default(string))
27+
28+
{
29+
this.Location = location;
30+
CustomInit();
31+
}
32+
33+
/// <summary>
34+
/// An initialization method that performs custom operations like setting defaults
35+
/// </summary>
36+
partial void CustomInit();
37+
38+
39+
/// <summary>
40+
/// Gets or sets
41+
/// </summary>
42+
[Newtonsoft.Json.JsonProperty(PropertyName = "Location")]
43+
public string Location {get; set; }
44+
}
45+
}

src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkEncryption.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public VirtualNetworkEncryption()
2828
/// <param name="enabled">Indicates if encryption is enabled on the virtual network.
2929
/// </param>
3030

31-
/// <param name="enforcement">If the encrypted VNet allows VM that does not support encryption
31+
/// <param name="enforcement">If the encrypted VNet allows VM that does not support encryption. This
32+
/// field is for future support, AllowUnencrypted is the only supported value
33+
/// at general availability.
3234
/// Possible values include: &#39;DropUnencrypted&#39;, &#39;AllowUnencrypted&#39;</param>
3335
public VirtualNetworkEncryption(bool enabled, string enforcement = default(string))
3436

@@ -52,7 +54,8 @@ public VirtualNetworkEncryption()
5254

5355
/// <summary>
5456
/// Gets or sets if the encrypted VNet allows VM that does not support
55-
/// encryption Possible values include: &#39;DropUnencrypted&#39;, &#39;AllowUnencrypted&#39;
57+
/// encryption. This field is for future support, AllowUnencrypted is the only
58+
/// supported value at general availability. Possible values include: &#39;DropUnencrypted&#39;, &#39;AllowUnencrypted&#39;
5659
/// </summary>
5760
[Newtonsoft.Json.JsonProperty(PropertyName = "enforcement")]
5861
public string Enforcement {get; set; }

src/Network/Network.Management.Sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use-extension:
2727
2828
###
2929
``` yaml
30-
commit: 3d6e80ed299ddd6d10f4af07a7ea25489a007f74
30+
commit: 738879cc6e1c5569b01130fd69a2587388fc34b3
3131
input-file:
3232
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/applicationGateway.json
3333
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/network/resource-manager/Microsoft.Network/stable/2024-03-01/applicationGatewayWafDynamicManifests.json

0 commit comments

Comments
 (0)