-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ServiceArtifactReference.cs
123 lines (101 loc) · 4.18 KB
/
ServiceArtifactReference.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
120
121
122
123
// 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>
/// Specifies the service artifact reference id used to set same image version for all virtual machines in the scale
/// set when using 'latest' image version.
/// </summary>
public partial class ServiceArtifactReference : ITransportObjectProvider<Models.ServiceArtifactReference>, IPropertyMetadata
{
private class PropertyContainer : PropertyCollection
{
public readonly PropertyAccessor<string> IdProperty;
public PropertyContainer() : base(BindingState.Unbound)
{
this.IdProperty = this.CreatePropertyAccessor<string>(nameof(Id), BindingAccess.Read | BindingAccess.Write);
}
public PropertyContainer(Models.ServiceArtifactReference protocolObject) : base(BindingState.Bound)
{
this.IdProperty = this.CreatePropertyAccessor(
protocolObject.Id,
nameof(Id),
BindingAccess.Read | BindingAccess.Write);
}
}
private readonly PropertyContainer propertyContainer;
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="ServiceArtifactReference"/> class.
/// </summary>
/// <param name='id'>The service artifact reference id of ServiceArtifactReference</param>
public ServiceArtifactReference(
string id)
{
this.propertyContainer = new PropertyContainer();
this.Id = id;
}
/// <summary>
/// Default constructor to support mocking the <see cref="ServiceArtifactReference"/> class.
/// </summary>
protected ServiceArtifactReference()
{
this.propertyContainer = new PropertyContainer();
}
internal ServiceArtifactReference(Models.ServiceArtifactReference protocolObject)
{
this.propertyContainer = new PropertyContainer(protocolObject);
}
#endregion Constructors
#region ServiceArtifactReference
/// <summary>
/// Gets or sets the service artifact reference id of ServiceArtifactReference
/// </summary>
/// <remarks>
/// The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}
/// </remarks>
public string Id
{
get { return this.propertyContainer.IdProperty.Value; }
set { this.propertyContainer.IdProperty.Value = value; }
}
#endregion // ServiceArtifactReference
#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.ServiceArtifactReference ITransportObjectProvider<Models.ServiceArtifactReference>.GetTransportObject()
{
Models.ServiceArtifactReference result = new Models.ServiceArtifactReference()
{
Id = this.Id,
};
return result;
}
#endregion // Internal/private methods
}
}