AgentContactNotification.cs
1 using Newtonsoft.Json;
2 
3 namespace Microsoft.Bot.Builder.Calling.ObjectModel.Contracts
4 {
9  [JsonObject(MemberSerialization = MemberSerialization.OptOut)]
11  {
12  public const string TypeName = "AgentContactNotification";
13  public const string UserDisplayNameKey = "fromUserDisplayName";
14  public const string LcidKey = "fromUserLcid";
15  public const string ActionKey = "action";
16  public const string ContactAddAction = "add";
17  public const string ContactRemoveAction = "remove";
18 
20  : base(AgentContactNotification.TypeName)
21  {
22  }
23 
24  [JsonProperty(PropertyName = "fromUserDisplayName", Required = Required.Always)]
25  public string DisplayName { get; set; }
26 
27  [JsonProperty(PropertyName = "fromUserLcid", Required = Required.Default)]
28  public int Lcid { get; set; }
29 
30  [JsonProperty(PropertyName = "action", Required = Required.Always)]
31  public string Action { get; set; }
32 
33  protected override void ValidateInternal()
34  {
35  VerifyPropertyExists(this.DisplayName, "DisplayName");
36  VerifyPropertyExists(this.Action, "Action");
37  }
38  }
39 }
Message type for notifying agents that a user has added or removed them.
Base message wrapper for all API messages. The format is: { type: (type-of-message), to: (to-user-MRI), from: (from-user-MRI), (optional additional-message-specific-properties), (optional additional-message-specific-properties), (optional additional-message-specific-properties), }
Definition: BaseMessage.cs:22