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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 36 additions & 16 deletions src/libs/DeepL/Generated/DeepL.Models.UsageResponse.g.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace DeepL
Expand Down Expand Up @@ -47,21 +49,39 @@ public sealed partial class UsageResponse
public long? ApiKeyCharacterLimit { get; set; }

/// <summary>
/// Only present for API Pro users. Milliseconds of speech-to-text used in the current period.<br/>
/// Example: 1800000
/// Deprecated. Always returns 0. Use speech_to_text_minutes_count instead.<br/>
/// Example: 0
/// </summary>
/// <example>1800000</example>
/// <example>0</example>
[global::System.Text.Json.Serialization.JsonPropertyName("speech_to_text_milliseconds_count")]
[global::System.Obsolete("This property marked as deprecated.")]
public int? SpeechToTextMillisecondsCount { get; set; }

/// <summary>
/// Only present for API Pro users. Milliseconds of speech-to-text limit in the current period.<br/>
/// Example: 36000000
/// Deprecated. Always returns 0. Use speech_to_text_minutes_limit instead.<br/>
/// Example: 0
/// </summary>
/// <example>36000000</example>
/// <example>0</example>
[global::System.Text.Json.Serialization.JsonPropertyName("speech_to_text_milliseconds_limit")]
[global::System.Obsolete("This property marked as deprecated.")]
public int? SpeechToTextMillisecondsLimit { get; set; }

/// <summary>
/// Only present for API Pro users. Minutes of speech-to-text used in the current period. Milliseconds are rounded up to the nearest minute.<br/>
/// Example: 30
/// </summary>
/// <example>30</example>
[global::System.Text.Json.Serialization.JsonPropertyName("speech_to_text_minutes_count")]
public int? SpeechToTextMinutesCount { get; set; }

/// <summary>
/// Only present for API Pro users. Maximum minutes of speech-to-text that can be used in the current billing period.<br/>
/// Example: 600
/// </summary>
/// <example>600</example>
[global::System.Text.Json.Serialization.JsonPropertyName("speech_to_text_minutes_limit")]
public int? SpeechToTextMinutesLimit { get; set; }

