using System; using System.Runtime.Serialization; namespace GitHub.DistributedTask.WebApi { /// /// Provides a contract for receiving messages from the task orchestrator. /// [DataContract] public sealed class TaskAgentMessage { /// /// Initializes an empty TaskAgentMessage instance. /// public TaskAgentMessage() { } /// /// Gets or sets the message identifier. /// [DataMember(EmitDefaultValue = false)] public Int64 MessageId { get; set; } /// /// Gets or sets the message type, describing the data contract found in TaskAgentMessage.Body. /// [DataMember] public String MessageType { get; set; } /// /// Gets or sets the intialization vector used to encrypt this message. /// [DataMember(EmitDefaultValue = false)] public Byte[] IV { get; set; } /// /// Gets or sets the body of the message. If the IV property is provided the body will need to be /// decrypted using the TaskAgentSession.EncryptionKey value in addition to the IV. /// [DataMember] public String Body { get; set; } } }