-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ManagedDisk.cs
119 lines (97 loc) · 4.03 KB
/
ManagedDisk.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// 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.
//
// This file was autogenerated by a tool.
// Do not modify it.
//
namespace Microsoft.Azure.Batch
{
using Models = Microsoft.Azure.Batch.Protocol.Models;
using System;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// The managed disk object.
/// </summary>
public partial class ManagedDisk : ITransportObjectProvider<Models.ManagedDisk>, IPropertyMetadata
{
private class PropertyContainer : PropertyCollection
{
public readonly PropertyAccessor<Common.StorageAccountType?> StorageAccountTypeProperty;
public PropertyContainer() : base(BindingState.Unbound)
{
this.StorageAccountTypeProperty = this.CreatePropertyAccessor<Common.StorageAccountType?>(nameof(StorageAccountType), BindingAccess.Read | BindingAccess.Write);
}
public PropertyContainer(Models.ManagedDisk protocolObject) : base(BindingState.Bound)
{
this.StorageAccountTypeProperty = this.CreatePropertyAccessor(
UtilitiesInternal.MapNullableEnum<Models.StorageAccountType, Common.StorageAccountType>(protocolObject.StorageAccountType),
nameof(StorageAccountType),
BindingAccess.Read | BindingAccess.Write);
}
}
private readonly PropertyContainer propertyContainer;
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="ManagedDisk"/> class.
/// </summary>
/// <param name='storageAccountType'>The Azure Storage account name.</param>
public ManagedDisk(
Common.StorageAccountType? storageAccountType = default(Common.StorageAccountType?))
{
this.propertyContainer = new PropertyContainer();
this.StorageAccountType = storageAccountType;
}
/// <summary>
/// Default constructor to support mocking the <see cref="ManagedDisk"/> class.
/// </summary>
protected ManagedDisk()
{
this.propertyContainer = new PropertyContainer();
}
internal ManagedDisk(Models.ManagedDisk protocolObject)
{
this.propertyContainer = new PropertyContainer(protocolObject);
}
#endregion Constructors
#region ManagedDisk
/// <summary>
/// Gets or sets the Azure Storage account name.
/// </summary>
public Common.StorageAccountType? StorageAccountType
{
get { return this.propertyContainer.StorageAccountTypeProperty.Value; }
set { this.propertyContainer.StorageAccountTypeProperty.Value = value; }
}
#endregion // ManagedDisk
#region IPropertyMetadata
bool IModifiable.HasBeenModified
{
get { return this.propertyContainer.HasBeenModified; }
}
bool IReadOnly.IsReadOnly
{
get { return this.propertyContainer.IsReadOnly; }
set { this.propertyContainer.IsReadOnly = value; }
}
#endregion //IPropertyMetadata
#region Internal/private methods
/// <summary>
/// Return a protocol object of the requested type.
/// </summary>
/// <returns>The protocol object of the requested type.</returns>
Models.ManagedDisk ITransportObjectProvider<Models.ManagedDisk>.GetTransportObject()
{
Models.ManagedDisk result = new Models.ManagedDisk()
{
StorageAccountType = UtilitiesInternal.MapNullableEnum<Common.StorageAccountType, Models.StorageAccountType>(this.StorageAccountType),
};
return result;
}
#endregion // Internal/private methods
}
}