/// <summary> /// create /// </summary> /// <param name="options"> Create CompositionSettings parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CompositionSettings </returns> public static CompositionSettingsResource Create(CreateCompositionSettingsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildCreateRequest(CreateCompositionSettingsOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Video, "/v1/CompositionSettings/Default", postParams: options.GetParams() )); }
/// <summary> /// create /// </summary> /// <param name="friendlyName"> A descriptive string that you create to describe the resource </param> /// <param name="awsCredentialsSid"> The SID of the stored Credential resource </param> /// <param name="encryptionKeySid"> The SID of the Public Key resource to use for encryption </param> /// <param name="awsS3Url"> The URL of the AWS S3 bucket where the compositions should be stored </param> /// <param name="awsStorageEnabled"> Whether all compositions should be written to the aws_s3_url </param> /// <param name="encryptionEnabled"> Whether all compositions should be stored in an encrypted form </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CompositionSettings </returns> public static async System.Threading.Tasks.Task <CompositionSettingsResource> CreateAsync(string friendlyName, string awsCredentialsSid = null, string encryptionKeySid = null, Uri awsS3Url = null, bool?awsStorageEnabled = null, bool?encryptionEnabled = null, ITwilioRestClient client = null) { var options = new CreateCompositionSettingsOptions(friendlyName) { AwsCredentialsSid = awsCredentialsSid, EncryptionKeySid = encryptionKeySid, AwsS3Url = awsS3Url, AwsStorageEnabled = awsStorageEnabled, EncryptionEnabled = encryptionEnabled }; return(await CreateAsync(options, client)); }
/// <summary> /// create /// </summary> /// <param name="friendlyName"> A descriptive string that you create to describe the resource </param> /// <param name="awsCredentialsSid"> The SID of the stored Credential resource </param> /// <param name="encryptionKeySid"> The SID of the Public Key resource to use for encryption </param> /// <param name="awsS3Url"> The URL of the AWS S3 bucket where the compositions should be stored </param> /// <param name="awsStorageEnabled"> Whether all compositions should be written to the aws_s3_url </param> /// <param name="encryptionEnabled"> Whether all compositions should be stored in an encrypted form </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of CompositionSettings </returns> public static CompositionSettingsResource Create(string friendlyName, string awsCredentialsSid = null, string encryptionKeySid = null, Uri awsS3Url = null, bool?awsStorageEnabled = null, bool?encryptionEnabled = null, ITwilioRestClient client = null) { var options = new CreateCompositionSettingsOptions(friendlyName) { AwsCredentialsSid = awsCredentialsSid, EncryptionKeySid = encryptionKeySid, AwsS3Url = awsS3Url, AwsStorageEnabled = awsStorageEnabled, EncryptionEnabled = encryptionEnabled }; return(Create(options, client)); }
/// <summary> /// create /// </summary> /// <param name="options"> Create CompositionSettings parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of CompositionSettings </returns> public static async System.Threading.Tasks.Task <CompositionSettingsResource> CreateAsync(CreateCompositionSettingsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }