-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
ComputeResourceSkuLocationInfo.cs
36 lines (30 loc) · 1.5 KB
/
ComputeResourceSkuLocationInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#nullable disable
using System.Runtime.CompilerServices;
using System.Text.Json;
using Azure.Core;
namespace Azure.ResourceManager.Compute.Models
{
[CodeGenSerialization(nameof(ExtendedLocationType), SerializationValueHook = nameof(WriteExtendedLocationType), DeserializationValueHook = nameof(ReadExtendedLocationType))]
public partial class ComputeResourceSkuLocationInfo
{
// this piece of customized code replaces the ExtendedLocationType with the one in resourcemanager
/// <summary> The type of the extended location. </summary>
[CodeGenMember("ExtendedLocationType")]
public Azure.ResourceManager.Resources.Models.ExtendedLocationType? ExtendedLocationType { get; }
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal void WriteExtendedLocationType(Utf8JsonWriter writer)
{
writer.WriteStringValue(ExtendedLocationType.Value.ToString());
}
// deserialization hook for required property
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static void ReadExtendedLocationType(JsonProperty property, ref Azure.ResourceManager.Resources.Models.ExtendedLocationType? type)
{
if (property.Value.ValueKind == JsonValueKind.Null)
return;
type = new Azure.ResourceManager.Resources.Models.ExtendedLocationType(property.Value.GetString());
}
}
}