Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:@coderabbitai #48

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions src/libs/Replicate/Generated/Replicate.Exceptions.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#nullable enable

namespace Replicate
{
/// <summary>
/// Represents an exception thrown by the API.
/// </summary>
[global::System.Serializable]
public partial class ApiException : global::System.Exception
{
/// <summary>
/// The HTTP status code of the response.
/// </summary>
public global::System.Net.HttpStatusCode StatusCode { get; }
/// <summary>
/// The response body.
/// </summary>
public string? ResponseBody { get; set; }
/// <summary>
/// The response headers.
/// </summary>
public global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IEnumerable<string>>? ResponseHeaders { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
public ApiException()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class with a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
/// <param name="statusCode">The HTTP status code of the response.</param>
public ApiException(string message, global::System.Net.HttpStatusCode statusCode) : base(message)
{
StatusCode = statusCode;
}

/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
/// <param name="statusCode">The HTTP status code of the response.</param>
public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException)
{
StatusCode = statusCode;
}
}

/// <summary>
/// Represents an exception thrown by the API.
/// </summary>
/// <typeparam name="T"></typeparam>
[global::System.Serializable]
public partial class ApiException<T> : ApiException
{
/// <summary>
/// The response object.
/// </summary>
public T? ResponseObject { get; set; }

/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
public ApiException()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class with a specified error message.
/// </summary>
/// <param name="message">The message that describes the error.</param>
/// <param name="statusCode">The HTTP status code of the response.</param>
public ApiException(string message, global::System.Net.HttpStatusCode statusCode) : base(message, statusCode)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
/// <param name="statusCode">The HTTP status code of the response.</param>
public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public partial interface IReplicateApi
/// ```
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.AccountGetResponse> AccountGetAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="collectionSlug"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task CollectionsGetAsync(
string collectionSlug,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public partial interface IReplicateApi
/// ```
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task CollectionsListAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.DeploymentsCreateResponse> DeploymentsCreateAsync(
global::Replicate.DeploymentsCreateRequest request,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public partial interface IReplicateApi
/// <param name="deploymentOwner"></param>
/// <param name="deploymentName"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task DeploymentsDeleteAsync(
string deploymentOwner,
string deploymentName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public partial interface IReplicateApi
/// <param name="deploymentOwner"></param>
/// <param name="deploymentName"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.DeploymentsGetResponse> DeploymentsGetAsync(
string deploymentOwner,
string deploymentName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public partial interface IReplicateApi
/// ```
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.DeploymentsListResponse> DeploymentsListAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public partial interface IReplicateApi
/// </param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task DeploymentsPredictionsCreateAsync(
string deploymentOwner,
string deploymentName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public partial interface IReplicateApi
/// <param name="deploymentName"></param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.DeploymentsUpdateResponse> DeploymentsUpdateAsync(
string deploymentOwner,
string deploymentName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial interface IReplicateApi
/// ```
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::Replicate.HardwareListResponseItem>> HardwareListAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task ModelsCreateAsync(
global::Replicate.ModelsCreateRequest request,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public partial interface IReplicateApi
/// <param name="modelOwner"></param>
/// <param name="modelName"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task ModelsDeleteAsync(
string modelOwner,
string modelName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public partial interface IReplicateApi
/// <param name="modelOwner"></param>
/// <param name="modelName"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task ModelsGetAsync(
string modelOwner,
string modelName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public partial interface IReplicateApi
/// - A generic fallback image.
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task ModelsListAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public partial interface IReplicateApi
/// </param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.PredictionResponse> ModelsPredictionsCreateAsync(
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync(
string modelOwner,
string modelName,
global::Replicate.PredictionRequest request,
Expand Down Expand Up @@ -92,7 +92,7 @@ public partial interface IReplicateApi
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.PredictionResponse> ModelsPredictionsCreateAsync(
global::System.Threading.Tasks.Task ModelsPredictionsCreateAsync(
string modelOwner,
string modelName,
object input,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public partial interface IReplicateApi
/// <param name="modelName"></param>
/// <param name="versionId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task ModelsVersionsDeleteAsync(
string modelOwner,
string modelName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public partial interface IReplicateApi
/// <param name="modelName"></param>
/// <param name="versionId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task ModelsVersionsGetAsync(
string modelOwner,
string modelName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public partial interface IReplicateApi
/// <param name="modelOwner"></param>
/// <param name="modelName"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task ModelsVersionsListAsync(
string modelOwner,
string modelName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="predictionId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task PredictionsCancelAsync(
string predictionId,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial interface IReplicateApi
/// </param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task PredictionsCreateAsync(
global::Replicate.VersionPredictionRequest request,
string? prefer = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="predictionId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.PredictionResponse> PredictionsGetAsync(
string predictionId,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public partial interface IReplicateApi
/// `data_removed` will be `true` if the input and output data has been deleted.
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task PredictionsListAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="trainingId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task TrainingsCancelAsync(
string trainingId,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public partial interface IReplicateApi
/// <param name="versionId"></param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task TrainingsCreateAsync(
string modelOwner,
string modelName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public partial interface IReplicateApi
/// </summary>
/// <param name="trainingId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task TrainingsGetAsync(
string trainingId,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public partial interface IReplicateApi
/// `version` will be the unique ID of model version used to create the training.
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task TrainingsListAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public partial interface IReplicateApi
/// ```
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
/// <exception cref="global::Replicate.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Replicate.WebhooksDefaultSecretGetResponse> WebhooksDefaultSecretGetAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Replicate/Generated/Replicate.IReplicateApi.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public partial interface IReplicateApi : global::System.IDisposable
/// </summary>
public global::System.Collections.Generic.List<global::Replicate.EndPointAuthorization> Authorizations { get; }

/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// </summary>
public bool ReadResponseAsString { get; set; }

/// <summary>
///
/// </summary>
Expand Down
Loading
Loading