From 69bcb9abbe4917cfd8454845224ee3708bca0d9c Mon Sep 17 00:00:00 2001 From: Falguni Date: Fri, 26 Jun 2020 15:55:22 -0700 Subject: [PATCH 1/2] Add RecordingRules type --- src/Twilio/Types/RecordingRule.cs | 66 ++++++++++++++++++++++++ src/Twilio/Types/RecordingRulesUpdate.cs | 20 +++++++ 2 files changed, 86 insertions(+) create mode 100644 src/Twilio/Types/RecordingRule.cs create mode 100644 src/Twilio/Types/RecordingRulesUpdate.cs diff --git a/src/Twilio/Types/RecordingRule.cs b/src/Twilio/Types/RecordingRule.cs new file mode 100644 index 000000000..6ca959c31 --- /dev/null +++ b/src/Twilio/Types/RecordingRule.cs @@ -0,0 +1,66 @@ +using System.Collections.Generic; +using Newtonsoft.Json; +using Twilio.Converters; + +namespace Twilio.Types +{ + public class RecordingRule + { + public sealed class TypeEnum : StringEnum + { + private TypeEnum(string value) : base(value) {} + + public TypeEnum() {} + public static readonly TypeEnum Include = new TypeEnum("include"); + public static readonly TypeEnum Exclude = new TypeEnum("exclude"); + } + + public sealed class KindEnum : StringEnum + { + private KindEnum(string value) : base(value) {} + + public KindEnum() {} + + public static readonly KindEnum Audio = new KindEnum("audio"); + public static readonly KindEnum Data = new KindEnum("data"); + public static readonly KindEnum Video = new KindEnum("video"); + } + + [JsonProperty("type")] + [JsonConverter(typeof(StringEnumConverter))] + public TypeEnum Type { get; private set; } + + [JsonProperty("all")] + public bool? All { get; private set; } + + [JsonProperty("publisher")] + public string Publisher { get; private set; } + + [JsonProperty("track")] + public string Track { get; private set; } + + [JsonProperty("kind")] + [JsonConverter(typeof(StringEnumConverter))] + public KindEnum Kind { get; private set; } + + public RecordingRule ( + [JsonProperty("type")] + TypeEnum type, + [JsonProperty("all")] + bool? all, + [JsonProperty("publisher")] + string publisher, + [JsonProperty("track")] + string track, + [JsonProperty("kind")] + KindEnum kind + ) + { + Type = type; + All = all; + Publisher = publisher; + Track = track; + Kind = kind; + } + } +} diff --git a/src/Twilio/Types/RecordingRulesUpdate.cs b/src/Twilio/Types/RecordingRulesUpdate.cs new file mode 100644 index 000000000..def6e0aa3 --- /dev/null +++ b/src/Twilio/Types/RecordingRulesUpdate.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Newtonsoft.Json; +using Twilio.Converters; + +namespace Twilio.Types +{ + public class RecordingRulesUpdate + { + [JsonProperty("rules")] + public List Rules { get; private set; } + + public RecordingRulesUpdate ( + [JsonProperty("rules")] + List rules + ) + { + Rules = rules; + } + } +} From 58082ecf5405ca2dc677807975006226951814fc Mon Sep 17 00:00:00 2001 From: Falguni Vadodaria Date: Mon, 12 Oct 2020 16:33:22 -0700 Subject: [PATCH 2/2] Description --- src/Twilio/Types/RecordingRule.cs | 4 ++++ src/Twilio/Types/RecordingRulesUpdate.cs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/Twilio/Types/RecordingRule.cs b/src/Twilio/Types/RecordingRule.cs index 6ca959c31..d8d7de00a 100644 --- a/src/Twilio/Types/RecordingRule.cs +++ b/src/Twilio/Types/RecordingRule.cs @@ -2,10 +2,14 @@ using Newtonsoft.Json; using Twilio.Converters; +/// +/// Recording Rule - A single Recording Rule for a Room +/// namespace Twilio.Types { public class RecordingRule { + public sealed class TypeEnum : StringEnum { private TypeEnum(string value) : base(value) {} diff --git a/src/Twilio/Types/RecordingRulesUpdate.cs b/src/Twilio/Types/RecordingRulesUpdate.cs index def6e0aa3..0027c6a38 100644 --- a/src/Twilio/Types/RecordingRulesUpdate.cs +++ b/src/Twilio/Types/RecordingRulesUpdate.cs @@ -2,6 +2,9 @@ using Newtonsoft.Json; using Twilio.Converters; +/// +/// Recording Rule Update - Used to update the list of Recording Rules +/// namespace Twilio.Types { public class RecordingRulesUpdate