Skip to content

Commit a967e48

Browse files
committed
update model classes
1 parent d33d22b commit a967e48

File tree

9 files changed

+135
-66
lines changed

9 files changed

+135
-66
lines changed

src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164
<Compile Include="Extension\GetAzureVMExtensionCommand.cs" />
165165
<Compile Include="Images\GetAzureVMImageCommand.cs" />
166166
<Compile Include="Models\HashTableExtensions.cs" />
167+
<Compile Include="Models\PSOperation.cs" />
167168
<Compile Include="Models\PSStorageAccount.cs" />
168169
<Compile Include="Extension\VMAccess\GetAzureVMAccessExtension.cs" />
169170
<Compile Include="Extension\VMAccess\RemoveAzureVMAccessExtension.cs" />
@@ -176,7 +177,6 @@
176177
<Compile Include="Images\GetAzureVMImageOfferCommand.cs" />
177178
<Compile Include="Images\GetAzureVMImageDetailCommand.cs" />
178179
<Compile Include="Images\VirtualMachineImageBaseCmdlet.cs" />
179-
<Compile Include="Models\PSOperationContext.cs" />
180180
<Compile Include="Models\PSUsage.cs" />
181181
<Compile Include="Models\PSVirtualMachineExtensionImage.cs" />
182182
<Compile Include="Models\PSVirtualMachineImage.cs" />

src/ResourceManager/Compute/Commands.Compute/Models/PSAvailabilitySet.cs

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,44 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
66
// You may obtain a copy of the License at
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
89
// Unless required by applicable law or agreed to in writing, software
910
// distributed under the License is distributed on an "AS IS" BASIS,
1011
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
1113
// See the License for the specific language governing permissions and
1214
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
15+
//
16+
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
1421

1522
using Microsoft.Azure.Management.Compute.Models;
1623
using Newtonsoft.Json;
1724
using System.Collections.Generic;
25+
using System.Text.RegularExpressions;
1826

1927
namespace Microsoft.Azure.Commands.Compute.Models
2028
{
21-
public class PSAvailabilitySet
29+
public class PSAvailabilitySet : PSOperation
2230
{
31+
// Gets or sets the property of 'ResourceGroupName'
32+
public string ResourceGroupName
33+
{
34+
get
35+
{
36+
Regex r = new Regex(@"(.*?)/resourcegroups/(?<rgname>\S+)/providers/(.*?)", RegexOptions.IgnoreCase);
37+
Match m = r.Match(Id);
38+
return m.Success ? m.Groups["rgname"].Value : null;
39+
}
40+
}
41+
2342
// Gets or sets the property of 'Id'
2443
public string Id { get; set; }
2544

@@ -41,13 +60,13 @@ public string TagsText
4160
get { return JsonConvert.SerializeObject(Tags, Formatting.Indented); }
4261
}
4362

44-
// Gets or sets the property of 'PlatformFaultDomainCount'
63+
// Gets or sets Fault Domain count.
4564
public int? PlatformFaultDomainCount { get; set; }
4665

47-
// Gets or sets the property of 'PlatformUpdateDomainCount'
66+
// Gets or sets Update Domain count.
4867
public int? PlatformUpdateDomainCount { get; set; }
4968

50-
// Gets or sets the property of 'Statuses'
69+
// Gets or sets the resource status information.
5170
public IList<InstanceViewStatus> Statuses { get; set; }
5271

5372
[JsonIgnore]
@@ -56,7 +75,7 @@ public string StatusesText
5675
get { return JsonConvert.SerializeObject(Statuses, Formatting.Indented); }
5776
}
5877

59-
// Gets or sets the property of 'VirtualMachinesReferences'
78+
// Gets or sets a list containing reference to all Virtual Machines created under this Availability Set.
6079
public IList<VirtualMachineReference> VirtualMachinesReferences { get; set; }
6180

6281
[JsonIgnore]

src/ResourceManager/Compute/Commands.Compute/Models/PSOperationContext.cs renamed to src/ResourceManager/Compute/Commands.Compute/Models/PSOperation.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
66
// You may obtain a copy of the License at
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
89
// Unless required by applicable law or agreed to in writing, software
910
// distributed under the License is distributed on an "AS IS" BASIS,
1011
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
1113
// See the License for the specific language governing permissions and
1214
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
15+
//
16+
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
1421

