-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
CapacityReservationGroupPatch.cs
58 lines (52 loc) · 4.39 KB
/
CapacityReservationGroupPatch.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.ResourceManager.Resources.Models;
namespace Azure.ResourceManager.Compute.Models
{
/// <summary> Specifies information about the capacity reservation group. Only tags can be updated. </summary>
public partial class CapacityReservationGroupPatch : ComputeResourcePatch
{
/// <summary> Initializes a new instance of <see cref="CapacityReservationGroupPatch"/>. </summary>
public CapacityReservationGroupPatch()
{
CapacityReservations = new ChangeTrackingList<SubResource>();
VirtualMachinesAssociated = new ChangeTrackingList<SubResource>();
}
/// <summary> Initializes a new instance of <see cref="CapacityReservationGroupPatch"/>. </summary>
/// <param name="tags"> Resource tags. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
/// <param name="capacityReservations"> A list of all capacity reservation resource ids that belong to capacity reservation group. </param>
/// <param name="virtualMachinesAssociated"> A list of references to all virtual machines associated to the capacity reservation group. </param>
/// <param name="instanceView"> The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group. </param>
/// <param name="sharingProfile"> Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. Pls. keep in mind the capacity reservation group resource generally can be shared across subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship established between the AAD tenants. **Note:** Minimum api-version: 2024-03-01. Please refer to https://aka.ms/computereservationsharing for more details. </param>
internal CapacityReservationGroupPatch(IDictionary<string, string> tags, IDictionary<string, BinaryData> serializedAdditionalRawData, IReadOnlyList<SubResource> capacityReservations, IReadOnlyList<SubResource> virtualMachinesAssociated, CapacityReservationGroupInstanceView instanceView, ResourceSharingProfile sharingProfile) : base(tags, serializedAdditionalRawData)
{
CapacityReservations = capacityReservations;
VirtualMachinesAssociated = virtualMachinesAssociated;
InstanceView = instanceView;
SharingProfile = sharingProfile;
}
/// <summary> A list of all capacity reservation resource ids that belong to capacity reservation group. </summary>
public IReadOnlyList<SubResource> CapacityReservations { get; }
/// <summary> A list of references to all virtual machines associated to the capacity reservation group. </summary>
public IReadOnlyList<SubResource> VirtualMachinesAssociated { get; }
/// <summary> The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group. </summary>
public CapacityReservationGroupInstanceView InstanceView { get; }
/// <summary> Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. Pls. keep in mind the capacity reservation group resource generally can be shared across subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship established between the AAD tenants. **Note:** Minimum api-version: 2024-03-01. Please refer to https://aka.ms/computereservationsharing for more details. </summary>
internal ResourceSharingProfile SharingProfile { get; set; }
/// <summary> Specifies an array of subscription resource IDs that capacity reservation group is shared with. **Note:** Minimum api-version: 2024-03-01. Please refer to https://aka.ms/computereservationsharing for more details. </summary>
public IList<WritableSubResource> SharingSubscriptionIds
{
get
{
if (SharingProfile is null)
SharingProfile = new ResourceSharingProfile();
return SharingProfile.SubscriptionIds;
}
}
}
}