| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.Collections.Generic; |
| | | 6 | | using System.Text; |
| | | 7 | | |
| | | 8 | | namespace Azure.Storage.Files.DataLake.Models |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// A user delegation key |
| | | 12 | | /// </summary> |
| | | 13 | | public class UserDelegationKey |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// The Azure Active Directory object ID in GUID format. |
| | | 17 | | /// </summary> |
| | 116 | 18 | | public string SignedObjectId { get; internal set; } |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// The Azure Active Directory tenant ID in GUID format |
| | | 22 | | /// </summary> |
| | 116 | 23 | | public string SignedTenantId { get; internal set; } |
| | | 24 | | |
| | | 25 | | /// <summary> |
| | | 26 | | /// The date-time the key is active |
| | | 27 | | /// </summary> |
| | 116 | 28 | | public DateTimeOffset SignedStartsOn { get; internal set; } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// The date-time the key expires |
| | | 32 | | /// </summary> |
| | 116 | 33 | | public DateTimeOffset SignedExpiresOn { get; internal set; } |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Abbreviation of the Azure Storage service that accepts the key |
| | | 37 | | /// </summary> |
| | 116 | 38 | | public string SignedService { get; internal set; } |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// The service version that created the key |
| | | 42 | | /// </summary> |
| | 116 | 43 | | public string SignedVersion { get; internal set; } |
| | | 44 | | |
| | | 45 | | /// <summary> |
| | | 46 | | /// The key as a base64 string |
| | | 47 | | /// </summary> |
| | 68 | 48 | | public string Value { get; internal set; } |
| | | 49 | | |
| | | 50 | | /// <summary> |
| | | 51 | | /// Prevent direct instantiation of UserDelegationKey instances. |
| | | 52 | | /// You can use DataLakeModelFactory.UserDelegationKey instead. |
| | | 53 | | /// </summary> |
| | 0 | 54 | | internal UserDelegationKey() { } |
| | | 55 | | |
| | 36 | 56 | | internal UserDelegationKey(Blobs.Models.UserDelegationKey blobUserDelegationKey) |
| | | 57 | | { |
| | 36 | 58 | | SignedObjectId = blobUserDelegationKey.SignedObjectId; |
| | 36 | 59 | | SignedTenantId = blobUserDelegationKey.SignedTenantId; |
| | 36 | 60 | | SignedStartsOn = blobUserDelegationKey.SignedStartsOn; |
| | 36 | 61 | | SignedExpiresOn = blobUserDelegationKey.SignedExpiresOn; |
| | 36 | 62 | | SignedService = blobUserDelegationKey.SignedService; |
| | 36 | 63 | | SignedVersion = blobUserDelegationKey.SignedVersion; |
| | 36 | 64 | | Value = blobUserDelegationKey.Value; |
| | 36 | 65 | | } |
| | | 66 | | } |
| | | 67 | | } |