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