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
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,43 @@ partial void ProcessPostResurrectRunResponseContent(
h => h.Key,
h => h.Value));
}
// Payment required - the user has exceeded their usage limit, does not have enough credits, or the request lacks authentication and payment credentials.
if ((int)__response.StatusCode == 402)
{
string? __content_402 = null;
global::System.Exception? __exception_402 = null;
global::Apify.ErrorResponse? __value_402 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_402 = global::Apify.ErrorResponse.FromJson(__content_402, JsonSerializerContext);
}
else
{
__content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_402 = global::Apify.ErrorResponse.FromJson(__content_402, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_402 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.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));
}
// Forbidden - insufficient permissions to perform this action.
if ((int)__response.StatusCode == 403)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,43 @@ partial void ProcessActorTaskRunSyncGetDatasetItemsPostResponseContent(
h => h.Key,
h => h.Value));
}
// The HTTP request exceeded the timeout limit
if ((int)__response.StatusCode == 408)
{
string? __content_408 = null;
global::System.Exception? __exception_408 = null;
global::Apify.ErrorResponse? __value_408 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_408 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_408 = global::Apify.ErrorResponse.FromJson(__content_408, JsonSerializerContext);
}
else
{
__content_408 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_408 = global::Apify.ErrorResponse.FromJson(__content_408, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_408 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.Create(
statusCode: __response.StatusCode,
message: __content_408 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_408,
responseBody: __content_408,
responseObject: __value_408,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// Payload too large - the request body exceeds the size limit.
if ((int)__response.StatusCode == 413)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,43 @@ partial void ProcessActRunResurrectPostResponseContent(
h => h.Key,
h => h.Value));
}
// Payment required - the user has exceeded their usage limit, does not have enough credits, or the request lacks authentication and payment credentials.
if ((int)__response.StatusCode == 402)
{
string? __content_402 = null;
global::System.Exception? __exception_402 = null;
global::Apify.ErrorResponse? __value_402 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_402 = global::Apify.ErrorResponse.FromJson(__content_402, JsonSerializerContext);
}
else
{
__content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_402 = global::Apify.ErrorResponse.FromJson(__content_402, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_402 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.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));
}
// Forbidden - insufficient permissions to perform this action.
if ((int)__response.StatusCode == 403)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,43 @@ partial void ProcessActRunSyncGetDatasetItemsGetResponseContent(
h => h.Key,
h => h.Value));
}
// Payment required - the user has exceeded their usage limit, does not have enough credits, or the request lacks authentication and payment credentials.
if ((int)__response.StatusCode == 402)
{
string? __content_402 = null;
global::System.Exception? __exception_402 = null;
global::Apify.ErrorResponse? __value_402 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_402 = global::Apify.ErrorResponse.FromJson(__content_402, JsonSerializerContext);
}
else
{
__content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_402 = global::Apify.ErrorResponse.FromJson(__content_402, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_402 = __ex;
}


throw global::Apify.ApiException<global::Apify.ErrorResponse>.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));
}
// Forbidden - insufficient permissions to perform this action.
if ((int)__response.StatusCode == 403)
{
Expand Down
7 changes: 3 additions & 4 deletions src/libs/Apify/Generated/Apify.Models.BuildStats.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public sealed partial class BuildStats
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("computeUnits")]
[global::System.Text.Json.Serialization.JsonRequired]
public required double ComputeUnits { get; set; }
public double? ComputeUnits { get; set; }

/// <summary>
///
Expand All @@ -42,17 +41,17 @@ public sealed partial class BuildStats
/// <summary>
/// Initializes a new instance of the <see cref="BuildStats" /> class.
/// </summary>
/// <param name="computeUnits"></param>
/// <param name="durationMillis"></param>
/// <param name="runTimeSecs"></param>
/// <param name="computeUnits"></param>
/// <param name="imageSizeBytes"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public BuildStats(
double computeUnits,
int? durationMillis,
double? runTimeSecs,
double? computeUnits,
long? imageSizeBytes)
{
this.DurationMillis = durationMillis;
Expand Down
10 changes: 4 additions & 6 deletions src/libs/Apify/Generated/Apify.Models.KeyValueStoreStats.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ public sealed partial class KeyValueStoreStats
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("readCount")]
[global::System.Text.Json.Serialization.JsonRequired]
public required int ReadCount { get; set; }
public int? ReadCount { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("writeCount")]
[global::System.Text.Json.Serialization.JsonRequired]
public required int WriteCount { get; set; }
public int? WriteCount { get; set; }

/// <summary>
///
Expand Down Expand Up @@ -65,8 +63,8 @@ public sealed partial class KeyValueStoreStats
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public KeyValueStoreStats(
int readCount,
int writeCount,
int? readCount,
int? writeCount,
int? deleteCount,
int? listCount,
long? s3StorageBytes,
Expand Down
23 changes: 10 additions & 13 deletions src/libs/Apify/Generated/Apify.Models.RunStats.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ public sealed partial class RunStats
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("restartCount")]
[global::System.Text.Json.Serialization.JsonRequired]
public required int RestartCount { get; set; }
public int? RestartCount { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("resurrectCount")]
[global::System.Text.Json.Serialization.JsonRequired]
public required int ResurrectCount { get; set; }
public int? ResurrectCount { get; set; }

/// <summary>
///
Expand Down Expand Up @@ -110,8 +108,7 @@ public sealed partial class RunStats
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("computeUnits")]
[global::System.Text.Json.Serialization.JsonRequired]
public required double ComputeUnits { get; set; }
public double? ComputeUnits { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand All @@ -122,12 +119,11 @@ public sealed partial class RunStats
/// <summary>
/// Initializes a new instance of the <see cref="RunStats" /> class.
/// </summary>
/// <param name="restartCount"></param>
/// <param name="resurrectCount"></param>
/// <param name="computeUnits"></param>
/// <param name="inputBodyLen"></param>
/// <param name="migrationCount"></param>
/// <param name="rebootCount"></param>
/// <param name="restartCount"></param>
/// <param name="resurrectCount"></param>
/// <param name="memAvgBytes"></param>
/// <param name="memMaxBytes"></param>
/// <param name="memCurrentBytes"></param>
Expand All @@ -139,16 +135,16 @@ public sealed partial class RunStats
/// <param name="durationMillis"></param>
/// <param name="runTimeSecs"></param>
/// <param name="metamorph"></param>
/// <param name="computeUnits"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public RunStats(
int restartCount,
int resurrectCount,
double computeUnits,
int? inputBodyLen,
int? migrationCount,
int? rebootCount,
int? restartCount,
int? resurrectCount,
double? memAvgBytes,
long? memMaxBytes,
long? memCurrentBytes,
Expand All @@ -159,7 +155,8 @@ public RunStats(
long? netTxBytes,
int? durationMillis,
double? runTimeSecs,
int? metamorph)
int? metamorph,
double? computeUnits)
{
this.InputBodyLen = inputBodyLen;
this.MigrationCount = migrationCount;
Expand Down
5 changes: 2 additions & 3 deletions src/libs/Apify/Generated/Apify.Models.WebhookStats.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ public sealed partial class WebhookStats
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("totalDispatches")]
[global::System.Text.Json.Serialization.JsonRequired]
public required int TotalDispatches { get; set; }
public int? TotalDispatches { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand All @@ -29,7 +28,7 @@ public sealed partial class WebhookStats
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public WebhookStats(
int totalDispatches)
int? totalDispatches)
{
this.TotalDispatches = totalDispatches;
}
Expand Down
Loading