forked from PeterWaher/IoTGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttachment.cs
More file actions
91 lines (82 loc) · 1.89 KB
/
Attachment.cs
File metadata and controls
91 lines (82 loc) · 1.89 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
using System;
using System.Collections.Generic;
using System.Text;
namespace Waher.Networking.XMPP.Contracts
{
/// <summary>
/// Contains a reference to an attachment assigned to a legal object.
/// </summary>
public class Attachment
{
private string id = null;
private string legalId = null;
private string contentType = string.Empty;
private string fileName = null;
private string url = null;
private byte[] signature = null;
private DateTime timestamp = DateTime.MinValue;
/// <summary>
/// Contains a reference to an attachment assigned to a legal object.
/// </summary>
public Attachment()
{
}
/// <summary>
/// Attachment ID
/// </summary>
public string Id
{
get { return this.id; }
set { this.id = value; }
}
/// <summary>
/// Legal ID of uploader of attachment
/// </summary>
public string LegalId
{
get { return this.legalId; }
set { this.legalId = value; }
}
/// <summary>
/// Internet Content Type of binary attachment.
/// </summary>
public string ContentType
{
get => this.contentType;
set => this.contentType = value;
}
/// <summary>
/// Filename of attachment.
/// </summary>
public string FileName
{
get => this.fileName;
set => this.fileName = value;
}
/// <summary>
/// URL to retrieve attachment, if provided.
/// </summary>
public string Url
{
get => this.url;
set => this.url = value;
}
/// <summary>
/// Binary signature of the attachment, generated by an approved legal identity of the account-holder.
/// If no signature, attribute is null.
/// </summary>
public byte[] Signature
{
get => this.signature;
set => this.signature = value;
}
/// <summary>
/// Timestamp of signature. If no signature, value is <see cref="DateTime.MinValue"/>
/// </summary>
public DateTime Timestamp
{
get => this.timestamp;
set => this.timestamp = value;
}
}
}