-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
AutoscaleSettingData.cs
75 lines (68 loc) · 4.66 KB
/
AutoscaleSettingData.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using Azure.Core;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Monitor.Models;
namespace Azure.ResourceManager.Monitor
{
/// <summary>
/// A class representing the AutoscaleSetting data model.
/// The autoscale setting resource.
/// </summary>
public partial class AutoscaleSettingData : TrackedResourceData
{
/// <summary> Initializes a new instance of AutoscaleSettingData. </summary>
/// <param name="location"> The location. </param>
/// <param name="profiles"> the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. </param>
/// <exception cref="ArgumentNullException"> <paramref name="profiles"/> is null. </exception>
public AutoscaleSettingData(AzureLocation location, IEnumerable<AutoscaleProfile> profiles) : base(location)
{
Argument.AssertNotNull(profiles, nameof(profiles));
Profiles = profiles.ToList();
Notifications = new ChangeTrackingList<AutoscaleNotification>();
}
/// <summary> Initializes a new instance of AutoscaleSettingData. </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="profiles"> the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. </param>
/// <param name="notifications"> the collection of notifications. </param>
/// <param name="isEnabled"> the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. </param>
/// <param name="predictiveAutoscalePolicy"> the predictive autoscale policy mode. </param>
/// <param name="autoscaleSettingName"> the name of the autoscale setting. </param>
/// <param name="targetResourceId"> the resource identifier of the resource that the autoscale setting should be added to. </param>
/// <param name="targetResourceLocation"> the location of the resource that the autoscale setting should be added to. </param>
internal AutoscaleSettingData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, IList<AutoscaleProfile> profiles, IList<AutoscaleNotification> notifications, bool? isEnabled, PredictiveAutoscalePolicy predictiveAutoscalePolicy, string autoscaleSettingName, ResourceIdentifier targetResourceId, AzureLocation? targetResourceLocation) : base(id, name, resourceType, systemData, tags, location)
{
Profiles = profiles;
Notifications = notifications;
IsEnabled = isEnabled;
PredictiveAutoscalePolicy = predictiveAutoscalePolicy;
AutoscaleSettingName = autoscaleSettingName;
TargetResourceId = targetResourceId;
TargetResourceLocation = targetResourceLocation;
}
/// <summary> the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. </summary>
public IList<AutoscaleProfile> Profiles { get; }
/// <summary> the collection of notifications. </summary>
public IList<AutoscaleNotification> Notifications { get; set; }
/// <summary> the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. </summary>
public bool? IsEnabled { get; set; }
/// <summary> the predictive autoscale policy mode. </summary>
public PredictiveAutoscalePolicy PredictiveAutoscalePolicy { get; set; }
/// <summary> the name of the autoscale setting. </summary>
public string AutoscaleSettingName { get; set; }
/// <summary> the resource identifier of the resource that the autoscale setting should be added to. </summary>
public ResourceIdentifier TargetResourceId { get; set; }
/// <summary> the location of the resource that the autoscale setting should be added to. </summary>
public AzureLocation? TargetResourceLocation { get; set; }
}
}