From fdd5b4539dc79b15249e5b6eb0ce749d9726f2b0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 1 Oct 2024 03:27:04 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Generated/Replicate.PathBuilder.g.cs | 16 ++++++++++++++++ .../Replicate.ReplicateApi.AccountGet.g.cs | 7 +++++++ ...icate.ReplicateApi.Authorizations.Bearer.g.cs | 8 +++++--- .../Replicate.ReplicateApi.CollectionsGet.g.cs | 7 +++++++ .../Replicate.ReplicateApi.CollectionsList.g.cs | 7 +++++++ ...plicate.ReplicateApi.Constructors.Bearer.g.cs | 5 +++-- ...Replicate.ReplicateApi.DeploymentsCreate.g.cs | 7 +++++++ ...Replicate.ReplicateApi.DeploymentsDelete.g.cs | 7 +++++++ .../Replicate.ReplicateApi.DeploymentsGet.g.cs | 7 +++++++ .../Replicate.ReplicateApi.DeploymentsList.g.cs | 7 +++++++ ...eplicateApi.DeploymentsPredictionsCreate.g.cs | 7 +++++++ ...Replicate.ReplicateApi.DeploymentsUpdate.g.cs | 7 +++++++ .../Replicate.ReplicateApi.HardwareList.g.cs | 7 +++++++ .../Replicate.ReplicateApi.ModelsCreate.g.cs | 7 +++++++ .../Replicate.ReplicateApi.ModelsDelete.g.cs | 7 +++++++ .../Replicate.ReplicateApi.ModelsGet.g.cs | 7 +++++++ .../Replicate.ReplicateApi.ModelsList.g.cs | 7 +++++++ ...ate.ReplicateApi.ModelsPredictionsCreate.g.cs | 7 +++++++ ...licate.ReplicateApi.ModelsVersionsDelete.g.cs | 7 +++++++ ...Replicate.ReplicateApi.ModelsVersionsGet.g.cs | 7 +++++++ ...eplicate.ReplicateApi.ModelsVersionsList.g.cs | 7 +++++++ ...Replicate.ReplicateApi.PredictionsCancel.g.cs | 7 +++++++ ...Replicate.ReplicateApi.PredictionsCreate.g.cs | 7 +++++++ .../Replicate.ReplicateApi.PredictionsGet.g.cs | 7 +++++++ .../Replicate.ReplicateApi.PredictionsList.g.cs | 7 +++++++ .../Replicate.ReplicateApi.TrainingsCancel.g.cs | 7 +++++++ .../Replicate.ReplicateApi.TrainingsCreate.g.cs | 7 +++++++ .../Replicate.ReplicateApi.TrainingsGet.g.cs | 7 +++++++ .../Replicate.ReplicateApi.TrainingsList.g.cs | 7 +++++++ ...te.ReplicateApi.WebhooksDefaultSecretGet.g.cs | 7 +++++++ .../Generated/Replicate.ReplicateApi.g.cs | 8 ++++++-- 31 files changed, 219 insertions(+), 7 deletions(-) diff --git a/src/libs/Replicate/Generated/Replicate.PathBuilder.g.cs b/src/libs/Replicate/Generated/Replicate.PathBuilder.g.cs index 8864ddb..510ab35 100644 --- a/src/libs/Replicate/Generated/Replicate.PathBuilder.g.cs +++ b/src/libs/Replicate/Generated/Replicate.PathBuilder.g.cs @@ -224,4 +224,20 @@ public PathBuilder AddOptionalParameter( /// The constructed URL. public override string ToString() => _stringBuilder.ToString(); } + + /// + /// + /// + public class EndPointAuthorization + { + /// + /// + /// + public string Name { get; set; } = string.Empty; + + /// + /// + /// + public string Value { get; set; } = string.Empty; + } } \ No newline at end of file diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.AccountGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.AccountGet.g.cs index 6dba59f..6203e71 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.AccountGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.AccountGet.g.cs @@ -56,6 +56,13 @@ partial void ProcessAccountGetResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.Authorizations.Bearer.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.Authorizations.Bearer.g.cs index fc374b2..a281cfb 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.Authorizations.Bearer.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.Authorizations.Bearer.g.cs @@ -14,9 +14,11 @@ public void AuthorizeUsingBearer( { apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); - _httpClient.DefaultRequestHeaders.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: "Bearer", - parameter: apiKey); + _authorization = new global::Replicate.EndPointAuthorization + { + Name = "Bearer", + Value = apiKey, + }; } } } \ 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 49e8795..7729df8 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsGet.g.cs @@ -55,6 +55,13 @@ partial void ProcessCollectionsGetResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsList.g.cs index 339d664..0032e64 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.CollectionsList.g.cs @@ -55,6 +55,13 @@ partial void ProcessCollectionsListResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.Constructors.Bearer.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.Constructors.Bearer.g.cs index d8ace68..1c4a7b0 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.Constructors.Bearer.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.Constructors.Bearer.g.cs @@ -5,11 +5,12 @@ namespace Replicate { public sealed partial class ReplicateApi { - /// + /// public ReplicateApi( string apiKey, global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) : this(httpClient, baseUri) + global::System.Uri? baseUri = null, + global::Replicate.EndPointAuthorization? authorization = null) : this(httpClient, baseUri, authorization) { Authorizing(_httpClient, ref apiKey); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsCreate.g.cs index 6694e07..ad1271e 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsCreate.g.cs @@ -87,6 +87,13 @@ partial void ProcessDeploymentsCreateResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsDelete.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsDelete.g.cs index b1ef3de..048f201 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsDelete.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsDelete.g.cs @@ -55,6 +55,13 @@ partial void ProcessDeploymentsDeleteResponse( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsGet.g.cs index acf525f..1be1e82 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsGet.g.cs @@ -81,6 +81,13 @@ partial void ProcessDeploymentsGetResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsList.g.cs index 0328c9a..5bfbf4a 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsList.g.cs @@ -77,6 +77,13 @@ partial void ProcessDeploymentsListResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsPredictionsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsPredictionsCreate.g.cs index 176a1a4..93c5fd8 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsPredictionsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsPredictionsCreate.g.cs @@ -90,6 +90,13 @@ partial void ProcessDeploymentsPredictionsCreateResponse( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsUpdate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsUpdate.g.cs index c811f07..9dff7fa 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsUpdate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.DeploymentsUpdate.g.cs @@ -91,6 +91,13 @@ partial void ProcessDeploymentsUpdateResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.HardwareList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.HardwareList.g.cs index ebcaecc..266e89a 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.HardwareList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.HardwareList.g.cs @@ -55,6 +55,13 @@ partial void ProcessHardwareListResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsCreate.g.cs index 92bffa4..4f8144e 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsCreate.g.cs @@ -68,6 +68,13 @@ partial void ProcessModelsCreateResponse( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsDelete.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsDelete.g.cs index 62b46d9..d990519 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsDelete.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsDelete.g.cs @@ -57,6 +57,13 @@ partial void ProcessModelsDeleteResponse( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsGet.g.cs index 99b0692..b3a2e6f 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsGet.g.cs @@ -75,6 +75,13 @@ partial void ProcessModelsGetResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsList.g.cs index ba8550d..46925a6 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsList.g.cs @@ -70,6 +70,13 @@ partial void ProcessModelsListResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsPredictionsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsPredictionsCreate.g.cs index a731616..32281c0 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsPredictionsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsPredictionsCreate.g.cs @@ -95,6 +95,13 @@ partial void ProcessModelsPredictionsCreateResponseContent( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsDelete.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsDelete.g.cs index 53d85e6..15cd3a8 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsDelete.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsDelete.g.cs @@ -65,6 +65,13 @@ partial void ProcessModelsVersionsDeleteResponse( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsGet.g.cs index 9334432..95b2fd9 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsGet.g.cs @@ -92,6 +92,13 @@ partial void ProcessModelsVersionsGetResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsList.g.cs index 2df4a6c..daf9dd3 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.ModelsVersionsList.g.cs @@ -66,6 +66,13 @@ partial void ProcessModelsVersionsListResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCancel.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCancel.g.cs index a728c54..2b01aeb 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCancel.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCancel.g.cs @@ -40,6 +40,13 @@ partial void ProcessPredictionsCancelResponse( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCreate.g.cs index 6b13d72..e4d7e7d 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsCreate.g.cs @@ -82,6 +82,13 @@ partial void ProcessPredictionsCreateResponse( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsGet.g.cs index 49b4434..06900f2 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsGet.g.cs @@ -90,6 +90,13 @@ partial void ProcessPredictionsGetResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsList.g.cs index 44d81a4..fa99e43 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.PredictionsList.g.cs @@ -81,6 +81,13 @@ partial void ProcessPredictionsListResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCancel.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCancel.g.cs index d99ead4..0318f50 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCancel.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCancel.g.cs @@ -40,6 +40,13 @@ partial void ProcessTrainingsCancelResponse( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCreate.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCreate.g.cs index 821d497..baacf11 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCreate.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsCreate.g.cs @@ -97,6 +97,13 @@ partial void ProcessTrainingsCreateResponse( using var httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsGet.g.cs index 6615a61..b892fff 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsGet.g.cs @@ -84,6 +84,13 @@ partial void ProcessTrainingsGetResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsList.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsList.g.cs index 655e57f..a1dc0c0 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsList.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.TrainingsList.g.cs @@ -81,6 +81,13 @@ partial void ProcessTrainingsListResponse( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.WebhooksDefaultSecretGet.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.WebhooksDefaultSecretGet.g.cs index b43d004..891bcc1 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.WebhooksDefaultSecretGet.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.WebhooksDefaultSecretGet.g.cs @@ -53,6 +53,13 @@ partial void ProcessWebhooksDefaultSecretGetResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + if (_authorization != null) + {{ + httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: _authorization.Name, + parameter: _authorization.Value); + }} + PrepareRequest( client: _httpClient, request: httpRequest); diff --git a/src/libs/Replicate/Generated/Replicate.ReplicateApi.g.cs b/src/libs/Replicate/Generated/Replicate.ReplicateApi.g.cs index ae1ce88..d3260da 100644 --- a/src/libs/Replicate/Generated/Replicate.ReplicateApi.g.cs +++ b/src/libs/Replicate/Generated/Replicate.ReplicateApi.g.cs @@ -16,6 +16,7 @@ public sealed partial class ReplicateApi : global::Replicate.IReplicateApi, glob public const string BaseUrl = "https://api.replicate.com/v1"; private readonly global::System.Net.Http.HttpClient _httpClient; + private global::Replicate.EndPointAuthorization? _authorization; /// /// @@ -29,13 +30,16 @@ public sealed partial class ReplicateApi : global::Replicate.IReplicateApi, glob /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// /// - /// + /// + /// public ReplicateApi( global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null) + global::System.Uri? baseUri = null, + global::Replicate.EndPointAuthorization? authorization = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); + _authorization = authorization; Initialized(_httpClient); }