-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
CloudServiceData.cs
197 lines (186 loc) · 11.6 KB
/
CloudServiceData.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// 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.Compute.Models;
using Azure.ResourceManager.Models;
namespace Azure.ResourceManager.Compute
{
/// <summary>
/// A class representing the CloudService data model.
/// Describes the cloud service.
/// </summary>
public partial class CloudServiceData : TrackedResourceData
{
/// <summary>
/// Keeps track of any properties unknown to the library.
/// <para>
/// To assign an object to the value of this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formatted json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
private IDictionary<string, BinaryData> _serializedAdditionalRawData;
/// <summary> Initializes a new instance of <see cref="CloudServiceData"/>. </summary>
/// <param name="location"> The location. </param>
public CloudServiceData(AzureLocation location) : base(location)
{
Zones = new ChangeTrackingList<string>();
}
/// <summary> Initializes a new instance of <see cref="CloudServiceData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="tags"> The tags. </param>
/// <param name="location"> The location. </param>
/// <param name="zones"> List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. </param>
/// <param name="packageUri">
/// Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account.
/// This is a write-only property and is not returned in GET calls.
/// </param>
/// <param name="configuration"> Specifies the XML service configuration (.cscfg) for the cloud service. </param>
/// <param name="configurationUri">
/// Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account.
/// This is a write-only property and is not returned in GET calls.
/// </param>
/// <param name="startCloudService">
/// (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`.
/// If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff.
/// </param>
/// <param name="allowModelOverride">
/// (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively.
/// The default value is `false`.
/// </param>
/// <param name="upgradeMode">
/// Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains.
/// Possible Values are <br /><br />**Auto**<br /><br />**Manual** <br /><br />**Simultaneous**<br /><br />
/// If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence.
/// </param>
/// <param name="roleProfile"> Describes the role profile for the cloud service. </param>
/// <param name="osProfile"> Describes the OS profile for the cloud service. </param>
/// <param name="networkProfile"> Network Profile for the cloud service. </param>
/// <param name="extensionProfile"> Describes a cloud service extension profile. </param>
/// <param name="provisioningState"> The provisioning state, which only appears in the response. </param>
/// <param name="uniqueId"> The unique identifier for the cloud service. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal CloudServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, IList<string> zones, Uri packageUri, string configuration, Uri configurationUri, bool? startCloudService, bool? allowModelOverride, CloudServiceUpgradeMode? upgradeMode, CloudServiceRoleProfile roleProfile, CloudServiceOSProfile osProfile, CloudServiceNetworkProfile networkProfile, CloudServiceExtensionProfile extensionProfile, string provisioningState, string uniqueId, IDictionary<string, BinaryData> serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
Zones = zones;
PackageUri = packageUri;
Configuration = configuration;
ConfigurationUri = configurationUri;
StartCloudService = startCloudService;
AllowModelOverride = allowModelOverride;
UpgradeMode = upgradeMode;
RoleProfile = roleProfile;
OSProfile = osProfile;
NetworkProfile = networkProfile;
ExtensionProfile = extensionProfile;
ProvisioningState = provisioningState;
UniqueId = uniqueId;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
/// <summary> Initializes a new instance of <see cref="CloudServiceData"/> for deserialization. </summary>
internal CloudServiceData()
{
}
/// <summary> List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. </summary>
public IList<string> Zones { get; }
/// <summary>
/// Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account.
/// This is a write-only property and is not returned in GET calls.
/// </summary>
public Uri PackageUri { get; set; }
/// <summary> Specifies the XML service configuration (.cscfg) for the cloud service. </summary>
public string Configuration { get; set; }
/// <summary>
/// Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account.
/// This is a write-only property and is not returned in GET calls.
/// </summary>
public Uri ConfigurationUri { get; set; }
/// <summary>
/// (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`.
/// If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff.
/// </summary>
public bool? StartCloudService { get; set; }
/// <summary>
/// (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively.
/// The default value is `false`.
/// </summary>
public bool? AllowModelOverride { get; set; }
/// <summary>
/// Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains.
/// Possible Values are <br /><br />**Auto**<br /><br />**Manual** <br /><br />**Simultaneous**<br /><br />
/// If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence.
/// </summary>
public CloudServiceUpgradeMode? UpgradeMode { get; set; }
/// <summary> Describes the role profile for the cloud service. </summary>
internal CloudServiceRoleProfile RoleProfile { get; set; }
/// <summary> List of roles for the cloud service. </summary>
public IList<CloudServiceRoleProfileProperties> Roles
{
get
{
if (RoleProfile is null)
RoleProfile = new CloudServiceRoleProfile();
return RoleProfile.Roles;
}
}
/// <summary> Describes the OS profile for the cloud service. </summary>
internal CloudServiceOSProfile OSProfile { get; set; }
/// <summary> Specifies set of certificates that should be installed onto the role instances. </summary>
public IList<CloudServiceVaultSecretGroup> OSSecrets
{
get
{
if (OSProfile is null)
OSProfile = new CloudServiceOSProfile();
return OSProfile.Secrets;
}
}
/// <summary> Network Profile for the cloud service. </summary>
public CloudServiceNetworkProfile NetworkProfile { get; set; }
/// <summary> Describes a cloud service extension profile. </summary>
internal CloudServiceExtensionProfile ExtensionProfile { get; set; }
/// <summary> List of extensions for the cloud service. </summary>
public IList<CloudServiceExtension> Extensions
{
get
{
if (ExtensionProfile is null)
ExtensionProfile = new CloudServiceExtensionProfile();
return ExtensionProfile.Extensions;
}
}
/// <summary> The provisioning state, which only appears in the response. </summary>
public string ProvisioningState { get; }
/// <summary> The unique identifier for the cloud service. </summary>
public string UniqueId { get; }
}
}