/// <summary> /// create /// </summary> /// <param name="friendlyName"> Friendly name of the Composition Hook to be shown in the console. </param> /// <param name="enabled"> Boolean flag for activating the Composition Hook. </param> /// <param name="videoLayout"> The JSON video layout description. </param> /// <param name="audioSources"> A list of audio sources related to this Composition Hook. </param> /// <param name="audioSourcesExcluded"> A list of audio sources excluded related to this Composition Hook. </param> /// <param name="resolution"> Pixel resolution of the composed video. </param> /// <param name="format"> Container format of the Composition Hook media file. Any of the following: `mp4`, `webm`. /// </param> /// <param name="statusCallback"> A URL that Twilio sends asynchronous webhook requests to on every composition event. /// </param> /// <param name="statusCallbackMethod"> HTTP method Twilio should use when requesting the above URL. </param> /// <param name="trim"> Boolean flag for clipping intervals that have no media. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CompositionHook </returns> public static CompositionHookResource Create(string friendlyName, bool?enabled = null, object videoLayout = null, List <string> audioSources = null, List <string> audioSourcesExcluded = null, string resolution = null, CompositionHookResource.FormatEnum format = null, Uri statusCallback = null, Twilio.Http.HttpMethod statusCallbackMethod = null, bool?trim = null, ITwilioRestClient client = null) { var options = new CreateCompositionHookOptions(friendlyName) { Enabled = enabled, VideoLayout = videoLayout, AudioSources = audioSources, AudioSourcesExcluded = audioSourcesExcluded, Resolution = resolution, Format = format, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, Trim = trim }; return(Create(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathSid"> A 34-character string that uniquely identifies this Composition Hook. </param> /// <param name="friendlyName"> Friendly name of the Composition Hook to be shown in the console. </param> /// <param name="enabled"> Boolean flag for activating the Composition Hook. </param> /// <param name="videoLayout"> The JSON video layout description. </param> /// <param name="audioSources"> A list of audio sources related to this Composition Hook. </param> /// <param name="audioSourcesExcluded"> A list of audio sources excluded related to this Composition Hook. </param> /// <param name="trim"> Boolean flag for clipping intervals that have no media. </param> /// <param name="format"> Container format of the Composition Hook media file. Any of the following: `mp4`, `webm`. /// </param> /// <param name="resolution"> Pixel resolution of the composed video. </param> /// <param name="statusCallback"> A URL that Twilio sends asynchronous webhook requests to on every composition event. /// </param> /// <param name="statusCallbackMethod"> HTTP method Twilio should use when requesting the above URL. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CompositionHook </returns> public static async System.Threading.Tasks.Task <CompositionHookResource> UpdateAsync(string pathSid, string friendlyName, bool?enabled = null, object videoLayout = null, List <string> audioSources = null, List <string> audioSourcesExcluded = null, bool?trim = null, CompositionHookResource.FormatEnum format = null, string resolution = null, Uri statusCallback = null, Twilio.Http.HttpMethod statusCallbackMethod = null, ITwilioRestClient client = null) { var options = new UpdateCompositionHookOptions(pathSid, friendlyName) { Enabled = enabled, VideoLayout = videoLayout, AudioSources = audioSources, AudioSourcesExcluded = audioSourcesExcluded, Trim = trim, Format = format, Resolution = resolution, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod }; return(await UpdateAsync(options, client)); }