RecordOutcome.cs
2 using Newtonsoft.Json;
3 
4 namespace Microsoft.Bot.Builder.Calling.ObjectModel.Contracts
5 {
9  [JsonObject(MemberSerialization.OptOut)]
11  {
15  [JsonProperty(Required = Required.Always)]
16  public RecordingCompletionReason CompletionReason { get; set; }
17 
21  [JsonProperty(Required = Required.Always)]
22  public double LengthOfRecordingInSecs { get; set; }
23 
27  public RecordingFormat Format { get; set; }
28 
29  public RecordOutcome()
30  {
31  this.Type = ValidOutcomes.RecordOutcome;
32  }
33 
34  public override void Validate()
35  {
36  base.Validate();
37  if (this.Outcome == Outcome.Success)
38  {
39  Utils.AssertArgument(this.LengthOfRecordingInSecs > 0,
40  "Recording Length must be specified for successful recording");
41  }
42  else
43  {
44  Utils.AssertArgument(this.LengthOfRecordingInSecs <= 0,
45  "Recording Length must not be specified for failed recording");
46  }
47  }
48  }
49 }
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
This is a helper class for validating outcomes. This can be used by customers or by us (before we sen...
This is the outcome of the "record" action. This is conveyed to the customer as POST to the customer ...
RecordingCompletionReason
Reason for completion of Recording Operation
Root namespace for the Microsoft Bot Builder Calling SDK.
RecordingFormat
Encoding format to be used for recording
Namespace for utilities and helpers in the Microsoft Bot Builder Calling SDK.
Root namespace for the Microsoft Bot Builder SDK.