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
244 changes: 128 additions & 116 deletions src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public sealed partial class SpeakerIdentificationRequestBodySpeakerIdentificatio
[global::System.Text.Json.Serialization.JsonPropertyName("known_values")]
public global::System.Collections.Generic.IList<string>? KnownValues { get; set; }

/// <summary>
/// An array of speaker objects with metadata to improve identification accuracy. Each object should include a `role` or `name` (depending on `speaker_type`) and an optional `description` to help the model identify the speaker. You can also include any additional custom properties (e.g., `company`, `title`) to provide more context. Use this as an alternative to `known_values` when you want to provide additional context about each speaker.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("speakers")]
public global::System.Collections.Generic.IList<global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker>? Speakers { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -37,15 +43,20 @@ public sealed partial class SpeakerIdentificationRequestBodySpeakerIdentificatio
/// <param name="knownValues">
/// Required if speaker_type is "role". Each value must be 35 characters or less.
/// </param>
/// <param name="speakers">
/// An array of speaker objects with metadata to improve identification accuracy. Each object should include a `role` or `name` (depending on `speaker_type`) and an optional `description` to help the model identify the speaker. You can also include any additional custom properties (e.g., `company`, `title`) to provide more context. Use this as an alternative to `known_values` when you want to provide additional context about each speaker.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public SpeakerIdentificationRequestBodySpeakerIdentification(
global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeakerType speakerType,
global::System.Collections.Generic.IList<string>? knownValues)
global::System.Collections.Generic.IList<string>? knownValues,
global::System.Collections.Generic.IList<global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker>? speakers)
{
this.SpeakerType = speakerType;
this.KnownValues = knownValues;
this.Speakers = speakers;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace AssemblyAI
{
public sealed partial class SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker),
jsonSerializerContext) as global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker),
jsonSerializerContext).ConfigureAwait(false)) as global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::AssemblyAI.SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

#nullable enable

namespace AssemblyAI
{
/// <summary>
///
/// </summary>
public sealed partial class SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker
{
/// <summary>
/// The role of the speaker. Required when `speaker_type` is "role".
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("role")]
public string? Role { get; set; }

/// <summary>
/// The name of the speaker. Required when `speaker_type` is "name".
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("name")]
public string? Name { get; set; }

/// <summary>
/// A description of the speaker to help the model identify them based on conversational context.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("description")]
public string? Description { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

/// <summary>
/// Initializes a new instance of the <see cref="SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker" /> class.
/// </summary>
/// <param name="role">
/// The role of the speaker. Required when `speaker_type` is "role".
/// </param>
/// <param name="name">
/// The name of the speaker. Required when `speaker_type` is "name".
/// </param>
/// <param name="description">
/// A description of the speaker to help the model identify them based on conversational context.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker(
string? role,
string? name,
string? description)
{
this.Role = role;
this.Name = name;
this.Description = description;
}

/// <summary>
/// Initializes a new instance of the <see cref="SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker" /> class.
/// </summary>
public SpeakerIdentificationRequestBodySpeakerIdentificationSpeaker()
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ namespace AssemblyAI
/// </summary>
public sealed partial class SpeakerIdentificationResponseSpeakerIdentification
{
/// <summary>
/// A mapping of the original generic speaker labels (e.g., "A", "B") to the identified speaker names or roles.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("mapping")]
public global::System.Collections.Generic.Dictionary<string, string>? Mapping { get; set; }

/// <summary>
///
/// </summary>
Expand All @@ -23,13 +29,18 @@ public sealed partial class SpeakerIdentificationResponseSpeakerIdentification
/// <summary>
/// Initializes a new instance of the <see cref="SpeakerIdentificationResponseSpeakerIdentification" /> class.
/// </summary>
/// <param name="mapping">
/// A mapping of the original generic speaker labels (e.g., "A", "B") to the identified speaker names or roles.
/// </param>
/// <param name="status"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public SpeakerIdentificationResponseSpeakerIdentification(
global::System.Collections.Generic.Dictionary<string, string>? mapping,
string? status)
{
this.Mapping = mapping;
this.Status = status;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace AssemblyAI
{
public sealed partial class SpeakerIdentificationResponseSpeakerIdentificationMapping
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping),
jsonSerializerContext) as global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping),
jsonSerializerContext).ConfigureAwait(false)) as global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::AssemblyAI.SpeakerIdentificationResponseSpeakerIdentificationMapping?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

#nullable enable

namespace AssemblyAI
{
/// <summary>
/// A mapping of the original generic speaker labels (e.g., "A", "B") to the identified speaker names or roles.
/// </summary>
public sealed partial class SpeakerIdentificationResponseSpeakerIdentificationMapping
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
Loading
Loading