aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/ByteData.cs
blob: 7b832eb5371aa7372d8922b15a135d2896cd37ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using NSwag.Annotations;

namespace Timeline.Models
{
    /// <summary>
    /// Model for reading http body as bytes.
    /// </summary>
    [OpenApiFile]
    public class ByteData
    {
        /// <summary>
        /// </summary>
        /// <param name="data">The data.</param>
        /// <param name="contentType">The content type.</param>
        public ByteData(byte[] data, string contentType)
        {
            Data = data;
            ContentType = contentType;
        }

        /// <summary>
        /// Data.
        /// </summary>
#pragma warning disable CA1819 // Properties should not return arrays
        public byte[] Data { get; }
#pragma warning restore CA1819 // Properties should not return arrays

        /// <summary>
        /// Content type.
        /// </summary>
        public string ContentType { get; }
    }
}