diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IMusicDetectionClient.Authorizations.Bearer.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IMusicDetectionClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..efb55cb --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.IMusicDetectionClient.Authorizations.Bearer.g.cs @@ -0,0 +1,16 @@ + +#nullable enable + +namespace ResembleAI +{ + public partial interface IMusicDetectionClient + { + /// + /// Authorize using bearer authentication. + /// + /// + + public void AuthorizeUsingBearer( + string apiKey); + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IMusicDetectionClient.CreateMusicDetection.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IMusicDetectionClient.CreateMusicDetection.g.cs new file mode 100644 index 0000000..5a9441a --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.IMusicDetectionClient.CreateMusicDetection.g.cs @@ -0,0 +1,227 @@ +#nullable enable + +namespace ResembleAI +{ + public partial interface IMusicDetectionClient + { + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateMusicDetectionAsync( + + global::ResembleAI.CreateMusicDetectionRequest request, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateMusicDetectionAsResponseAsync( + + global::ResembleAI.CreateMusicDetectionRequest request, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// Display name for the detection. Defaults to the source filename. + /// + /// + /// POST destination for the result once processing finishes. The body matches the response of `GET /detect/{uuid}`. + /// + /// + /// Return a base64-encoded heatmap image in `metrics.image`.
+ /// Default Value: false + /// + /// + /// Start of the segment to analyze, in seconds. + /// + /// + /// End of the segment to analyze, in seconds. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateMusicDetectionAsync( + byte[] file, + string filename, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + string? name = default, + string? callbackUrl = default, + bool? visualize = default, + double? startRegion = default, + double? endRegion = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// Display name for the detection. Defaults to the source filename. + /// + /// + /// POST destination for the result once processing finishes. The body matches the response of `GET /detect/{uuid}`. + /// + /// + /// Return a base64-encoded heatmap image in `metrics.image`.
+ /// Default Value: false + /// + /// + /// Start of the segment to analyze, in seconds. + /// + /// + /// End of the segment to analyze, in seconds. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateMusicDetectionAsync( + global::System.IO.Stream file, + string filename, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + string? name = default, + string? callbackUrl = default, + bool? visualize = default, + double? startRegion = default, + double? endRegion = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// Display name for the detection. Defaults to the source filename. + /// + /// + /// POST destination for the result once processing finishes. The body matches the response of `GET /detect/{uuid}`. + /// + /// + /// Return a base64-encoded heatmap image in `metrics.image`.
+ /// Default Value: false + /// + /// + /// Start of the segment to analyze, in seconds. + /// + /// + /// End of the segment to analyze, in seconds. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateMusicDetectionAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + string? name = default, + string? callbackUrl = default, + bool? visualize = default, + double? startRegion = default, + double? endRegion = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IMusicDetectionClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IMusicDetectionClient.g.cs new file mode 100644 index 0000000..023b209 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.IMusicDetectionClient.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IMusicDetectionClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// When false, successful responses are deserialized directly from the response stream for better performance. + /// Error responses are always read as strings regardless of this setting, + /// ensuring is populated. + /// + public bool ReadResponseAsString { get; set; } + /// + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// + public global::ResembleAI.AutoSDKClientOptions Options { get; } + + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.IResembleAIClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.IResembleAIClient.g.cs index 658b5ee..49242d8 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.IResembleAIClient.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.IResembleAIClient.g.cs @@ -135,6 +135,11 @@ public partial interface IResembleAIClient : global::System.IDisposable /// public IntelligenceClient Intelligence { get; } + /// + /// + /// + public MusicDetectionClient MusicDetection { get; } + /// /// /// diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.DetectMusicPostParametersPrefer.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.DetectMusicPostParametersPrefer.g.cs new file mode 100644 index 0000000..3bd3747 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.DetectMusicPostParametersPrefer.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class DetectMusicPostParametersPreferJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.DetectMusicPostParametersPrefer 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::ResembleAI.DetectMusicPostParametersPreferExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.DetectMusicPostParametersPrefer)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.DetectMusicPostParametersPrefer); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.DetectMusicPostParametersPrefer value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::ResembleAI.DetectMusicPostParametersPreferExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.DetectMusicPostParametersPreferNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.DetectMusicPostParametersPreferNullable.g.cs new file mode 100644 index 0000000..a050451 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.DetectMusicPostParametersPreferNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class DetectMusicPostParametersPreferNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.DetectMusicPostParametersPrefer? 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::ResembleAI.DetectMusicPostParametersPreferExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.DetectMusicPostParametersPrefer)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.DetectMusicPostParametersPrefer?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.DetectMusicPostParametersPrefer? 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::ResembleAI.DetectMusicPostParametersPreferExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetector.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetector.g.cs new file mode 100644 index 0000000..75c869d --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetector.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class MusicDetectItemExtraParamsDetectorJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.MusicDetectItemExtraParamsDetector 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::ResembleAI.MusicDetectItemExtraParamsDetectorExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.MusicDetectItemExtraParamsDetector)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.MusicDetectItemExtraParamsDetector); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.MusicDetectItemExtraParamsDetector value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::ResembleAI.MusicDetectItemExtraParamsDetectorExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetectorNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetectorNullable.g.cs new file mode 100644 index 0000000..98a6bf9 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetectorNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class MusicDetectItemExtraParamsDetectorNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.MusicDetectItemExtraParamsDetector? 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::ResembleAI.MusicDetectItemExtraParamsDetectorExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.MusicDetectItemExtraParamsDetector)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.MusicDetectItemExtraParamsDetector?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.MusicDetectItemExtraParamsDetector? 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::ResembleAI.MusicDetectItemExtraParamsDetectorExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemMediaType.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemMediaType.g.cs new file mode 100644 index 0000000..038a7fd --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemMediaType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class MusicDetectItemMediaTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.MusicDetectItemMediaType 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::ResembleAI.MusicDetectItemMediaTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.MusicDetectItemMediaType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.MusicDetectItemMediaType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.MusicDetectItemMediaType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::ResembleAI.MusicDetectItemMediaTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemMediaTypeNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemMediaTypeNullable.g.cs new file mode 100644 index 0000000..8f841ec --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemMediaTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class MusicDetectItemMediaTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.MusicDetectItemMediaType? 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::ResembleAI.MusicDetectItemMediaTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.MusicDetectItemMediaType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.MusicDetectItemMediaType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.MusicDetectItemMediaType? 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::ResembleAI.MusicDetectItemMediaTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemStatus.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemStatus.g.cs new file mode 100644 index 0000000..64e8f17 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemStatus.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class MusicDetectItemStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.MusicDetectItemStatus 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::ResembleAI.MusicDetectItemStatusExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.MusicDetectItemStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.MusicDetectItemStatus); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.MusicDetectItemStatus value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::ResembleAI.MusicDetectItemStatusExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemStatusNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemStatusNullable.g.cs new file mode 100644 index 0000000..64a45c6 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectItemStatusNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class MusicDetectItemStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.MusicDetectItemStatus? 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::ResembleAI.MusicDetectItemStatusExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.MusicDetectItemStatus)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.MusicDetectItemStatus?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.MusicDetectItemStatus? 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::ResembleAI.MusicDetectItemStatusExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectMetricsLabel.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectMetricsLabel.g.cs new file mode 100644 index 0000000..ada2ed1 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectMetricsLabel.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class MusicDetectMetricsLabelJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.MusicDetectMetricsLabel 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::ResembleAI.MusicDetectMetricsLabelExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.MusicDetectMetricsLabel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.MusicDetectMetricsLabel); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.MusicDetectMetricsLabel value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::ResembleAI.MusicDetectMetricsLabelExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectMetricsLabelNullable.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectMetricsLabelNullable.g.cs new file mode 100644 index 0000000..86be25e --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonConverters.MusicDetectMetricsLabelNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace ResembleAI.JsonConverters +{ + /// + public sealed class MusicDetectMetricsLabelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::ResembleAI.MusicDetectMetricsLabel? 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::ResembleAI.MusicDetectMetricsLabelExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::ResembleAI.MusicDetectMetricsLabel)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::ResembleAI.MusicDetectMetricsLabel?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::ResembleAI.MusicDetectMetricsLabel? 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::ResembleAI.MusicDetectMetricsLabelExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContext.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContext.g.cs index f84d333..289fd77 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContext.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContext.g.cs @@ -222,6 +222,16 @@ namespace ResembleAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.TextDetectRequestThinking), TypeInfoPropertyName = "TextDetectRequestThinking2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.TextDetectRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.TextDetectResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectMusicPostParametersPrefer), TypeInfoPropertyName = "DetectMusicPostParametersPrefer2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemStatus), TypeInfoPropertyName = "MusicDetectItemStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemMediaType), TypeInfoPropertyName = "MusicDetectItemMediaType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectMetricsLabel), TypeInfoPropertyName = "MusicDetectMetricsLabel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectMetrics))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector), TypeInfoPropertyName = "MusicDetectItemExtraParamsDetector2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemExtraParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSubmissionInputModality), TypeInfoPropertyName = "SignalSubmissionInputModality2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSubmissionVerdict), TypeInfoPropertyName = "SignalSubmissionVerdict2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalCategoryScore))] @@ -263,7 +273,6 @@ namespace ResembleAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaSampleRate), TypeInfoPropertyName = "SynthesizePostRequestBodyContentApplicationJsonSchemaSampleRate2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.AudioTimestamps))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.TextToSpeechSynthesizeResponse200))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.StreamPostRequestBodyContentApplicationJsonSchemaPrecision), TypeInfoPropertyName = "StreamPostRequestBodyContentApplicationJsonSchemaPrecision2")] @@ -463,6 +472,7 @@ namespace ResembleAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.AskDetectIntelligenceQuestionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.CreateIdentityAttachmentRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SearchIdentitiesRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.CreateMusicDetectionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.CreateSignalSubmissionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.CreateSecureUploadRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SynthesizeRequest))] @@ -499,16 +509,6 @@ namespace ResembleAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkVisionDetectionMetricsOverallStatus?), TypeInfoPropertyName = "NullableWatermarkVisionDetectionMetricsOverallStatus2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkVisionDetectionMetricsDetectedModelVersionsItems?), TypeInfoPropertyName = "NullableWatermarkVisionDetectionMetricsDetectedModelVersionsItems2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkVisionModelResultModelVersion?), TypeInfoPropertyName = "NullableWatermarkVisionModelResultModelVersion2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkVisionModelResultStatus?), TypeInfoPropertyName = "NullableWatermarkVisionModelResultStatus2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkVisionDetectionMetricsVerdict?), TypeInfoPropertyName = "NullableWatermarkVisionDetectionMetricsVerdict2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectWatermarkAnalysisMetrics?), TypeInfoPropertyName = "NullableDetectWatermarkAnalysisMetrics2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectC2PaManifestValidationState?), TypeInfoPropertyName = "NullableDetectC2PaManifestValidationState2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectPostRequestBodyContentMultipartFormDataSchemaModality?), TypeInfoPropertyName = "NullableDetectPostRequestBodyContentMultipartFormDataSchemaModality2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectPostResponsesContentApplicationJsonSchemaItemStatus?), TypeInfoPropertyName = "NullableDetectPostResponsesContentApplicationJsonSchemaItemStatus2")] internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -519,6 +519,16 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull )] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkVisionDetectionMetricsDetectedModelVersionsItems?), TypeInfoPropertyName = "NullableWatermarkVisionDetectionMetricsDetectedModelVersionsItems2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkVisionModelResultModelVersion?), TypeInfoPropertyName = "NullableWatermarkVisionModelResultModelVersion2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkVisionModelResultStatus?), TypeInfoPropertyName = "NullableWatermarkVisionModelResultStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.WatermarkVisionDetectionMetricsVerdict?), TypeInfoPropertyName = "NullableWatermarkVisionDetectionMetricsVerdict2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectWatermarkAnalysisMetrics?), TypeInfoPropertyName = "NullableDetectWatermarkAnalysisMetrics2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectC2PaManifestValidationState?), TypeInfoPropertyName = "NullableDetectC2PaManifestValidationState2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectPostRequestBodyContentMultipartFormDataSchemaModality?), TypeInfoPropertyName = "NullableDetectPostRequestBodyContentMultipartFormDataSchemaModality2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectPostResponsesContentApplicationJsonSchemaItemStatus?), TypeInfoPropertyName = "NullableDetectPostResponsesContentApplicationJsonSchemaItemStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectPostResponsesContentApplicationJsonSchemaItemModality?), TypeInfoPropertyName = "NullableDetectPostResponsesContentApplicationJsonSchemaItemModality2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceStatus?), TypeInfoPropertyName = "NullableDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceStatus2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionOneOf1FraudType?), TypeInfoPropertyName = "NullableDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionOneOf1FraudType2")] @@ -578,6 +588,11 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.TextDetectItemPrediction?), TypeInfoPropertyName = "NullableTextDetectItemPrediction2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.TextDetectPostParametersPrefer?), TypeInfoPropertyName = "NullableTextDetectPostParametersPrefer2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.TextDetectRequestThinking?), TypeInfoPropertyName = "NullableTextDetectRequestThinking2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectMusicPostParametersPrefer?), TypeInfoPropertyName = "NullableDetectMusicPostParametersPrefer2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemStatus?), TypeInfoPropertyName = "NullableMusicDetectItemStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemMediaType?), TypeInfoPropertyName = "NullableMusicDetectItemMediaType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectMetricsLabel?), TypeInfoPropertyName = "NullableMusicDetectMetricsLabel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector?), TypeInfoPropertyName = "NullableMusicDetectItemExtraParamsDetector2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSubmissionInputModality?), TypeInfoPropertyName = "NullableSignalSubmissionInputModality2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalSubmissionVerdict?), TypeInfoPropertyName = "NullableSignalSubmissionVerdict2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SignalScoreItemInputModality?), TypeInfoPropertyName = "NullableSignalScoreItemInputModality2")] @@ -628,6 +643,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -637,7 +653,6 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -1006,6 +1021,26 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::ResembleAI.TextDetectRequestThinking?) + || typeToConvert == typeof(global::ResembleAI.DetectMusicPostParametersPrefer) + + || typeToConvert == typeof(global::ResembleAI.DetectMusicPostParametersPrefer?) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemStatus) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemStatus?) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemMediaType) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemMediaType?) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectMetricsLabel) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectMetricsLabel?) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector?) + || typeToConvert == typeof(global::ResembleAI.SignalSubmissionInputModality) || typeToConvert == typeof(global::ResembleAI.SignalSubmissionInputModality?) @@ -1797,6 +1832,56 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::ResembleAI.JsonConverters.TextDetectRequestThinkingNullableJsonConverter(); } + if (typeToConvert == typeof(global::ResembleAI.DetectMusicPostParametersPrefer)) + { + return new global::ResembleAI.JsonConverters.DetectMusicPostParametersPreferJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.DetectMusicPostParametersPrefer?)) + { + return new global::ResembleAI.JsonConverters.DetectMusicPostParametersPreferNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemStatus)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemStatus?)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemMediaType)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemMediaTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemMediaType?)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemMediaTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectMetricsLabel)) + { + return new global::ResembleAI.JsonConverters.MusicDetectMetricsLabelJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectMetricsLabel?)) + { + return new global::ResembleAI.JsonConverters.MusicDetectMetricsLabelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetectorJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector?)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetectorNullableJsonConverter(); + } + if (typeToConvert == typeof(global::ResembleAI.SignalSubmissionInputModality)) { return new global::ResembleAI.JsonConverters.SignalSubmissionInputModalityJsonConverter(); diff --git a/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContextTypes.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContextTypes.g.cs index cbe8145..a814c76 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContextTypes.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.JsonSerializerContextTypes.g.cs @@ -869,1067 +869,1107 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::ResembleAI.SignalSubmissionInputModality? Type209 { get; set; } + public global::ResembleAI.DetectMusicPostParametersPrefer? Type209 { get; set; } /// /// /// - public global::ResembleAI.SignalSubmissionVerdict? Type210 { get; set; } + public global::ResembleAI.MusicDetectItemStatus? Type210 { get; set; } /// /// /// - public global::ResembleAI.SignalCategoryScore? Type211 { get; set; } + public global::ResembleAI.MusicDetectItemMediaType? Type211 { get; set; } /// /// /// - public global::ResembleAI.SignalScoreItemInputModality? Type212 { get; set; } + public global::ResembleAI.MusicDetectMetricsLabel? Type212 { get; set; } /// /// /// - public global::ResembleAI.SignalScoreItemVerdict? Type213 { get; set; } + public global::ResembleAI.MusicDetectMetrics? Type213 { get; set; } /// /// /// - public global::ResembleAI.SignalTopMatch? Type214 { get; set; } + public global::System.Collections.Generic.IList? Type214 { get; set; } /// /// /// - public global::ResembleAI.SignalScoreItem? Type215 { get; set; } + public global::ResembleAI.MusicDetectItemExtraParamsDetector? Type215 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type216 { get; set; } + public global::ResembleAI.MusicDetectItemExtraParams? Type216 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type217 { get; set; } + public global::ResembleAI.MusicDetectItem? Type217 { get; set; } /// /// /// - public global::ResembleAI.SignalSubmission? Type218 { get; set; } + public global::ResembleAI.MusicDetectResponse? Type218 { get; set; } /// /// /// - public global::ResembleAI.SignalSubmissionListResponse? Type219 { get; set; } + public global::ResembleAI.SignalSubmissionInputModality? Type219 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type220 { get; set; } + public global::ResembleAI.SignalSubmissionVerdict? Type220 { get; set; } /// /// /// - public global::ResembleAI.SignalError? Type221 { get; set; } + public global::ResembleAI.SignalCategoryScore? Type221 { get; set; } /// /// /// - public long? Type222 { get; set; } + public global::ResembleAI.SignalScoreItemInputModality? Type222 { get; set; } /// /// /// - public global::ResembleAI.SignalScoreResponse? Type223 { get; set; } + public global::ResembleAI.SignalScoreItemVerdict? Type223 { get; set; } /// /// /// - public global::ResembleAI.SignalSuccessResponse? Type224 { get; set; } + public global::ResembleAI.SignalTopMatch? Type224 { get; set; } /// /// /// - public global::ResembleAI.SignalSettings? Type225 { get; set; } + public global::ResembleAI.SignalScoreItem? Type225 { get; set; } /// /// /// - public global::ResembleAI.SignalBuiltInCategory? Type226 { get; set; } + public global::System.Collections.Generic.IList? Type226 { get; set; } /// /// /// - public global::ResembleAI.SignalCustomCategoryStatus? Type227 { get; set; } + public global::System.Collections.Generic.IList? Type227 { get; set; } /// /// /// - public global::ResembleAI.SignalCustomCategoryOverlapsItems? Type228 { get; set; } + public global::ResembleAI.SignalSubmission? Type228 { get; set; } /// /// /// - public global::ResembleAI.SignalScenario? Type229 { get; set; } + public global::ResembleAI.SignalSubmissionListResponse? Type229 { get; set; } /// /// /// - public global::ResembleAI.SignalCustomCategory? Type230 { get; set; } + public global::System.Collections.Generic.IList? Type230 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type231 { get; set; } + public global::ResembleAI.SignalError? Type231 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type232 { get; set; } + public long? Type232 { get; set; } /// /// /// - public global::ResembleAI.SignalCalibrationWarningsItems? Type233 { get; set; } + public global::ResembleAI.SignalScoreResponse? Type233 { get; set; } /// /// /// - public global::ResembleAI.SignalCalibration? Type234 { get; set; } + public global::ResembleAI.SignalSuccessResponse? Type234 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type235 { get; set; } + public global::ResembleAI.SignalSettings? Type235 { get; set; } /// /// /// - public global::ResembleAI.SignalCustomCategoryListResponse? Type236 { get; set; } + public global::ResembleAI.SignalBuiltInCategory? Type236 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type237 { get; set; } + public global::ResembleAI.SignalCustomCategoryStatus? Type237 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type238 { get; set; } + public global::ResembleAI.SignalCustomCategoryOverlapsItems? Type238 { get; set; } /// /// /// - public global::ResembleAI.SignalCustomCategoryCreateRequest? Type239 { get; set; } + public global::ResembleAI.SignalScenario? Type239 { get; set; } /// /// /// - public global::ResembleAI.SignalCustomCategoryResponse? Type240 { get; set; } + public global::ResembleAI.SignalCustomCategory? Type240 { get; set; } /// /// /// - public global::ResembleAI.SignalCustomCategoryUpdateRequest? Type241 { get; set; } + public global::System.Collections.Generic.IList? Type241 { get; set; } /// /// /// - public global::ResembleAI.SignalSettingsUpdateRequest? Type242 { get; set; } + public global::System.Collections.Generic.IList? Type242 { get; set; } /// /// /// - public global::ResembleAI.SignalSettingsResponse? Type243 { get; set; } + public global::ResembleAI.SignalCalibrationWarningsItems? Type243 { get; set; } /// /// /// - public global::ResembleAI.SecureUploadsCreateSecureUploadResponse200? Type244 { get; set; } + public global::ResembleAI.SignalCalibration? Type244 { get; set; } /// /// /// - public global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaPrecision? Type245 { get; set; } + public global::System.Collections.Generic.IList? Type245 { get; set; } /// /// /// - public global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaOutputFormat? Type246 { get; set; } + public global::ResembleAI.SignalCustomCategoryListResponse? Type246 { get; set; } /// /// /// - public global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaSampleRate? Type247 { get; set; } + public global::System.Collections.Generic.IList? Type247 { get; set; } /// /// /// - public global::ResembleAI.AudioTimestamps? Type248 { get; set; } + public global::System.Collections.Generic.IList? Type248 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type249 { get; set; } + public global::ResembleAI.SignalCustomCategoryCreateRequest? Type249 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type250 { get; set; } + public global::ResembleAI.SignalCustomCategoryResponse? Type250 { get; set; } /// /// /// - public global::ResembleAI.TextToSpeechSynthesizeResponse200? Type251 { get; set; } + public global::ResembleAI.SignalCustomCategoryUpdateRequest? Type251 { get; set; } /// /// /// - public byte[]? Type252 { get; set; } + public global::ResembleAI.SignalSettingsUpdateRequest? Type252 { get; set; } /// /// /// - public global::ResembleAI.StreamPostRequestBodyContentApplicationJsonSchemaPrecision? Type253 { get; set; } + public global::ResembleAI.SignalSettingsResponse? Type253 { get; set; } /// /// /// - public global::ResembleAI.StreamPostRequestBodyContentApplicationJsonSchemaSampleRate? Type254 { get; set; } + public global::ResembleAI.SecureUploadsCreateSecureUploadResponse200? Type254 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextGetResponsesContentApplicationJsonSchemaItemsItems? Type255 { get; set; } + public global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaPrecision? Type255 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextGetResponsesContentApplicationJsonSchemaMeta? Type256 { get; set; } + public global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaOutputFormat? Type256 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextListTranscriptsResponse200? Type257 { get; set; } + public global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaSampleRate? Type257 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type258 { get; set; } + public global::ResembleAI.AudioTimestamps? Type258 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextPostResponsesContentApplicationJsonSchemaItemStatus? Type259 { get; set; } + public global::System.Collections.Generic.IList>? Type259 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextPostResponsesContentApplicationJsonSchemaItem? Type260 { get; set; } + public global::ResembleAI.TextToSpeechSynthesizeResponse200? Type260 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextCreateTranscriptResponse200? Type261 { get; set; } + public byte[]? Type261 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextUuidGetResponsesContentApplicationJsonSchemaItemStatus? Type262 { get; set; } + public global::ResembleAI.StreamPostRequestBodyContentApplicationJsonSchemaPrecision? Type262 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextUuidGetResponsesContentApplicationJsonSchemaItemWordsItems? Type263 { get; set; } + public global::ResembleAI.StreamPostRequestBodyContentApplicationJsonSchemaSampleRate? Type263 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextUuidGetResponsesContentApplicationJsonSchemaItem? Type264 { get; set; } + public global::ResembleAI.SpeechToTextGetResponsesContentApplicationJsonSchemaItemsItems? Type264 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type265 { get; set; } + public global::ResembleAI.SpeechToTextGetResponsesContentApplicationJsonSchemaMeta? Type265 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextGetTranscriptResponse200? Type266 { get; set; } + public global::ResembleAI.SpeechToTextListTranscriptsResponse200? Type266 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextUuidAskPostResponsesContentApplicationJsonSchemaItem? Type267 { get; set; } + public global::System.Collections.Generic.IList? Type267 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextAskTranscriptQuestionResponse200? Type268 { get; set; } + public global::ResembleAI.SpeechToTextPostResponsesContentApplicationJsonSchemaItemStatus? Type268 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextUuidQuestionsGetResponsesContentApplicationJsonSchemaItemsItems? Type269 { get; set; } + public global::ResembleAI.SpeechToTextPostResponsesContentApplicationJsonSchemaItem? Type269 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextUuidQuestionsGetResponsesContentApplicationJsonSchemaMeta? Type270 { get; set; } + public global::ResembleAI.SpeechToTextCreateTranscriptResponse200? Type270 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextListTranscriptQuestionsResponse200? Type271 { get; set; } + public global::ResembleAI.SpeechToTextUuidGetResponsesContentApplicationJsonSchemaItemStatus? Type271 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type272 { get; set; } + public global::ResembleAI.SpeechToTextUuidGetResponsesContentApplicationJsonSchemaItemWordsItems? Type272 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextUuidQuestionsQuestionUuidGetResponsesContentApplicationJsonSchemaItem? Type273 { get; set; } + public global::ResembleAI.SpeechToTextUuidGetResponsesContentApplicationJsonSchemaItem? Type273 { get; set; } /// /// /// - public global::ResembleAI.SpeechToTextGetTranscriptQuestionResponse200? Type274 { get; set; } + public global::System.Collections.Generic.IList? Type274 { get; set; } /// /// /// - public global::ResembleAI.AudioEnhancementsGetResponsesContentApplicationJsonSchemaItemsItemsStatus? Type275 { get; set; } + public global::ResembleAI.SpeechToTextGetTranscriptResponse200? Type275 { get; set; } /// /// /// - public global::ResembleAI.AudioEnhancementsGetResponsesContentApplicationJsonSchemaItemsItems? Type276 { get; set; } + public global::ResembleAI.SpeechToTextUuidAskPostResponsesContentApplicationJsonSchemaItem? Type276 { get; set; } /// /// /// - public global::ResembleAI.AudioEnhancementListAudioEnhancementsResponse200? Type277 { get; set; } + public global::ResembleAI.SpeechToTextAskTranscriptQuestionResponse200? Type277 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type278 { get; set; } + public global::ResembleAI.SpeechToTextUuidQuestionsGetResponsesContentApplicationJsonSchemaItemsItems? Type278 { get; set; } /// /// /// - public global::ResembleAI.ListAudioEnhancementsRequestBadRequestError? Type279 { get; set; } + public global::ResembleAI.SpeechToTextUuidQuestionsGetResponsesContentApplicationJsonSchemaMeta? Type279 { get; set; } /// /// /// - public global::ResembleAI.AudioEnhancementsPostResponsesContentApplicationJsonSchemaStatus? Type280 { get; set; } + public global::ResembleAI.SpeechToTextListTranscriptQuestionsResponse200? Type280 { get; set; } /// /// /// - public global::ResembleAI.AudioEnhancementCreateAudioEnhancementResponse202? Type281 { get; set; } + public global::System.Collections.Generic.IList? Type281 { get; set; } /// /// /// - public global::ResembleAI.CreateAudioEnhancementRequestBadRequestError? Type282 { get; set; } + public global::ResembleAI.SpeechToTextUuidQuestionsQuestionUuidGetResponsesContentApplicationJsonSchemaItem? Type282 { get; set; } /// /// /// - public global::ResembleAI.CreateAudioEnhancementRequestForbiddenError? Type283 { get; set; } + public global::ResembleAI.SpeechToTextGetTranscriptQuestionResponse200? Type283 { get; set; } /// /// /// - public global::ResembleAI.AudioEnhancementsEnhancementUuidGetResponsesContentApplicationJsonSchemaStatus? Type284 { get; set; } + public global::ResembleAI.AudioEnhancementsGetResponsesContentApplicationJsonSchemaItemsItemsStatus? Type284 { get; set; } /// /// /// - public global::ResembleAI.AudioEnhancementGetAudioEnhancementResponse200? Type285 { get; set; } + public global::ResembleAI.AudioEnhancementsGetResponsesContentApplicationJsonSchemaItemsItems? Type285 { get; set; } /// /// /// - public global::ResembleAI.GetAudioEnhancementRequestNotFoundError? Type286 { get; set; } + public global::ResembleAI.AudioEnhancementListAudioEnhancementsResponse200? Type286 { get; set; } /// /// /// - public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItems? Type287 { get; set; } + public global::System.Collections.Generic.IList? Type287 { get; set; } /// /// /// - public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsComponentStatus? Type288 { get; set; } + public global::ResembleAI.ListAudioEnhancementsRequestBadRequestError? Type288 { get; set; } /// /// /// - public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsComponentStatusTextToSpeech? Type289 { get; set; } + public global::ResembleAI.AudioEnhancementsPostResponsesContentApplicationJsonSchemaStatus? Type289 { get; set; } /// /// /// - public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsComponentStatusFill? Type290 { get; set; } + public global::ResembleAI.AudioEnhancementCreateAudioEnhancementResponse202? Type290 { get; set; } /// /// /// - public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsComponentStatusVoiceConversion? Type291 { get; set; } + public global::ResembleAI.CreateAudioEnhancementRequestBadRequestError? Type291 { get; set; } /// /// /// - public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsApiSupport? Type292 { get; set; } + public global::ResembleAI.CreateAudioEnhancementRequestForbiddenError? Type292 { get; set; } /// /// /// - public global::ResembleAI.VoicesListVoicesResponse200? Type293 { get; set; } + public global::ResembleAI.AudioEnhancementsEnhancementUuidGetResponsesContentApplicationJsonSchemaStatus? Type293 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type294 { get; set; } + public global::ResembleAI.AudioEnhancementGetAudioEnhancementResponse200? Type294 { get; set; } /// /// /// - public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItem? Type295 { get; set; } + public global::ResembleAI.GetAudioEnhancementRequestNotFoundError? Type295 { get; set; } /// /// /// - public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemComponentStatus? Type296 { get; set; } + public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItems? Type296 { get; set; } /// /// /// - public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemComponentStatusTextToSpeech? Type297 { get; set; } + public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsComponentStatus? Type297 { get; set; } /// /// /// - public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemComponentStatusFill? Type298 { get; set; } + public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsComponentStatusTextToSpeech? Type298 { get; set; } /// /// /// - public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemComponentStatusVoiceConversion? Type299 { get; set; } + public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsComponentStatusFill? Type299 { get; set; } /// /// /// - public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemApiSupport? Type300 { get; set; } + public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsComponentStatusVoiceConversion? Type300 { get; set; } /// /// /// - public global::ResembleAI.VoicesCreateVoiceResponse200? Type301 { get; set; } + public global::ResembleAI.VoicesGetResponsesContentApplicationJsonSchemaItemsItemsApiSupport? Type301 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItem? Type302 { get; set; } + public global::ResembleAI.VoicesListVoicesResponse200? Type302 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemComponentStatus? Type303 { get; set; } + public global::System.Collections.Generic.IList? Type303 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemComponentStatusTextToSpeech? Type304 { get; set; } + public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItem? Type304 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemComponentStatusFill? Type305 { get; set; } + public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemComponentStatus? Type305 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemComponentStatusVoiceConversion? Type306 { get; set; } + public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemComponentStatusTextToSpeech? Type306 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemApiSupport? Type307 { get; set; } + public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemComponentStatusFill? Type307 { get; set; } /// /// /// - public global::ResembleAI.VoicesGetVoiceResponse200? Type308 { get; set; } + public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemComponentStatusVoiceConversion? Type308 { get; set; } /// /// /// - public global::ResembleAI.VoicesDeleteVoiceResponse200? Type309 { get; set; } + public global::ResembleAI.VoicesPostResponsesContentApplicationJsonSchemaItemApiSupport? Type309 { get; set; } /// /// /// - public global::ResembleAI.VoicesBuildVoiceResponse200? Type310 { get; set; } + public global::ResembleAI.VoicesCreateVoiceResponse200? Type310 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidRecordingsGetResponsesContentApplicationJsonSchemaItemsItems? Type311 { get; set; } + public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItem? Type311 { get; set; } /// /// /// - public global::ResembleAI.RecordingsListRecordingsResponse200? Type312 { get; set; } + public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemComponentStatus? Type312 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type313 { get; set; } + public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemComponentStatusTextToSpeech? Type313 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidRecordingsPostResponsesContentApplicationJsonSchemaItem? Type314 { get; set; } + public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemComponentStatusFill? Type314 { get; set; } /// /// /// - public global::ResembleAI.RecordingsCreateRecordingResponse200? Type315 { get; set; } + public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemComponentStatusVoiceConversion? Type315 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidRecordingsRecordingIdGetResponsesContentApplicationJsonSchemaItem? Type316 { get; set; } + public global::ResembleAI.VoicesVoiceUuidGetResponsesContentApplicationJsonSchemaItemApiSupport? Type316 { get; set; } /// /// /// - public global::ResembleAI.RecordingsGetRecordingResponse200? Type317 { get; set; } + public global::ResembleAI.VoicesGetVoiceResponse200? Type317 { get; set; } /// /// /// - public global::ResembleAI.RecordingsDeleteRecordingResponse200? Type318 { get; set; } + public global::ResembleAI.VoicesDeleteVoiceResponse200? Type318 { get; set; } /// /// /// - public global::ResembleAI.VoicesVoiceUuidRecordingsRecordingIdPatchResponsesContentApplicationJsonSchemaItem? Type319 { get; set; } + public global::ResembleAI.VoicesBuildVoiceResponse200? Type319 { get; set; } /// /// /// - public global::ResembleAI.RecordingsUpdateRecordingResponse200? Type320 { get; set; } + public global::ResembleAI.VoicesVoiceUuidRecordingsGetResponsesContentApplicationJsonSchemaItemsItems? Type320 { get; set; } /// /// /// - public global::ResembleAI.TermSubstitutionsGetResponsesContentApplicationJsonSchemaItemsItems? Type321 { get; set; } + public global::ResembleAI.RecordingsListRecordingsResponse200? Type321 { get; set; } /// /// /// - public global::ResembleAI.TermSubstitutionsListTermSubstitutionsResponse200? Type322 { get; set; } + public global::System.Collections.Generic.IList? Type322 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type323 { get; set; } + public global::ResembleAI.VoicesVoiceUuidRecordingsPostResponsesContentApplicationJsonSchemaItem? Type323 { get; set; } /// /// /// - public global::ResembleAI.TermSubstitutionsPostResponsesContentApplicationJsonSchemaItem? Type324 { get; set; } + public global::ResembleAI.RecordingsCreateRecordingResponse200? Type324 { get; set; } /// /// /// - public global::ResembleAI.TermSubstitutionsCreateTermSubstitutionResponse200? Type325 { get; set; } + public global::ResembleAI.VoicesVoiceUuidRecordingsRecordingIdGetResponsesContentApplicationJsonSchemaItem? Type325 { get; set; } /// /// /// - public global::ResembleAI.TermSubstitutionsIdGetResponsesContentApplicationJsonSchemaItem? Type326 { get; set; } + public global::ResembleAI.RecordingsGetRecordingResponse200? Type326 { get; set; } /// /// /// - public global::ResembleAI.TermSubstitutionsGetTermSubstitutionResponse200? Type327 { get; set; } + public global::ResembleAI.RecordingsDeleteRecordingResponse200? Type327 { get; set; } /// /// /// - public global::ResembleAI.TermSubstitutionsDeleteTermSubstitutionResponse200? Type328 { get; set; } + public global::ResembleAI.VoicesVoiceUuidRecordingsRecordingIdPatchResponsesContentApplicationJsonSchemaItem? Type328 { get; set; } /// /// /// - public global::ResembleAI.PronunciationsGetParametersStatus? Type329 { get; set; } + public global::ResembleAI.RecordingsUpdateRecordingResponse200? Type329 { get; set; } /// /// /// - public global::ResembleAI.CustomPronunciationStatus? Type330 { get; set; } + public global::ResembleAI.TermSubstitutionsGetResponsesContentApplicationJsonSchemaItemsItems? Type330 { get; set; } /// /// /// - public global::ResembleAI.CustomPronunciation? Type331 { get; set; } + public global::ResembleAI.TermSubstitutionsListTermSubstitutionsResponse200? Type331 { get; set; } /// /// /// - public global::ResembleAI.CustomPronunciationsListPronunciationsResponse200? Type332 { get; set; } + public global::System.Collections.Generic.IList? Type332 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type333 { get; set; } + public global::ResembleAI.TermSubstitutionsPostResponsesContentApplicationJsonSchemaItem? Type333 { get; set; } /// /// /// - public global::ResembleAI.CustomPronunciationsCreatePronunciationResponse201? Type334 { get; set; } + public global::ResembleAI.TermSubstitutionsCreateTermSubstitutionResponse200? Type334 { get; set; } /// /// /// - public global::ResembleAI.PronunciationsBulkPostResponsesContentApplicationJsonSchemaErrorsItems? Type335 { get; set; } + public global::ResembleAI.TermSubstitutionsIdGetResponsesContentApplicationJsonSchemaItem? Type335 { get; set; } /// /// /// - public global::ResembleAI.CustomPronunciationsBulkCreatePronunciationsResponse201? Type336 { get; set; } + public global::ResembleAI.TermSubstitutionsGetTermSubstitutionResponse200? Type336 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type337 { get; set; } + public global::ResembleAI.TermSubstitutionsDeleteTermSubstitutionResponse200? Type337 { get; set; } /// /// /// - public global::ResembleAI.CustomPronunciationsGetPronunciationResponse200? Type338 { get; set; } + public global::ResembleAI.PronunciationsGetParametersStatus? Type338 { get; set; } /// /// /// - public global::ResembleAI.CustomPronunciationsDeletePronunciationResponse200? Type339 { get; set; } + public global::ResembleAI.CustomPronunciationStatus? Type339 { get; set; } /// /// /// - public global::ResembleAI.CustomPronunciationsUpdatePronunciationResponse200? Type340 { get; set; } + public global::ResembleAI.CustomPronunciation? Type340 { get; set; } /// /// /// - public global::ResembleAI.VoiceSettingsPresetsGetResponsesContentApplicationJsonSchemaItemsItems? Type341 { get; set; } + public global::ResembleAI.CustomPronunciationsListPronunciationsResponse200? Type341 { get; set; } /// /// /// - public global::ResembleAI.VoiceSettingsPresetsListVoiceSettingsPresetsResponse200? Type342 { get; set; } + public global::System.Collections.Generic.IList? Type342 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type343 { get; set; } + public global::ResembleAI.CustomPronunciationsCreatePronunciationResponse201? Type343 { get; set; } /// /// /// - public global::ResembleAI.VoiceSettingsPresetsPostResponsesContentApplicationJsonSchemaData? Type344 { get; set; } + public global::ResembleAI.PronunciationsBulkPostResponsesContentApplicationJsonSchemaErrorsItems? Type344 { get; set; } /// /// /// - public global::ResembleAI.VoiceSettingsPresetsCreateVoiceSettingsPresetResponse201? Type345 { get; set; } + public global::ResembleAI.CustomPronunciationsBulkCreatePronunciationsResponse201? Type345 { get; set; } /// /// /// - public global::ResembleAI.VoiceSettingsPresetsUuidGetResponsesContentApplicationJsonSchemaData? Type346 { get; set; } + public global::System.Collections.Generic.IList? Type346 { get; set; } /// /// /// - public global::ResembleAI.VoiceSettingsPresetsGetVoiceSettingsPresetResponse200? Type347 { get; set; } + public global::ResembleAI.CustomPronunciationsGetPronunciationResponse200? Type347 { get; set; } /// /// /// - public global::ResembleAI.VoiceSettingsPresetsDeleteVoiceSettingsPresetResponse200? Type348 { get; set; } + public global::ResembleAI.CustomPronunciationsDeletePronunciationResponse200? Type348 { get; set; } /// /// /// - public global::ResembleAI.VoiceSettingsPresetsUuidPatchResponsesContentApplicationJsonSchemaData? Type349 { get; set; } + public global::ResembleAI.CustomPronunciationsUpdatePronunciationResponse200? Type349 { get; set; } /// /// /// - public global::ResembleAI.VoiceSettingsPresetsUpdateVoiceSettingsPresetResponse200? Type350 { get; set; } + public global::ResembleAI.VoiceSettingsPresetsGetResponsesContentApplicationJsonSchemaItemsItems? Type350 { get; set; } /// /// /// - public global::ResembleAI.ProjectsGetResponsesContentApplicationJsonSchemaItemsItems? Type351 { get; set; } + public global::ResembleAI.VoiceSettingsPresetsListVoiceSettingsPresetsResponse200? Type351 { get; set; } /// /// /// - public global::ResembleAI.ProjectsListProjectsResponse200? Type352 { get; set; } + public global::System.Collections.Generic.IList? Type352 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type353 { get; set; } + public global::ResembleAI.VoiceSettingsPresetsPostResponsesContentApplicationJsonSchemaData? Type353 { get; set; } /// /// /// - public global::ResembleAI.ProjectsPostResponsesContentApplicationJsonSchemaItem? Type354 { get; set; } + public global::ResembleAI.VoiceSettingsPresetsCreateVoiceSettingsPresetResponse201? Type354 { get; set; } /// /// /// - public global::ResembleAI.ProjectsCreateProjectResponse200? Type355 { get; set; } + public global::ResembleAI.VoiceSettingsPresetsUuidGetResponsesContentApplicationJsonSchemaData? Type355 { get; set; } /// /// /// - public global::ResembleAI.ProjectsProjectUuidGetResponsesContentApplicationJsonSchemaItem? Type356 { get; set; } + public global::ResembleAI.VoiceSettingsPresetsGetVoiceSettingsPresetResponse200? Type356 { get; set; } /// /// /// - public global::ResembleAI.ProjectsGetProjectResponse200? Type357 { get; set; } + public global::ResembleAI.VoiceSettingsPresetsDeleteVoiceSettingsPresetResponse200? Type357 { get; set; } /// /// /// - public global::ResembleAI.ProjectsProjectUuidPutResponsesContentApplicationJsonSchemaItem? Type358 { get; set; } + public global::ResembleAI.VoiceSettingsPresetsUuidPatchResponsesContentApplicationJsonSchemaData? Type358 { get; set; } /// /// /// - public global::ResembleAI.ProjectsUpdateProjectResponse200? Type359 { get; set; } + public global::ResembleAI.VoiceSettingsPresetsUpdateVoiceSettingsPresetResponse200? Type359 { get; set; } /// /// /// - public global::ResembleAI.ProjectsDeleteProjectResponse200? Type360 { get; set; } + public global::ResembleAI.ProjectsGetResponsesContentApplicationJsonSchemaItemsItems? Type360 { get; set; } /// /// /// - public global::ResembleAI.ProjectsProjectUuidClipsGetResponsesContentApplicationJsonSchemaItemsItems? Type361 { get; set; } + public global::ResembleAI.ProjectsListProjectsResponse200? Type361 { get; set; } /// /// /// - public global::ResembleAI.ClipsListClipsResponse200? Type362 { get; set; } + public global::System.Collections.Generic.IList? Type362 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type363 { get; set; } + public global::ResembleAI.ProjectsPostResponsesContentApplicationJsonSchemaItem? Type363 { get; set; } /// /// /// - public global::ResembleAI.ProjectsProjectUuidClipsClipUuidGetResponsesContentApplicationJsonSchemaItem? Type364 { get; set; } + public global::ResembleAI.ProjectsCreateProjectResponse200? Type364 { get; set; } /// /// /// - public global::ResembleAI.ClipsGetClipResponse200? Type365 { get; set; } + public global::ResembleAI.ProjectsProjectUuidGetResponsesContentApplicationJsonSchemaItem? Type365 { get; set; } /// /// /// - public global::ResembleAI.ClipsDeleteClipResponse200? Type366 { get; set; } + public global::ResembleAI.ProjectsGetProjectResponse200? Type366 { get; set; } /// /// /// - public global::ResembleAI.ProjectsProjectUuidClipsClipUuidPatchResponsesContentApplicationJsonSchemaItem? Type367 { get; set; } + public global::ResembleAI.ProjectsProjectUuidPutResponsesContentApplicationJsonSchemaItem? Type367 { get; set; } /// /// /// - public global::ResembleAI.ClipsUpdateClipResponse200? Type368 { get; set; } + public global::ResembleAI.ProjectsUpdateProjectResponse200? Type368 { get; set; } /// /// /// - public global::ResembleAI.DuetVoicesGetResponsesContentApplicationJsonSchemaItemsItems? Type369 { get; set; } + public global::ResembleAI.ProjectsDeleteProjectResponse200? Type369 { get; set; } /// /// /// - public global::ResembleAI.DuetsListDuetVoicesResponse200? Type370 { get; set; } + public global::ResembleAI.ProjectsProjectUuidClipsGetResponsesContentApplicationJsonSchemaItemsItems? Type370 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type371 { get; set; } + public global::ResembleAI.ClipsListClipsResponse200? Type371 { get; set; } /// /// /// - public global::ResembleAI.DuetVoicesPostResponsesContentApplicationJsonSchemaItem? Type372 { get; set; } + public global::System.Collections.Generic.IList? Type372 { get; set; } /// /// /// - public global::ResembleAI.DuetsCreateDuetVoiceResponse200? Type373 { get; set; } + public global::ResembleAI.ProjectsProjectUuidClipsClipUuidGetResponsesContentApplicationJsonSchemaItem? Type373 { get; set; } /// /// /// - public global::ResembleAI.DuetVoicesIdPutResponsesContentApplicationJsonSchemaItem? Type374 { get; set; } + public global::ResembleAI.ClipsGetClipResponse200? Type374 { get; set; } /// /// /// - public global::ResembleAI.DuetsUpdateDuetVoiceResponse200? Type375 { get; set; } + public global::ResembleAI.ClipsDeleteClipResponse200? Type375 { get; set; } /// /// /// - public global::ResembleAI.DuetsDeleteDuetVoiceResponse200? Type376 { get; set; } + public global::ResembleAI.ProjectsProjectUuidClipsClipUuidPatchResponsesContentApplicationJsonSchemaItem? Type376 { get; set; } /// /// /// - public global::ResembleAI.DuetVoicePairsGetResponsesContentApplicationJsonSchemaItemsItems? Type377 { get; set; } + public global::ResembleAI.ClipsUpdateClipResponse200? Type377 { get; set; } /// /// /// - public global::ResembleAI.DuetsListDuetVoicePairsResponse200? Type378 { get; set; } + public global::ResembleAI.DuetVoicesGetResponsesContentApplicationJsonSchemaItemsItems? Type378 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type379 { get; set; } + public global::ResembleAI.DuetsListDuetVoicesResponse200? Type379 { get; set; } /// /// /// - public global::ResembleAI.DuetVoicePairsPostResponsesContentApplicationJsonSchemaItem? Type380 { get; set; } + public global::System.Collections.Generic.IList? Type380 { get; set; } /// /// /// - public global::ResembleAI.DuetsCreateDuetVoicePairResponse200? Type381 { get; set; } + public global::ResembleAI.DuetVoicesPostResponsesContentApplicationJsonSchemaItem? Type381 { get; set; } /// /// /// - public global::ResembleAI.DuetPostRequestBodyContentApplicationJsonSchemaScriptItemsSpeaker? Type382 { get; set; } + public global::ResembleAI.DuetsCreateDuetVoiceResponse200? Type382 { get; set; } /// /// /// - public global::ResembleAI.DuetPostRequestBodyContentApplicationJsonSchemaScriptItems? Type383 { get; set; } + public global::ResembleAI.DuetVoicesIdPutResponsesContentApplicationJsonSchemaItem? Type383 { get; set; } /// /// /// - public global::ResembleAI.DuetPostResponsesContentApplicationJsonSchemaItem? Type384 { get; set; } + public global::ResembleAI.DuetsUpdateDuetVoiceResponse200? Type384 { get; set; } /// /// /// - public global::ResembleAI.DuetsGenerateDuetResponse200? Type385 { get; set; } + public global::ResembleAI.DuetsDeleteDuetVoiceResponse200? Type385 { get; set; } /// /// /// - public global::ResembleAI.AccountGetResponsesContentApplicationJsonSchemaItem? Type386 { get; set; } + public global::ResembleAI.DuetVoicePairsGetResponsesContentApplicationJsonSchemaItemsItems? Type386 { get; set; } /// /// /// - public global::ResembleAI.AccountGetAccountResponse200? Type387 { get; set; } + public global::ResembleAI.DuetsListDuetVoicePairsResponse200? Type387 { get; set; } /// /// /// - public global::ResembleAI.AccountTeamsGetResponsesContentApplicationJsonSchemaItemsItems? Type388 { get; set; } + public global::System.Collections.Generic.IList? Type388 { get; set; } /// /// /// - public global::ResembleAI.AccountGetTeamsResponse200? Type389 { get; set; } + public global::ResembleAI.DuetVoicePairsPostResponsesContentApplicationJsonSchemaItem? Type389 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type390 { get; set; } + public global::ResembleAI.DuetsCreateDuetVoicePairResponse200? Type390 { get; set; } /// /// /// - public global::ResembleAI.AccountTeamsTeamUuidGetResponsesContentApplicationJsonSchemaItem? Type391 { get; set; } + public global::ResembleAI.DuetPostRequestBodyContentApplicationJsonSchemaScriptItemsSpeaker? Type391 { get; set; } /// /// /// - public global::ResembleAI.AccountGetTeamResponse200? Type392 { get; set; } + public global::ResembleAI.DuetPostRequestBodyContentApplicationJsonSchemaScriptItems? Type392 { get; set; } /// /// /// - public global::ResembleAI.BillingPlanPlanType? Type393 { get; set; } + public global::ResembleAI.DuetPostResponsesContentApplicationJsonSchemaItem? Type393 { get; set; } /// /// /// - public global::ResembleAI.BillingPlanBillingInterval? Type394 { get; set; } + public global::ResembleAI.DuetsGenerateDuetResponse200? Type394 { get; set; } /// /// /// - public global::ResembleAI.BillingPlanFamily? Type395 { get; set; } + public global::ResembleAI.AccountGetResponsesContentApplicationJsonSchemaItem? Type395 { get; set; } /// /// /// - public global::ResembleAI.BillingPlanProductCategory? Type396 { get; set; } + public global::ResembleAI.AccountGetAccountResponse200? Type396 { get; set; } /// /// /// - public global::ResembleAI.BillingProductRateTier? Type397 { get; set; } + public global::ResembleAI.AccountTeamsGetResponsesContentApplicationJsonSchemaItemsItems? Type397 { get; set; } /// /// /// - public global::ResembleAI.BillingProductFamily? Type398 { get; set; } + public global::ResembleAI.AccountGetTeamsResponse200? Type398 { get; set; } /// /// /// - public global::ResembleAI.BillingPlanProduct? Type399 { get; set; } + public global::System.Collections.Generic.IList? Type399 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type400 { get; set; } + public global::ResembleAI.AccountTeamsTeamUuidGetResponsesContentApplicationJsonSchemaItem? Type400 { get; set; } /// /// /// - public global::ResembleAI.BillingPlan? Type401 { get; set; } + public global::ResembleAI.AccountGetTeamResponse200? Type401 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type402 { get; set; } + public global::ResembleAI.BillingPlanPlanType? Type402 { get; set; } /// /// /// - public global::ResembleAI.BillingPlansResponse? Type403 { get; set; } + public global::ResembleAI.BillingPlanBillingInterval? Type403 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type404 { get; set; } + public global::ResembleAI.BillingPlanFamily? Type404 { get; set; } /// /// /// - public global::ResembleAI.BillingError? Type405 { get; set; } + public global::ResembleAI.BillingPlanProductCategory? Type405 { get; set; } /// /// /// - public global::ResembleAI.BillingPlanResponse? Type406 { get; set; } + public global::ResembleAI.BillingProductRateTier? Type406 { get; set; } /// /// /// - public global::ResembleAI.BillingSubscriptionStatus? Type407 { get; set; } + public global::ResembleAI.BillingProductFamily? Type407 { get; set; } /// /// /// - public global::ResembleAI.BillingSubscriptionProductCategory? Type408 { get; set; } + public global::ResembleAI.BillingPlanProduct? Type408 { get; set; } /// /// /// - public global::ResembleAI.BillingSubscriptionProduct? Type409 { get; set; } + public global::System.Collections.Generic.IList? Type409 { get; set; } /// /// /// - public global::ResembleAI.BillingSubscriptionPlanProduct? Type410 { get; set; } + public global::ResembleAI.BillingPlan? Type410 { get; set; } /// /// /// - public global::ResembleAI.BillingSubscriptionItem? Type411 { get; set; } + public global::System.Collections.Generic.IList? Type411 { get; set; } /// /// /// - public global::ResembleAI.BillingSubscription? Type412 { get; set; } + public global::ResembleAI.BillingPlansResponse? Type412 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type413 { get; set; } + public global::System.Collections.Generic.IList? Type413 { get; set; } /// /// /// - public global::ResembleAI.BillingSubscriptionResponse? Type414 { get; set; } + public global::ResembleAI.BillingError? Type414 { get; set; } /// /// /// - public global::ResembleAI.BillingForbiddenError? Type415 { get; set; } + public global::ResembleAI.BillingPlanResponse? Type415 { get; set; } /// /// /// - public global::ResembleAI.BillingProductQuantityChange? Type416 { get; set; } + public global::ResembleAI.BillingSubscriptionStatus? Type416 { get; set; } /// /// /// - public global::ResembleAI.BillingUpdateProductsRequest? Type417 { get; set; } + public global::ResembleAI.BillingSubscriptionProductCategory? Type417 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type418 { get; set; } + public global::ResembleAI.BillingSubscriptionProduct? Type418 { get; set; } /// /// /// - public global::ResembleAI.BillingPaymentActionRequired? Type419 { get; set; } + public global::ResembleAI.BillingSubscriptionPlanProduct? Type419 { get; set; } /// /// /// - public global::ResembleAI.BillingValidationErrors? Type420 { get; set; } + public global::ResembleAI.BillingSubscriptionItem? Type420 { get; set; } /// /// /// - public global::ResembleAI.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError? Type421 { get; set; } + public global::ResembleAI.BillingSubscription? Type421 { get; set; } /// /// /// - public global::ResembleAI.BillingConfirmPaymentRequest? Type422 { get; set; } + public global::System.Collections.Generic.IList? Type422 { get; set; } /// /// /// - public global::ResembleAI.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError? Type423 { get; set; } + public global::ResembleAI.BillingSubscriptionResponse? Type423 { get; set; } /// /// /// - public global::ResembleAI.BillingChangePlanRequest? Type424 { get; set; } + public global::ResembleAI.BillingForbiddenError? Type424 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type425 { get; set; } + public global::ResembleAI.BillingProductQuantityChange? Type425 { get; set; } /// /// /// - public global::ResembleAI.ChangeBillingPlanRequestUnprocessableEntityError? Type426 { get; set; } + public global::ResembleAI.BillingUpdateProductsRequest? Type426 { get; set; } /// /// /// - public global::ResembleAI.BillingWallet? Type427 { get; set; } + public global::System.Collections.Generic.IList? Type427 { get; set; } /// /// /// - public global::ResembleAI.BillingWalletResponse? Type428 { get; set; } + public global::ResembleAI.BillingPaymentActionRequired? Type428 { get; set; } /// /// /// - public global::ResembleAI.BillingWalletTransactionTransactionType? Type429 { get; set; } + public global::ResembleAI.BillingValidationErrors? Type429 { get; set; } /// /// /// - public global::ResembleAI.BillingWalletTransaction? Type430 { get; set; } + public global::ResembleAI.UpdateBillingSubscriptionProductsRequestUnprocessableEntityError? Type430 { get; set; } /// /// /// - public global::ResembleAI.BillingPagination? Type431 { get; set; } + public global::ResembleAI.BillingConfirmPaymentRequest? Type431 { get; set; } /// /// /// - public global::ResembleAI.BillingTransactionsResponse? Type432 { get; set; } + public global::ResembleAI.ConfirmBillingSubscriptionPaymentRequestUnprocessableEntityError? Type432 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type433 { get; set; } + public global::ResembleAI.BillingChangePlanRequest? Type433 { get; set; } /// /// /// - public global::ResembleAI.BillingAutoReloadSetting? Type434 { get; set; } + public global::System.Collections.Generic.Dictionary? Type434 { get; set; } /// /// /// - public global::ResembleAI.BillingAutoReloadResponse? Type435 { get; set; } + public global::ResembleAI.ChangeBillingPlanRequestUnprocessableEntityError? Type435 { get; set; } /// /// /// - public global::ResembleAI.BillingUpdateAutoReloadRequest? Type436 { get; set; } + public global::ResembleAI.BillingWallet? Type436 { get; set; } /// /// /// - public global::ResembleAI.BillingWalletUpdateBillingAutoReloadResponse200? Type437 { get; set; } + public global::ResembleAI.BillingWalletResponse? Type437 { get; set; } /// /// /// - public global::ResembleAI.UpdateBillingAutoReloadRequestUnprocessableEntityError? Type438 { get; set; } + public global::ResembleAI.BillingWalletTransactionTransactionType? Type438 { get; set; } /// /// /// - public global::ResembleAI.AccountBillingUsageGetResponsesContentApplicationJsonSchemaItem? Type439 { get; set; } + public global::ResembleAI.BillingWalletTransaction? Type439 { get; set; } /// /// /// - public global::ResembleAI.AccountGetBillingUsageResponse200? Type440 { get; set; } + public global::ResembleAI.BillingPagination? Type440 { get; set; } /// /// /// - public global::ResembleAI.CreateDetectionRequest? Type441 { get; set; } + public global::ResembleAI.BillingTransactionsResponse? Type441 { get; set; } /// /// /// - public global::ResembleAI.CreateDetectBatchRequest? Type442 { get; set; } + public global::System.Collections.Generic.IList? Type442 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type443 { get; set; } + public global::ResembleAI.BillingAutoReloadSetting? Type443 { get; set; } /// /// /// - public global::ResembleAI.CreateDetectFeedbackRequest? Type444 { get; set; } + public global::ResembleAI.BillingAutoReloadResponse? Type444 { get; set; } /// /// /// - public global::ResembleAI.RunDetectAgentInvestigationRequest? Type445 { get; set; } + public global::ResembleAI.BillingUpdateAutoReloadRequest? Type445 { get; set; } /// /// /// - public global::ResembleAI.RunIntelligenceRequest? Type446 { get; set; } + public global::ResembleAI.BillingWalletUpdateBillingAutoReloadResponse200? Type446 { get; set; } /// /// /// - public global::ResembleAI.AskDetectIntelligenceQuestionRequest? Type447 { get; set; } + public global::ResembleAI.UpdateBillingAutoReloadRequestUnprocessableEntityError? Type447 { get; set; } /// /// /// - public global::ResembleAI.CreateIdentityAttachmentRequest? Type448 { get; set; } + public global::ResembleAI.AccountBillingUsageGetResponsesContentApplicationJsonSchemaItem? Type448 { get; set; } /// /// /// - public global::ResembleAI.SearchIdentitiesRequest? Type449 { get; set; } + public global::ResembleAI.AccountGetBillingUsageResponse200? Type449 { get; set; } /// /// /// - public global::ResembleAI.CreateSignalSubmissionRequest? Type450 { get; set; } + public global::ResembleAI.CreateDetectionRequest? Type450 { get; set; } /// /// /// - public global::ResembleAI.CreateSecureUploadRequest? Type451 { get; set; } + public global::ResembleAI.CreateDetectBatchRequest? Type451 { get; set; } /// /// /// - public global::ResembleAI.SynthesizeRequest? Type452 { get; set; } + public global::System.Collections.Generic.IList? Type452 { get; set; } /// /// /// - public global::ResembleAI.StreamSynthesizeRequest? Type453 { get; set; } + public global::ResembleAI.CreateDetectFeedbackRequest? Type453 { get; set; } /// /// /// - public global::ResembleAI.CreateTranscriptRequest? Type454 { get; set; } + public global::ResembleAI.RunDetectAgentInvestigationRequest? Type454 { get; set; } /// /// /// - public global::ResembleAI.AskTranscriptQuestionRequest? Type455 { get; set; } + public global::ResembleAI.RunIntelligenceRequest? Type455 { get; set; } /// /// /// - public global::ResembleAI.CreateAudioEnhancementRequest? Type456 { get; set; } + public global::ResembleAI.AskDetectIntelligenceQuestionRequest? Type456 { get; set; } /// /// /// - public global::ResembleAI.CreateVoiceRequest? Type457 { get; set; } + public global::ResembleAI.CreateIdentityAttachmentRequest? Type457 { get; set; } /// /// /// - public global::ResembleAI.BuildVoiceRequest? Type458 { get; set; } + public global::ResembleAI.SearchIdentitiesRequest? Type458 { get; set; } /// /// /// - public global::ResembleAI.CreateRecordingRequest? Type459 { get; set; } + public global::ResembleAI.CreateMusicDetectionRequest? Type459 { get; set; } /// /// /// - public global::ResembleAI.UpdateRecordingRequest? Type460 { get; set; } + public global::ResembleAI.CreateSignalSubmissionRequest? Type460 { get; set; } /// /// /// - public global::ResembleAI.CreateTermSubstitutionRequest? Type461 { get; set; } + public global::ResembleAI.CreateSecureUploadRequest? Type461 { get; set; } /// /// /// - public global::ResembleAI.CreatePronunciationRequest? Type462 { get; set; } + public global::ResembleAI.SynthesizeRequest? Type462 { get; set; } /// /// /// - public global::ResembleAI.BulkCreatePronunciationsRequest? Type463 { get; set; } + public global::ResembleAI.StreamSynthesizeRequest? Type463 { get; set; } /// /// /// - public global::ResembleAI.UpdatePronunciationRequest? Type464 { get; set; } + public global::ResembleAI.CreateTranscriptRequest? Type464 { get; set; } /// /// /// - public global::ResembleAI.CreateVoiceSettingsPresetRequest? Type465 { get; set; } + public global::ResembleAI.AskTranscriptQuestionRequest? Type465 { get; set; } /// /// /// - public global::ResembleAI.UpdateVoiceSettingsPresetRequest? Type466 { get; set; } + public global::ResembleAI.CreateAudioEnhancementRequest? Type466 { get; set; } /// /// /// - public global::ResembleAI.CreateProjectRequest? Type467 { get; set; } + public global::ResembleAI.CreateVoiceRequest? Type467 { get; set; } /// /// /// - public global::ResembleAI.UpdateProjectRequest? Type468 { get; set; } + public global::ResembleAI.BuildVoiceRequest? Type468 { get; set; } /// /// /// - public global::ResembleAI.UpdateClipRequest? Type469 { get; set; } + public global::ResembleAI.CreateRecordingRequest? Type469 { get; set; } /// /// /// - public global::ResembleAI.CreateDuetVoiceRequest? Type470 { get; set; } + public global::ResembleAI.UpdateRecordingRequest? Type470 { get; set; } /// /// /// - public global::ResembleAI.UpdateDuetVoiceRequest? Type471 { get; set; } + public global::ResembleAI.CreateTermSubstitutionRequest? Type471 { get; set; } /// /// /// - public global::ResembleAI.CreateDuetVoicePairRequest? Type472 { get; set; } + public global::ResembleAI.CreatePronunciationRequest? Type472 { get; set; } /// /// /// - public global::ResembleAI.GenerateDuetRequest? Type473 { get; set; } + public global::ResembleAI.BulkCreatePronunciationsRequest? Type473 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type474 { get; set; } + public global::ResembleAI.UpdatePronunciationRequest? Type474 { get; set; } + /// + /// + /// + public global::ResembleAI.CreateVoiceSettingsPresetRequest? Type475 { get; set; } + /// + /// + /// + public global::ResembleAI.UpdateVoiceSettingsPresetRequest? Type476 { get; set; } + /// + /// + /// + public global::ResembleAI.CreateProjectRequest? Type477 { get; set; } + /// + /// + /// + public global::ResembleAI.UpdateProjectRequest? Type478 { get; set; } + /// + /// + /// + public global::ResembleAI.UpdateClipRequest? Type479 { get; set; } + /// + /// + /// + public global::ResembleAI.CreateDuetVoiceRequest? Type480 { get; set; } + /// + /// + /// + public global::ResembleAI.UpdateDuetVoiceRequest? Type481 { get; set; } + /// + /// + /// + public global::ResembleAI.CreateDuetVoicePairRequest? Type482 { get; set; } + /// + /// + /// + public global::ResembleAI.GenerateDuetRequest? Type483 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type484 { get; set; } /// /// @@ -2022,43 +2062,43 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType22 { get; set; } + public global::System.Collections.Generic.List? ListType22 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType23 { get; set; } + public global::System.Collections.Generic.List? ListType23 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType24 { get; set; } + public global::System.Collections.Generic.List? ListType24 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType25 { get; set; } + public global::System.Collections.Generic.List? ListType25 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType26 { get; set; } + public global::System.Collections.Generic.List? ListType26 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType27 { get; set; } + public global::System.Collections.Generic.List? ListType27 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType28 { get; set; } + public global::System.Collections.Generic.List? ListType28 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType29 { get; set; } + public global::System.Collections.Generic.List? ListType29 { get; set; } /// /// /// - public global::System.Collections.Generic.List>? ListType30 { get; set; } + public global::System.Collections.Generic.List? ListType30 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType31 { get; set; } + public global::System.Collections.Generic.List>? ListType31 { get; set; } /// /// /// diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.CreateMusicDetectionRequest.Json.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.CreateMusicDetectionRequest.Json.g.cs new file mode 100644 index 0000000..53139bc --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.CreateMusicDetectionRequest.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace ResembleAI +{ + public sealed partial class CreateMusicDetectionRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::ResembleAI.CreateMusicDetectionRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::ResembleAI.CreateMusicDetectionRequest), + jsonSerializerContext) as global::ResembleAI.CreateMusicDetectionRequest; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::ResembleAI.CreateMusicDetectionRequest? FromJson( + string json) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::ResembleAI.CreateMusicDetectionRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::ResembleAI.CreateMusicDetectionRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::ResembleAI.CreateMusicDetectionRequest; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.CreateMusicDetectionRequest.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.CreateMusicDetectionRequest.g.cs new file mode 100644 index 0000000..1cf3c6c --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.CreateMusicDetectionRequest.g.cs @@ -0,0 +1,116 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// + /// + public sealed partial class CreateMusicDetectionRequest + { + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] File { get; set; } + + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } + + /// + /// Display name for the detection. Defaults to the source filename. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// POST destination for the result once processing finishes. The body matches the response of `GET /detect/{uuid}`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("callback_url")] + public string? CallbackUrl { get; set; } + + /// + /// Return a base64-encoded heatmap image in `metrics.image`.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("visualize")] + public bool? Visualize { get; set; } + + /// + /// Start of the segment to analyze, in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start_region")] + public double? StartRegion { get; set; } + + /// + /// End of the segment to analyze, in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end_region")] + public double? EndRegion { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// Display name for the detection. Defaults to the source filename. + /// + /// + /// POST destination for the result once processing finishes. The body matches the response of `GET /detect/{uuid}`. + /// + /// + /// Return a base64-encoded heatmap image in `metrics.image`.
+ /// Default Value: false + /// + /// + /// Start of the segment to analyze, in seconds. + /// + /// + /// End of the segment to analyze, in seconds. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateMusicDetectionRequest( + byte[] file, + string filename, + string? name, + string? callbackUrl, + bool? visualize, + double? startRegion, + double? endRegion) + { + this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); + this.Name = name; + this.CallbackUrl = callbackUrl; + this.Visualize = visualize; + this.StartRegion = startRegion; + this.EndRegion = endRegion; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateMusicDetectionRequest() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectMusicPostParametersPrefer.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectMusicPostParametersPrefer.g.cs new file mode 100644 index 0000000..35507ff --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectMusicPostParametersPrefer.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// + /// + public enum DetectMusicPostParametersPrefer + { + /// + /// + /// + Wait, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class DetectMusicPostParametersPreferExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this DetectMusicPostParametersPrefer value) + { + return value switch + { + DetectMusicPostParametersPrefer.Wait => "wait", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static DetectMusicPostParametersPrefer? ToEnum(string value) + { + return value switch + { + "wait" => DetectMusicPostParametersPrefer.Wait, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItem.Json.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItem.Json.g.cs new file mode 100644 index 0000000..d32588e --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItem.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace ResembleAI +{ + public sealed partial class MusicDetectItem + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::ResembleAI.MusicDetectItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::ResembleAI.MusicDetectItem), + jsonSerializerContext) as global::ResembleAI.MusicDetectItem; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::ResembleAI.MusicDetectItem? FromJson( + string json) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::ResembleAI.MusicDetectItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::ResembleAI.MusicDetectItem), + jsonSerializerContext).ConfigureAwait(false)) as global::ResembleAI.MusicDetectItem; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItem.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItem.g.cs new file mode 100644 index 0000000..7d1c72c --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItem.g.cs @@ -0,0 +1,163 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// + /// + public sealed partial class MusicDetectItem + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("uuid")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Uuid { get; set; } + + /// + /// Display name for the detection. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// `processing` until inference returns, `completed` once `metrics` is populated, or `failed` if the analysis errored. Failed analyses are not billed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::ResembleAI.JsonConverters.MusicDetectItemStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::ResembleAI.MusicDetectItemStatus Status { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("media_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::ResembleAI.JsonConverters.MusicDetectItemMediaTypeJsonConverter))] + public global::ResembleAI.MusicDetectItemMediaType MediaType { get; set; } + + /// + /// Music detection verdict. Empty while the detection is processing or when it failed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metrics")] + public global::ResembleAI.MusicDetectMetrics? Metrics { get; set; } + + /// + /// Duration of the submitted audio in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("duration")] + public double? Duration { get; set; } + + /// + /// URL to the stored audio file. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// Original filename. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + public string? Filename { get; set; } + + /// + /// Reason the analysis failed. Null unless `status` is `failed`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error_message")] + public string? ErrorMessage { get; set; } + + /// + /// Request metadata. Music detections always include `detector` set to `music`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("extra_params")] + public global::ResembleAI.MusicDetectItemExtraParams? ExtraParams { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// `processing` until inference returns, `completed` once `metrics` is populated, or `failed` if the analysis errored. Failed analyses are not billed. + /// + /// + /// Display name for the detection. + /// + /// + /// + /// Music detection verdict. Empty while the detection is processing or when it failed. + /// + /// + /// Duration of the submitted audio in seconds. + /// + /// + /// URL to the stored audio file. + /// + /// + /// Original filename. + /// + /// + /// Reason the analysis failed. Null unless `status` is `failed`. + /// + /// + /// Request metadata. Music detections always include `detector` set to `music`. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MusicDetectItem( + string uuid, + global::ResembleAI.MusicDetectItemStatus status, + string? name, + global::ResembleAI.MusicDetectItemMediaType mediaType, + global::ResembleAI.MusicDetectMetrics? metrics, + double? duration, + string? url, + string? filename, + string? errorMessage, + global::ResembleAI.MusicDetectItemExtraParams? extraParams, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt) + { + this.Uuid = uuid ?? throw new global::System.ArgumentNullException(nameof(uuid)); + this.Name = name; + this.Status = status; + this.MediaType = mediaType; + this.Metrics = metrics; + this.Duration = duration; + this.Url = url; + this.Filename = filename; + this.ErrorMessage = errorMessage; + this.ExtraParams = extraParams; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + } + + /// + /// Initializes a new instance of the class. + /// + public MusicDetectItem() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemExtraParams.Json.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemExtraParams.Json.g.cs new file mode 100644 index 0000000..4009985 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemExtraParams.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace ResembleAI +{ + public sealed partial class MusicDetectItemExtraParams + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::ResembleAI.MusicDetectItemExtraParams? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::ResembleAI.MusicDetectItemExtraParams), + jsonSerializerContext) as global::ResembleAI.MusicDetectItemExtraParams; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::ResembleAI.MusicDetectItemExtraParams? FromJson( + string json) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::ResembleAI.MusicDetectItemExtraParams? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::ResembleAI.MusicDetectItemExtraParams), + jsonSerializerContext).ConfigureAwait(false)) as global::ResembleAI.MusicDetectItemExtraParams; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemExtraParams.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemExtraParams.g.cs new file mode 100644 index 0000000..4e86536 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemExtraParams.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// Request metadata. Music detections always include `detector` set to `music`. + /// + public sealed partial class MusicDetectItemExtraParams + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("detector")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetectorJsonConverter))] + public global::ResembleAI.MusicDetectItemExtraParamsDetector? Detector { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MusicDetectItemExtraParams( + global::ResembleAI.MusicDetectItemExtraParamsDetector? detector) + { + this.Detector = detector; + } + + /// + /// Initializes a new instance of the class. + /// + public MusicDetectItemExtraParams() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemExtraParamsDetector.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemExtraParamsDetector.g.cs new file mode 100644 index 0000000..3e0a6f1 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemExtraParamsDetector.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// + /// + public enum MusicDetectItemExtraParamsDetector + { + /// + /// + /// + Music, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MusicDetectItemExtraParamsDetectorExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MusicDetectItemExtraParamsDetector value) + { + return value switch + { + MusicDetectItemExtraParamsDetector.Music => "music", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MusicDetectItemExtraParamsDetector? ToEnum(string value) + { + return value switch + { + "music" => MusicDetectItemExtraParamsDetector.Music, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemMediaType.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemMediaType.g.cs new file mode 100644 index 0000000..429112c --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemMediaType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// + /// + public enum MusicDetectItemMediaType + { + /// + /// + /// + Audio, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MusicDetectItemMediaTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MusicDetectItemMediaType value) + { + return value switch + { + MusicDetectItemMediaType.Audio => "audio", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MusicDetectItemMediaType? ToEnum(string value) + { + return value switch + { + "audio" => MusicDetectItemMediaType.Audio, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemStatus.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemStatus.g.cs new file mode 100644 index 0000000..0f955d1 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectItemStatus.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// `processing` until inference returns, `completed` once `metrics` is populated, or `failed` if the analysis errored. Failed analyses are not billed. + /// + public enum MusicDetectItemStatus + { + /// + /// + /// + Completed, + /// + /// + /// + Failed, + /// + /// + /// + Processing, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MusicDetectItemStatusExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MusicDetectItemStatus value) + { + return value switch + { + MusicDetectItemStatus.Completed => "completed", + MusicDetectItemStatus.Failed => "failed", + MusicDetectItemStatus.Processing => "processing", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MusicDetectItemStatus? ToEnum(string value) + { + return value switch + { + "completed" => MusicDetectItemStatus.Completed, + "failed" => MusicDetectItemStatus.Failed, + "processing" => MusicDetectItemStatus.Processing, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectMetrics.Json.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectMetrics.Json.g.cs new file mode 100644 index 0000000..553c350 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectMetrics.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace ResembleAI +{ + public sealed partial class MusicDetectMetrics + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::ResembleAI.MusicDetectMetrics? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::ResembleAI.MusicDetectMetrics), + jsonSerializerContext) as global::ResembleAI.MusicDetectMetrics; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::ResembleAI.MusicDetectMetrics? FromJson( + string json) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::ResembleAI.MusicDetectMetrics? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::ResembleAI.MusicDetectMetrics), + jsonSerializerContext).ConfigureAwait(false)) as global::ResembleAI.MusicDetectMetrics; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectMetrics.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectMetrics.g.cs new file mode 100644 index 0000000..c7653fd --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectMetrics.g.cs @@ -0,0 +1,102 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// Music detection verdict. Empty while the detection is processing or when it failed. + /// + public sealed partial class MusicDetectMetrics + { + /// + /// `fake` when the track is classified as AI-generated music, `real` when it is classified as human-produced. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("label")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::ResembleAI.JsonConverters.MusicDetectMetricsLabelJsonConverter))] + public global::ResembleAI.MusicDetectMetricsLabel? Label { get; set; } + + /// + /// Overall likelihood that the track is AI-generated, from 0 to 1. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("aggregated_score")] + public double? AggregatedScore { get; set; } + + /// + /// Per-window likelihood that the audio is AI-generated, from 0 to 1. A window that could not be scored (for example, silence) is `null`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("score")] + public global::System.Collections.Generic.IList? Score { get; set; } + + /// + /// Duration of the analyzed audio in seconds. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("duration")] + public double? Duration { get; set; } + + /// + /// How consistent the per-window scores are across the track, from 0 to 100. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("consistency")] + public double? Consistency { get; set; } + + /// + /// Base64-encoded heatmap image. Present only when `visualize` was `true`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("image")] + public string? Image { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// `fake` when the track is classified as AI-generated music, `real` when it is classified as human-produced. + /// + /// + /// Overall likelihood that the track is AI-generated, from 0 to 1. + /// + /// + /// Per-window likelihood that the audio is AI-generated, from 0 to 1. A window that could not be scored (for example, silence) is `null`. + /// + /// + /// Duration of the analyzed audio in seconds. + /// + /// + /// How consistent the per-window scores are across the track, from 0 to 100. + /// + /// + /// Base64-encoded heatmap image. Present only when `visualize` was `true`. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MusicDetectMetrics( + global::ResembleAI.MusicDetectMetricsLabel? label, + double? aggregatedScore, + global::System.Collections.Generic.IList? score, + double? duration, + double? consistency, + string? image) + { + this.Label = label; + this.AggregatedScore = aggregatedScore; + this.Score = score; + this.Duration = duration; + this.Consistency = consistency; + this.Image = image; + } + + /// + /// Initializes a new instance of the class. + /// + public MusicDetectMetrics() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectMetricsLabel.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectMetricsLabel.g.cs new file mode 100644 index 0000000..9fa9c87 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectMetricsLabel.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// `fake` when the track is classified as AI-generated music, `real` when it is classified as human-produced. + /// + public enum MusicDetectMetricsLabel + { + /// + /// + /// + Fake, + /// + /// + /// + Real, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class MusicDetectMetricsLabelExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this MusicDetectMetricsLabel value) + { + return value switch + { + MusicDetectMetricsLabel.Fake => "fake", + MusicDetectMetricsLabel.Real => "real", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static MusicDetectMetricsLabel? ToEnum(string value) + { + return value switch + { + "fake" => MusicDetectMetricsLabel.Fake, + "real" => MusicDetectMetricsLabel.Real, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectResponse.Json.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectResponse.Json.g.cs new file mode 100644 index 0000000..0f12d1a --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace ResembleAI +{ + public sealed partial class MusicDetectResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::ResembleAI.MusicDetectResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::ResembleAI.MusicDetectResponse), + jsonSerializerContext) as global::ResembleAI.MusicDetectResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::ResembleAI.MusicDetectResponse? FromJson( + string json) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::ResembleAI.MusicDetectResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::ResembleAI.MusicDetectResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::ResembleAI.MusicDetectResponse; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::ResembleAI.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectResponse.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectResponse.g.cs new file mode 100644 index 0000000..69d4c93 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.MusicDetectResponse.g.cs @@ -0,0 +1,55 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// + /// + public sealed partial class MusicDetectResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("success")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Success { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("item")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::ResembleAI.MusicDetectItem Item { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MusicDetectResponse( + bool success, + global::ResembleAI.MusicDetectItem item) + { + this.Success = success; + this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); + } + + /// + /// Initializes a new instance of the class. + /// + public MusicDetectResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.MusicDetection.JsonSerializerContext.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetection.JsonSerializerContext.g.cs new file mode 100644 index 0000000..6658e00 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetection.JsonSerializerContext.g.cs @@ -0,0 +1,238 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// + /// + [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull + )] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.Error))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectMusicPostParametersPrefer), TypeInfoPropertyName = "DetectMusicPostParametersPrefer2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemStatus), TypeInfoPropertyName = "MusicDetectItemStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemMediaType), TypeInfoPropertyName = "MusicDetectItemMediaType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectMetricsLabel), TypeInfoPropertyName = "MusicDetectMetricsLabel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectMetrics))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector), TypeInfoPropertyName = "MusicDetectItemExtraParamsDetector2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemExtraParams))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItem))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.CreateMusicDetectionRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.DetectMusicPostParametersPrefer?), TypeInfoPropertyName = "NullableDetectMusicPostParametersPrefer2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemStatus?), TypeInfoPropertyName = "NullableMusicDetectItemStatus2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemMediaType?), TypeInfoPropertyName = "NullableMusicDetectItemMediaType2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectMetricsLabel?), TypeInfoPropertyName = "NullableMusicDetectMetricsLabel2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector?), TypeInfoPropertyName = "NullableMusicDetectItemExtraParamsDetector2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + internal sealed partial class MusicDetectionSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext + { + } + /// + /// + /// + public sealed partial class MusicDetectionSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + internal static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver TypeInfoResolver => Resolver; + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static MusicDetectionSourceGenerationContext Default { get; } = new(DefaultOptions); + + private MusicDetectionSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + options.Converters.Add(new global::ResembleAI.JsonConverters.UnixTimestampJsonConverter()); + options.Converters.Add(new LazyEnumJsonConverterFactory()); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + + private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(global::System.Type typeToConvert) + { + return + typeToConvert == typeof(global::ResembleAI.DetectMusicPostParametersPrefer) + + || typeToConvert == typeof(global::ResembleAI.DetectMusicPostParametersPrefer?) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemStatus) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemStatus?) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemMediaType) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemMediaType?) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectMetricsLabel) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectMetricsLabel?) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector) + + || typeToConvert == typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector?); + } + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + if (typeToConvert == typeof(global::ResembleAI.DetectMusicPostParametersPrefer)) + { + return new global::ResembleAI.JsonConverters.DetectMusicPostParametersPreferJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.DetectMusicPostParametersPrefer?)) + { + return new global::ResembleAI.JsonConverters.DetectMusicPostParametersPreferNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemStatus)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemStatusJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemStatus?)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemStatusNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemMediaType)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemMediaTypeJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemMediaType?)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemMediaTypeNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectMetricsLabel)) + { + return new global::ResembleAI.JsonConverters.MusicDetectMetricsLabelJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectMetricsLabel?)) + { + return new global::ResembleAI.JsonConverters.MusicDetectMetricsLabelNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetectorJsonConverter(); + } + + if (typeToConvert == typeof(global::ResembleAI.MusicDetectItemExtraParamsDetector?)) + { + return new global::ResembleAI.JsonConverters.MusicDetectItemExtraParamsDetectorNullableJsonConverter(); + } + throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); + } + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => new MusicDetectionSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()), + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.Authorizations.Bearer.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.Authorizations.Bearer.g.cs new file mode 100644 index 0000000..aca10c9 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.Authorizations.Bearer.g.cs @@ -0,0 +1,35 @@ + +#nullable enable + +namespace ResembleAI +{ + public sealed partial class MusicDetectionClient + { + + /// + public void AuthorizeUsingBearer( + string apiKey) + { + apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + + Authorizations.Add(new global::ResembleAI.EndPointAuthorization + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + Value = apiKey, + }); + } + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.Constructors.Bearer.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.Constructors.Bearer.g.cs new file mode 100644 index 0000000..4aaaea3 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.Constructors.Bearer.g.cs @@ -0,0 +1,31 @@ + +#nullable enable + +namespace ResembleAI +{ + public sealed partial class MusicDetectionClient + { + /// + + public MusicDetectionClient( + string apiKey, + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this(httpClient, baseUri, authorizations, disposeHttpClient) + { + Authorizing(HttpClient, ref apiKey); + + AuthorizeUsingBearer(apiKey); + + Authorized(HttpClient); + } + + partial void Authorizing( + global::System.Net.Http.HttpClient client, + ref string apiKey); + partial void Authorized( + global::System.Net.Http.HttpClient client); + + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.CreateMusicDetection.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.CreateMusicDetection.g.cs new file mode 100644 index 0000000..88ffed3 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.CreateMusicDetection.g.cs @@ -0,0 +1,2421 @@ + +#nullable enable + +namespace ResembleAI +{ + public partial class MusicDetectionClient + { + + private static readonly global::ResembleAI.AutoSDKServer[] s_CreateMusicDetectionServers = new global::ResembleAI.AutoSDKServer[] + { new global::ResembleAI.AutoSDKServer( + id: "https-app-resemble-ai-api-v2", + name: "app.resemble.ai api v2", + url: "https://app.resemble.ai/api/v2", + description: ""), + }; + + + private static readonly global::ResembleAI.EndPointSecurityRequirement s_CreateMusicDetectionSecurityRequirement0 = + new global::ResembleAI.EndPointSecurityRequirement + { + Authorizations = new global::ResembleAI.EndPointAuthorizationRequirement[] + { new global::ResembleAI.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::ResembleAI.EndPointSecurityRequirement[] s_CreateMusicDetectionSecurityRequirements = + new global::ResembleAI.EndPointSecurityRequirement[] + { s_CreateMusicDetectionSecurityRequirement0, + }; + partial void PrepareCreateMusicDetectionArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::ResembleAI.DetectMusicPostParametersPrefer? prefer, + global::ResembleAI.CreateMusicDetectionRequest request); + partial void PrepareCreateMusicDetectionRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer, + global::ResembleAI.CreateMusicDetectionRequest request); + partial void ProcessCreateMusicDetectionResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateMusicDetectionResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateMusicDetectionAsync( + + global::ResembleAI.CreateMusicDetectionRequest request, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateMusicDetectionAsResponseAsync( + + request: request, + prefer: prefer, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateMusicDetectionAsResponseAsync( + + global::ResembleAI.CreateMusicDetectionRequest request, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateMusicDetectionArguments( + httpClient: HttpClient, + prefer: ref prefer, + request: request); + + + var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateMusicDetectionSecurityRequirements, + operationName: "CreateMusicDetectionAsync"); + + using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::ResembleAI.PathBuilder( + path: "/detect/music", + baseUri: ResolveBaseUri( + servers: s_CreateMusicDetectionServers, + defaultBaseUrl: "https://app.resemble.ai/api/v2")); + var __path = __pathBuilder.ToString(); + __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (prefer != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Prefer", prefer?.ToValueString() ?? string.Empty); + } + + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.Name != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty), + name: "\"name\""); + + } + if (request.CallbackUrl != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.CallbackUrl ?? string.Empty), + name: "\"callback_url\""); + + } + if (request.Visualize != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.Visualize, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()), + name: "\"visualize\""); + + } + if (request.StartRegion != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.StartRegion, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty), + name: "\"start_region\""); + + } + if (request.EndRegion != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.EndRegion, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty), + name: "\"end_region\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateMusicDetectionRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + prefer: prefer, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateMusicDetectionResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Invalid request: no `file`, `url`, or `media_token`; a non-audio file; a file over 150 MB; an invalid or expired `media_token`; a URL that resolves to a private address; or a malformed `callback_url`. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::ResembleAI.Error? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::ResembleAI.Error.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::ResembleAI.Error.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::ResembleAI.Error? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::ResembleAI.Error.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::ResembleAI.Error.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Insufficient balance for the detection. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::ResembleAI.Error? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::ResembleAI.Error.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::ResembleAI.Error.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Audio Deepfake Detection is not included in your subscription. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::ResembleAI.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::ResembleAI.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::ResembleAI.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Invalid `start_region`/`end_region`, or (with `Prefer: wait`) the audio could not be decoded. The failed item is returned in `item` with `status: failed`. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::ResembleAI.MusicDetectResponse? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::ResembleAI.MusicDetectResponse.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::ResembleAI.MusicDetectResponse.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // With `Prefer: wait`, the detection model returned an error. The failed item is returned in `item`. + if ((int)__response.StatusCode == 502) + { + string? __content_502 = null; + global::System.Exception? __exception_502 = null; + global::ResembleAI.MusicDetectResponse? __value_502 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_502 = global::ResembleAI.MusicDetectResponse.FromJson(__content_502, JsonSerializerContext); + } + else + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_502 = global::ResembleAI.MusicDetectResponse.FromJson(__content_502, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_502 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_502 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_502, + responseBody: __content_502, + responseObject: __value_502, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // With `Prefer: wait`, the detection model timed out. The failed item is returned in `item`. + if ((int)__response.StatusCode == 504) + { + string? __content_504 = null; + global::System.Exception? __exception_504 = null; + global::ResembleAI.MusicDetectResponse? __value_504 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_504 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_504 = global::ResembleAI.MusicDetectResponse.FromJson(__content_504, JsonSerializerContext); + } + else + { + __content_504 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_504 = global::ResembleAI.MusicDetectResponse.FromJson(__content_504, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_504 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_504, + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateMusicDetectionResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::ResembleAI.MusicDetectResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::ResembleAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::ResembleAI.MusicDetectResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::ResembleAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// Display name for the detection. Defaults to the source filename. + /// + /// + /// POST destination for the result once processing finishes. The body matches the response of `GET /detect/{uuid}`. + /// + /// + /// Return a base64-encoded heatmap image in `metrics.image`.
+ /// Default Value: false + /// + /// + /// Start of the segment to analyze, in seconds. + /// + /// + /// End of the segment to analyze, in seconds. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateMusicDetectionAsync( + byte[] file, + string filename, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + string? name = default, + string? callbackUrl = default, + bool? visualize = default, + double? startRegion = default, + double? endRegion = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::ResembleAI.CreateMusicDetectionRequest + { + File = file, + Filename = filename, + Name = name, + CallbackUrl = callbackUrl, + Visualize = visualize, + StartRegion = startRegion, + EndRegion = endRegion, + }; + + return await CreateMusicDetectionAsync( + prefer: prefer, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// Display name for the detection. Defaults to the source filename. + /// + /// + /// POST destination for the result once processing finishes. The body matches the response of `GET /detect/{uuid}`. + /// + /// + /// Return a base64-encoded heatmap image in `metrics.image`.
+ /// Default Value: false + /// + /// + /// Start of the segment to analyze, in seconds. + /// + /// + /// End of the segment to analyze, in seconds. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateMusicDetectionAsync( + global::System.IO.Stream file, + string filename, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + string? name = default, + string? callbackUrl = default, + bool? visualize = default, + double? startRegion = default, + double? endRegion = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::ResembleAI.CreateMusicDetectionRequest + { + File = global::System.Array.Empty(), + Filename = filename, + Name = name, + CallbackUrl = callbackUrl, + Visualize = visualize, + StartRegion = startRegion, + EndRegion = endRegion, + }; + PrepareArguments( + client: HttpClient); + PrepareCreateMusicDetectionArguments( + httpClient: HttpClient, + prefer: ref prefer, + request: request); + + + var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateMusicDetectionSecurityRequirements, + operationName: "CreateMusicDetectionAsync"); + + using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::ResembleAI.PathBuilder( + path: "/detect/music", + baseUri: ResolveBaseUri( + servers: s_CreateMusicDetectionServers, + defaultBaseUrl: "https://app.resemble.ai/api/v2")); + var __path = __pathBuilder.ToString(); + __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (prefer != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Prefer", prefer?.ToValueString() ?? string.Empty); + } + + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.Name != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty), + name: "\"name\""); + + } + if (request.CallbackUrl != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.CallbackUrl ?? string.Empty), + name: "\"callback_url\""); + + } + if (request.Visualize != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.Visualize, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()), + name: "\"visualize\""); + + } + if (request.StartRegion != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.StartRegion, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty), + name: "\"start_region\""); + + } + if (request.EndRegion != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.EndRegion, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty), + name: "\"end_region\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateMusicDetectionRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + prefer: prefer, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateMusicDetectionResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Invalid request: no `file`, `url`, or `media_token`; a non-audio file; a file over 150 MB; an invalid or expired `media_token`; a URL that resolves to a private address; or a malformed `callback_url`. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::ResembleAI.Error? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::ResembleAI.Error.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::ResembleAI.Error.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::ResembleAI.Error? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::ResembleAI.Error.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::ResembleAI.Error.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Insufficient balance for the detection. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::ResembleAI.Error? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::ResembleAI.Error.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::ResembleAI.Error.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Audio Deepfake Detection is not included in your subscription. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::ResembleAI.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::ResembleAI.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::ResembleAI.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Invalid `start_region`/`end_region`, or (with `Prefer: wait`) the audio could not be decoded. The failed item is returned in `item` with `status: failed`. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::ResembleAI.MusicDetectResponse? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::ResembleAI.MusicDetectResponse.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::ResembleAI.MusicDetectResponse.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // With `Prefer: wait`, the detection model returned an error. The failed item is returned in `item`. + if ((int)__response.StatusCode == 502) + { + string? __content_502 = null; + global::System.Exception? __exception_502 = null; + global::ResembleAI.MusicDetectResponse? __value_502 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_502 = global::ResembleAI.MusicDetectResponse.FromJson(__content_502, JsonSerializerContext); + } + else + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_502 = global::ResembleAI.MusicDetectResponse.FromJson(__content_502, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_502 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_502 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_502, + responseBody: __content_502, + responseObject: __value_502, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // With `Prefer: wait`, the detection model timed out. The failed item is returned in `item`. + if ((int)__response.StatusCode == 504) + { + string? __content_504 = null; + global::System.Exception? __exception_504 = null; + global::ResembleAI.MusicDetectResponse? __value_504 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_504 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_504 = global::ResembleAI.MusicDetectResponse.FromJson(__content_504, JsonSerializerContext); + } + else + { + __content_504 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_504 = global::ResembleAI.MusicDetectResponse.FromJson(__content_504, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_504 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_504, + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateMusicDetectionResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::ResembleAI.MusicDetectResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::ResembleAI.MusicDetectResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Detect AI-generated music
+ /// Analyze a song or music track and classify it as AI-generated or human-produced.
+ /// Supply audio via one of three intake methods:
+ /// - **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.
+ /// - **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.
+ /// - **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.
+ /// Exactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are
+ /// accepted.
+ /// Processing is asynchronous by default: the response returns immediately with `status: processing`.
+ /// Music detections are standard detections, so you can poll
+ /// [`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to
+ /// be notified. Send the `Prefer: wait` header to block until the verdict is available and receive the
+ /// completed item in the same response. Allow a generous client timeout when waiting, since the first
+ /// request after a period of inactivity can take several minutes while the model warms up.
+ /// Each successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed. + ///
+ /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// The audio file to analyze. Must be 150 MB or smaller. + /// + /// + /// Display name for the detection. Defaults to the source filename. + /// + /// + /// POST destination for the result once processing finishes. The body matches the response of `GET /detect/{uuid}`. + /// + /// + /// Return a base64-encoded heatmap image in `metrics.image`.
+ /// Default Value: false + /// + /// + /// Start of the segment to analyze, in seconds. + /// + /// + /// End of the segment to analyze, in seconds. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateMusicDetectionAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::ResembleAI.DetectMusicPostParametersPrefer? prefer = default, + string? name = default, + string? callbackUrl = default, + bool? visualize = default, + double? startRegion = default, + double? endRegion = default, + global::ResembleAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::ResembleAI.CreateMusicDetectionRequest + { + File = global::System.Array.Empty(), + Filename = filename, + Name = name, + CallbackUrl = callbackUrl, + Visualize = visualize, + StartRegion = startRegion, + EndRegion = endRegion, + }; + PrepareArguments( + client: HttpClient); + PrepareCreateMusicDetectionArguments( + httpClient: HttpClient, + prefer: ref prefer, + request: request); + + + var __authorizations = global::ResembleAI.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateMusicDetectionSecurityRequirements, + operationName: "CreateMusicDetectionAsync"); + + using var __timeoutCancellationTokenSource = global::ResembleAI.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::ResembleAI.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::ResembleAI.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::ResembleAI.PathBuilder( + path: "/detect/music", + baseUri: ResolveBaseUri( + servers: s_CreateMusicDetectionServers, + defaultBaseUrl: "https://app.resemble.ai/api/v2")); + var __path = __pathBuilder.ToString(); + __path = global::ResembleAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (prefer != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Prefer", prefer?.ToValueString() ?? string.Empty); + } + + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.Name != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty), + name: "\"name\""); + + } + if (request.CallbackUrl != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.CallbackUrl ?? string.Empty), + name: "\"callback_url\""); + + } + if (request.Visualize != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.Visualize, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()), + name: "\"visualize\""); + + } + if (request.StartRegion != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.StartRegion, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty), + name: "\"start_region\""); + + } + if (request.EndRegion != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.EndRegion, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty), + name: "\"end_region\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::ResembleAI.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateMusicDetectionRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + prefer: prefer, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::ResembleAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::ResembleAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::ResembleAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateMusicDetectionResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::ResembleAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::ResembleAI.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateMusicDetection", + methodName: "CreateMusicDetectionAsync", + pathTemplate: "\"/detect/music\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Invalid request: no `file`, `url`, or `media_token`; a non-audio file; a file over 150 MB; an invalid or expired `media_token`; a URL that resolves to a private address; or a malformed `callback_url`. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::ResembleAI.Error? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::ResembleAI.Error.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::ResembleAI.Error.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Unauthorized + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::ResembleAI.Error? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::ResembleAI.Error.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::ResembleAI.Error.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Insufficient balance for the detection. + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::ResembleAI.Error? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::ResembleAI.Error.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::ResembleAI.Error.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Audio Deepfake Detection is not included in your subscription. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::ResembleAI.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::ResembleAI.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::ResembleAI.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Invalid `start_region`/`end_region`, or (with `Prefer: wait`) the audio could not be decoded. The failed item is returned in `item` with `status: failed`. + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::ResembleAI.MusicDetectResponse? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::ResembleAI.MusicDetectResponse.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::ResembleAI.MusicDetectResponse.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // With `Prefer: wait`, the detection model returned an error. The failed item is returned in `item`. + if ((int)__response.StatusCode == 502) + { + string? __content_502 = null; + global::System.Exception? __exception_502 = null; + global::ResembleAI.MusicDetectResponse? __value_502 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_502 = global::ResembleAI.MusicDetectResponse.FromJson(__content_502, JsonSerializerContext); + } + else + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_502 = global::ResembleAI.MusicDetectResponse.FromJson(__content_502, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_502 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_502 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_502, + responseBody: __content_502, + responseObject: __value_502, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // With `Prefer: wait`, the detection model timed out. The failed item is returned in `item`. + if ((int)__response.StatusCode == 504) + { + string? __content_504 = null; + global::System.Exception? __exception_504 = null; + global::ResembleAI.MusicDetectResponse? __value_504 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_504 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_504 = global::ResembleAI.MusicDetectResponse.FromJson(__content_504, JsonSerializerContext); + } + else + { + __content_504 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_504 = global::ResembleAI.MusicDetectResponse.FromJson(__content_504, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_504 = __ex; + } + + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_504, + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateMusicDetectionResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::ResembleAI.MusicDetectResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::ResembleAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::ResembleAI.MusicDetectResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::ResembleAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::ResembleAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::ResembleAI.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.g.cs new file mode 100644 index 0000000..d0576e1 --- /dev/null +++ b/src/libs/ResembleAI/Generated/ResembleAI.MusicDetectionClient.g.cs @@ -0,0 +1,182 @@ + +#nullable enable + +namespace ResembleAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class MusicDetectionClient : global::ResembleAI.IMusicDetectionClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://app.resemble.ai/api/v2"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + + /// + public global::ResembleAI.AutoSDKClientOptions Options { get; } + + + internal global::ResembleAI.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::ResembleAI.AutoSDKServerConfiguration(); + + internal global::System.Lazy JsonSerializerContextProvider { get; set; } = new(() => global::ResembleAI.MusicDetectionSourceGenerationContext.Default); + + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext + { + get => JsonSerializerContextProvider.Value; + set => JsonSerializerContextProvider = new(() => value); + } + + + /// + /// Creates a new instance of the MusicDetectionClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public MusicDetectionClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this( + httpClient, + baseUri, + authorizations, + options: null, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the MusicDetectionClient with explicit options but no base URL override. + /// Skips passing baseUri so the default base URL from the OpenAPI spec applies. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public MusicDetectionClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Collections.Generic.List? authorizations, + global::ResembleAI.AutoSDKClientOptions? options, + bool disposeHttpClient = true) : this( + httpClient, + baseUri: null, + authorizations, + options, + disposeHttpClient: disposeHttpClient) + { + } + + /// + /// Creates a new instance of the MusicDetectionClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Client-wide request defaults such as headers, query parameters, retries, and timeout. + /// Dispose the HttpClient when the instance is disposed. True by default. + public MusicDetectionClient( + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::ResembleAI.AutoSDKClientOptions? options, + bool disposeHttpClient = true) + { + + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + if (baseUri is not null) + { + HttpClient.BaseAddress ??= baseUri; + } + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + Options = options ?? new global::ResembleAI.AutoSDKClientOptions(); + _disposeHttpClient = disposeHttpClient; + + AutoSDKServerConfiguration.ExplicitBaseUri = baseUri ?? httpClient?.BaseAddress; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + + + private global::System.Uri? ResolveBaseUri( + global::ResembleAI.AutoSDKServer[] servers, + string defaultBaseUrl) + { + if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri) + { + return explicitBaseUri; + } + + if (AutoSDKServerConfiguration.SelectedServer is global::ResembleAI.AutoSDKServer selectedServer) + { + foreach (var server in servers) + { + if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal)) + { + return server.Uri; + } + } + } + + if (servers.Length > 0) + { + return servers[0].Uri; + } + + return string.IsNullOrWhiteSpace(defaultBaseUrl) + ? HttpClient.BaseAddress + : new global::System.Uri(defaultBaseUrl, global::System.UriKind.RelativeOrAbsolute); + } + } +} \ No newline at end of file diff --git a/src/libs/ResembleAI/Generated/ResembleAI.ResembleAIClient.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.ResembleAIClient.g.cs index 98fb491..f23c161 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.ResembleAIClient.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.ResembleAIClient.g.cs @@ -189,6 +189,16 @@ public sealed partial class ResembleAIClient : global::ResembleAI.IResembleAICli AutoSDKServerConfiguration = AutoSDKServerConfiguration, }; + /// + /// + /// + public MusicDetectionClient MusicDetection => new MusicDetectionClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContextProvider = JsonSerializerContextProvider, + AutoSDKServerConfiguration = AutoSDKServerConfiguration, + }; + /// /// /// diff --git a/src/libs/ResembleAI/Generated/ResembleAI.TextToSpeech.JsonSerializerContext.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.TextToSpeech.JsonSerializerContext.g.cs index ab93f0d..6d9a76c 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.TextToSpeech.JsonSerializerContext.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.TextToSpeech.JsonSerializerContext.g.cs @@ -20,12 +20,12 @@ namespace ResembleAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.Error))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaPrecision), TypeInfoPropertyName = "SynthesizePostRequestBodyContentApplicationJsonSchemaPrecision2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaOutputFormat), TypeInfoPropertyName = "SynthesizePostRequestBodyContentApplicationJsonSchemaOutputFormat2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.SynthesizePostRequestBodyContentApplicationJsonSchemaSampleRate), TypeInfoPropertyName = "SynthesizePostRequestBodyContentApplicationJsonSchemaSampleRate2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.AudioTimestamps))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.TextToSpeechSynthesizeResponse200))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.StreamPostRequestBodyContentApplicationJsonSchemaPrecision), TypeInfoPropertyName = "StreamPostRequestBodyContentApplicationJsonSchemaPrecision2")] @@ -42,8 +42,8 @@ namespace ResembleAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::ResembleAI.StreamPostRequestBodyContentApplicationJsonSchemaSampleRate?), TypeInfoPropertyName = "NullableStreamPostRequestBodyContentApplicationJsonSchemaSampleRate2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary>))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))] internal sealed partial class TextToSpeechSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } diff --git a/src/libs/ResembleAI/openapi.yaml b/src/libs/ResembleAI/openapi.yaml index 6b47a1f..0dd4f9b 100644 --- a/src/libs/ResembleAI/openapi.yaml +++ b/src/libs/ResembleAI/openapi.yaml @@ -2320,6 +2320,162 @@ } ] }, + "/detect/music": { + "post": { + "operationId": "musicDetection_createMusicDetection", + "summary": "Detect AI-generated music", + "description": "Analyze a song or music track and classify it as AI-generated or human-produced.\n\nSupply audio via one of three intake methods:\n\n- **Direct file upload**: `multipart/form-data` with the file attached as `file`. Files must be 150 MB or smaller.\n- **Public URL**: `application/json` with a `url` field. Resemble downloads and stores the file before analysis.\n- **Secure upload token**: `application/json` with a `media_token` field obtained from `POST /secure_uploads`.\n\nExactly one of `file`, `url`, or `media_token` must be provided per request. Only audio files are\naccepted.\n\nProcessing is asynchronous by default: the response returns immediately with `status: processing`.\nMusic detections are standard detections, so you can poll\n[`GET /detect/{uuid}`](/api-reference/deepfake-detection/get-detection) or supply a `callback_url` to\nbe notified. Send the `Prefer: wait` header to block until the verdict is available and receive the\ncompleted item in the same response. Allow a generous client timeout when waiting, since the first\nrequest after a period of inactivity can take several minutes while the model warms up.\n\nEach successful analysis is billed as audio Deepfake Detection usage. Failed analyses are not billed.\n", + "tags": [ + "musicDetection" + ], + "parameters": [ + { + "name": "Prefer", + "in": "header", + "description": "When set to \"wait\", the API processes synchronously and returns the completed result.", + "required": false, + "schema": { + "$ref": "#/components/schemas/DetectMusicPostParametersPrefer" + } + } + ], + "responses": { + "200": { + "description": "Music detection created (or completed when `Prefer: wait` was sent)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MusicDetectResponse" + } + } + } + }, + "400": { + "description": "Invalid request: no `file`, `url`, or `media_token`; a non-audio file; a file over 150 MB; an invalid or expired `media_token`; a URL that resolves to a private address; or a malformed `callback_url`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "402": { + "description": "Insufficient balance for the detection.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Audio Deepfake Detection is not included in your subscription.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Invalid `start_region`/`end_region`, or (with `Prefer: wait`) the audio could not be decoded. The failed item is returned in `item` with `status: failed`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MusicDetectResponse" + } + } + } + }, + "502": { + "description": "With `Prefer: wait`, the detection model returned an error. The failed item is returned in `item`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MusicDetectResponse" + } + } + } + }, + "504": { + "description": "With `Prefer: wait`, the detection model timed out. The failed item is returned in `item`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MusicDetectResponse" + } + } + } + } + }, + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "The audio file to analyze. Must be 150 MB or smaller." + }, + "name": { + "type": "string", + "description": "Display name for the detection. Defaults to the source filename." + }, + "callback_url": { + "type": "string", + "format": "uri", + "description": "POST destination for the result once processing finishes. The body matches the response of `GET /detect/{uuid}`." + }, + "visualize": { + "type": "boolean", + "default": false, + "description": "Return a base64-encoded heatmap image in `metrics.image`." + }, + "start_region": { + "type": "number", + "format": "double", + "description": "Start of the segment to analyze, in seconds." + }, + "end_region": { + "type": "number", + "format": "double", + "description": "End of the segment to analyze, in seconds." + } + }, + "required": [ + "file" + ] + } + } + } + }, + "security": [ + { + "BearerAuth": [] + } + ] + }, + "servers": [ + { + "url": "https://app.resemble.ai/api/v2" + } + ] + }, "/signal": { "get": { "operationId": "signal_listSignalSubmissions", @@ -6726,6 +6882,9 @@ { "name": "textDetection" }, + { + "name": "musicDetection" + }, { "name": "signal" }, @@ -10543,6 +10702,182 @@ ], "title": "TextDetectResponse" }, + "DetectMusicPostParametersPrefer": { + "type": "string", + "enum": [ + "wait" + ], + "title": "DetectMusicPostParametersPrefer" + }, + "MusicDetectItemStatus": { + "type": "string", + "enum": [ + "processing", + "completed", + "failed" + ], + "description": "`processing` until inference returns, `completed` once `metrics` is populated, or `failed` if the analysis errored. Failed analyses are not billed.", + "title": "MusicDetectItemStatus" + }, + "MusicDetectItemMediaType": { + "type": "string", + "enum": [ + "audio" + ], + "title": "MusicDetectItemMediaType" + }, + "MusicDetectMetricsLabel": { + "type": "string", + "enum": [ + "fake", + "real" + ], + "description": "`fake` when the track is classified as AI-generated music, `real` when it is classified as human-produced.", + "title": "MusicDetectMetricsLabel" + }, + "MusicDetectMetrics": { + "type": "object", + "properties": { + "label": { + "$ref": "#/components/schemas/MusicDetectMetricsLabel", + "description": "`fake` when the track is classified as AI-generated music, `real` when it is classified as human-produced." + }, + "aggregated_score": { + "type": "number", + "format": "double", + "description": "Overall likelihood that the track is AI-generated, from 0 to 1." + }, + "score": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "description": "Per-window likelihood that the audio is AI-generated, from 0 to 1. A window that could not be scored (for example, silence) is `null`." + }, + "duration": { + "type": "number", + "format": "double", + "description": "Duration of the analyzed audio in seconds." + }, + "consistency": { + "type": "number", + "format": "double", + "description": "How consistent the per-window scores are across the track, from 0 to 100." + }, + "image": { + "type": "string", + "description": "Base64-encoded heatmap image. Present only when `visualize` was `true`." + } + }, + "description": "Music detection verdict. Empty while the detection is processing or when it failed.", + "title": "MusicDetectMetrics" + }, + "MusicDetectItemExtraParamsDetector": { + "type": "string", + "enum": [ + "music" + ], + "title": "MusicDetectItemExtraParamsDetector" + }, + "MusicDetectItemExtraParams": { + "type": "object", + "properties": { + "detector": { + "$ref": "#/components/schemas/MusicDetectItemExtraParamsDetector" + } + }, + "description": "Request metadata. Music detections always include `detector` set to `music`.", + "title": "MusicDetectItemExtraParams" + }, + "MusicDetectItem": { + "type": "object", + "properties": { + "uuid": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ], + "description": "Display name for the detection." + }, + "status": { + "$ref": "#/components/schemas/MusicDetectItemStatus", + "description": "`processing` until inference returns, `completed` once `metrics` is populated, or `failed` if the analysis errored. Failed analyses are not billed." + }, + "media_type": { + "$ref": "#/components/schemas/MusicDetectItemMediaType" + }, + "metrics": { + "$ref": "#/components/schemas/MusicDetectMetrics" + }, + "duration": { + "type": [ + "number", + "null" + ], + "format": "double", + "description": "Duration of the submitted audio in seconds." + }, + "url": { + "type": [ + "string", + "null" + ], + "description": "URL to the stored audio file." + }, + "filename": { + "type": [ + "string", + "null" + ], + "description": "Original filename." + }, + "error_message": { + "type": [ + "string", + "null" + ], + "description": "Reason the analysis failed. Null unless `status` is `failed`." + }, + "extra_params": { + "$ref": "#/components/schemas/MusicDetectItemExtraParams", + "description": "Request metadata. Music detections always include `detector` set to `music`." + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "uuid", + "status", + "media_type" + ], + "title": "MusicDetectItem" + }, + "MusicDetectResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "item": { + "$ref": "#/components/schemas/MusicDetectItem" + } + }, + "required": [ + "success", + "item" + ], + "title": "MusicDetectResponse" + }, "SignalSubmissionInputModality": { "type": "string", "enum": [