| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System.ComponentModel; |
| | 5 | |
|
| | 6 | | namespace Azure.Storage.Files.DataLake.Models |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// Standard HTTP properties supported by paths. |
| | 10 | | /// These properties are represented as standard HTTP headers use standard |
| | 11 | | /// names, as specified in the Header Field Definitions section 14 of the |
| | 12 | | /// HTTP/1.1 protocol specification. |
| | 13 | | /// |
| | 14 | | /// For more information, see |
| | 15 | | /// <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-and-retrieving-properties-and-metad |
| | 16 | | /// Setting and retrieving properties and metadata for service resources</see>. |
| | 17 | | /// </summary> |
| | 18 | | public class PathHttpHeaders |
| | 19 | | { |
| | 20 | | /// <summary> |
| | 21 | | /// The MIME content type of the path. |
| | 22 | | /// </summary> |
| 264 | 23 | | public string ContentType { get; set; } |
| | 24 | |
|
| | 25 | | #pragma warning disable CA1819 // Properties should not return arrays |
| | 26 | | /// <summary> |
| | 27 | | /// An MD5 hash of the path content. This hash is used to verify the |
| | 28 | | /// integrity of the path during transport. When this header is |
| | 29 | | /// specified, the storage service checks the hash that has arrived |
| | 30 | | /// with the one that was sent. If the two hashes do not match, the |
| | 31 | | /// operation will fail with error code 400 (Bad Request). |
| | 32 | | /// </summary> |
| 216 | 33 | | public byte[] ContentHash { get; set; } |
| | 34 | |
|
| | 35 | | /// <summary> |
| | 36 | | /// Specifies which content encodings have been applied to the path. |
| | 37 | | /// This value is returned to the client when the Get path operation |
| | 38 | | /// is performed on the path resource. The client can use this value |
| | 39 | | /// when returned to decode the path content. |
| | 40 | | /// </summary> |
| 266 | 41 | | public string ContentEncoding { get; set; } |
| | 42 | |
|
| | 43 | | /// <summary> |
| | 44 | | /// Specifies the natural language used by this resource. |
| | 45 | | /// </summary> |
| 264 | 46 | | public string ContentLanguage { get; set; } |
| | 47 | | #pragma warning restore CA1819 // Properties should not return arrays |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// Conveys additional information about how to process the response |
| | 51 | | /// payload, and also can be used to attach additional metadata. For |
| | 52 | | /// example, if set to attachment, it indicates that the user-agent |
| | 53 | | /// should not display the response, but instead show a Save As dialog |
| | 54 | | /// with a filename other than the path name specified. |
| | 55 | | /// </summary> |
| 264 | 56 | | public string ContentDisposition { get; set; } |
| | 57 | |
|
| | 58 | | /// <summary> |
| | 59 | | /// Specify directives for caching mechanisms. |
| | 60 | | /// </summary> |
| 266 | 61 | | public string CacheControl { get; set; } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Creates a string representation of a |
| | 65 | | /// <see cref="PathHttpHeaders"/>. |
| | 66 | | /// </summary> |
| | 67 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 68 | | public override string ToString() => base.ToString(); |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Check if two <see cref="PathHttpHeaders"/> instances are equal. |
| | 72 | | /// </summary> |
| | 73 | | /// <param name="obj">The instance to compare to.</param> |
| | 74 | | /// <returns>True if they're equal, false otherwise.</returns> |
| | 75 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 76 | | public override bool Equals(object obj) => base.Equals(obj); |
| | 77 | |
|
| | 78 | | /// <summary> |
| | 79 | | /// Get a hash code for the <see cref="PathHttpHeaders"/>. |
| | 80 | | /// </summary> |
| | 81 | | /// <returns>Hash code for the <see cref="PathHttpHeaders"/>.</returns> |
| | 82 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 83 | | public override int GetHashCode() => base.GetHashCode(); |
| | 84 | | } |
| | 85 | | } |