1522
using System.Net;
1623

17-
namespace Microsoft.Azure.Commands.Compute.Models
24+
namespace Microsoft.Azure.Commands.Compute
1825
{
19-
public class PSOperationContext
26+
public class PSOperation
2027
{
2128
public string RequestId { get; set; }
2229

src/ResourceManager/Compute/Commands.Compute/Models/PSUsage.cs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
66
// You may obtain a copy of the License at
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
89
// Unless required by applicable law or agreed to in writing, software
910
// distributed under the License is distributed on an "AS IS" BASIS,
1011
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
1113
// See the License for the specific language governing permissions and
1214
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
15+
//
16+
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
1421

1522
using Microsoft.Azure.Management.Compute.Models;
1623
using Newtonsoft.Json;
1724
using System.Collections.Generic;
25+
using System.Text.RegularExpressions;
1826

1927
namespace Microsoft.Azure.Commands.Compute.Models
2028
{
21-
public class PSUsage
29+
public class PSUsage : PSOperation
2230
{
23-
// Gets or sets the property of 'CurrentValue'
31+
// Gets or sets the current value of the usage.
2432
public int CurrentValue { get; set; }
2533

26-
// Gets or sets the property of 'Limit'
34+
// Gets or sets the limit of usage.
2735
public uint Limit { get; set; }
2836

29-
// Gets or sets the property of 'Name'
37+
// Gets or sets the name of the type of usage.
3038
public UsageName Name { get; set; }
3139

3240
[JsonIgnore]
@@ -35,7 +43,7 @@ public string NameText
3543
get { return JsonConvert.SerializeObject(Name, Formatting.Indented); }
3644
}
3745

38-
// Gets or sets the property of 'Unit'
46+
// Gets or sets an enum describing the unit of measurement.
3947
public UsageUnit Unit { get; set; }
4048

4149
[JsonIgnore]

src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachine.cs

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,44 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
66
// You may obtain a copy of the License at
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
89
// Unless required by applicable law or agreed to in writing, software
910
// distributed under the License is distributed on an "AS IS" BASIS,
1011
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
1113
// See the License for the specific language governing permissions and
1214
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
15+
//
16+
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
1421

1522
using Microsoft.Azure.Management.Compute.Models;
1623
using Newtonsoft.Json;
1724
using System.Collections.Generic;
25+
using System.Text.RegularExpressions;
1826

1927
namespace Microsoft.Azure.Commands.Compute.Models
2028
{
21-
public class PSVirtualMachine
29+
public class PSVirtualMachine : PSOperation
2230
{
31+
// Gets or sets the property of 'ResourceGroupName'
32+
public string ResourceGroupName
33+
{
34+
get
35+
{
36+
Regex r = new Regex(@"(.*?)/resourcegroups/(?<rgname>\S+)/providers/(.*?)", RegexOptions.IgnoreCase);
37+
Match m = r.Match(Id);
38+
return m.Success ? m.Groups["rgname"].Value : null;
39+
}
40+
}
41+
2342
// Gets or sets the property of 'Id'
2443
public string Id { get; set; }
2544

@@ -41,7 +60,7 @@ public string TagsText
4160
get { return JsonConvert.SerializeObject(Tags, Formatting.Indented); }
4261
}
4362

44-
// Gets or sets the property of 'AvailabilitySetReference'
63+
// Gets or sets the reference Id of the availailbity set to which this virtual machine belongs.
4564
public AvailabilitySetReference AvailabilitySetReference { get; set; }
4665

4766
[JsonIgnore]
@@ -50,7 +69,7 @@ public string AvailabilitySetReferenceText
5069
get { return JsonConvert.SerializeObject(AvailabilitySetReference, Formatting.Indented); }
5170
}
5271

53-
// Gets or sets the property of 'Extensions'
72+
// Gets the virtual machine child extension resources.
5473
public IList<VirtualMachineExtension> Extensions { get; set; }
5574

5675
[JsonIgnore]
@@ -59,7 +78,7 @@ public string ExtensionsText
5978
get { return JsonConvert.SerializeObject(Extensions, Formatting.Indented); }
6079
}
6180

62-
// Gets or sets the property of 'HardwareProfile'
81+
// Gets or sets the hardware profile.
6382
public HardwareProfile HardwareProfile { get; set; }
6483

6584
[JsonIgnore]
@@ -68,7 +87,7 @@ public string HardwareProfileText
6887
get { return JsonConvert.SerializeObject(HardwareProfile, Formatting.Indented); }
6988
}
7089

71-
// Gets or sets the property of 'InstanceView'
90+
// Gets the virtual machine instance view.
7291
public VirtualMachineInstanceView InstanceView { get; set; }
7392

7493
[JsonIgnore]
@@ -77,7 +96,7 @@ public string InstanceViewText
7796
get { return JsonConvert.SerializeObject(InstanceView, Formatting.Indented); }
7897
}
7998

