diff --git a/src/libs/Replicate/Generated/Replicate.Exceptions.g.cs b/src/libs/Replicate/Generated/Replicate.Exceptions.g.cs new file mode 100644 index 0000000..8bef3b2 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Exceptions.g.cs @@ -0,0 +1,90 @@ +#nullable enable + +namespace Replicate +{ + /// + /// Represents an exception thrown by the API. + /// + [global::System.Serializable] + public partial class ApiException : global::System.Exception + { + /// + /// The HTTP status code of the response. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// The response body. + /// + public string? ResponseBody { get; set; } + /// + /// The response headers. + /// + public global::System.Collections.Generic.Dictionary>? ResponseHeaders { get; set; } + /// + /// Initializes a new instance of the class. + /// + public ApiException() + { + } + + /// + /// Initializes a new instance of the class with a specified error message. + /// + /// The message that describes the error. + /// The HTTP status code of the response. + public ApiException(string message, global::System.Net.HttpStatusCode statusCode) : base(message) + { + StatusCode = statusCode; + } + + /// + /// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + /// + /// The error message that explains the reason for the exception. + /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified. + /// The HTTP status code of the response. + public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException) + { + StatusCode = statusCode; + } + } + + /// + /// Represents an exception thrown by the API. + /// + /// + [global::System.Serializable] + public partial class ApiException : ApiException + { + /// + /// The response object. + /// + public T? ResponseObject { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() + { + } + + /// + /// Initializes a new instance of the class with a specified error message. + /// + /// The message that describes the error. + /// The HTTP status code of the response. + public ApiException(string message, global::System.Net.HttpStatusCode statusCode) : base(message, statusCode) + { + } + + /// + /// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + /// + /// The error message that explains the reason for the exception. + /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified. + /// The HTTP status code of the response. + public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode) + { + } + } +} \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.AccountGet.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.AccountGet.g.cs index 2d37c1c..354f6c6 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.AccountGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.AccountGet.g.cs @@ -24,7 +24,7 @@ public partial interface IReplicateApi /// ``` /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task AccountGetAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.CollectionsGet.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.CollectionsGet.g.cs index 083352d..0c367ed 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.CollectionsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.CollectionsGet.g.cs @@ -24,7 +24,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task CollectionsGetAsync( string collectionSlug, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.CollectionsList.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.CollectionsList.g.cs index e44890c..8ccd9ec 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.CollectionsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.CollectionsList.g.cs @@ -28,7 +28,7 @@ public partial interface IReplicateApi /// ``` /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task CollectionsListAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsCreate.g.cs index 650f9da..40da34f 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsCreate.g.cs @@ -50,7 +50,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeploymentsCreateAsync( global::Replicate.DeploymentsCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsDelete.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsDelete.g.cs index b464295..d959923 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsDelete.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsDelete.g.cs @@ -20,7 +20,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeploymentsDeleteAsync( string deploymentOwner, string deploymentName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsGet.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsGet.g.cs index 5b58e69..f49a0f4 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsGet.g.cs @@ -41,7 +41,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeploymentsGetAsync( string deploymentOwner, string deploymentName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsList.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsList.g.cs index 70ca99e..6c1fe93 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsList.g.cs @@ -45,7 +45,7 @@ public partial interface IReplicateApi /// ``` /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeploymentsListAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsPredictionsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsPredictionsCreate.g.cs index a5f5eb1..013ec48 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsPredictionsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsPredictionsCreate.g.cs @@ -25,7 +25,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeploymentsPredictionsCreateAsync( string deploymentOwner, string deploymentName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsUpdate.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsUpdate.g.cs index d7d0ce5..27283f9 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsUpdate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.DeploymentsUpdate.g.cs @@ -46,7 +46,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeploymentsUpdateAsync( string deploymentOwner, string deploymentName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.HardwareList.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.HardwareList.g.cs index d769e26..7912464 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.HardwareList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.HardwareList.g.cs @@ -23,7 +23,7 @@ public partial interface IReplicateApi /// ``` /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task> HardwareListAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsCreate.g.cs index 83b730a..f2a8980 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsCreate.g.cs @@ -36,7 +36,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelsCreateAsync( global::Replicate.ModelsCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsDelete.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsDelete.g.cs index fc2e2d7..ad6dee4 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsDelete.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsDelete.g.cs @@ -22,7 +22,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelsDeleteAsync( string modelOwner, string modelName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsGet.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsGet.g.cs index 837977c..c23f79d 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsGet.g.cs @@ -40,7 +40,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelsGetAsync( string modelOwner, string modelName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsList.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsList.g.cs index 2446d28..85788b1 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsList.g.cs @@ -43,7 +43,7 @@ public partial interface IReplicateApi /// - A generic fallback image. /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelsListAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsPredictionsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsPredictionsCreate.g.cs index afd06d8..1816f46 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsPredictionsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsPredictionsCreate.g.cs @@ -25,8 +25,8 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync( + /// + global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync( string modelOwner, string modelName, global::Replicate.PredictionRequest request, @@ -92,7 +92,7 @@ public partial interface IReplicateApi /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync( + global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync( string modelOwner, string modelName, object input, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsDelete.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsDelete.g.cs index 58fb3de..a609a31 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsDelete.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsDelete.g.cs @@ -26,7 +26,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelsVersionsDeleteAsync( string modelOwner, string modelName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsGet.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsGet.g.cs index dbaa91b..9e1bc4e 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsGet.g.cs @@ -53,7 +53,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelsVersionsGetAsync( string modelOwner, string modelName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsList.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsList.g.cs index d90d5a7..0a0bc1a 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.ModelsVersionsList.g.cs @@ -31,7 +31,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelsVersionsListAsync( string modelOwner, string modelName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsCancel.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsCancel.g.cs index 88b035f..cd267c0 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsCancel.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsCancel.g.cs @@ -9,7 +9,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task PredictionsCancelAsync( string predictionId, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsCreate.g.cs index 396d693..83197d4 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsCreate.g.cs @@ -23,7 +23,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task PredictionsCreateAsync( global::Replicate.VersionPredictionRequest request, string? prefer = default, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsGet.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsGet.g.cs index c095949..59c8ed3 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsGet.g.cs @@ -54,7 +54,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task PredictionsGetAsync( string predictionId, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsList.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsList.g.cs index 64ce4f0..b74ac6a 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.PredictionsList.g.cs @@ -54,7 +54,7 @@ public partial interface IReplicateApi /// `data_removed` will be `true` if the input and output data has been deleted. /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task PredictionsListAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsCancel.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsCancel.g.cs index 367aa76..731b17d 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsCancel.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsCancel.g.cs @@ -9,7 +9,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task TrainingsCancelAsync( string trainingId, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsCreate.g.cs index 70db52b..0772e97 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsCreate.g.cs @@ -53,7 +53,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task TrainingsCreateAsync( string modelOwner, string modelName, diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsGet.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsGet.g.cs index 9755365..b823968 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsGet.g.cs @@ -53,7 +53,7 @@ public partial interface IReplicateApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task TrainingsGetAsync( string trainingId, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsList.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsList.g.cs index 60ed697..5addf55 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.TrainingsList.g.cs @@ -54,7 +54,7 @@ public partial interface IReplicateApi /// `version` will be the unique ID of model version used to create the training. /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task TrainingsListAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.WebhooksDefaultSecretGet.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.WebhooksDefaultSecretGet.g.cs index 7a05ea8..098c5c8 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.WebhooksDefaultSecretGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.WebhooksDefaultSecretGet.g.cs @@ -21,7 +21,7 @@ public partial interface IReplicateApi /// ``` /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task WebhooksDefaultSecretGetAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Replicate/Generated/Replicate.IReplicateApi.g.cs b/src/libs/Replicate/Generated/Replicate.IReplicateApi.g.cs index 2535ef1..81d8fe0 100644 --- a/src/libs/Replicate/Generated/Replicate.IReplicateApi.g.cs +++ b/src/libs/Replicate/Generated/Replicate.IReplicateApi.g.cs @@ -25,6 +25,12 @@ public partial interface IReplicateApi : global::System.IDisposable /// 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. + /// + public bool ReadResponseAsString { get; set; } + /// /// /// diff --git a/src/libs/Replicate/Generated/Replicate.Models.AccountGetResponse.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.AccountGetResponse.Json.g.cs new file mode 100644 index 0000000..1a838db --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.AccountGetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class AccountGetResponse + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.AccountGetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.AccountGetResponse), + jsonSerializerContext) as global::Replicate.AccountGetResponse; + } + + /// + /// 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::Replicate.AccountGetResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.AccountGetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.AccountGetResponse; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.AccountGetResponse.g.cs b/src/libs/Replicate/Generated/Replicate.Models.AccountGetResponse.g.cs index 8769d36..cbdeebe 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.AccountGetResponse.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.AccountGetResponse.g.cs @@ -39,91 +39,39 @@ public sealed partial class AccountGetResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.AccountGetResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.AccountGetResponse), - jsonSerializerContext) as global::Replicate.AccountGetResponse; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.AccountGetResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The GitHub URL of the account. + /// + /// + /// The name of the account. + /// + /// + /// The account type. Can be a user or an organization. + /// + /// + /// The username of the account. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public AccountGetResponse( + string? githubUrl, + string? name, + global::Replicate.AccountGetResponseType? type, + string? username) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.AccountGetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.AccountGetResponse; + this.GithubUrl = githubUrl; + this.Name = name; + this.Type = type; + this.Username = username; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public AccountGetResponse() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateRequest.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateRequest.Json.g.cs new file mode 100644 index 0000000..35f1055 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsCreateRequest + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsCreateRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsCreateRequest), + jsonSerializerContext) as global::Replicate.DeploymentsCreateRequest; + } + + /// + /// 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::Replicate.DeploymentsCreateRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsCreateRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateRequest; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateRequest.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateRequest.g.cs index 2e2fcf6..80c6155 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateRequest.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateRequest.g.cs @@ -56,91 +56,49 @@ public sealed partial class DeploymentsCreateRequest [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsCreateRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsCreateRequest), - jsonSerializerContext) as global::Replicate.DeploymentsCreateRequest; - } - - /// - /// 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::Replicate.DeploymentsCreateRequest? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The SKU for the hardware used to run the model. Possible values can be retrieved from the `hardware.list` endpoint. + /// + /// + /// The maximum number of instances for scaling. + /// + /// + /// The minimum number of instances for scaling. + /// + /// + /// The full name of the model that you want to deploy e.g. stability-ai/sdxl. + /// + /// + /// The name of the deployment. + /// + /// + /// The 64-character string ID of the model version that you want to deploy. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsCreateRequest( + string hardware, + int maxInstances, + int minInstances, + string model, + string name, + string version) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsCreateRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateRequest; + this.Hardware = hardware ?? throw new global::System.ArgumentNullException(nameof(hardware)); + this.MaxInstances = maxInstances; + this.MinInstances = minInstances; + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Version = version ?? throw new global::System.ArgumentNullException(nameof(version)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsCreateRequest() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponse.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponse.Json.g.cs new file mode 100644 index 0000000..9017a95 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsCreateResponse + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsCreateResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsCreateResponse), + jsonSerializerContext) as global::Replicate.DeploymentsCreateResponse; + } + + /// + /// 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::Replicate.DeploymentsCreateResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsCreateResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateResponse; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponse.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponse.g.cs index f00d2db..e50a158 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponse.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponse.g.cs @@ -32,91 +32,32 @@ public sealed partial class DeploymentsCreateResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsCreateResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsCreateResponse), - jsonSerializerContext) as global::Replicate.DeploymentsCreateResponse; - } - - /// - /// 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::Replicate.DeploymentsCreateResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// The name of the deployment. + /// + /// + /// The owner of the deployment. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsCreateResponse( + global::Replicate.DeploymentsCreateResponseCurrentRelease? currentRelease, + string? name, + string? owner) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsCreateResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateResponse; + this.CurrentRelease = currentRelease; + this.Name = name; + this.Owner = owner; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsCreateResponse() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentRelease.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentRelease.Json.g.cs new file mode 100644 index 0000000..1a33309 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentRelease.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsCreateResponseCurrentRelease + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsCreateResponseCurrentRelease? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsCreateResponseCurrentRelease), + jsonSerializerContext) as global::Replicate.DeploymentsCreateResponseCurrentRelease; + } + + /// + /// 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::Replicate.DeploymentsCreateResponseCurrentRelease? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsCreateResponseCurrentRelease), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateResponseCurrentRelease; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentRelease.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentRelease.g.cs index 1bfb853..ba46f7a 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentRelease.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentRelease.g.cs @@ -50,91 +50,45 @@ public sealed partial class DeploymentsCreateResponseCurrentRelease [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsCreateResponseCurrentRelease? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsCreateResponseCurrentRelease), - jsonSerializerContext) as global::Replicate.DeploymentsCreateResponseCurrentRelease; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.DeploymentsCreateResponseCurrentRelease? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// The time the release was created. + /// + /// + /// + /// The model identifier string in the format of `{model_owner}/{model_name}`. + /// + /// + /// The release number. + /// + /// + /// The ID of the model version used in the release. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsCreateResponseCurrentRelease( + global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration? configuration, + global::System.DateTime? createdAt, + global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy? createdBy, + string? model, + int? number, + string? version) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsCreateResponseCurrentRelease), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateResponseCurrentRelease; + this.Configuration = configuration; + this.CreatedAt = createdAt; + this.CreatedBy = createdBy; + this.Model = model; + this.Number = number; + this.Version = version; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsCreateResponseCurrentRelease() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseConfiguration.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseConfiguration.Json.g.cs new file mode 100644 index 0000000..7e0d4d4 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseConfiguration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsCreateResponseCurrentReleaseConfiguration + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration), + jsonSerializerContext) as global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration; + } + + /// + /// 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::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseConfiguration.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseConfiguration.g.cs index 6693527..bf6a87d 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseConfiguration.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseConfiguration.g.cs @@ -32,91 +32,34 @@ public sealed partial class DeploymentsCreateResponseCurrentReleaseConfiguration [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration), - jsonSerializerContext) as global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration; - } - - /// - /// 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::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The SKU for the hardware used to run the model. + /// + /// + /// The maximum number of instances for scaling. + /// + /// + /// The minimum number of instances for scaling. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsCreateResponseCurrentReleaseConfiguration( + string? hardware, + int? maxInstances, + int? minInstances) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateResponseCurrentReleaseConfiguration; + this.Hardware = hardware; + this.MaxInstances = maxInstances; + this.MinInstances = minInstances; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsCreateResponseCurrentReleaseConfiguration() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseCreatedBy.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseCreatedBy.Json.g.cs new file mode 100644 index 0000000..744758c --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseCreatedBy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsCreateResponseCurrentReleaseCreatedBy + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy), + jsonSerializerContext) as global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy; + } + + /// + /// 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::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseCreatedBy.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseCreatedBy.g.cs index d116670..ef95bb6 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseCreatedBy.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsCreateResponseCurrentReleaseCreatedBy.g.cs @@ -39,91 +39,39 @@ public sealed partial class DeploymentsCreateResponseCurrentReleaseCreatedBy [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy), - jsonSerializerContext) as global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The GitHub URL of the account that created the release. + /// + /// + /// The name of the account that created the release. + /// + /// + /// The account type of the creator. Can be a user or an organization. + /// + /// + /// The username of the account that created the release. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsCreateResponseCurrentReleaseCreatedBy( + string? githubUrl, + string? name, + global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedByType? type, + string? username) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsCreateResponseCurrentReleaseCreatedBy; + this.GithubUrl = githubUrl; + this.Name = name; + this.Type = type; + this.Username = username; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsCreateResponseCurrentReleaseCreatedBy() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponse.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponse.Json.g.cs new file mode 100644 index 0000000..28a96f4 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsGetResponse + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsGetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsGetResponse), + jsonSerializerContext) as global::Replicate.DeploymentsGetResponse; + } + + /// + /// 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::Replicate.DeploymentsGetResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsGetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsGetResponse; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponse.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponse.g.cs index 44863a3..654c137 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponse.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponse.g.cs @@ -32,91 +32,32 @@ public sealed partial class DeploymentsGetResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsGetResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsGetResponse), - jsonSerializerContext) as global::Replicate.DeploymentsGetResponse; - } - - /// - /// 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::Replicate.DeploymentsGetResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// The name of the deployment. + /// + /// + /// The owner of the deployment. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsGetResponse( + global::Replicate.DeploymentsGetResponseCurrentRelease? currentRelease, + string? name, + string? owner) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsGetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsGetResponse; + this.CurrentRelease = currentRelease; + this.Name = name; + this.Owner = owner; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsGetResponse() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentRelease.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentRelease.Json.g.cs new file mode 100644 index 0000000..398546b --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentRelease.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsGetResponseCurrentRelease + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsGetResponseCurrentRelease? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsGetResponseCurrentRelease), + jsonSerializerContext) as global::Replicate.DeploymentsGetResponseCurrentRelease; + } + + /// + /// 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::Replicate.DeploymentsGetResponseCurrentRelease? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsGetResponseCurrentRelease), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsGetResponseCurrentRelease; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentRelease.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentRelease.g.cs index 037ee9b..e81137f 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentRelease.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentRelease.g.cs @@ -50,91 +50,45 @@ public sealed partial class DeploymentsGetResponseCurrentRelease [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsGetResponseCurrentRelease? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsGetResponseCurrentRelease), - jsonSerializerContext) as global::Replicate.DeploymentsGetResponseCurrentRelease; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.DeploymentsGetResponseCurrentRelease? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// The time the release was created. + /// + /// + /// + /// The model identifier string in the format of `{model_owner}/{model_name}`. + /// + /// + /// The release number. + /// + /// + /// The ID of the model version used in the release. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsGetResponseCurrentRelease( + global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration? configuration, + global::System.DateTime? createdAt, + global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy? createdBy, + string? model, + int? number, + string? version) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsGetResponseCurrentRelease), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsGetResponseCurrentRelease; + this.Configuration = configuration; + this.CreatedAt = createdAt; + this.CreatedBy = createdBy; + this.Model = model; + this.Number = number; + this.Version = version; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsGetResponseCurrentRelease() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseConfiguration.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseConfiguration.Json.g.cs new file mode 100644 index 0000000..7f18c5d --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseConfiguration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsGetResponseCurrentReleaseConfiguration + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration), + jsonSerializerContext) as global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration; + } + + /// + /// 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::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseConfiguration.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseConfiguration.g.cs index c4a9ff4..fb9bd5b 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseConfiguration.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseConfiguration.g.cs @@ -32,91 +32,34 @@ public sealed partial class DeploymentsGetResponseCurrentReleaseConfiguration [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration), - jsonSerializerContext) as global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration; - } - - /// - /// 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::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The SKU for the hardware used to run the model. + /// + /// + /// The maximum number of instances for scaling. + /// + /// + /// The minimum number of instances for scaling. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsGetResponseCurrentReleaseConfiguration( + string? hardware, + int? maxInstances, + int? minInstances) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsGetResponseCurrentReleaseConfiguration; + this.Hardware = hardware; + this.MaxInstances = maxInstances; + this.MinInstances = minInstances; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsGetResponseCurrentReleaseConfiguration() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseCreatedBy.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseCreatedBy.Json.g.cs new file mode 100644 index 0000000..b8c05ec --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseCreatedBy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsGetResponseCurrentReleaseCreatedBy + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy), + jsonSerializerContext) as global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy; + } + + /// + /// 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::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseCreatedBy.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseCreatedBy.g.cs index cd7fd8e..04793b9 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseCreatedBy.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsGetResponseCurrentReleaseCreatedBy.g.cs @@ -39,91 +39,39 @@ public sealed partial class DeploymentsGetResponseCurrentReleaseCreatedBy [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy), - jsonSerializerContext) as global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The GitHub URL of the account that created the release. + /// + /// + /// The name of the account that created the release. + /// + /// + /// The account type of the creator. Can be a user or an organization. + /// + /// + /// The username of the account that created the release. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsGetResponseCurrentReleaseCreatedBy( + string? githubUrl, + string? name, + global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedByType? type, + string? username) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsGetResponseCurrentReleaseCreatedBy; + this.GithubUrl = githubUrl; + this.Name = name; + this.Type = type; + this.Username = username; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsGetResponseCurrentReleaseCreatedBy() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponse.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponse.Json.g.cs new file mode 100644 index 0000000..bb9e32d --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsListResponse + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsListResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsListResponse), + jsonSerializerContext) as global::Replicate.DeploymentsListResponse; + } + + /// + /// 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::Replicate.DeploymentsListResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsListResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponse; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponse.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponse.g.cs index 944d340..b7b1bf9 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponse.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponse.g.cs @@ -32,91 +32,34 @@ public sealed partial class DeploymentsListResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsListResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsListResponse), - jsonSerializerContext) as global::Replicate.DeploymentsListResponse; - } - - /// - /// 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::Replicate.DeploymentsListResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// A URL pointing to the next page of deployment objects if any + /// + /// + /// A URL pointing to the previous page of deployment objects if any + /// + /// + /// An array containing a page of deployment objects + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsListResponse( + string? next, + string? previous, + global::System.Collections.Generic.IList? results) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsListResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponse; + this.Next = next; + this.Previous = previous; + this.Results = results; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsListResponse() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResult.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResult.Json.g.cs new file mode 100644 index 0000000..08723d6 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsListResponseResult + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsListResponseResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsListResponseResult), + jsonSerializerContext) as global::Replicate.DeploymentsListResponseResult; + } + + /// + /// 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::Replicate.DeploymentsListResponseResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsListResponseResult), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponseResult; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResult.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResult.g.cs index eee2750..47bc831 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResult.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResult.g.cs @@ -32,91 +32,32 @@ public sealed partial class DeploymentsListResponseResult [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsListResponseResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsListResponseResult), - jsonSerializerContext) as global::Replicate.DeploymentsListResponseResult; - } - - /// - /// 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::Replicate.DeploymentsListResponseResult? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// The name of the deployment. + /// + /// + /// The owner of the deployment. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsListResponseResult( + global::Replicate.DeploymentsListResponseResultCurrentRelease? currentRelease, + string? name, + string? owner) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsListResponseResult), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponseResult; + this.CurrentRelease = currentRelease; + this.Name = name; + this.Owner = owner; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsListResponseResult() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentRelease.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentRelease.Json.g.cs new file mode 100644 index 0000000..c7524f6 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentRelease.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsListResponseResultCurrentRelease + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsListResponseResultCurrentRelease? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsListResponseResultCurrentRelease), + jsonSerializerContext) as global::Replicate.DeploymentsListResponseResultCurrentRelease; + } + + /// + /// 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::Replicate.DeploymentsListResponseResultCurrentRelease? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsListResponseResultCurrentRelease), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponseResultCurrentRelease; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentRelease.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentRelease.g.cs index da43e99..3a3b08c 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentRelease.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentRelease.g.cs @@ -50,91 +50,45 @@ public sealed partial class DeploymentsListResponseResultCurrentRelease [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsListResponseResultCurrentRelease? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsListResponseResultCurrentRelease), - jsonSerializerContext) as global::Replicate.DeploymentsListResponseResultCurrentRelease; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.DeploymentsListResponseResultCurrentRelease? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// The time the release was created. + /// + /// + /// + /// The model identifier string in the format of `{model_owner}/{model_name}`. + /// + /// + /// The release number. This is an auto-incrementing integer that starts at 1, and is set automatically when a deployment is created. + /// + /// + /// The ID of the model version used in the release. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsListResponseResultCurrentRelease( + global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration? configuration, + global::System.DateTime? createdAt, + global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy? createdBy, + string? model, + int? number, + string? version) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsListResponseResultCurrentRelease), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponseResultCurrentRelease; + this.Configuration = configuration; + this.CreatedAt = createdAt; + this.CreatedBy = createdBy; + this.Model = model; + this.Number = number; + this.Version = version; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsListResponseResultCurrentRelease() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseConfiguration.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseConfiguration.Json.g.cs new file mode 100644 index 0000000..eb1cfb5 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseConfiguration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsListResponseResultCurrentReleaseConfiguration + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration), + jsonSerializerContext) as global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration; + } + + /// + /// 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::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseConfiguration.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseConfiguration.g.cs index 129e3c7..7b6c81a 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseConfiguration.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseConfiguration.g.cs @@ -32,91 +32,34 @@ public sealed partial class DeploymentsListResponseResultCurrentReleaseConfigura [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration), - jsonSerializerContext) as global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration; - } - - /// - /// 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::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The SKU for the hardware used to run the model. + /// + /// + /// The maximum number of instances for scaling. + /// + /// + /// The minimum number of instances for scaling. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsListResponseResultCurrentReleaseConfiguration( + string? hardware, + int? maxInstances, + int? minInstances) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponseResultCurrentReleaseConfiguration; + this.Hardware = hardware; + this.MaxInstances = maxInstances; + this.MinInstances = minInstances; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsListResponseResultCurrentReleaseConfiguration() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseCreatedBy.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseCreatedBy.Json.g.cs new file mode 100644 index 0000000..25e025e --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseCreatedBy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsListResponseResultCurrentReleaseCreatedBy + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy), + jsonSerializerContext) as global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy; + } + + /// + /// 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::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseCreatedBy.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseCreatedBy.g.cs index 27a0ee3..578d647 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseCreatedBy.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsListResponseResultCurrentReleaseCreatedBy.g.cs @@ -39,91 +39,39 @@ public sealed partial class DeploymentsListResponseResultCurrentReleaseCreatedBy [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy), - jsonSerializerContext) as global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The GitHub URL of the account that created the release. + /// + /// + /// The name of the account that created the release. + /// + /// + /// The account type of the creator. Can be a user or an organization. + /// + /// + /// The username of the account that created the release. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsListResponseResultCurrentReleaseCreatedBy( + string? githubUrl, + string? name, + global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedByType? type, + string? username) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsListResponseResultCurrentReleaseCreatedBy; + this.GithubUrl = githubUrl; + this.Name = name; + this.Type = type; + this.Username = username; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsListResponseResultCurrentReleaseCreatedBy() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateRequest.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateRequest.Json.g.cs new file mode 100644 index 0000000..25d00ad --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsUpdateRequest + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsUpdateRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsUpdateRequest), + jsonSerializerContext) as global::Replicate.DeploymentsUpdateRequest; + } + + /// + /// 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::Replicate.DeploymentsUpdateRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsUpdateRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateRequest; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateRequest.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateRequest.g.cs index 50077e3..ffcd20f 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateRequest.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateRequest.g.cs @@ -38,91 +38,39 @@ public sealed partial class DeploymentsUpdateRequest [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsUpdateRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsUpdateRequest), - jsonSerializerContext) as global::Replicate.DeploymentsUpdateRequest; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.DeploymentsUpdateRequest? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The SKU for the hardware used to run the model. Possible values can be retrieved from the `hardware.list` endpoint. + /// + /// + /// The maximum number of instances for scaling. + /// + /// + /// The minimum number of instances for scaling. + /// + /// + /// The ID of the model version that you want to deploy + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsUpdateRequest( + string? hardware, + int? maxInstances, + int? minInstances, + string? version) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsUpdateRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateRequest; + this.Hardware = hardware; + this.MaxInstances = maxInstances; + this.MinInstances = minInstances; + this.Version = version; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsUpdateRequest() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponse.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponse.Json.g.cs new file mode 100644 index 0000000..52b94a6 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsUpdateResponse + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsUpdateResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsUpdateResponse), + jsonSerializerContext) as global::Replicate.DeploymentsUpdateResponse; + } + + /// + /// 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::Replicate.DeploymentsUpdateResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsUpdateResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateResponse; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponse.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponse.g.cs index d4dbf95..1515517 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponse.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponse.g.cs @@ -32,91 +32,32 @@ public sealed partial class DeploymentsUpdateResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsUpdateResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsUpdateResponse), - jsonSerializerContext) as global::Replicate.DeploymentsUpdateResponse; - } - - /// - /// 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::Replicate.DeploymentsUpdateResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// The name of the deployment. + /// + /// + /// The owner of the deployment. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsUpdateResponse( + global::Replicate.DeploymentsUpdateResponseCurrentRelease? currentRelease, + string? name, + string? owner) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsUpdateResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateResponse; + this.CurrentRelease = currentRelease; + this.Name = name; + this.Owner = owner; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsUpdateResponse() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentRelease.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentRelease.Json.g.cs new file mode 100644 index 0000000..d3b1725 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentRelease.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsUpdateResponseCurrentRelease + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsUpdateResponseCurrentRelease? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsUpdateResponseCurrentRelease), + jsonSerializerContext) as global::Replicate.DeploymentsUpdateResponseCurrentRelease; + } + + /// + /// 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::Replicate.DeploymentsUpdateResponseCurrentRelease? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsUpdateResponseCurrentRelease), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateResponseCurrentRelease; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentRelease.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentRelease.g.cs index 1ae6641..f7a9de9 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentRelease.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentRelease.g.cs @@ -50,91 +50,45 @@ public sealed partial class DeploymentsUpdateResponseCurrentRelease [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsUpdateResponseCurrentRelease? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsUpdateResponseCurrentRelease), - jsonSerializerContext) as global::Replicate.DeploymentsUpdateResponseCurrentRelease; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.DeploymentsUpdateResponseCurrentRelease? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// The time the release was created. + /// + /// + /// + /// The model identifier string in the format of `{model_owner}/{model_name}`. + /// + /// + /// The release number. + /// + /// + /// The ID of the model version used in the release. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsUpdateResponseCurrentRelease( + global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration? configuration, + global::System.DateTime? createdAt, + global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy? createdBy, + string? model, + int? number, + string? version) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsUpdateResponseCurrentRelease), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateResponseCurrentRelease; + this.Configuration = configuration; + this.CreatedAt = createdAt; + this.CreatedBy = createdBy; + this.Model = model; + this.Number = number; + this.Version = version; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsUpdateResponseCurrentRelease() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseConfiguration.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseConfiguration.Json.g.cs new file mode 100644 index 0000000..6393c17 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseConfiguration.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsUpdateResponseCurrentReleaseConfiguration + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration), + jsonSerializerContext) as global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration; + } + + /// + /// 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::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseConfiguration.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseConfiguration.g.cs index 9041cdc..0474aae 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseConfiguration.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseConfiguration.g.cs @@ -32,91 +32,34 @@ public sealed partial class DeploymentsUpdateResponseCurrentReleaseConfiguration [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration), - jsonSerializerContext) as global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration; - } - - /// - /// 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::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The SKU for the hardware used to run the model. + /// + /// + /// The maximum number of instances for scaling. + /// + /// + /// The minimum number of instances for scaling. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsUpdateResponseCurrentReleaseConfiguration( + string? hardware, + int? maxInstances, + int? minInstances) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateResponseCurrentReleaseConfiguration; + this.Hardware = hardware; + this.MaxInstances = maxInstances; + this.MinInstances = minInstances; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsUpdateResponseCurrentReleaseConfiguration() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseCreatedBy.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseCreatedBy.Json.g.cs new file mode 100644 index 0000000..3c78435 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseCreatedBy.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class DeploymentsUpdateResponseCurrentReleaseCreatedBy + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy), + jsonSerializerContext) as global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy; + } + + /// + /// 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::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseCreatedBy.g.cs b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseCreatedBy.g.cs index 813aca0..139f9b6 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseCreatedBy.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.DeploymentsUpdateResponseCurrentReleaseCreatedBy.g.cs @@ -39,91 +39,39 @@ public sealed partial class DeploymentsUpdateResponseCurrentReleaseCreatedBy [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy), - jsonSerializerContext) as global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The GitHub URL of the account that created the release. + /// + /// + /// The name of the account that created the release. + /// + /// + /// The account type of the creator. Can be a user or an organization. + /// + /// + /// The username of the account that created the release. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentsUpdateResponseCurrentReleaseCreatedBy( + string? githubUrl, + string? name, + global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedByType? type, + string? username) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.DeploymentsUpdateResponseCurrentReleaseCreatedBy; + this.GithubUrl = githubUrl; + this.Name = name; + this.Type = type; + this.Username = username; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentsUpdateResponseCurrentReleaseCreatedBy() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.HardwareListResponseItem.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.HardwareListResponseItem.Json.g.cs new file mode 100644 index 0000000..d3304f6 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.HardwareListResponseItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class HardwareListResponseItem + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.HardwareListResponseItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.HardwareListResponseItem), + jsonSerializerContext) as global::Replicate.HardwareListResponseItem; + } + + /// + /// 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::Replicate.HardwareListResponseItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.HardwareListResponseItem), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.HardwareListResponseItem; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.HardwareListResponseItem.g.cs b/src/libs/Replicate/Generated/Replicate.Models.HardwareListResponseItem.g.cs index 54efee3..d706be5 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.HardwareListResponseItem.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.HardwareListResponseItem.g.cs @@ -26,91 +26,29 @@ public sealed partial class HardwareListResponseItem [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.HardwareListResponseItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.HardwareListResponseItem), - jsonSerializerContext) as global::Replicate.HardwareListResponseItem; - } - - /// - /// 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::Replicate.HardwareListResponseItem? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The name of the hardware. + /// + /// + /// The SKU of the hardware. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public HardwareListResponseItem( + string? name, + string? sku) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.HardwareListResponseItem), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.HardwareListResponseItem; + this.Name = name; + this.Sku = sku; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public HardwareListResponseItem() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.ModelsCreateRequest.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.ModelsCreateRequest.Json.g.cs new file mode 100644 index 0000000..77f49d9 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.ModelsCreateRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class ModelsCreateRequest + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.ModelsCreateRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.ModelsCreateRequest), + jsonSerializerContext) as global::Replicate.ModelsCreateRequest; + } + + /// + /// 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::Replicate.ModelsCreateRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.ModelsCreateRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.ModelsCreateRequest; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.ModelsCreateRequest.g.cs b/src/libs/Replicate/Generated/Replicate.Models.ModelsCreateRequest.g.cs index 3e6a435..08333c0 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.ModelsCreateRequest.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.ModelsCreateRequest.g.cs @@ -73,91 +73,64 @@ public sealed partial class ModelsCreateRequest [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.ModelsCreateRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.ModelsCreateRequest), - jsonSerializerContext) as global::Replicate.ModelsCreateRequest; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.ModelsCreateRequest? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// A URL for the model's cover image. This should be an image file. + /// + /// + /// A description of the model. + /// + /// + /// A URL for the model's source code on GitHub. + /// + /// + /// The SKU for the hardware used to run the model. Possible values can be retrieved from the `hardware.list` endpoint. + /// + /// + /// A URL for the model's license. + /// + /// + /// The name of the model. This must be unique among all models owned by the user or organization. + /// + /// + /// The name of the user or organization that will own the model. This must be the same as the user or organization that is making the API request. In other words, the API token used in the request must belong to this user or organization. + /// + /// + /// A URL for the model's paper. + /// + /// + /// Whether the model should be public or private. A public model can be viewed and run by anyone, whereas a private model can be viewed and run only by the user or organization members that own the model. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelsCreateRequest( + string hardware, + string name, + string owner, + global::Replicate.ModelsCreateRequestVisibility visibility, + string? coverImageUrl, + string? description, + string? githubUrl, + string? licenseUrl, + string? paperUrl) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.ModelsCreateRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.ModelsCreateRequest; + this.Hardware = hardware ?? throw new global::System.ArgumentNullException(nameof(hardware)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Owner = owner ?? throw new global::System.ArgumentNullException(nameof(owner)); + this.Visibility = visibility; + this.CoverImageUrl = coverImageUrl; + this.Description = description; + this.GithubUrl = githubUrl; + this.LicenseUrl = licenseUrl; + this.PaperUrl = paperUrl; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelsCreateRequest() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionRequest.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionRequest.Json.g.cs new file mode 100644 index 0000000..e657b44 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class PredictionRequest + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.PredictionRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.PredictionRequest), + jsonSerializerContext) as global::Replicate.PredictionRequest; + } + + /// + /// 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::Replicate.PredictionRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.PredictionRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionRequest; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionRequest.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionRequest.g.cs index 629ecd7..d667280 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.PredictionRequest.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionRequest.g.cs @@ -65,91 +65,65 @@ public sealed partial class PredictionRequest [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.PredictionRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.PredictionRequest), - jsonSerializerContext) as global::Replicate.PredictionRequest; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.PredictionRequest? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The model's input as a JSON object. The input schema depends on what model you are running. To see the available inputs, click the "API" tab on the model you are running or [get the model version](#models.versions.get) and look at its `openapi_schema` property. For example, [stability-ai/sdxl](https://replicate.com/stability-ai/sdxl) takes `prompt` as an input.
+ /// Files should be passed as HTTP URLs or data URLs.
+ /// Use an HTTP URL when:
+ /// - you have a large file > 256kb
+ /// - you want to be able to use the file multiple times
+ /// - you want your prediction metadata to be associable with your input files
+ /// Use a data URL when:
+ /// - you have a small file <= 256kb
+ /// - you don't want to upload and host the file somewhere
+ /// - you don't need to use the file again (Replicate will not store it) + /// + /// + /// **This field is deprecated.**
+ /// Request a URL to receive streaming output using [server-sent events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events).
+ /// This field is no longer needed as the returned prediction will always have a `stream` entry in its `url` property if the model supports streaming. + /// + /// + /// An HTTPS URL for receiving a webhook when the prediction has new output. The webhook will be a POST request where the request body is the same as the response body of the [get prediction](#predictions.get) operation. If there are network problems, we will retry the webhook a few times, so make sure it can be safely called more than once. Replicate will not follow redirects when sending webhook requests to your service, so be sure to specify a URL that will resolve without redirecting. + /// + /// + /// By default, we will send requests to your webhook URL whenever there are new outputs or the prediction has finished. You can change which events trigger webhook requests by specifying `webhook_events_filter` in the prediction request:
+ /// - `start`: immediately on prediction start
+ /// - `output`: each time a prediction generates an output (note that predictions can generate multiple outputs)
+ /// - `logs`: each time log output is generated by a prediction
+ /// - `completed`: when the prediction reaches a terminal state (succeeded/canceled/failed)
+ /// For example, if you only wanted requests to be sent at the start and end of the prediction, you would provide:
+ /// ```json
+ /// {
+ /// "input": {
+ /// "text": "Alice"
+ /// },
+ /// "webhook": "https://example.com/my-webhook",
+ /// "webhook_events_filter": ["start", "completed"]
+ /// }
+ /// ```
+ /// Requests for event types `output` and `logs` will be sent at most once every 500ms. If you request `start` and `completed` webhooks, then they'll always be sent regardless of throttling. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PredictionRequest( + object input, + bool? stream, + string? webhook, + global::System.Collections.Generic.IList? webhookEventsFilter) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.PredictionRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionRequest; + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); + this.Stream = stream; + this.Webhook = webhook; + this.WebhookEventsFilter = webhookEventsFilter; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public PredictionRequest() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionRequestInput.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionRequestInput.Json.g.cs new file mode 100644 index 0000000..f89e853 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionRequestInput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class PredictionRequestInput + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.PredictionRequestInput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.PredictionRequestInput), + jsonSerializerContext) as global::Replicate.PredictionRequestInput; + } + + /// + /// 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::Replicate.PredictionRequestInput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.PredictionRequestInput), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionRequestInput; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionRequestInput.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionRequestInput.g.cs index 64d2e12..2729e31 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.PredictionRequestInput.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionRequestInput.g.cs @@ -24,91 +24,13 @@ public sealed partial class PredictionRequestInput [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static global::Replicate.PredictionRequestInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PredictionRequestInput( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.PredictionRequestInput), - jsonSerializerContext) as global::Replicate.PredictionRequestInput; } - - /// - /// 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::Replicate.PredictionRequestInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.PredictionRequestInput), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionRequestInput; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponse.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponse.Json.g.cs new file mode 100644 index 0000000..ef0ce72 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class PredictionResponse + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.PredictionResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.PredictionResponse), + jsonSerializerContext) as global::Replicate.PredictionResponse; + } + + /// + /// 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::Replicate.PredictionResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.PredictionResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionResponse; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponse.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponse.g.cs index 7495971..ef82876 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponse.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponse.g.cs @@ -92,91 +92,58 @@ public sealed partial class PredictionResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.PredictionResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PredictionResponse( + string? completedAt, + string? createdAt, + bool? dataRemoved, + object? error, + string? id, + global::Replicate.PredictionResponseInput? input, + string? logs, + global::Replicate.PredictionResponseMetrics? metrics, + string? output, + string? startedAt, + string? status, + global::Replicate.PredictionResponseUrls? urls, + string? version) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.PredictionResponse), - jsonSerializerContext) as global::Replicate.PredictionResponse; + this.CompletedAt = completedAt; + this.CreatedAt = createdAt; + this.DataRemoved = dataRemoved; + this.Error = error; + this.Id = id; + this.Input = input; + this.Logs = logs; + this.Metrics = metrics; + this.Output = output; + this.StartedAt = startedAt; + this.Status = status; + this.Urls = urls; + this.Version = version; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.PredictionResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public PredictionResponse() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.PredictionResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseInput.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseInput.Json.g.cs new file mode 100644 index 0000000..63255f4 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseInput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class PredictionResponseInput + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.PredictionResponseInput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.PredictionResponseInput), + jsonSerializerContext) as global::Replicate.PredictionResponseInput; + } + + /// + /// 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::Replicate.PredictionResponseInput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.PredictionResponseInput), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionResponseInput; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseInput.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseInput.g.cs index 2a03d64..199f63c 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseInput.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseInput.g.cs @@ -56,91 +56,40 @@ public sealed partial class PredictionResponseInput [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static global::Replicate.PredictionResponseInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PredictionResponseInput( + double? seed, + double? steps, + string? prompt, + double? guidance, + double? interval, + string? aspectRatio, + double? safetyTolerance) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.PredictionResponseInput), - jsonSerializerContext) as global::Replicate.PredictionResponseInput; + this.Seed = seed; + this.Steps = steps; + this.Prompt = prompt; + this.Guidance = guidance; + this.Interval = interval; + this.AspectRatio = aspectRatio; + this.SafetyTolerance = safetyTolerance; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.PredictionResponseInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public PredictionResponseInput() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.PredictionResponseInput), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionResponseInput; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseMetrics.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseMetrics.Json.g.cs new file mode 100644 index 0000000..11ca1ce --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseMetrics.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class PredictionResponseMetrics + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.PredictionResponseMetrics? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.PredictionResponseMetrics), + jsonSerializerContext) as global::Replicate.PredictionResponseMetrics; + } + + /// + /// 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::Replicate.PredictionResponseMetrics? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.PredictionResponseMetrics), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionResponseMetrics; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseMetrics.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseMetrics.g.cs index 0f66b8c..1099481 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseMetrics.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseMetrics.g.cs @@ -32,91 +32,28 @@ public sealed partial class PredictionResponseMetrics [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static global::Replicate.PredictionResponseMetrics? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PredictionResponseMetrics( + double? imageCount, + double? predictTime, + double? totalTime) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.PredictionResponseMetrics), - jsonSerializerContext) as global::Replicate.PredictionResponseMetrics; + this.ImageCount = imageCount; + this.PredictTime = predictTime; + this.TotalTime = totalTime; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.PredictionResponseMetrics? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public PredictionResponseMetrics() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.PredictionResponseMetrics), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionResponseMetrics; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseUrls.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseUrls.Json.g.cs new file mode 100644 index 0000000..22d9060 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseUrls.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class PredictionResponseUrls + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.PredictionResponseUrls? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.PredictionResponseUrls), + jsonSerializerContext) as global::Replicate.PredictionResponseUrls; + } + + /// + /// 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::Replicate.PredictionResponseUrls? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.PredictionResponseUrls), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionResponseUrls; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseUrls.g.cs b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseUrls.g.cs index 3281961..e2dc1fe 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseUrls.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.PredictionResponseUrls.g.cs @@ -26,91 +26,25 @@ public sealed partial class PredictionResponseUrls [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static global::Replicate.PredictionResponseUrls? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PredictionResponseUrls( + string? get, + string? cancel) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.PredictionResponseUrls), - jsonSerializerContext) as global::Replicate.PredictionResponseUrls; + this.Get = get; + this.Cancel = cancel; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::Replicate.PredictionResponseUrls? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public PredictionResponseUrls() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.PredictionResponseUrls), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.PredictionResponseUrls; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.TrainingRequest.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.TrainingRequest.Json.g.cs new file mode 100644 index 0000000..446ff96 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.TrainingRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class TrainingRequest + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.TrainingRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.TrainingRequest), + jsonSerializerContext) as global::Replicate.TrainingRequest; + } + + /// + /// 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::Replicate.TrainingRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.TrainingRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.TrainingRequest; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.TrainingRequest.g.cs b/src/libs/Replicate/Generated/Replicate.Models.TrainingRequest.g.cs index 307d743..602cc27 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.TrainingRequest.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.TrainingRequest.g.cs @@ -56,91 +56,55 @@ public sealed partial class TrainingRequest [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.TrainingRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.TrainingRequest), - jsonSerializerContext) as global::Replicate.TrainingRequest; - } - - /// - /// 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::Replicate.TrainingRequest? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// A string representing the desired model to push to in the format `{destination_model_owner}/{destination_model_name}`. This should be an existing model owned by the user or organization making the API request. If the destination is invalid, the server will return an appropriate 4XX response. + /// + /// + /// An object containing inputs to the Cog model's `train()` function. + /// + /// + /// An HTTPS URL for receiving a webhook when the training completes. The webhook will be a POST request where the request body is the same as the response body of the [get training](#trainings.get) operation. If there are network problems, we will retry the webhook a few times, so make sure it can be safely called more than once. Replicate will not follow redirects when sending webhook requests to your service, so be sure to specify a URL that will resolve without redirecting. + /// + /// + /// By default, we will send requests to your webhook URL whenever there are new outputs or the training has finished. You can change which events trigger webhook requests by specifying `webhook_events_filter` in the training request:
+ /// - `start`: immediately on training start
+ /// - `output`: each time a training generates an output (note that trainings can generate multiple outputs)
+ /// - `logs`: each time log output is generated by a training
+ /// - `completed`: when the training reaches a terminal state (succeeded/canceled/failed)
+ /// For example, if you only wanted requests to be sent at the start and end of the training, you would provide:
+ /// ```json
+ /// {
+ /// "destination": "my-organization/my-model",
+ /// "input": {
+ /// "text": "Alice"
+ /// },
+ /// "webhook": "https://example.com/my-webhook",
+ /// "webhook_events_filter": ["start", "completed"]
+ /// }
+ /// ```
+ /// Requests for event types `output` and `logs` will be sent at most once every 500ms. If you request `start` and `completed` webhooks, then they'll always be sent regardless of throttling. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TrainingRequest( + string destination, + object input, + string? webhook, + global::System.Collections.Generic.IList? webhookEventsFilter) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.TrainingRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.TrainingRequest; + this.Destination = destination ?? throw new global::System.ArgumentNullException(nameof(destination)); + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); + this.Webhook = webhook; + this.WebhookEventsFilter = webhookEventsFilter; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public TrainingRequest() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.TrainingRequestInput.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.TrainingRequestInput.Json.g.cs new file mode 100644 index 0000000..d1d6689 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.TrainingRequestInput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class TrainingRequestInput + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.TrainingRequestInput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.TrainingRequestInput), + jsonSerializerContext) as global::Replicate.TrainingRequestInput; + } + + /// + /// 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::Replicate.TrainingRequestInput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.TrainingRequestInput), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.TrainingRequestInput; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.TrainingRequestInput.g.cs b/src/libs/Replicate/Generated/Replicate.Models.TrainingRequestInput.g.cs index 81a0152..5511809 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.TrainingRequestInput.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.TrainingRequestInput.g.cs @@ -15,91 +15,13 @@ public sealed partial class TrainingRequestInput [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static global::Replicate.TrainingRequestInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TrainingRequestInput( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.TrainingRequestInput), - jsonSerializerContext) as global::Replicate.TrainingRequestInput; } - - /// - /// 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::Replicate.TrainingRequestInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.TrainingRequestInput), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.TrainingRequestInput; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequest.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequest.Json.g.cs new file mode 100644 index 0000000..62317ad --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class VersionPredictionRequest + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.VersionPredictionRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.VersionPredictionRequest), + jsonSerializerContext) as global::Replicate.VersionPredictionRequest; + } + + /// + /// 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::Replicate.VersionPredictionRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.VersionPredictionRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.VersionPredictionRequest; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequest.g.cs b/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequest.g.cs index 27f0107..ded96b1 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequest.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequest.g.cs @@ -73,91 +73,71 @@ public sealed partial class VersionPredictionRequest [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static global::Replicate.VersionPredictionRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.VersionPredictionRequest), - jsonSerializerContext) as global::Replicate.VersionPredictionRequest; - } - - /// - /// 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::Replicate.VersionPredictionRequest? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The model's input as a JSON object. The input schema depends on what model you are running. To see the available inputs, click the "API" tab on the model you are running or [get the model version](#models.versions.get) and look at its `openapi_schema` property. For example, [stability-ai/sdxl](https://replicate.com/stability-ai/sdxl) takes `prompt` as an input.
+ /// Files should be passed as HTTP URLs or data URLs.
+ /// Use an HTTP URL when:
+ /// - you have a large file > 256kb
+ /// - you want to be able to use the file multiple times
+ /// - you want your prediction metadata to be associable with your input files
+ /// Use a data URL when:
+ /// - you have a small file <= 256kb
+ /// - you don't want to upload and host the file somewhere
+ /// - you don't need to use the file again (Replicate will not store it) + /// + /// + /// **This field is deprecated.**
+ /// Request a URL to receive streaming output using [server-sent events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events).
+ /// This field is no longer needed as the returned prediction will always have a `stream` entry in its `url` property if the model supports streaming. + /// + /// + /// The ID of the model version that you want to run. + /// + /// + /// An HTTPS URL for receiving a webhook when the prediction has new output. The webhook will be a POST request where the request body is the same as the response body of the [get prediction](#predictions.get) operation. If there are network problems, we will retry the webhook a few times, so make sure it can be safely called more than once. Replicate will not follow redirects when sending webhook requests to your service, so be sure to specify a URL that will resolve without redirecting. + /// + /// + /// By default, we will send requests to your webhook URL whenever there are new outputs or the prediction has finished. You can change which events trigger webhook requests by specifying `webhook_events_filter` in the prediction request:
+ /// - `start`: immediately on prediction start
+ /// - `output`: each time a prediction generates an output (note that predictions can generate multiple outputs)
+ /// - `logs`: each time log output is generated by a prediction
+ /// - `completed`: when the prediction reaches a terminal state (succeeded/canceled/failed)
+ /// For example, if you only wanted requests to be sent at the start and end of the prediction, you would provide:
+ /// ```json
+ /// {
+ /// "version": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
+ /// "input": {
+ /// "text": "Alice"
+ /// },
+ /// "webhook": "https://example.com/my-webhook",
+ /// "webhook_events_filter": ["start", "completed"]
+ /// }
+ /// ```
+ /// Requests for event types `output` and `logs` will be sent at most once every 500ms. If you request `start` and `completed` webhooks, then they'll always be sent regardless of throttling. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public VersionPredictionRequest( + object input, + string version, + bool? stream, + string? webhook, + global::System.Collections.Generic.IList? webhookEventsFilter) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.VersionPredictionRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.VersionPredictionRequest; + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); + this.Version = version ?? throw new global::System.ArgumentNullException(nameof(version)); + this.Stream = stream; + this.Webhook = webhook; + this.WebhookEventsFilter = webhookEventsFilter; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public VersionPredictionRequest() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequestInput.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequestInput.Json.g.cs new file mode 100644 index 0000000..9f90f71 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequestInput.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class VersionPredictionRequestInput + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.VersionPredictionRequestInput? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.VersionPredictionRequestInput), + jsonSerializerContext) as global::Replicate.VersionPredictionRequestInput; + } + + /// + /// 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::Replicate.VersionPredictionRequestInput? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.VersionPredictionRequestInput), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.VersionPredictionRequestInput; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequestInput.g.cs b/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequestInput.g.cs index 3a3205d..f0e8908 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequestInput.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.VersionPredictionRequestInput.g.cs @@ -24,91 +24,13 @@ public sealed partial class VersionPredictionRequestInput [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 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) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - public static global::Replicate.VersionPredictionRequestInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public VersionPredictionRequestInput( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.VersionPredictionRequestInput), - jsonSerializerContext) as global::Replicate.VersionPredictionRequestInput; } - - /// - /// 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::Replicate.VersionPredictionRequestInput? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.VersionPredictionRequestInput), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.VersionPredictionRequestInput; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.Models.WebhooksDefaultSecretGetResponse.Json.g.cs b/src/libs/Replicate/Generated/Replicate.Models.WebhooksDefaultSecretGetResponse.Json.g.cs new file mode 100644 index 0000000..f8737a8 --- /dev/null +++ b/src/libs/Replicate/Generated/Replicate.Models.WebhooksDefaultSecretGetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Replicate +{ + public sealed partial class WebhooksDefaultSecretGetResponse + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Replicate.WebhooksDefaultSecretGetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Replicate.WebhooksDefaultSecretGetResponse), + jsonSerializerContext) as global::Replicate.WebhooksDefaultSecretGetResponse; + } + + /// + /// 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::Replicate.WebhooksDefaultSecretGetResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Replicate.WebhooksDefaultSecretGetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.WebhooksDefaultSecretGetResponse; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Replicate/Generated/Replicate.Models.WebhooksDefaultSecretGetResponse.g.cs b/src/libs/Replicate/Generated/Replicate.Models.WebhooksDefaultSecretGetResponse.g.cs index 0d8e55d..befc2d8 100644 --- a/src/libs/Replicate/Generated/Replicate.Models.WebhooksDefaultSecretGetResponse.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Models.WebhooksDefaultSecretGetResponse.g.cs @@ -20,91 +20,24 @@ public sealed partial class WebhooksDefaultSecretGetResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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 provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public string ToJson( - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Replicate.WebhooksDefaultSecretGetResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Replicate.WebhooksDefaultSecretGetResponse), - jsonSerializerContext) as global::Replicate.WebhooksDefaultSecretGetResponse; - } - - /// - /// 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::Replicate.WebhooksDefaultSecretGetResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The signing secret. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public WebhooksDefaultSecretGetResponse( + string? key) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Replicate.WebhooksDefaultSecretGetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Replicate.WebhooksDefaultSecretGetResponse; + this.Key = key; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public WebhooksDefaultSecretGetResponse() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.PathBuilder.g.cs b/src/libs/Replicate/Generated/Replicate.PathBuilder.g.cs index 150f455..ef25faf 100644 --- a/src/libs/Replicate/Generated/Replicate.PathBuilder.g.cs +++ b/src/libs/Replicate/Generated/Replicate.PathBuilder.g.cs @@ -1,5 +1,3 @@ -using System.Linq; - #nullable enable namespace Replicate @@ -103,7 +101,11 @@ public PathBuilder AddRequiredParameter( string delimiter = ",", bool explode = false) { - AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + AddRequiredParameter( + name, + global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(value, selector)), + delimiter, + explode); return this; } @@ -167,7 +169,11 @@ public PathBuilder AddOptionalParameter( { if (value is not null) { - AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + AddRequiredParameter( + name, + global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(value, selector)), + delimiter, + explode); } return this; diff --git a/src/libs/Replicate/Generated/Replicate.Polyfills.g.cs b/src/libs/Replicate/Generated/Replicate.Polyfills.g.cs index 519a3b6..eebb6e1 100644 --- a/src/libs/Replicate/Generated/Replicate.Polyfills.g.cs +++ b/src/libs/Replicate/Generated/Replicate.Polyfills.g.cs @@ -7,7 +7,7 @@ namespace Replicate /// /// /// - public static partial class AutoSDKPolyfills + public static partial class AutoSdkPolyfills { /// /// diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.AccountGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.AccountGet.g.cs index 85fc56e..f3b7128 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.AccountGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.AccountGet.g.cs @@ -39,7 +39,7 @@ partial void ProcessAccountGetResponseContent( /// ``` /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task AccountGetAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -91,29 +91,70 @@ partial void ProcessAccountGetResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessAccountGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAccountGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::Replicate.AccountGetResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::Replicate.AccountGetResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::Replicate.AccountGetResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsGet.g.cs index a3f60f9..2c570a8 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsGet.g.cs @@ -36,7 +36,7 @@ partial void ProcessCollectionsGetResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task CollectionsGetAsync( string collectionSlug, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,7 +90,23 @@ partial void ProcessCollectionsGetResponse( ProcessCollectionsGetResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsList.g.cs index 85d7eb8..19daddf 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsList.g.cs @@ -38,7 +38,7 @@ partial void ProcessCollectionsListResponse( /// ``` /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task CollectionsListAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -89,7 +89,23 @@ partial void ProcessCollectionsListResponse( ProcessCollectionsListResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsCreate.g.cs index 732b87e..6458ac2 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsCreate.g.cs @@ -67,7 +67,7 @@ partial void ProcessDeploymentsCreateResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeploymentsCreateAsync( global::Replicate.DeploymentsCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default) @@ -130,29 +130,70 @@ partial void ProcessDeploymentsCreateResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeploymentsCreateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeploymentsCreateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::Replicate.DeploymentsCreateResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::Replicate.DeploymentsCreateResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::Replicate.DeploymentsCreateResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsDelete.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsDelete.g.cs index fc9669c..fa659d2 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsDelete.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsDelete.g.cs @@ -34,7 +34,7 @@ partial void ProcessDeploymentsDeleteResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeploymentsDeleteAsync( string deploymentOwner, string deploymentName, @@ -91,7 +91,23 @@ partial void ProcessDeploymentsDeleteResponse( ProcessDeploymentsDeleteResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsGet.g.cs index c46ea86..6d70e11 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsGet.g.cs @@ -60,7 +60,7 @@ partial void ProcessDeploymentsGetResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeploymentsGetAsync( string deploymentOwner, string deploymentName, @@ -118,29 +118,70 @@ partial void ProcessDeploymentsGetResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeploymentsGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeploymentsGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::Replicate.DeploymentsGetResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::Replicate.DeploymentsGetResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::Replicate.DeploymentsGetResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsList.g.cs index 2022e0d..cbd6ca6 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsList.g.cs @@ -60,7 +60,7 @@ partial void ProcessDeploymentsListResponseContent( /// ``` /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeploymentsListAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -112,29 +112,70 @@ partial void ProcessDeploymentsListResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeploymentsListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeploymentsListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::Replicate.DeploymentsListResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::Replicate.DeploymentsListResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::Replicate.DeploymentsListResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsPredictionsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsPredictionsCreate.g.cs index be9bedb..53e4671 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsPredictionsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsPredictionsCreate.g.cs @@ -43,7 +43,7 @@ partial void ProcessDeploymentsPredictionsCreateResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeploymentsPredictionsCreateAsync( string deploymentOwner, string deploymentName, @@ -120,7 +120,23 @@ partial void ProcessDeploymentsPredictionsCreateResponse( ProcessDeploymentsPredictionsCreateResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } /// diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsUpdate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsUpdate.g.cs index cfcf9ac..b9f8d8d 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsUpdate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsUpdate.g.cs @@ -67,7 +67,7 @@ partial void ProcessDeploymentsUpdateResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeploymentsUpdateAsync( string deploymentOwner, string deploymentName, @@ -136,29 +136,70 @@ partial void ProcessDeploymentsUpdateResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeploymentsUpdateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeploymentsUpdateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::Replicate.DeploymentsUpdateResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::Replicate.DeploymentsUpdateResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::Replicate.DeploymentsUpdateResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.HardwareList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.HardwareList.g.cs index 032fc20..8b3f58f 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.HardwareList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.HardwareList.g.cs @@ -38,7 +38,7 @@ partial void ProcessHardwareListResponseContent( /// ``` /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task> HardwareListAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -90,29 +90,70 @@ partial void ProcessHardwareListResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessHardwareListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessHardwareListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsCreate.g.cs index 619bfb8..f63b3ab 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsCreate.g.cs @@ -48,7 +48,7 @@ partial void ProcessModelsCreateResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelsCreateAsync( global::Replicate.ModelsCreateRequest request, global::System.Threading.CancellationToken cancellationToken = default) @@ -110,7 +110,23 @@ partial void ProcessModelsCreateResponse( ProcessModelsCreateResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } /// diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsDelete.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsDelete.g.cs index abe93f3..066aea2 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsDelete.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsDelete.g.cs @@ -36,7 +36,7 @@ partial void ProcessModelsDeleteResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelsDeleteAsync( string modelOwner, string modelName, @@ -93,7 +93,23 @@ partial void ProcessModelsDeleteResponse( ProcessModelsDeleteResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsGet.g.cs index 34b0ed4..266f99f 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsGet.g.cs @@ -54,7 +54,7 @@ partial void ProcessModelsGetResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelsGetAsync( string modelOwner, string modelName, @@ -111,7 +111,23 @@ partial void ProcessModelsGetResponse( ProcessModelsGetResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsList.g.cs index 549b7aa..37576e2 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsList.g.cs @@ -53,7 +53,7 @@ partial void ProcessModelsListResponse( /// - A generic fallback image. /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelsListAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -104,7 +104,23 @@ partial void ProcessModelsListResponse( ProcessModelsListResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsPredictionsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsPredictionsCreate.g.cs index 0dec62e..5060f81 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsPredictionsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsPredictionsCreate.g.cs @@ -22,11 +22,6 @@ partial void ProcessModelsPredictionsCreateResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessModelsPredictionsCreateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - /// /// Create a prediction using an official model
/// Create a prediction for the deployment and inputs you provide.
@@ -48,8 +43,8 @@ partial void ProcessModelsPredictionsCreateResponseContent( /// /// /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync( + /// + public async global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync( string modelOwner, string modelName, global::Replicate.PredictionRequest request, @@ -125,30 +120,23 @@ partial void ProcessModelsPredictionsCreateResponseContent( ProcessModelsPredictionsCreateResponse( httpClient: HttpClient, httpResponseMessage: __response); - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModelsPredictionsCreateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - try { __response.EnsureSuccessStatusCode(); } catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, __ex); + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - - return - global::Replicate.PredictionResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } /// @@ -210,7 +198,7 @@ partial void ProcessModelsPredictionsCreateResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync( + public async global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync( string modelOwner, string modelName, object input, @@ -228,7 +216,7 @@ partial void ProcessModelsPredictionsCreateResponseContent( WebhookEventsFilter = webhookEventsFilter, }; - return await ModelsPredictionsCreateAsync( + await ModelsPredictionsCreateAsync( modelOwner: modelOwner, modelName: modelName, prefer: prefer, diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsDelete.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsDelete.g.cs index 032a4a5..1675184 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsDelete.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsDelete.g.cs @@ -42,7 +42,7 @@ partial void ProcessModelsVersionsDeleteResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelsVersionsDeleteAsync( string modelOwner, string modelName, @@ -102,7 +102,23 @@ partial void ProcessModelsVersionsDeleteResponse( ProcessModelsVersionsDeleteResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsGet.g.cs index 22e4e38..59d866f 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsGet.g.cs @@ -69,7 +69,7 @@ partial void ProcessModelsVersionsGetResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelsVersionsGetAsync( string modelOwner, string modelName, @@ -129,7 +129,23 @@ partial void ProcessModelsVersionsGetResponse( ProcessModelsVersionsGetResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsList.g.cs index d8df365..1fb5192 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsList.g.cs @@ -45,7 +45,7 @@ partial void ProcessModelsVersionsListResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelsVersionsListAsync( string modelOwner, string modelName, @@ -102,7 +102,23 @@ partial void ProcessModelsVersionsListResponse( ProcessModelsVersionsListResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCancel.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCancel.g.cs index c12bbdb..f06b28b 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCancel.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCancel.g.cs @@ -21,7 +21,7 @@ partial void ProcessPredictionsCancelResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task PredictionsCancelAsync( string predictionId, global::System.Threading.CancellationToken cancellationToken = default) @@ -75,7 +75,23 @@ partial void ProcessPredictionsCancelResponse( ProcessPredictionsCancelResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCreate.g.cs index 9b38cd1..baf0df4 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCreate.g.cs @@ -37,7 +37,7 @@ partial void ProcessPredictionsCreateResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task PredictionsCreateAsync( global::Replicate.VersionPredictionRequest request, string? prefer = default, @@ -108,7 +108,23 @@ partial void ProcessPredictionsCreateResponse( ProcessPredictionsCreateResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } /// diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsGet.g.cs index 05408c7..48e9bdc 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsGet.g.cs @@ -71,7 +71,7 @@ partial void ProcessPredictionsGetResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task PredictionsGetAsync( string predictionId, global::System.Threading.CancellationToken cancellationToken = default) @@ -126,29 +126,70 @@ partial void ProcessPredictionsGetResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessPredictionsGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPredictionsGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::Replicate.PredictionResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::Replicate.PredictionResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::Replicate.PredictionResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsList.g.cs index d0cb1a0..8eb5672 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsList.g.cs @@ -64,7 +64,7 @@ partial void ProcessPredictionsListResponse( /// `data_removed` will be `true` if the input and output data has been deleted. ///
/// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task PredictionsListAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -115,7 +115,23 @@ partial void ProcessPredictionsListResponse( ProcessPredictionsListResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCancel.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCancel.g.cs index 48858ea..6eaa809 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCancel.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCancel.g.cs @@ -21,7 +21,7 @@ partial void ProcessTrainingsCancelResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task TrainingsCancelAsync( string trainingId, global::System.Threading.CancellationToken cancellationToken = default) @@ -75,7 +75,23 @@ partial void ProcessTrainingsCancelResponse( ProcessTrainingsCancelResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCreate.g.cs index 73993a2..c35f2d2 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCreate.g.cs @@ -71,7 +71,7 @@ partial void ProcessTrainingsCreateResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task TrainingsCreateAsync( string modelOwner, string modelName, @@ -142,7 +142,23 @@ partial void ProcessTrainingsCreateResponse( ProcessTrainingsCreateResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } /// diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsGet.g.cs index 6d96da7..7598083 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsGet.g.cs @@ -65,7 +65,7 @@ partial void ProcessTrainingsGetResponse( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task TrainingsGetAsync( string trainingId, global::System.Threading.CancellationToken cancellationToken = default) @@ -119,7 +119,23 @@ partial void ProcessTrainingsGetResponse( ProcessTrainingsGetResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsList.g.cs index 4e9af1b..b2b36be 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsList.g.cs @@ -64,7 +64,7 @@ partial void ProcessTrainingsListResponse( /// `version` will be the unique ID of model version used to create the training. /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task TrainingsListAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -115,7 +115,23 @@ partial void ProcessTrainingsListResponse( ProcessTrainingsListResponse( httpClient: HttpClient, httpResponseMessage: __response); - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.WebhooksDefaultSecretGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.WebhooksDefaultSecretGet.g.cs index e152d25..e2c7dfb 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.WebhooksDefaultSecretGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.WebhooksDefaultSecretGet.g.cs @@ -36,7 +36,7 @@ partial void ProcessWebhooksDefaultSecretGetResponseContent( /// ``` /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task WebhooksDefaultSecretGetAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -88,29 +88,70 @@ partial void ProcessWebhooksDefaultSecretGetResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessWebhooksDefaultSecretGetResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessWebhooksDefaultSecretGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::Replicate.WebhooksDefaultSecretGetResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::Replicate.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::Replicate.WebhooksDefaultSecretGetResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::Replicate.WebhooksDefaultSecretGetResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.g.cs index 35dee43..336a689 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.g.cs @@ -26,6 +26,11 @@ public sealed partial class ReplicateApi : global::Replicate.IReplicateApi, glob /// public global::System.Collections.Generic.List Authorizations { get; } + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif /// /// ///