|   |  | 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.IO; | 
|   |  | 7 |  | using Azure.Storage.Blobs.Models; | 
|   |  | 8 |  |  | 
|   |  | 9 |  | namespace Azure.Storage.Blobs.Models | 
|   |  | 10 |  | { | 
|   |  | 11 |  |     /// <summary> | 
|   |  | 12 |  |     /// Propeties of a Blob | 
|   |  | 13 |  |     /// </summary> | 
|   |  | 14 |  |     public partial class BlobProperties | 
|   |  | 15 |  |     { | 
|   |  | 16 |  |         /// <summary> | 
|   |  | 17 |  |         /// Returns the date and time the blob was last modified. Any operation that modifies the blob, | 
|   |  | 18 |  |         /// including an update of the blob's metadata or properties, changes the last-modified time of the blob. | 
|   |  | 19 |  |         /// </summary> | 
|   | 1276 | 20 |  |         public DateTimeOffset LastModified { get; internal set; } | 
|   |  | 21 |  |  | 
|   |  | 22 |  |         /// <summary> | 
|   |  | 23 |  |         /// Returns the date and time the blob was created. | 
|   |  | 24 |  |         /// </summary> | 
|   | 1276 | 25 |  |         public DateTimeOffset CreatedOn { get; internal set; } | 
|   |  | 26 |  |  | 
|   |  | 27 |  |         /// <summary> | 
|   |  | 28 |  |         /// Metadata. | 
|   |  | 29 |  |         /// </summary> | 
|   | 3304 | 30 |  |         public IDictionary<string, string> Metadata { get; internal set; } | 
|   |  | 31 |  |  | 
|   |  | 32 |  |         /// <summary> | 
|   |  | 33 |  |         /// Object Replication Policy Id of the destination blob. | 
|   |  | 34 |  |         /// </summary> | 
|   | 680 | 35 |  |         public string ObjectReplicationDestinationPolicyId { get; internal set; } | 
|   |  | 36 |  |  | 
|   |  | 37 |  |         /// <summary> | 
|   |  | 38 |  |         /// Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. | 
|   |  | 39 |  |         /// </summary> | 
|   | 1364 | 40 |  |         public IList<ObjectReplicationPolicy> ObjectReplicationSourceProperties { get; internal set; } | 
|   |  | 41 |  |  | 
|   |  | 42 |  |         /// <summary> | 
|   |  | 43 |  |         /// The blob's type. | 
|   |  | 44 |  |         /// </summary> | 
|   | 732 | 45 |  |         public BlobType BlobType { get; internal set; } | 
|   |  | 46 |  |  | 
|   |  | 47 |  |         /// <summary> | 
|   |  | 48 |  |         /// Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. | 
|   |  | 49 |  |         /// This value can specify the time of a completed, aborted, or failed copy attempt. This header does | 
|   |  | 50 |  |         /// not appear if a copy is pending, if this blob has never been the destination in a Copy Blob operation, | 
|   |  | 51 |  |         /// or if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, | 
|   |  | 52 |  |         /// Put Blob, or Put Block List. | 
|   |  | 53 |  |         /// </summary> | 
|   | 1276 | 54 |  |         public DateTimeOffset CopyCompletedOn { get; internal set; } | 
|   |  | 55 |  |  | 
|   |  | 56 |  |         /// <summary> | 
|   |  | 57 |  |         /// Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or | 
|   |  | 58 |  |         /// non-fatal copy operation failure. This header does not appear if this blob has never been the destination | 
|   |  | 59 |  |         /// in a Copy Blob operation, or if this blob has been modified after a concluded Copy Blob operation using | 
|   |  | 60 |  |         /// Set Blob Properties, Put Blob, or Put Block List | 
|   |  | 61 |  |         /// </summary> | 
|   | 1276 | 62 |  |         public string CopyStatusDescription { get; internal set; } | 
|   |  | 63 |  |  | 
|   |  | 64 |  |         /// <summary> | 
|   |  | 65 |  |         /// String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy | 
|   |  | 66 |  |         /// operation, or pass to Abort Copy Blob to abort a pending copy. | 
|   |  | 67 |  |         /// </summary> | 
|   | 2116 | 68 |  |         public string CopyId { get; internal set; } | 
|   |  | 69 |  |  | 
|   |  | 70 |  |         /// <summary> | 
|   |  | 71 |  |         /// Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob | 
|   |  | 72 |  |         /// operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. | 
|   |  | 73 |  |         /// This header does not appear if this blob has never been the destination in a Copy Blob operation, or | 
|   |  | 74 |  |         /// if this blob has been modified after a concluded Copy Blob operation using Set Blob Properties, Put | 
|   |  | 75 |  |         /// Blob, or Put Block List. | 
|   |  | 76 |  |         /// </summary> | 
|   | 1276 | 77 |  |         public string CopyProgress { get; internal set; } | 
|   |  | 78 |  |  | 
|   |  | 79 |  |         /// <summary> | 
|   |  | 80 |  |         /// URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob | 
|   |  | 81 |  |         /// operation where this blob was the destination blob. This header does not appear if this blob has never | 
|   |  | 82 |  |         /// been the destination in a Copy Blob operation, or if this blob has been modified after a concluded | 
|   |  | 83 |  |         /// Copy Blob operation using Set Blob Properties, Put Blob, or Put Block List. | 
|   |  | 84 |  |         /// </summary> | 
|   | 1276 | 85 |  |         public Uri CopySource { get; internal set; } | 
|   |  | 86 |  |  | 
|   |  | 87 |  |         /// <summary> | 
|   |  | 88 |  |         /// State of the copy operation identified by x-ms-copy-id. | 
|   |  | 89 |  |         /// </summary> | 
|   | 844 | 90 |  |         public CopyStatus CopyStatus { get; internal set; } | 
|   |  | 91 |  |  | 
|   |  | 92 |  |         /// <summary> | 
|   |  | 93 |  |         /// Included if the blob is incremental copy blob. | 
|   |  | 94 |  |         /// </summary> | 
|   | 1276 | 95 |  |         public bool IsIncrementalCopy { get; internal set; } | 
|   |  | 96 |  |  | 
|   |  | 97 |  |         /// <summary> | 
|   |  | 98 |  |         /// Included if the blob is incremental copy blob or incremental copy snapshot, if x-ms-copy-status is success. | 
|   |  | 99 |  |         /// Snapshot time of the last successful incremental copy snapshot for this blob. | 
|   |  | 100 |  |         /// </summary> | 
|   | 0 | 101 |  |         public string DestinationSnapshot { get; internal set; } | 
|   |  | 102 |  |  | 
|   |  | 103 |  |         /// <summary> | 
|   |  | 104 |  |         /// When a blob is leased, specifies whether the lease is of infinite or fixed duration. | 
|   |  | 105 |  |         /// </summary> | 
|   | 1276 | 106 |  |         public LeaseDurationType LeaseDuration { get; internal set; } | 
|   |  | 107 |  |  | 
|   |  | 108 |  |         /// <summary> | 
|   |  | 109 |  |         /// Lease state of the blob. | 
|   |  | 110 |  |         /// </summary> | 
|   | 1276 | 111 |  |         public LeaseState LeaseState { get; internal set; } | 
|   |  | 112 |  |  | 
|   |  | 113 |  |         /// <summary> | 
|   |  | 114 |  |         /// The current lease status of the blob. | 
|   |  | 115 |  |         /// </summary> | 
|   | 1276 | 116 |  |         public LeaseStatus LeaseStatus { get; internal set; } | 
|   |  | 117 |  |  | 
|   |  | 118 |  |         /// <summary> | 
|   |  | 119 |  |         /// The number of bytes present in the response body. | 
|   |  | 120 |  |         /// </summary> | 
|   | 2048 | 121 |  |         public long ContentLength { get; internal set; } | 
|   |  | 122 |  |  | 
|   |  | 123 |  |         /// <summary> | 
|   |  | 124 |  |         /// The content type specified for the blob. The default content type is 'application/octet-stream'. | 
|   |  | 125 |  |         /// </summary> | 
|   | 1960 | 126 |  |         public string ContentType { get; internal set; } | 
|   |  | 127 |  |  | 
|   |  | 128 |  |         /// <summary> | 
|   |  | 129 |  |         /// The ETag contains a value that you can use to perform operations conditionally. | 
|   |  | 130 |  |         /// If the request version is 2011-08-18 or newer, the ETag value will be in quotes. | 
|   |  | 131 |  |         /// </summary> | 
|   | 2268 | 132 |  |         public ETag ETag { get; internal set; } | 
|   |  | 133 |  |  | 
|   |  | 134 |  |         /// <summary> | 
|   |  | 135 |  |         /// If the blob has an MD5 hash and this operation is to read the full blob, this response header is | 
|   |  | 136 |  |         /// returned so that the client can check for message content integrity. | 
|   |  | 137 |  |         /// </summary> | 
|   |  | 138 |  | #pragma warning disable CA1819 // Properties should not return arrays | 
|   | 1964 | 139 |  |         public byte[] ContentHash { get; internal set; } | 
|   |  | 140 |  | #pragma warning restore CA1819 // Properties should not return arrays | 
|   |  | 141 |  |  | 
|   |  | 142 |  |         /// <summary> | 
|   |  | 143 |  |         /// This header returns the value that was specified for the Content-Encoding request header. | 
|   |  | 144 |  |         /// </summary> | 
|   | 1968 | 145 |  |         public string ContentEncoding { get; internal set; } | 
|   |  | 146 |  |  | 
|   |  | 147 |  |         /// <summary> | 
|   |  | 148 |  |         /// This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. | 
|   |  | 149 |  |         /// The Content-Disposition response header field conveys additional information about how to process | 
|   |  | 150 |  |         /// the response payload, and also can be used to attach additional metadata. For example, if set to | 
|   |  | 151 |  |         /// attachment, it indicates that the user-agent should not display the response, but instead show a | 
|   |  | 152 |  |         /// Save As dialog with a filename other than the blob name specified. | 
|   |  | 153 |  |         /// </summary> | 
|   | 1964 | 154 |  |         public string ContentDisposition { get; internal set; } | 
|   |  | 155 |  |  | 
|   |  | 156 |  |         /// <summary> | 
|   |  | 157 |  |         /// This header returns the value that was specified for the Content-Language request header. | 
|   |  | 158 |  |         /// </summary> | 
|   | 1968 | 159 |  |         public string ContentLanguage { get; internal set; } | 
|   |  | 160 |  |  | 
|   |  | 161 |  |         /// <summary> | 
|   |  | 162 |  |         /// This header is returned if it was previously specified for the blob. | 
|   |  | 163 |  |         /// </summary> | 
|   | 1964 | 164 |  |         public string CacheControl { get; internal set; } | 
|   |  | 165 |  |  | 
|   |  | 166 |  |         /// <summary> | 
|   |  | 167 |  |         /// The current sequence number for a page blob. This header is not returned for block blobs or append blobs. | 
|   |  | 168 |  |         /// </summary> | 
|   | 680 | 169 |  |         public long BlobSequenceNumber { get; internal set; } | 
|   |  | 170 |  |  | 
|   |  | 171 |  |         /// <summary> | 
|   |  | 172 |  |         /// Indicates that the service supports requests for partial blob content. | 
|   |  | 173 |  |         /// </summary> | 
|   | 1276 | 174 |  |         public string AcceptRanges { get; internal set; } | 
|   |  | 175 |  |  | 
|   |  | 176 |  |         /// <summary> | 
|   |  | 177 |  |         /// The number of committed blocks present in the blob. This header is returned only for append blobs. | 
|   |  | 178 |  |         /// </summary> | 
|   | 0 | 179 |  |         public int BlobCommittedBlockCount { get; internal set; } | 
|   |  | 180 |  |  | 
|   |  | 181 |  |         /// <summary> | 
|   |  | 182 |  |         /// The value of this header is set to true if the blob data and application metadata are completely encrypted | 
|   |  | 183 |  |         /// using the specified algorithm. Otherwise, the value is set to false (when the blob is unencrypted, or if | 
|   |  | 184 |  |         /// only parts of the blob/application metadata are encrypted). | 
|   |  | 185 |  |         /// </summary> | 
|   | 1276 | 186 |  |         public bool IsServerEncrypted { get; internal set; } | 
|   |  | 187 |  |  | 
|   |  | 188 |  |         /// <summary> | 
|   |  | 189 |  |         /// The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only returned when the | 
|   |  | 190 |  |         /// metadata was encrypted with a customer-provided key. | 
|   |  | 191 |  |         /// </summary> | 
|   | 1952 | 192 |  |         public string EncryptionKeySha256 { get; internal set; } | 
|   |  | 193 |  |  | 
|   |  | 194 |  |         /// <summary> | 
|   |  | 195 |  |         /// Returns the name of the encryption scope used to encrypt the blob contents and application metadata. | 
|   |  | 196 |  |         /// Note that the absence of this header implies use of the default account encryption scope. | 
|   |  | 197 |  |         /// </summary> | 
|   | 676 | 198 |  |         public string EncryptionScope { get; internal set; } | 
|   |  | 199 |  |  | 
|   |  | 200 |  |         /// <summary> | 
|   |  | 201 |  |         /// The tier of page blob on a premium storage account or tier of block blob on blob storage LRS accounts. | 
|   |  | 202 |  |         /// For a list of allowed premium page blob tiers, see | 
|   |  | 203 |  |         /// https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage#features. For blob | 
|   |  | 204 |  |         /// storage LRS accounts, valid values are Hot/Cool/Archive. | 
|   |  | 205 |  |         /// </summary> | 
|   | 2092 | 206 |  |         public string AccessTier { get; internal set; } | 
|   |  | 207 |  |  | 
|   |  | 208 |  |         /// <summary> | 
|   |  | 209 |  |         /// For page blobs on a premium storage account only. If the access tier is not explicitly set on the blob, | 
|   |  | 210 |  |         /// the tier is inferred based on its content length and this header will be returned with true value. | 
|   |  | 211 |  |         /// </summary> | 
|   | 0 | 212 |  |         public bool AccessTierInferred { get; internal set; } | 
|   |  | 213 |  |  | 
|   |  | 214 |  |         /// <summary> | 
|   |  | 215 |  |         /// For blob storage LRS accounts, valid values are rehydrate-pending-to-hot/rehydrate-pending-to-cool. | 
|   |  | 216 |  |         /// If the blob is being rehydrated and is not complete then this header is returned indicating that | 
|   |  | 217 |  |         /// rehydrate is pending and also tells the destination tier. | 
|   |  | 218 |  |         /// </summary> | 
|   | 1956 | 219 |  |         public string ArchiveStatus { get; internal set; } | 
|   |  | 220 |  |  | 
|   |  | 221 |  |         /// <summary> | 
|   |  | 222 |  |         /// The time the tier was changed on the object. This is only returned if the tier on the block blob was ever se | 
|   |  | 223 |  |         /// </summary> | 
|   | 1276 | 224 |  |         public DateTimeOffset AccessTierChangedOn { get; internal set; } | 
|   |  | 225 |  |  | 
|   |  | 226 |  |         /// <summary> | 
|   |  | 227 |  |         /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header | 
|   |  | 228 |  |         /// indicates the blob version, and may be used in subsequent requests to access this version of the blob. | 
|   |  | 229 |  |         /// </summary> | 
|   | 676 | 230 |  |         public string VersionId { get; internal set; } | 
|   |  | 231 |  |  | 
|   |  | 232 |  |         /// <summary> | 
|   |  | 233 |  |         /// The value of this header indicates whether version of this blob is a current version, see also x-ms-version- | 
|   |  | 234 |  |         /// </summary> | 
|   | 676 | 235 |  |         public bool IsLatestVersion { get; internal set; } | 
|   |  | 236 |  |  | 
|   |  | 237 |  |         /// <summary> | 
|   |  | 238 |  |         /// The number of tags associated with the blob. | 
|   |  | 239 |  |         /// </summary> | 
|   | 676 | 240 |  |         public long TagCount { get; internal set; } | 
|   |  | 241 |  |  | 
|   |  | 242 |  |         /// <summary> | 
|   |  | 243 |  |         /// The time this blob will expire. | 
|   |  | 244 |  |         /// </summary> | 
|   | 1276 | 245 |  |         public DateTimeOffset ExpiresOn { get; internal set; } | 
|   |  | 246 |  |  | 
|   |  | 247 |  |         /// <summary> | 
|   |  | 248 |  |         /// If this blob has been sealed. | 
|   |  | 249 |  |         /// </summary> | 
|   | 680 | 250 |  |         public bool IsSealed { get; internal set; } | 
|   |  | 251 |  |  | 
|   |  | 252 |  |         /// <summary> | 
|   |  | 253 |  |         /// If this blob is in rehydrate pending state, this indicates the rehydrate priority. | 
|   |  | 254 |  |         /// </summary> | 
|   | 684 | 255 |  |         public string RehydratePriority { get; internal set; } | 
|   |  | 256 |  |  | 
|   |  | 257 |  |         /// <summary> | 
|   |  | 258 |  |         /// Constructor. | 
|   |  | 259 |  |         /// </summary> | 
|   | 1384 | 260 |  |         public BlobProperties() | 
|   |  | 261 |  |         { | 
|   | 1384 | 262 |  |             Metadata = new Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase); | 
|   | 1384 | 263 |  |             ObjectReplicationSourceProperties = new List<ObjectReplicationPolicy>(); | 
|   | 1384 | 264 |  |         } | 
|   |  | 265 |  |     } | 
|   |  | 266 |  | } |