-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
DiskImagePatch.cs
59 lines (52 loc) · 3.34 KB
/
DiskImagePatch.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Resources.Models;
namespace Azure.ResourceManager.Compute.Models
{
/// <summary> The source user image virtual hard disk. Only tags may be updated. </summary>
public partial class DiskImagePatch : ComputeResourcePatch
{
/// <summary> Initializes a new instance of <see cref="DiskImagePatch"/>. </summary>
public DiskImagePatch()
{
}
/// <summary> Initializes a new instance of <see cref="DiskImagePatch"/>. </summary>
/// <param name="tags"> Resource tags. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
/// <param name="sourceVirtualMachine"> The source virtual machine from which Image is created. </param>
/// <param name="storageProfile"> Specifies the storage settings for the virtual machine disks. </param>
/// <param name="provisioningState"> The provisioning state. </param>
/// <param name="hyperVGeneration"> Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. </param>
internal DiskImagePatch(IDictionary<string, string> tags, IDictionary<string, BinaryData> serializedAdditionalRawData, WritableSubResource sourceVirtualMachine, ImageStorageProfile storageProfile, string provisioningState, HyperVGeneration? hyperVGeneration) : base(tags, serializedAdditionalRawData)
{
SourceVirtualMachine = sourceVirtualMachine;
StorageProfile = storageProfile;
ProvisioningState = provisioningState;
HyperVGeneration = hyperVGeneration;
}
/// <summary> The source virtual machine from which Image is created. </summary>
internal WritableSubResource SourceVirtualMachine { get; set; }
/// <summary> Gets or sets Id. </summary>
public ResourceIdentifier SourceVirtualMachineId
{
get => SourceVirtualMachine is null ? default : SourceVirtualMachine.Id;
set
{
if (SourceVirtualMachine is null)
SourceVirtualMachine = new WritableSubResource();
SourceVirtualMachine.Id = value;
}
}
/// <summary> Specifies the storage settings for the virtual machine disks. </summary>
public ImageStorageProfile StorageProfile { get; set; }
/// <summary> The provisioning state. </summary>
public string ProvisioningState { get; }
/// <summary> Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. </summary>
public HyperVGeneration? HyperVGeneration { get; set; }
}
}