80-
// Gets or sets the property of 'NetworkProfile'
99+
// Gets or sets the network profile.
81100
public NetworkProfile NetworkProfile { get; set; }
82101

83102
[JsonIgnore]
@@ -86,7 +105,7 @@ public string NetworkProfileText
86105
get { return JsonConvert.SerializeObject(NetworkProfile, Formatting.Indented); }
87106
}
88107

89-
// Gets or sets the property of 'OSProfile'
108+
// Gets or sets the OS profile.
90109
public OSProfile OSProfile { get; set; }
91110

92111
[JsonIgnore]
@@ -95,7 +114,7 @@ public string OSProfileText
95114
get { return JsonConvert.SerializeObject(OSProfile, Formatting.Indented); }
96115
}
97116

98-
// Gets or sets the property of 'Plan'
117+
// Gets or sets the purchase plan when deploying virtual machine from VM Marketplace images.
99118
public Plan Plan { get; set; }
100119

101120
[JsonIgnore]
@@ -104,10 +123,10 @@ public string PlanText
104123
get { return JsonConvert.SerializeObject(Plan, Formatting.Indented); }
105124
}
106125

107-
// Gets or sets the property of 'ProvisioningState'
126+
// Gets or sets the provisioning state, which only appears in the response.
108127
public string ProvisioningState { get; set; }
109128

110-
// Gets or sets the property of 'StorageProfile'
129+
// Gets or sets the storage profile.
111130
public StorageProfile StorageProfile { get; set; }
112131

113132
[JsonIgnore]

src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineExtensionImage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
namespace Microsoft.Azure.Commands.Compute.Models
1616
{
17-
public class PSVirtualMachineExtensionImage : PSOperationContext
17+
public class PSVirtualMachineExtensionImage : PSOperation
1818
{
1919
public string Id { get; set; }
2020

src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachineImage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
namespace Microsoft.Azure.Commands.Compute.Models
1919
{
20-
public class PSVirtualMachineImageBase : PSOperationContext
20+
public class PSVirtualMachineImageBase : PSOperation
2121
{
2222
public string Id { get; set; }
2323

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
66
// You may obtain a copy of the License at
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
89
// Unless required by applicable law or agreed to in writing, software
910
// distributed under the License is distributed on an "AS IS" BASIS,
1011
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
1113
// See the License for the specific language governing permissions and
1214
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
15+
//
16+
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
1421

1522
using Microsoft.Azure.Management.Compute.Models;
1623
using Newtonsoft.Json;
1724
using System.Collections.Generic;
25+
using System.Text.RegularExpressions;
1826

1927
namespace Microsoft.Azure.Commands.Compute.Models
2028
{
21-
public class PSVirtualMachineImageResource
29+
public class PSVirtualMachineImageResource : PSOperation
2230
{
23-
// Gets or sets the property of 'Id'
31+
// Gets or sets the ID of the artifact.
2432
public string Id { get; set; }
2533

26-
// Gets or sets the property of 'Location'
34+
// Gets or sets the location of the resource.
2735
public string Location { get; set; }
2836

29-
// Gets or sets the property of 'Name'
37+
// Gets or sets the name of the resource.
3038
public string Name { get; set; }
3139
}
3240
}

0 commit comments

Comments
 (0)