Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 13, 2024
1 parent 8e7935c commit 94945e5
Show file tree
Hide file tree
Showing 83 changed files with 3,908 additions and 22 deletions.
58 changes: 58 additions & 0 deletions src/libs/AssemblyAI/Generated/AnyOf.2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,63 @@ public override bool Equals(object? obj)
{
return obj is AnyOf<T1, T2> o && Equals(o);
}


/// <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.AnyOf<T1, T2>? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::AssemblyAI.AnyOf<T1, T2>),
jsonSerializerContext) as global::AssemblyAI.AnyOf<T1, T2>?;
}

/// <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.AnyOf<T1, T2>? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::AssemblyAI.AnyOf<T1, T2>>(
json,
jsonSerializerOptions);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ partial void ProcessGetLemurResponseResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::AssemblyAI.LemurResponse?), JsonSerializerContext) as global::AssemblyAI.LemurResponse? ??
global::AssemblyAI.LemurResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ partial void ProcessLemurActionItemsResponseContent(
httpRequest.Headers.Add(_authorization.Name, _authorization.Value);
}
}
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -109,7 +109,7 @@ partial void ProcessLemurActionItemsResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::AssemblyAI.LemurActionItemsResponse?), JsonSerializerContext) as global::AssemblyAI.LemurActionItemsResponse? ??
global::AssemblyAI.LemurActionItemsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ partial void ProcessLemurQuestionAnswerResponseContent(
httpRequest.Headers.Add(_authorization.Name, _authorization.Value);
}
}
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -110,7 +110,7 @@ partial void ProcessLemurQuestionAnswerResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::AssemblyAI.LemurQuestionAnswerResponse?), JsonSerializerContext) as global::AssemblyAI.LemurQuestionAnswerResponse? ??
global::AssemblyAI.LemurQuestionAnswerResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ partial void ProcessLemurSummaryResponseContent(
httpRequest.Headers.Add(_authorization.Name, _authorization.Value);
}
}
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -110,7 +110,7 @@ partial void ProcessLemurSummaryResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::AssemblyAI.LemurSummaryResponse?), JsonSerializerContext) as global::AssemblyAI.LemurSummaryResponse? ??
global::AssemblyAI.LemurSummaryResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ partial void ProcessLemurTaskResponseContent(
httpRequest.Headers.Add(_authorization.Name, _authorization.Value);
}
}
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext);
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -109,7 +109,7 @@ partial void ProcessLemurTaskResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::AssemblyAI.LemurTaskResponse?), JsonSerializerContext) as global::AssemblyAI.LemurTaskResponse? ??
global::AssemblyAI.LemurTaskResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ partial void ProcessPurgeLemurRequestDataResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::AssemblyAI.PurgeLemurRequestDataResponse), JsonSerializerContext) as global::AssemblyAI.PurgeLemurRequestDataResponse ??
global::AssemblyAI.PurgeLemurRequestDataResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,63 @@ public sealed partial class AutoHighlightResult
/// </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>
/// 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.AutoHighlightResult? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::AssemblyAI.AutoHighlightResult),
jsonSerializerContext) as global::AssemblyAI.AutoHighlightResult;
}

/// <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.AutoHighlightResult? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::AssemblyAI.AutoHighlightResult>(
json,
jsonSerializerOptions);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,63 @@ public sealed partial class AutoHighlightsResult2
/// </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>
/// 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.AutoHighlightsResult2? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::AssemblyAI.AutoHighlightsResult2),
jsonSerializerContext) as global::AssemblyAI.AutoHighlightsResult2;
}

/// <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.AutoHighlightsResult2? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::AssemblyAI.AutoHighlightsResult2>(
json,
jsonSerializerOptions);
}

}
}
58 changes: 58 additions & 0 deletions src/libs/AssemblyAI/Generated/AssemblyAI.Models.Chapter.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,63 @@ public sealed partial class Chapter
/// </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>
/// 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.Chapter? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::AssemblyAI.Chapter),
jsonSerializerContext) as global::AssemblyAI.Chapter;
}

/// <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.Chapter? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::AssemblyAI.Chapter>(
json,
jsonSerializerOptions);
}

}
}
Loading

0 comments on commit 94945e5

Please sign in to comment.