diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.JsonConverters.TranslationConfigType.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.JsonConverters.TranslationConfigType.g.cs
new file mode 100644
index 0000000..f4ecf2e
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.JsonConverters.TranslationConfigType.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Soniox.Realtime.JsonConverters
+{
+ ///
+ public sealed class TranslationConfigTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Soniox.Realtime.TranslationConfigType Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Soniox.Realtime.TranslationConfigTypeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Soniox.Realtime.TranslationConfigType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Soniox.Realtime.TranslationConfigType);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Soniox.Realtime.TranslationConfigType value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Soniox.Realtime.TranslationConfigTypeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.JsonConverters.TranslationConfigTypeNullable.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.JsonConverters.TranslationConfigTypeNullable.g.cs
new file mode 100644
index 0000000..ace1f1c
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.JsonConverters.TranslationConfigTypeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Soniox.Realtime.JsonConverters
+{
+ ///
+ public sealed class TranslationConfigTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Soniox.Realtime.TranslationConfigType? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Soniox.Realtime.TranslationConfigTypeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Soniox.Realtime.TranslationConfigType)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Soniox.Realtime.TranslationConfigType?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Soniox.Realtime.TranslationConfigType? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Soniox.Realtime.TranslationConfigTypeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.JsonSerializerContext.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.JsonSerializerContext.g.cs
index a7e6d0f..63557c9 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.JsonSerializerContext.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.JsonSerializerContext.g.cs
@@ -13,6 +13,10 @@ namespace Soniox.Realtime
DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull,
Converters = new global::System.Type[]
{
+ typeof(global::Soniox.Realtime.JsonConverters.TranslationConfigTypeJsonConverter),
+
+ typeof(global::Soniox.Realtime.JsonConverters.TranslationConfigTypeNullableJsonConverter),
+
typeof(global::Soniox.Realtime.JsonConverters.ServerEventJsonConverter),
typeof(global::Soniox.Realtime.JsonConverters.OneOfJsonConverter),
@@ -27,6 +31,7 @@ namespace Soniox.Realtime
[global::System.Text.Json.Serialization.JsonSerializable(typeof(object))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(double))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.Realtime.TranslationConfig))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.Realtime.TranslationConfigType), TypeInfoPropertyName = "TranslationConfigType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.Realtime.RealtimeToken))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Soniox.Realtime.RealtimeResult))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.JsonSerializerContextTypes.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.JsonSerializerContextTypes.g.cs
index 51f28e3..8d726c3 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.JsonSerializerContextTypes.g.cs
@@ -64,23 +64,27 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Soniox.Realtime.RealtimeToken? Type9 { get; set; }
+ public global::Soniox.Realtime.TranslationConfigType? Type9 { get; set; }
///
///
///
- public global::Soniox.Realtime.RealtimeResult? Type10 { get; set; }
+ public global::Soniox.Realtime.RealtimeToken? Type10 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type11 { get; set; }
+ public global::Soniox.Realtime.RealtimeResult? Type11 { get; set; }
///
///
///
- public global::Soniox.Realtime.RealtimeError? Type12 { get; set; }
+ public global::System.Collections.Generic.IList? Type12 { get; set; }
///
///
///
- public global::Soniox.Realtime.ServerEvent? Type13 { get; set; }
+ public global::Soniox.Realtime.RealtimeError? Type13 { get; set; }
+ ///
+ ///
+ ///
+ public global::Soniox.Realtime.ServerEvent? Type14 { get; set; }
///
///
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Models.RealtimeConfig.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Models.RealtimeConfig.g.cs
index 14ea93f..fcc7b06 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Models.RealtimeConfig.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Models.RealtimeConfig.g.cs
@@ -12,19 +12,22 @@ public sealed partial class RealtimeConfig
/// Soniox API key. Permanent and temporary API keys are supported.
///
[global::System.Text.Json.Serialization.JsonPropertyName("api_key")]
- public string? ApiKey { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string ApiKey { get; set; }
///
/// Realtime STT model id, for example stt-rt-v5.
///
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- public string? Model { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Model { get; set; }
///
/// Audio format; use auto for containerized streams or raw_* values with sample_rate.
///
[global::System.Text.Json.Serialization.JsonPropertyName("audio_format")]
- public string? AudioFormat { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string AudioFormat { get; set; }
///
/// Sample rate in Hz for raw audio.
@@ -164,9 +167,9 @@ public sealed partial class RealtimeConfig
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public RealtimeConfig(
- string? apiKey,
- string? model,
- string? audioFormat,
+ string apiKey,
+ string model,
+ string audioFormat,
int? sampleRate,
int? numChannels,
global::System.Collections.Generic.IList? languageHints,
@@ -181,9 +184,9 @@ public RealtimeConfig(
global::Soniox.Realtime.TranslationConfig? translation,
string? clientReferenceId)
{
- this.ApiKey = apiKey;
- this.Model = model;
- this.AudioFormat = audioFormat;
+ this.ApiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey));
+ this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
+ this.AudioFormat = audioFormat ?? throw new global::System.ArgumentNullException(nameof(audioFormat));
this.SampleRate = sampleRate;
this.NumChannels = numChannels;
this.LanguageHints = languageHints;
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Models.RealtimeError.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Models.RealtimeError.g.cs
index 0173e96..6e604c5 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Models.RealtimeError.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Models.RealtimeError.g.cs
@@ -12,13 +12,15 @@ public sealed partial class RealtimeError
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("error_code")]
- public int? ErrorCode { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int ErrorCode { get; set; }
///
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("error_message")]
- public string? ErrorMessage { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string ErrorMessage { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -35,11 +37,11 @@ public sealed partial class RealtimeError
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public RealtimeError(
- int? errorCode,
- string? errorMessage)
+ int errorCode,
+ string errorMessage)
{
this.ErrorCode = errorCode;
- this.ErrorMessage = errorMessage;
+ this.ErrorMessage = errorMessage ?? throw new global::System.ArgumentNullException(nameof(errorMessage));
}
///
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Models.TranslationConfig.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Models.TranslationConfig.g.cs
index 809b018..29bd929 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Models.TranslationConfig.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Models.TranslationConfig.g.cs
@@ -12,7 +12,9 @@ public sealed partial class TranslationConfig
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("type")]
- public string? Type { get; set; }
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Soniox.Realtime.JsonConverters.TranslationConfigTypeJsonConverter))]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::Soniox.Realtime.TranslationConfigType Type { get; set; }
///
///
@@ -49,7 +51,7 @@ public sealed partial class TranslationConfig
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public TranslationConfig(
- string? type,
+ global::Soniox.Realtime.TranslationConfigType type,
string? targetLanguage,
string? languageA,
string? languageB)
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Models.TranslationConfigType.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Models.TranslationConfigType.g.cs
new file mode 100644
index 0000000..fc612d0
--- /dev/null
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Models.TranslationConfigType.g.cs
@@ -0,0 +1,51 @@
+
+#nullable enable
+
+namespace Soniox.Realtime
+{
+ ///
+ ///
+ ///
+ public enum TranslationConfigType
+ {
+ ///
+ ///
+ ///
+ OneWay,
+ ///
+ ///
+ ///
+ TwoWay,
+ }
+
+ ///
+ /// Enum extensions to do fast conversions without the reflection.
+ ///
+ public static class TranslationConfigTypeExtensions
+ {
+ ///
+ /// Converts an enum to a string.
+ ///
+ public static string ToValueString(this TranslationConfigType value)
+ {
+ return value switch
+ {
+ TranslationConfigType.OneWay => "one_way",
+ TranslationConfigType.TwoWay => "two_way",
+ _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
+ };
+ }
+ ///
+ /// Converts an string to a enum.
+ ///
+ public static TranslationConfigType? ToEnum(string value)
+ {
+ return value switch
+ {
+ "one_way" => TranslationConfigType.OneWay,
+ "two_way" => TranslationConfigType.TwoWay,
+ _ => null,
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsAudio.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsAudio.g.cs
index 5c1e7c0..aa1e87d 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsAudio.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsAudio.g.cs
@@ -12,7 +12,8 @@ public sealed partial class TtsAudio
/// Stream identifier this audio belongs to.
///
[global::System.Text.Json.Serialization.JsonPropertyName("stream_id")]
- public string? StreamId { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string StreamId { get; set; }
///
/// Base64-encoded audio bytes.
@@ -55,12 +56,12 @@ public sealed partial class TtsAudio
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public TtsAudio(
- string? streamId,
+ string streamId,
string? audio,
bool? audioEnd,
global::Soniox.Realtime.Tts.TtsTimestamps? timestamps)
{
- this.StreamId = streamId;
+ this.StreamId = streamId ?? throw new global::System.ArgumentNullException(nameof(streamId));
this.Audio = audio;
this.AudioEnd = audioEnd;
this.Timestamps = timestamps;
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsCancel.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsCancel.g.cs
index 5683f52..bfe39e6 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsCancel.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsCancel.g.cs
@@ -12,13 +12,15 @@ public sealed partial class TtsCancel
/// Stream identifier to cancel.
///
[global::System.Text.Json.Serialization.JsonPropertyName("stream_id")]
- public string? StreamId { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string StreamId { get; set; }
///
/// True to cancel the active stream.
///
[global::System.Text.Json.Serialization.JsonPropertyName("cancel")]
- public bool? Cancel { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required bool Cancel { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -39,10 +41,10 @@ public sealed partial class TtsCancel
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public TtsCancel(
- string? streamId,
- bool? cancel)
+ string streamId,
+ bool cancel)
{
- this.StreamId = streamId;
+ this.StreamId = streamId ?? throw new global::System.ArgumentNullException(nameof(streamId));
this.Cancel = cancel;
}
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsConfig.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsConfig.g.cs
index c92fe69..d86380d 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsConfig.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsConfig.g.cs
@@ -12,38 +12,45 @@ public sealed partial class TtsConfig
/// Soniox API key. Permanent and temporary API keys are supported.
///
[global::System.Text.Json.Serialization.JsonPropertyName("api_key")]
- public string? ApiKey { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string ApiKey { get; set; }
///
/// Client-generated stream identifier unique among active streams on the connection.
///
[global::System.Text.Json.Serialization.JsonPropertyName("stream_id")]
- public string? StreamId { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string StreamId { get; set; }
///
/// Text-to-Speech model id, for example tts-rt-v2.
/// Default Value: tts-rt-v2
///
+ /// "tts-rt-v2"
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- public string? Model { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Model { get; set; } = "tts-rt-v2";
///
/// Input language code.
///
[global::System.Text.Json.Serialization.JsonPropertyName("language")]
- public string? Language { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Language { get; set; }
///
/// Built-in voice name or cloned voice id.
///
[global::System.Text.Json.Serialization.JsonPropertyName("voice")]
- public string? Voice { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Voice { get; set; }
///
/// Output audio format, for example wav, mp3, opus, flac, or raw PCM formats.
///
[global::System.Text.Json.Serialization.JsonPropertyName("audio_format")]
- public string? AudioFormat { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string AudioFormat { get; set; }
///
/// Optional output sample rate in Hz.
@@ -122,24 +129,24 @@ public sealed partial class TtsConfig
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public TtsConfig(
- string? apiKey,
- string? streamId,
- string? model,
- string? language,
- string? voice,
- string? audioFormat,
+ string apiKey,
+ string streamId,
+ string model,
+ string language,
+ string voice,
+ string audioFormat,
int? sampleRate,
int? bitrate,
string? clientReferenceId,
bool? returnTimestamps,
double? speed)
{
- this.ApiKey = apiKey;
- this.StreamId = streamId;
- this.Model = model;
- this.Language = language;
- this.Voice = voice;
- this.AudioFormat = audioFormat;
+ this.ApiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey));
+ this.StreamId = streamId ?? throw new global::System.ArgumentNullException(nameof(streamId));
+ this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
+ this.Language = language ?? throw new global::System.ArgumentNullException(nameof(language));
+ this.Voice = voice ?? throw new global::System.ArgumentNullException(nameof(voice));
+ this.AudioFormat = audioFormat ?? throw new global::System.ArgumentNullException(nameof(audioFormat));
this.SampleRate = sampleRate;
this.Bitrate = bitrate;
this.ClientReferenceId = clientReferenceId;
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsError.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsError.g.cs
index f23256a..9fa0de4 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsError.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsError.g.cs
@@ -18,19 +18,22 @@ public sealed partial class TtsError
/// HTTP-style status code.
///
[global::System.Text.Json.Serialization.JsonPropertyName("error_code")]
- public int? ErrorCode { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required int ErrorCode { get; set; }
///
/// Stable machine-readable error category.
///
[global::System.Text.Json.Serialization.JsonPropertyName("error_type")]
- public string? ErrorType { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string ErrorType { get; set; }
///
/// Human-readable error message.
///
[global::System.Text.Json.Serialization.JsonPropertyName("error_message")]
- public string? ErrorMessage { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string ErrorMessage { get; set; }
///
/// Optional documentation URL with additional information.
@@ -53,9 +56,6 @@ public sealed partial class TtsError
///
/// Initializes a new instance of the class.
///
- ///
- /// Stream identifier for stream-scoped errors.
- ///
///
/// HTTP-style status code.
///
@@ -65,6 +65,9 @@ public sealed partial class TtsError
///
/// Human-readable error message.
///
+ ///
+ /// Stream identifier for stream-scoped errors.
+ ///
///
/// Optional documentation URL with additional information.
///
@@ -75,17 +78,17 @@ public sealed partial class TtsError
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public TtsError(
+ int errorCode,
+ string errorType,
+ string errorMessage,
string? streamId,
- int? errorCode,
- string? errorType,
- string? errorMessage,
string? moreInfo,
string? requestId)
{
this.StreamId = streamId;
this.ErrorCode = errorCode;
- this.ErrorType = errorType;
- this.ErrorMessage = errorMessage;
+ this.ErrorType = errorType ?? throw new global::System.ArgumentNullException(nameof(errorType));
+ this.ErrorMessage = errorMessage ?? throw new global::System.ArgumentNullException(nameof(errorMessage));
this.MoreInfo = moreInfo;
this.RequestId = requestId;
}
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsKeepAlive.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsKeepAlive.g.cs
index 1ebfdf0..fb04563 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsKeepAlive.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsKeepAlive.g.cs
@@ -12,7 +12,8 @@ public sealed partial class TtsKeepAlive
/// True to keep an already-authenticated WebSocket connection alive.
///
[global::System.Text.Json.Serialization.JsonPropertyName("keep_alive")]
- public bool? KeepAlive { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required bool KeepAlive { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -30,7 +31,7 @@ public sealed partial class TtsKeepAlive
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public TtsKeepAlive(
- bool? keepAlive)
+ bool keepAlive)
{
this.KeepAlive = keepAlive;
}
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsTerminated.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsTerminated.g.cs
index 0833df4..992d271 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsTerminated.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsTerminated.g.cs
@@ -12,13 +12,15 @@ public sealed partial class TtsTerminated
/// Stream identifier whose lifecycle has completed.
///
[global::System.Text.Json.Serialization.JsonPropertyName("stream_id")]
- public string? StreamId { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string StreamId { get; set; }
///
/// True when the server has released stream resources.
///
[global::System.Text.Json.Serialization.JsonPropertyName("terminated")]
- public bool? Terminated { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required bool Terminated { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -39,10 +41,10 @@ public sealed partial class TtsTerminated
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public TtsTerminated(
- string? streamId,
- bool? terminated)
+ string streamId,
+ bool terminated)
{
- this.StreamId = streamId;
+ this.StreamId = streamId ?? throw new global::System.ArgumentNullException(nameof(streamId));
this.Terminated = terminated;
}
diff --git a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsText.g.cs b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsText.g.cs
index 137f40f..4031e41 100644
--- a/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsText.g.cs
+++ b/src/libs/Soniox/Generated/Soniox.Realtime.Tts.Models.TtsText.g.cs
@@ -12,19 +12,22 @@ public sealed partial class TtsText
/// Stream identifier to append text to.
///
[global::System.Text.Json.Serialization.JsonPropertyName("stream_id")]
- public string? StreamId { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string StreamId { get; set; }
///
/// Text chunk to synthesize.
///
[global::System.Text.Json.Serialization.JsonPropertyName("text")]
- public string? Text { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Text { get; set; }
///
/// True when this is the final text chunk for the stream.
///
[global::System.Text.Json.Serialization.JsonPropertyName("text_end")]
- public bool? TextEnd { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required bool TextEnd { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -48,12 +51,12 @@ public sealed partial class TtsText
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public TtsText(
- string? streamId,
- string? text,
- bool? textEnd)
+ string streamId,
+ string text,
+ bool textEnd)
{
- this.StreamId = streamId;
- this.Text = text;
+ this.StreamId = streamId ?? throw new global::System.ArgumentNullException(nameof(streamId));
+ this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text));
this.TextEnd = textEnd;
}