Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions src/libs/Shotstack/Generated/Shotstack.Models.Asset.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ namespace Shotstack
public global::Shotstack.AssetDiscriminatorType? Type { get; }

/// <summary>
/// The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file.
/// The VideoAsset adds a video to a Clip. The video can be sourced from a URL<br/>
/// (`src`) or generated from a text prompt (`prompt`), optionally seeded from a<br/>
/// starting image (`seed`). Exactly one of `src` or `prompt` must be provided.<br/>
/// - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.<br/>
/// - **Generated:** set `prompt` to describe the motion. Optionally set `seed` to<br/>
/// a starting image URL (image-to-video). Use `model` to choose the generator<br/>
/// (e.g. `luma-ray-3`, `runpod-itv-mini`). The generated `src` is filled in<br/>
/// automatically.
/// </summary>
#if NET6_0_OR_GREATER
public global::Shotstack.VideoAsset? Video { get; init; }
Expand Down Expand Up @@ -52,7 +59,12 @@ public bool TryPickVideo(
: throw new global::System.InvalidOperationException($"Expected union variant 'Video' but the value was {ToString()}.");

/// <summary>
/// The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file.
/// The ImageAsset adds an image to a Clip. The image can be sourced from a URL<br/>
/// (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or<br/>
/// `prompt` must be provided.<br/>
/// - **Source URL:** set `src` to the publicly accessible URL of a jpg or png file.<br/>
/// - **Generated:** set `prompt` to describe the image; the engine generates it<br/>
/// using the provider chosen by `model` and fills `src` in automatically.
/// </summary>
#if NET6_0_OR_GREATER
public global::Shotstack.ImageAsset? Image { get; init; }
Expand Down Expand Up @@ -165,7 +177,15 @@ public bool TryPickRichText(
: throw new global::System.InvalidOperationException($"Expected union variant 'RichText' but the value was {ToString()}.");

/// <summary>
/// The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file.
/// The AudioAsset adds audio to a Clip. The audio can be sourced from a URL<br/>
/// (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or<br/>
/// `prompt` must be provided.<br/>
/// - **Source URL:** set `src` to a publicly accessible audio URL (e.g. mp3).<br/>
/// - **Generated speech:** set `prompt` to the spoken text and `voice` to a voice<br/>
/// identifier (text-to-speech). Optionally set `language`/`newscaster`.<br/>
/// - **Generated music or SFX:** set `prompt` describing the sound; omit `voice`.<br/>
/// - Use `model` to choose the generator. The generated `src` is filled in<br/>
/// automatically.
/// </summary>
#if NET6_0_OR_GREATER
public global::Shotstack.AudioAsset? Audio { get; init; }
Expand Down Expand Up @@ -522,6 +542,9 @@ public bool TryPickSvg(
: throw new global::System.InvalidOperationException($"Expected union variant 'Svg' but the value was {ToString()}.");

/// <summary>
/// **Notice: TextToImageAsset is deprecated. Use [ImageAsset](#tocs_imageasset)<br/>
/// with `prompt` instead.** This type continues to function and is internally<br/>
/// rewritten to ImageAsset; no behaviour change for existing integrations.<br/>
/// The TextToImageAsset lets you create a dynamic image from a text prompt.
/// </summary>
#if NET6_0_OR_GREATER
Expand Down Expand Up @@ -559,6 +582,10 @@ public bool TryPickTextToImage(
: throw new global::System.InvalidOperationException($"Expected union variant 'TextToImage' but the value was {ToString()}.");

/// <summary>
/// **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)<br/>
/// with `prompt` and `seed` instead.** This type continues to function and is<br/>
/// internally rewritten to VideoAsset; no behaviour change for existing<br/>
/// integrations.<br/>
/// The ImageToVideoAsset lets you create a video from an image and a text prompt.
/// </summary>
#if NET6_0_OR_GREATER
Expand Down Expand Up @@ -596,7 +623,13 @@ public bool TryPickImageToVideo(
: throw new global::System.InvalidOperationException($"Expected union variant 'ImageToVideo' but the value was {ToString()}.");

/// <summary>
/// The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service. The generated audio can be trimmed, faded and have its volume and speed adjusted using the same properties available on the AudioAsset.
/// **Notice: TextToSpeechAsset is deprecated. Use [AudioAsset](#tocs_audioasset)<br/>
/// with `prompt` (the spoken text) and `voice` instead.** This type continues to<br/>
/// function and is internally rewritten to AudioAsset; no behaviour change for<br/>
/// existing integrations.<br/>
/// The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service.<br/>
/// The generated audio can be trimmed, faded and have its volume and speed adjusted using the<br/>
/// same properties available on the AudioAsset.
/// </summary>
#if NET6_0_OR_GREATER
public global::Shotstack.TextToSpeechAsset? TextToSpeech { get; init; }
Expand Down
106 changes: 85 additions & 21 deletions src/libs/Shotstack/Generated/Shotstack.Models.AudioAsset.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
namespace Shotstack
{
/// <summary>
/// The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file.
/// The AudioAsset adds audio to a Clip. The audio can be sourced from a URL<br/>
/// (`src`) or generated from a text prompt (`prompt`). Exactly one of `src` or<br/>
/// `prompt` must be provided.<br/>
/// - **Source URL:** set `src` to a publicly accessible audio URL (e.g. mp3).<br/>
/// - **Generated speech:** set `prompt` to the spoken text and `voice` to a voice<br/>
/// identifier (text-to-speech). Optionally set `language`/`newscaster`.<br/>
/// - **Generated music or SFX:** set `prompt` describing the sound; omit `voice`.<br/>
/// - Use `model` to choose the generator. The generated `src` is filled in<br/>
/// automatically.
/// </summary>
public sealed partial class AudioAsset
{
Expand All @@ -18,13 +26,51 @@ public sealed partial class AudioAsset
public global::Shotstack.AudioAssetType Type { get; set; } = global::Shotstack.AudioAssetType.Audio;

/// <summary>
/// The audio source URL. The URL must be publicly accessible or include credentials.<br/>
/// The audio source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.<br/>
/// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3
/// </summary>
/// <example>https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3</example>
[global::System.Text.Json.Serialization.JsonPropertyName("src")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Src { get; set; }
public string? Src { get; set; }

/// <summary>
/// A text prompt. When `voice` is set, the prompt is the spoken text (text-to-speech). Without `voice`, the prompt describes generated music or sound effects. The generated `src` is filled in automatically.<br/>
/// Example: Welcome to today's broadcast.
/// </summary>
/// <example>Welcome to today's broadcast.</example>
[global::System.Text.Json.Serialization.JsonPropertyName("prompt")]
public string? Prompt { get; set; }

/// <summary>
/// Voice identifier for text-to-speech generation (e.g. `Matthew`, `Joanna`). Only meaningful when `prompt` is set.<br/>
/// Example: Matthew
/// </summary>
/// <example>Matthew</example>
[global::System.Text.Json.Serialization.JsonPropertyName("voice")]
public string? Voice { get; set; }

/// <summary>
/// Optional BCP-47 language code (e.g. `en-US`) for text-to-speech. Only meaningful when `prompt` and `voice` are set.<br/>
/// Example: en-US
/// </summary>
/// <example>en-US</example>
[global::System.Text.Json.Serialization.JsonPropertyName("language")]
public string? Language { get; set; }

/// <summary>
/// Set to `true` to use the voice's newscaster mode when supported. Only meaningful when `prompt` and `voice` are set.<br/>
/// Default Value: false
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("newscaster")]
public bool? Newscaster { get; set; }

/// <summary>
/// The generation model to use when `prompt` is set (e.g. `polly-neural`). Defaults to the platform's preferred generator if omitted.<br/>
/// Example: polly-neural
/// </summary>
/// <example>polly-neural</example>
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
public string? Model { get; set; }

/// <summary>
/// The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached.
Expand All @@ -40,7 +86,7 @@ public sealed partial class AudioAsset
public global::Shotstack.OneOf<float?, global::System.Collections.Generic.IList<global::Shotstack.Tween>>? Volume { get; set; }

/// <summary>
/// Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).<br/>
/// Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).<br/>
/// Example: 1
/// </summary>
/// <example>1</example>
Expand Down Expand Up @@ -68,17 +114,37 @@ public sealed partial class AudioAsset
/// Initializes a new instance of the <see cref="AudioAsset" /> class.
/// </summary>
/// <param name="src">
/// The audio source URL. The URL must be publicly accessible or include credentials.<br/>
/// The audio source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.<br/>
/// Example: https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3
/// </param>
/// <param name="prompt">
/// A text prompt. When `voice` is set, the prompt is the spoken text (text-to-speech). Without `voice`, the prompt describes generated music or sound effects. The generated `src` is filled in automatically.<br/>
/// Example: Welcome to today's broadcast.
/// </param>
/// <param name="voice">
/// Voice identifier for text-to-speech generation (e.g. `Matthew`, `Joanna`). Only meaningful when `prompt` is set.<br/>
/// Example: Matthew
/// </param>
/// <param name="language">
/// Optional BCP-47 language code (e.g. `en-US`) for text-to-speech. Only meaningful when `prompt` and `voice` are set.<br/>
/// Example: en-US
/// </param>
/// <param name="newscaster">
/// Set to `true` to use the voice's newscaster mode when supported. Only meaningful when `prompt` and `voice` are set.<br/>
/// Default Value: false
/// </param>
/// <param name="model">
/// The generation model to use when `prompt` is set (e.g. `polly-neural`). Defaults to the platform's preferred generator if omitted.<br/>
/// Example: polly-neural
/// </param>
/// <param name="trim">
/// The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached.
/// </param>
/// <param name="volume">
/// Set the volume of the audio clip. Use a number or an array of [Tween](./#tocs_tween) objects to create custom volume transitions.
/// </param>
/// <param name="speed">
/// Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).<br/>
/// Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).<br/>
/// Example: 1
/// </param>
/// <param name="effect">
Expand All @@ -96,15 +162,25 @@ public sealed partial class AudioAsset
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public AudioAsset(
string src,
string? src,
string? prompt,
string? voice,
string? language,
bool? newscaster,
string? model,
double? trim,
global::Shotstack.OneOf<float?, global::System.Collections.Generic.IList<global::Shotstack.Tween>>? volume,
float? speed,
global::Shotstack.AudioAssetEffect? effect,
global::Shotstack.AudioAssetType type = global::Shotstack.AudioAssetType.Audio)
{
this.Type = type;
this.Src = src ?? throw new global::System.ArgumentNullException(nameof(src));
this.Src = src;
this.Prompt = prompt;
this.Voice = voice;
this.Language = language;
this.Newscaster = newscaster;
this.Model = model;
this.Trim = trim;
this.Volume = volume;
this.Speed = speed;
Expand All @@ -118,17 +194,5 @@ public AudioAsset()
{
}

/// <summary>
/// Creates a new <see cref="AudioAsset"/> from its single non-const required field,
/// hardcoding any const discriminator fields.
/// </summary>
public static AudioAsset FromSrc(string src)
{
return new AudioAsset
{
Src = src,
};
}

}
}
Loading