/// <summary>
/// Only present for API Pro users. Start time of the current billing period (ISO 8601).<br/>
/// Example: 2025-05-13T09:18:42Z
Expand Down Expand Up @@ -106,13 +126,13 @@ public sealed partial class UsageResponse
/// Only present for API Pro users. Character limit for this API key in the current period.<br/>
/// Example: 1000000000000
/// </param>
/// <param name="speechToTextMillisecondsCount">
/// Only present for API Pro users. Milliseconds of speech-to-text used in the current period.<br/>
/// Example: 1800000
/// <param name="speechToTextMinutesCount">
/// Only present for API Pro users. Minutes of speech-to-text used in the current period. Milliseconds are rounded up to the nearest minute.<br/>
/// Example: 30
/// </param>
/// <param name="speechToTextMillisecondsLimit">
/// Only present for API Pro users. Milliseconds of speech-to-text limit in the current period.<br/>
/// Example: 36000000
/// <param name="speechToTextMinutesLimit">
/// Only present for API Pro users. Maximum minutes of speech-to-text that can be used in the current billing period.<br/>
/// Example: 600
/// </param>
/// <param name="startTime">
/// Only present for API Pro users. Start time of the current billing period (ISO 8601).<br/>
Expand All @@ -131,8 +151,8 @@ public UsageResponse(
global::System.Collections.Generic.IList<global::DeepL.UsageResponseProduct>? products,
int? apiKeyCharacterCount,
long? apiKeyCharacterLimit,
int? speechToTextMillisecondsCount,
int? speechToTextMillisecondsLimit,
int? speechToTextMinutesCount,
int? speechToTextMinutesLimit,
global::System.DateTime? startTime,
global::System.DateTime? endTime)
{
Expand All @@ -141,8 +161,8 @@ public UsageResponse(
this.Products = products;
this.ApiKeyCharacterCount = apiKeyCharacterCount;
this.ApiKeyCharacterLimit = apiKeyCharacterLimit;
this.SpeechToTextMillisecondsCount = speechToTextMillisecondsCount;
this.SpeechToTextMillisecondsLimit = speechToTextMillisecondsLimit;
this.SpeechToTextMinutesCount = speechToTextMinutesCount;
this.SpeechToTextMinutesLimit = speechToTextMinutesLimit;
this.StartTime = startTime;
this.EndTime = endTime;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public enum UsageResponseProductBillingUnit
/// <summary>
///
/// </summary>
Milliseconds,
Minutes,
}

/// <summary>
Expand All @@ -32,7 +32,7 @@ public static string ToValueString(this UsageResponseProductBillingUnit value)
return value switch
{
UsageResponseProductBillingUnit.Characters => "characters",
UsageResponseProductBillingUnit.Milliseconds => "milliseconds",
UsageResponseProductBillingUnit.Minutes => "minutes",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -44,7 +44,7 @@ public static string ToValueString(this UsageResponseProductBillingUnit value)
return value switch
{
"characters" => UsageResponseProductBillingUnit.Characters,
"milliseconds" => UsageResponseProductBillingUnit.Milliseconds,
"minutes" => UsageResponseProductBillingUnit.Minutes,
_ => null,
};
}
Expand Down
36 changes: 24 additions & 12 deletions src/libs/DeepL/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ info:
contact:
name: DeepL - Contact us
url: https://www.deepl.com/contact-us
version: 3.10.0
version: 3.11.0
externalDocs:
description: DeepL Pro - Plans and pricing
url: https://www.deepl.com/pro#developer
Expand Down Expand Up @@ -2096,16 +2096,18 @@ paths:
account_unit_count: 5941580
api_key_character_count: 636
character_count: 5941580
- product_type: speech_to_text
billing_unit: milliseconds
api_key_unit_count: 1800000
account_unit_count: 1800000
- product_type: speechToText
billing_unit: minutes
api_key_unit_count: 30
account_unit_count: 30
api_key_character_count: 0
character_count: 0
api_key_character_count: 636
api_key_character_limit: 1000000000000
speech_to_text_milliseconds_count: 1800000
speech_to_text_milliseconds_limit: 36000000
speech_to_text_milliseconds_count: 0
speech_to_text_milliseconds_limit: 0
speech_to_text_minutes_count: 30
speech_to_text_minutes_limit: 600
start_time: '2025-05-13T09:18:42Z'
end_time: '2025-06-13T09:18:42Z'
400:
Expand Down Expand Up @@ -5642,7 +5644,7 @@ components:
type: string
enum:
- characters
- milliseconds
- minutes
description: The billing unit for this product type.
example: characters
api_key_unit_count:
Expand Down Expand Up @@ -5673,12 +5675,22 @@ components:
example: 1000000000000
speech_to_text_milliseconds_count:
type: integer
description: Only present for API Pro users. Milliseconds of speech-to-text used in the current period.
example: 1800000
deprecated: true
description: Deprecated. Always returns 0. Use speech_to_text_minutes_count instead.
example: 0
speech_to_text_milliseconds_limit:
type: integer
description: Only present for API Pro users. Milliseconds of speech-to-text limit in the current period.
example: 36000000
deprecated: true
description: Deprecated. Always returns 0. Use speech_to_text_minutes_limit instead.
example: 0
speech_to_text_minutes_count:
type: integer
description: Only present for API Pro users. Minutes of speech-to-text used in the current period. Milliseconds are rounded up to the nearest minute.
example: 30
speech_to_text_minutes_limit:
type: integer
description: Only present for API Pro users. Maximum minutes of speech-to-text that can be used in the current billing period.
example: 600
start_time:
type: string
format: date-time
Expand Down