| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System; |
| | 5 | | using System.ComponentModel; |
| | 6 | |
|
| | 7 | | namespace Azure.Storage.Files.DataLake.Models |
| | 8 | | { |
| | 9 | | /// <summary> |
| | 10 | | /// An Access policy. |
| | 11 | | /// </summary> |
| | 12 | | public class DataLakeAccessPolicy |
| | 13 | | { |
| | 14 | | /// <summary> |
| | 15 | | /// The <see cref="DateTimeOffset"/> the policy becomes active. |
| | 16 | | /// </summary> |
| 240 | 17 | | public DateTimeOffset? PolicyStartsOn { get; set; } |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// The <see cref="DateTimeOffset"/> the policy expires. |
| | 21 | | /// </summary> |
| 212 | 22 | | public DateTimeOffset? PolicyExpiresOn { get; set; } |
| | 23 | |
|
| | 24 | |
|
| | 25 | | /// <summary> |
| | 26 | | /// The <see cref="DateTimeOffset"/> the policy becomes active. |
| | 27 | | /// This value is non-nullable, please use <see cref="PolicyStartsOn"/>. |
| | 28 | | /// </summary> |
| | 29 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | 30 | | public System.DateTimeOffset StartsOn |
| | 31 | | { |
| | 32 | | get |
| | 33 | | { |
| 24 | 34 | | return PolicyStartsOn == default ? |
| 24 | 35 | | StartsOn : |
| 24 | 36 | | (DateTimeOffset)PolicyStartsOn; |
| | 37 | | } |
| | 38 | | set |
| | 39 | | { |
| 4 | 40 | | PolicyStartsOn = value; |
| 4 | 41 | | } |
| | 42 | | } |
| | 43 | |
|
| | 44 | | /// <summary> |
| | 45 | | /// The <see cref="DateTimeOffset"/> the policy expires. |
| | 46 | | /// This value is non-nullable, please use <see cref="PolicyExpiresOn"/>. |
| | 47 | | /// </summary> |
| | 48 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | 49 | | public System.DateTimeOffset ExpiresOn |
| | 50 | | { |
| | 51 | | get |
| | 52 | | { |
| 16 | 53 | | return PolicyExpiresOn == default ? |
| 16 | 54 | | ExpiresOn : |
| 16 | 55 | | (DateTimeOffset)PolicyExpiresOn; |
| | 56 | | } |
| | 57 | | set |
| | 58 | | { |
| 4 | 59 | | PolicyExpiresOn = value; |
| 4 | 60 | | } |
| | 61 | | } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// The file permissions for the policy. |
| | 65 | | /// </summary> |
| 152 | 66 | | public string Permissions { get; set; } |
| | 67 | | } |
| | 68 | | } |