NotificationResponse.cs
1 using System.Collections.Generic;
3 using Newtonsoft.Json;
4 using Newtonsoft.Json.Linq;
5 
6 namespace Microsoft.Bot.Builder.Calling.ObjectModel.Contracts
7 {
11  [JsonObject(MemberSerialization.OptOut)]
12  public class NotificationResponse
13  {
18  [JsonProperty(Required = Required.Default)]
19  public CallbackLink Links { get; set; }
20 
25  [JsonProperty(Required = Required.Default)]
26  public string AppState { get; set; }
27 
28  public virtual void Validate()
29  {
30  if (this.Links != null)
31  {
32  Utils.AssertArgument(this.Links.Callback != null, "Callback link cannot be specified as null");
33  Utils.AssertArgument(this.Links.Callback.IsAbsoluteUri, "Callback link must be an absolute uri");
34  }
35  ApplicationState.Validate(this.AppState);
36  }
37  }
38 }
static void Validate(string appState)
helper method to validate appState
This class contains the response the customer sent for the notification POST to their callback url...
Root namespace for the Microsoft Bot Builder Calling SDK object model.
static void AssertArgument(bool condition, string format, params object[] args)
Argument checker
Definition: Utils.cs:17
Root namespace for the Microsoft Bot Builder Calling SDK.
Namespace for utilities and helpers in the Microsoft Bot Builder Calling SDK.
Root namespace for the Microsoft Bot Builder SDK.