| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | |
|
| | 10 | | namespace Azure.ResourceManager.Storage.Models |
| | 11 | | { |
| | 12 | | /// <summary> An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. </summary> |
| | 13 | | public partial class ManagementPolicyRule |
| | 14 | | { |
| | 15 | | /// <summary> Initializes a new instance of ManagementPolicyRule. </summary> |
| | 16 | | /// <param name="name"> A rule name can contain any combination of alpha numeric characters. Rule name is case-s |
| | 17 | | /// <param name="definition"> An object that defines the Lifecycle rule. </param> |
| 12 | 18 | | public ManagementPolicyRule(string name, ManagementPolicyDefinition definition) |
| | 19 | | { |
| 12 | 20 | | if (name == null) |
| | 21 | | { |
| 0 | 22 | | throw new ArgumentNullException(nameof(name)); |
| | 23 | | } |
| 12 | 24 | | if (definition == null) |
| | 25 | | { |
| 0 | 26 | | throw new ArgumentNullException(nameof(definition)); |
| | 27 | | } |
| | 28 | |
|
| 12 | 29 | | Name = name; |
| 12 | 30 | | Type = "Lifecycle"; |
| 12 | 31 | | Definition = definition; |
| 12 | 32 | | } |
| | 33 | |
|
| | 34 | | /// <summary> Initializes a new instance of ManagementPolicyRule. </summary> |
| | 35 | | /// <param name="enabled"> Rule is enabled if set to true. </param> |
| | 36 | | /// <param name="name"> A rule name can contain any combination of alpha numeric characters. Rule name is case-s |
| | 37 | | /// <param name="type"> The valid value is Lifecycle. </param> |
| | 38 | | /// <param name="definition"> An object that defines the Lifecycle rule. </param> |
| 24 | 39 | | internal ManagementPolicyRule(bool? enabled, string name, string type, ManagementPolicyDefinition definition) |
| | 40 | | { |
| 24 | 41 | | Enabled = enabled; |
| 24 | 42 | | Name = name; |
| 24 | 43 | | Type = type; |
| 24 | 44 | | Definition = definition; |
| 24 | 45 | | } |
| | 46 | |
|
| | 47 | | /// <summary> Rule is enabled if set to true. </summary> |
| 116 | 48 | | public bool? Enabled { get; set; } |
| | 49 | | /// <summary> A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. |
| 168 | 50 | | public string Name { get; set; } |
| | 51 | | /// <summary> The valid value is Lifecycle. </summary> |
| 48 | 52 | | public string Type { get; set; } |
| | 53 | | /// <summary> An object that defines the Lifecycle rule. </summary> |
| 360 | 54 | | public ManagementPolicyDefinition Definition { get; set; } |
| | 55 | | } |
| | 56 | | } |