diff --git a/src/libs/Instill/Generated/Instill.CatalogClient.CreateCatalog.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.CreateCatalog.g.cs
index 1e539e0..cb0f91d 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.CreateCatalog.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.CreateCatalog.g.cs
@@ -51,6 +51,13 @@ partial void ProcessCreateCatalogResponseContent(
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/Instill/Generated/Instill.CatalogClient.DeleteCatalog.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.DeleteCatalog.g.cs
index 4be7ad4..b303da0 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.DeleteCatalog.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.DeleteCatalog.g.cs
@@ -50,6 +50,13 @@ partial void ProcessDeleteCatalogResponseContent(
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/Instill/Generated/Instill.CatalogClient.DeleteCatalogFile.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.DeleteCatalogFile.g.cs
index d6d151a..6a2feeb 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.DeleteCatalogFile.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.DeleteCatalogFile.g.cs
@@ -48,6 +48,13 @@ partial void ProcessDeleteCatalogFileResponseContent(
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/Instill/Generated/Instill.CatalogClient.GetFileCatalog.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.GetFileCatalog.g.cs
index 9d2827c..9bea4fc 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.GetFileCatalog.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.GetFileCatalog.g.cs
@@ -64,6 +64,13 @@ partial void ProcessGetFileCatalogResponseContent(
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/Instill/Generated/Instill.CatalogClient.GetSourceFile.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.GetSourceFile.g.cs
index 638d85f..b3f01df 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.GetSourceFile.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.GetSourceFile.g.cs
@@ -55,6 +55,13 @@ partial void ProcessGetSourceFileResponseContent(
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/Instill/Generated/Instill.CatalogClient.ListCatalogFiles.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.ListCatalogFiles.g.cs
index 73a5f9d..f7bc029 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.ListCatalogFiles.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.ListCatalogFiles.g.cs
@@ -70,6 +70,13 @@ partial void ProcessListCatalogFilesResponseContent(
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/Instill/Generated/Instill.CatalogClient.ListCatalogRuns.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.ListCatalogRuns.g.cs
index 1c02a6e..7ac1031 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.ListCatalogRuns.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.ListCatalogRuns.g.cs
@@ -76,6 +76,13 @@ partial void ProcessListCatalogRunsResponseContent(
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/Instill/Generated/Instill.CatalogClient.ListCatalogs.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.ListCatalogs.g.cs
index 9b5fe89..2d3259f 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.ListCatalogs.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.ListCatalogs.g.cs
@@ -45,6 +45,13 @@ partial void ProcessListCatalogsResponseContent(
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/Instill/Generated/Instill.CatalogClient.ListChunks.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.ListChunks.g.cs
index c219fdb..6566d4f 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.ListChunks.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.ListChunks.g.cs
@@ -64,6 +64,13 @@ partial void ProcessListChunksResponseContent(
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/Instill/Generated/Instill.CatalogClient.ProcessCatalogFiles.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.ProcessCatalogFiles.g.cs
index 128e1c3..45fa375 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.ProcessCatalogFiles.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.ProcessCatalogFiles.g.cs
@@ -44,11 +44,6 @@ partial void ProcessProcessCatalogFilesResponseContent(
instillRequesterUid: ref instillRequesterUid,
request: request);
- if (instillRequesterUid != default)
- {
- _httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Instill-Requester-Uid", instillRequesterUid);
- }
-
var __pathBuilder = new PathBuilder(
path: "/v1alpha/catalogs/files/processAsync",
baseUri: _httpClient.BaseAddress);
@@ -56,6 +51,19 @@ partial void ProcessProcessCatalogFilesResponseContent(
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);
+ }}
+
+ if (instillRequesterUid != default)
+ {
+ httpRequest.Headers.TryAddWithoutValidation("Instill-Requester-Uid", instillRequesterUid.ToString());
+ }
+
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/Instill/Generated/Instill.CatalogClient.QuestionAnswering.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.QuestionAnswering.g.cs
index 5b5cb71..6022444 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.QuestionAnswering.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.QuestionAnswering.g.cs
@@ -54,11 +54,6 @@ partial void ProcessQuestionAnsweringResponseContent(
instillRequesterUid: ref instillRequesterUid,
request: request);
- if (instillRequesterUid != default)
- {
- _httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Instill-Requester-Uid", instillRequesterUid);
- }
-
var __pathBuilder = new PathBuilder(
path: $"/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/ask",
baseUri: _httpClient.BaseAddress);
@@ -66,6 +61,19 @@ partial void ProcessQuestionAnsweringResponseContent(
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);
+ }}
+
+ if (instillRequesterUid != default)
+ {
+ httpRequest.Headers.TryAddWithoutValidation("Instill-Requester-Uid", instillRequesterUid.ToString());
+ }
+
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/Instill/Generated/Instill.CatalogClient.SimilarityChunksSearch.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.SimilarityChunksSearch.g.cs
index b728198..d821070 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.SimilarityChunksSearch.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.SimilarityChunksSearch.g.cs
@@ -54,11 +54,6 @@ partial void ProcessSimilarityChunksSearchResponseContent(
instillRequesterUid: ref instillRequesterUid,
request: request);
- if (instillRequesterUid != default)
- {
- _httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Instill-Requester-Uid", instillRequesterUid);
- }
-
var __pathBuilder = new PathBuilder(
path: $"/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/chunks/retrieve",
baseUri: _httpClient.BaseAddress);
@@ -66,6 +61,19 @@ partial void ProcessSimilarityChunksSearchResponseContent(
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);
+ }}
+
+ if (instillRequesterUid != default)
+ {
+ httpRequest.Headers.TryAddWithoutValidation("Instill-Requester-Uid", instillRequesterUid.ToString());
+ }
+
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/Instill/Generated/Instill.CatalogClient.UpdateCatalog.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.UpdateCatalog.g.cs
index 4228e70..89d17fc 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.UpdateCatalog.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.UpdateCatalog.g.cs
@@ -56,6 +56,13 @@ partial void ProcessUpdateCatalogResponseContent(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Put,
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/Instill/Generated/Instill.CatalogClient.UpdateChunk.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.UpdateChunk.g.cs
index 8fa1980..b3d3b9a 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.UpdateChunk.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.UpdateChunk.g.cs
@@ -51,6 +51,13 @@ partial void ProcessUpdateChunkResponseContent(
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/Instill/Generated/Instill.CatalogClient.UploadCatalogFile.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.UploadCatalogFile.g.cs
index 15f8998..f678785 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.UploadCatalogFile.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.UploadCatalogFile.g.cs
@@ -56,6 +56,13 @@ partial void ProcessUploadCatalogFileResponseContent(
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/Instill/Generated/Instill.CatalogClient.g.cs b/src/libs/Instill/Generated/Instill.CatalogClient.g.cs
index 2e3ab10..6cbd81d 100644
--- a/src/libs/Instill/Generated/Instill.CatalogClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.CatalogClient.g.cs
@@ -15,6 +15,7 @@ public sealed partial class CatalogClient : global::Instill.ICatalogClient, glob
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -28,13 +29,16 @@ public sealed partial class CatalogClient : global::Instill.ICatalogClient, glob
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public CatalogClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}
diff --git a/src/libs/Instill/Generated/Instill.CreditClient.GetRemainingCredit.g.cs b/src/libs/Instill/Generated/Instill.CreditClient.GetRemainingCredit.g.cs
index d012a89..2708210 100644
--- a/src/libs/Instill/Generated/Instill.CreditClient.GetRemainingCredit.g.cs
+++ b/src/libs/Instill/Generated/Instill.CreditClient.GetRemainingCredit.g.cs
@@ -49,6 +49,13 @@ partial void ProcessGetRemainingCreditResponseContent(
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/Instill/Generated/Instill.CreditClient.g.cs b/src/libs/Instill/Generated/Instill.CreditClient.g.cs
index 0b9abf1..e0dd3b6 100644
--- a/src/libs/Instill/Generated/Instill.CreditClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.CreditClient.g.cs
@@ -16,6 +16,7 @@ public sealed partial class CreditClient : global::Instill.ICreditClient, global
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -29,13 +30,16 @@ public sealed partial class CreditClient : global::Instill.ICreditClient, global
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public CreditClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}
diff --git a/src/libs/Instill/Generated/Instill.InstillClient.Authorizations.Bearer.g.cs b/src/libs/Instill/Generated/Instill.InstillClient.Authorizations.Bearer.g.cs
index be67555..c52462b 100644
--- a/src/libs/Instill/Generated/Instill.InstillClient.Authorizations.Bearer.g.cs
+++ b/src/libs/Instill/Generated/Instill.InstillClient.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::Instill.EndPointAuthorization
+ {
+ Name = "Bearer",
+ Value = apiKey,
+ };
}
}
}
\ No newline at end of file
diff --git a/src/libs/Instill/Generated/Instill.InstillClient.Constructors.Bearer.g.cs b/src/libs/Instill/Generated/Instill.InstillClient.Constructors.Bearer.g.cs
index 21fc200..5e12e71 100644
--- a/src/libs/Instill/Generated/Instill.InstillClient.Constructors.Bearer.g.cs
+++ b/src/libs/Instill/Generated/Instill.InstillClient.Constructors.Bearer.g.cs
@@ -5,11 +5,12 @@ namespace Instill
{
public sealed partial class InstillClient
{
- ///
+ ///
public InstillClient(
string apiKey,
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null) : this(httpClient, baseUri)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null) : this(httpClient, baseUri, authorization)
{
Authorizing(_httpClient, ref apiKey);
diff --git a/src/libs/Instill/Generated/Instill.InstillClient.g.cs b/src/libs/Instill/Generated/Instill.InstillClient.g.cs
index 0bb2b46..85a91b8 100644
--- a/src/libs/Instill/Generated/Instill.InstillClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.InstillClient.g.cs
@@ -16,6 +16,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -26,7 +27,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
///
/// User endpoints
///
- public UserClient User => new UserClient(_httpClient)
+ public UserClient User => new UserClient(_httpClient, authorization: _authorization)
{
JsonSerializerContext = JsonSerializerContext,
};
@@ -34,7 +35,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
///
/// Organization endpoints
///
- public OrganizationClient Organization => new OrganizationClient(_httpClient)
+ public OrganizationClient Organization => new OrganizationClient(_httpClient, authorization: _authorization)
{
JsonSerializerContext = JsonSerializerContext,
};
@@ -42,7 +43,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
///
/// Membership endpoints
///
- public MembershipClient Membership => new MembershipClient(_httpClient)
+ public MembershipClient Membership => new MembershipClient(_httpClient, authorization: _authorization)
{
JsonSerializerContext = JsonSerializerContext,
};
@@ -50,7 +51,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
///
/// Token endpoints
///
- public TokenClient Token => new TokenClient(_httpClient)
+ public TokenClient Token => new TokenClient(_httpClient, authorization: _authorization)
{
JsonSerializerContext = JsonSerializerContext,
};
@@ -58,7 +59,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
///
/// Subscription endpoints
///
- public SubscriptionClient Subscription => new SubscriptionClient(_httpClient)
+ public SubscriptionClient Subscription => new SubscriptionClient(_httpClient, authorization: _authorization)
{
JsonSerializerContext = JsonSerializerContext,
};
@@ -66,7 +67,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
///
/// Credit endpoints
///
- public CreditClient Credit => new CreditClient(_httpClient)
+ public CreditClient Credit => new CreditClient(_httpClient, authorization: _authorization)
{
JsonSerializerContext = JsonSerializerContext,
};
@@ -74,7 +75,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
///
/// Metric endpoints
///
- public MetricClient Metric => new MetricClient(_httpClient)
+ public MetricClient Metric => new MetricClient(_httpClient, authorization: _authorization)
{
JsonSerializerContext = JsonSerializerContext,
};
@@ -82,7 +83,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
///
/// Util endpoints
///
- public UtilsClient Utils => new UtilsClient(_httpClient)
+ public UtilsClient Utils => new UtilsClient(_httpClient, authorization: _authorization)
{
JsonSerializerContext = JsonSerializerContext,
};
@@ -90,7 +91,7 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
///
///
///
- public CatalogClient Catalog => new CatalogClient(_httpClient)
+ public CatalogClient Catalog => new CatalogClient(_httpClient, authorization: _authorization)
{
JsonSerializerContext = JsonSerializerContext,
};
@@ -101,13 +102,16 @@ public sealed partial class InstillClient : global::Instill.IInstillClient, glob
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public InstillClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}
diff --git a/src/libs/Instill/Generated/Instill.MembershipClient.DeleteOrganizationMembership.g.cs b/src/libs/Instill/Generated/Instill.MembershipClient.DeleteOrganizationMembership.g.cs
index 8dd8f83..6abb60e 100644
--- a/src/libs/Instill/Generated/Instill.MembershipClient.DeleteOrganizationMembership.g.cs
+++ b/src/libs/Instill/Generated/Instill.MembershipClient.DeleteOrganizationMembership.g.cs
@@ -51,6 +51,13 @@ partial void ProcessDeleteOrganizationMembershipResponseContent(
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/Instill/Generated/Instill.MembershipClient.DeleteUserMembership.g.cs b/src/libs/Instill/Generated/Instill.MembershipClient.DeleteUserMembership.g.cs
index ee9efc5..f952e9d 100644
--- a/src/libs/Instill/Generated/Instill.MembershipClient.DeleteUserMembership.g.cs
+++ b/src/libs/Instill/Generated/Instill.MembershipClient.DeleteUserMembership.g.cs
@@ -51,6 +51,13 @@ partial void ProcessDeleteUserMembershipResponseContent(
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/Instill/Generated/Instill.MembershipClient.GetOrganizationMembership.g.cs b/src/libs/Instill/Generated/Instill.MembershipClient.GetOrganizationMembership.g.cs
index a1d938a..e6003c3 100644
--- a/src/libs/Instill/Generated/Instill.MembershipClient.GetOrganizationMembership.g.cs
+++ b/src/libs/Instill/Generated/Instill.MembershipClient.GetOrganizationMembership.g.cs
@@ -59,6 +59,13 @@ partial void ProcessGetOrganizationMembershipResponseContent(
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/Instill/Generated/Instill.MembershipClient.GetUserMembership.g.cs b/src/libs/Instill/Generated/Instill.MembershipClient.GetUserMembership.g.cs
index 2e884c9..7a6f2b9 100644
--- a/src/libs/Instill/Generated/Instill.MembershipClient.GetUserMembership.g.cs
+++ b/src/libs/Instill/Generated/Instill.MembershipClient.GetUserMembership.g.cs
@@ -60,6 +60,13 @@ partial void ProcessGetUserMembershipResponseContent(
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/Instill/Generated/Instill.MembershipClient.ListOrganizationMemberships.g.cs b/src/libs/Instill/Generated/Instill.MembershipClient.ListOrganizationMemberships.g.cs
index 52052b9..3637c58 100644
--- a/src/libs/Instill/Generated/Instill.MembershipClient.ListOrganizationMemberships.g.cs
+++ b/src/libs/Instill/Generated/Instill.MembershipClient.ListOrganizationMemberships.g.cs
@@ -46,6 +46,13 @@ partial void ProcessListOrganizationMembershipsResponseContent(
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/Instill/Generated/Instill.MembershipClient.ListUserMemberships.g.cs b/src/libs/Instill/Generated/Instill.MembershipClient.ListUserMemberships.g.cs
index 4269fa7..0a7a40b 100644
--- a/src/libs/Instill/Generated/Instill.MembershipClient.ListUserMemberships.g.cs
+++ b/src/libs/Instill/Generated/Instill.MembershipClient.ListUserMemberships.g.cs
@@ -46,6 +46,13 @@ partial void ProcessListUserMembershipsResponseContent(
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/Instill/Generated/Instill.MembershipClient.UpdateOrganizationMembership.g.cs b/src/libs/Instill/Generated/Instill.MembershipClient.UpdateOrganizationMembership.g.cs
index b42bced..50937d4 100644
--- a/src/libs/Instill/Generated/Instill.MembershipClient.UpdateOrganizationMembership.g.cs
+++ b/src/libs/Instill/Generated/Instill.MembershipClient.UpdateOrganizationMembership.g.cs
@@ -65,6 +65,13 @@ partial void ProcessUpdateOrganizationMembershipResponseContent(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Put,
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/Instill/Generated/Instill.MembershipClient.UpdateUserMembership.g.cs b/src/libs/Instill/Generated/Instill.MembershipClient.UpdateUserMembership.g.cs
index ea82ce0..a2bf31b 100644
--- a/src/libs/Instill/Generated/Instill.MembershipClient.UpdateUserMembership.g.cs
+++ b/src/libs/Instill/Generated/Instill.MembershipClient.UpdateUserMembership.g.cs
@@ -65,6 +65,13 @@ partial void ProcessUpdateUserMembershipResponseContent(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Put,
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/Instill/Generated/Instill.MembershipClient.g.cs b/src/libs/Instill/Generated/Instill.MembershipClient.g.cs
index 108ea6a..c85b267 100644
--- a/src/libs/Instill/Generated/Instill.MembershipClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.MembershipClient.g.cs
@@ -16,6 +16,7 @@ public sealed partial class MembershipClient : global::Instill.IMembershipClient
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -29,13 +30,16 @@ public sealed partial class MembershipClient : global::Instill.IMembershipClient
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public MembershipClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}
diff --git a/src/libs/Instill/Generated/Instill.MetricClient.ListCreditConsumptionChartRecords.g.cs b/src/libs/Instill/Generated/Instill.MetricClient.ListCreditConsumptionChartRecords.g.cs
index 0827e53..e3718b7 100644
--- a/src/libs/Instill/Generated/Instill.MetricClient.ListCreditConsumptionChartRecords.g.cs
+++ b/src/libs/Instill/Generated/Instill.MetricClient.ListCreditConsumptionChartRecords.g.cs
@@ -70,6 +70,13 @@ partial void ProcessListCreditConsumptionChartRecordsResponseContent(
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/Instill/Generated/Instill.MetricClient.ListPipelineTriggerChartRecords.g.cs b/src/libs/Instill/Generated/Instill.MetricClient.ListPipelineTriggerChartRecords.g.cs
index ea1d580..9860af2 100644
--- a/src/libs/Instill/Generated/Instill.MetricClient.ListPipelineTriggerChartRecords.g.cs
+++ b/src/libs/Instill/Generated/Instill.MetricClient.ListPipelineTriggerChartRecords.g.cs
@@ -57,6 +57,13 @@ partial void ProcessListPipelineTriggerChartRecordsResponseContent(
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/Instill/Generated/Instill.MetricClient.g.cs b/src/libs/Instill/Generated/Instill.MetricClient.g.cs
index 927bb3b..39c1d5b 100644
--- a/src/libs/Instill/Generated/Instill.MetricClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.MetricClient.g.cs
@@ -16,6 +16,7 @@ public sealed partial class MetricClient : global::Instill.IMetricClient, global
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -29,13 +30,16 @@ public sealed partial class MetricClient : global::Instill.IMetricClient, global
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public MetricClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}
diff --git a/src/libs/Instill/Generated/Instill.OrganizationClient.CreateOrganization.g.cs b/src/libs/Instill/Generated/Instill.OrganizationClient.CreateOrganization.g.cs
index 06b25ac..4edd437 100644
--- a/src/libs/Instill/Generated/Instill.OrganizationClient.CreateOrganization.g.cs
+++ b/src/libs/Instill/Generated/Instill.OrganizationClient.CreateOrganization.g.cs
@@ -47,6 +47,13 @@ partial void ProcessCreateOrganizationResponseContent(
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/Instill/Generated/Instill.OrganizationClient.DeleteOrganization.g.cs b/src/libs/Instill/Generated/Instill.OrganizationClient.DeleteOrganization.g.cs
index 6a41942..9df96e9 100644
--- a/src/libs/Instill/Generated/Instill.OrganizationClient.DeleteOrganization.g.cs
+++ b/src/libs/Instill/Generated/Instill.OrganizationClient.DeleteOrganization.g.cs
@@ -46,6 +46,13 @@ partial void ProcessDeleteOrganizationResponseContent(
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/Instill/Generated/Instill.OrganizationClient.GetOrganization.g.cs b/src/libs/Instill/Generated/Instill.OrganizationClient.GetOrganization.g.cs
index b9e772e..66d67f1 100644
--- a/src/libs/Instill/Generated/Instill.OrganizationClient.GetOrganization.g.cs
+++ b/src/libs/Instill/Generated/Instill.OrganizationClient.GetOrganization.g.cs
@@ -54,6 +54,13 @@ partial void ProcessGetOrganizationResponseContent(
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/Instill/Generated/Instill.OrganizationClient.ListOrganizations.g.cs b/src/libs/Instill/Generated/Instill.OrganizationClient.ListOrganizations.g.cs
index daf45a0..0f67dea 100644
--- a/src/libs/Instill/Generated/Instill.OrganizationClient.ListOrganizations.g.cs
+++ b/src/libs/Instill/Generated/Instill.OrganizationClient.ListOrganizations.g.cs
@@ -67,6 +67,13 @@ partial void ProcessListOrganizationsResponseContent(
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/Instill/Generated/Instill.OrganizationClient.UpdateOrganization.g.cs b/src/libs/Instill/Generated/Instill.OrganizationClient.UpdateOrganization.g.cs
index 44f2670..15e57d1 100644
--- a/src/libs/Instill/Generated/Instill.OrganizationClient.UpdateOrganization.g.cs
+++ b/src/libs/Instill/Generated/Instill.OrganizationClient.UpdateOrganization.g.cs
@@ -54,6 +54,13 @@ partial void ProcessUpdateOrganizationResponseContent(
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/Instill/Generated/Instill.OrganizationClient.g.cs b/src/libs/Instill/Generated/Instill.OrganizationClient.g.cs
index 562b28b..ca28eb2 100644
--- a/src/libs/Instill/Generated/Instill.OrganizationClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.OrganizationClient.g.cs
@@ -16,6 +16,7 @@ public sealed partial class OrganizationClient : global::Instill.IOrganizationCl
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -29,13 +30,16 @@ public sealed partial class OrganizationClient : global::Instill.IOrganizationCl
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public OrganizationClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}
diff --git a/src/libs/Instill/Generated/Instill.PathBuilder.g.cs b/src/libs/Instill/Generated/Instill.PathBuilder.g.cs
index 331b338..c2c5fa4 100644
--- a/src/libs/Instill/Generated/Instill.PathBuilder.g.cs
+++ b/src/libs/Instill/Generated/Instill.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/Instill/Generated/Instill.SubscriptionClient.GetAuthenticatedUserSubscription.g.cs b/src/libs/Instill/Generated/Instill.SubscriptionClient.GetAuthenticatedUserSubscription.g.cs
index 807d987..f760ca6 100644
--- a/src/libs/Instill/Generated/Instill.SubscriptionClient.GetAuthenticatedUserSubscription.g.cs
+++ b/src/libs/Instill/Generated/Instill.SubscriptionClient.GetAuthenticatedUserSubscription.g.cs
@@ -41,6 +41,13 @@ partial void ProcessGetAuthenticatedUserSubscriptionResponseContent(
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/Instill/Generated/Instill.SubscriptionClient.GetOrganizationSubscription.g.cs b/src/libs/Instill/Generated/Instill.SubscriptionClient.GetOrganizationSubscription.g.cs
index ebd7854..71a2123 100644
--- a/src/libs/Instill/Generated/Instill.SubscriptionClient.GetOrganizationSubscription.g.cs
+++ b/src/libs/Instill/Generated/Instill.SubscriptionClient.GetOrganizationSubscription.g.cs
@@ -46,6 +46,13 @@ partial void ProcessGetOrganizationSubscriptionResponseContent(
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/Instill/Generated/Instill.SubscriptionClient.g.cs b/src/libs/Instill/Generated/Instill.SubscriptionClient.g.cs
index 329e3b0..25e3602 100644
--- a/src/libs/Instill/Generated/Instill.SubscriptionClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.SubscriptionClient.g.cs
@@ -16,6 +16,7 @@ public sealed partial class SubscriptionClient : global::Instill.ISubscriptionCl
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -29,13 +30,16 @@ public sealed partial class SubscriptionClient : global::Instill.ISubscriptionCl
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public SubscriptionClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}
diff --git a/src/libs/Instill/Generated/Instill.TokenClient.CreateToken.g.cs b/src/libs/Instill/Generated/Instill.TokenClient.CreateToken.g.cs
index cd18c32..d43e3eb 100644
--- a/src/libs/Instill/Generated/Instill.TokenClient.CreateToken.g.cs
+++ b/src/libs/Instill/Generated/Instill.TokenClient.CreateToken.g.cs
@@ -47,6 +47,13 @@ partial void ProcessCreateTokenResponseContent(
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/Instill/Generated/Instill.TokenClient.DeleteToken.g.cs b/src/libs/Instill/Generated/Instill.TokenClient.DeleteToken.g.cs
index ec6e588..67dacda 100644
--- a/src/libs/Instill/Generated/Instill.TokenClient.DeleteToken.g.cs
+++ b/src/libs/Instill/Generated/Instill.TokenClient.DeleteToken.g.cs
@@ -46,6 +46,13 @@ partial void ProcessDeleteTokenResponseContent(
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/Instill/Generated/Instill.TokenClient.GetToken.g.cs b/src/libs/Instill/Generated/Instill.TokenClient.GetToken.g.cs
index ce63df6..8141023 100644
--- a/src/libs/Instill/Generated/Instill.TokenClient.GetToken.g.cs
+++ b/src/libs/Instill/Generated/Instill.TokenClient.GetToken.g.cs
@@ -46,6 +46,13 @@ partial void ProcessGetTokenResponseContent(
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/Instill/Generated/Instill.TokenClient.ListTokens.g.cs b/src/libs/Instill/Generated/Instill.TokenClient.ListTokens.g.cs
index 8eb4181..e0d07f0 100644
--- a/src/libs/Instill/Generated/Instill.TokenClient.ListTokens.g.cs
+++ b/src/libs/Instill/Generated/Instill.TokenClient.ListTokens.g.cs
@@ -55,6 +55,13 @@ partial void ProcessListTokensResponseContent(
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/Instill/Generated/Instill.TokenClient.ValidateToken.g.cs b/src/libs/Instill/Generated/Instill.TokenClient.ValidateToken.g.cs
index e0287f9..d7252cc 100644
--- a/src/libs/Instill/Generated/Instill.TokenClient.ValidateToken.g.cs
+++ b/src/libs/Instill/Generated/Instill.TokenClient.ValidateToken.g.cs
@@ -41,6 +41,13 @@ partial void ProcessValidateTokenResponseContent(
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/Instill/Generated/Instill.TokenClient.g.cs b/src/libs/Instill/Generated/Instill.TokenClient.g.cs
index bed25db..1140017 100644
--- a/src/libs/Instill/Generated/Instill.TokenClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.TokenClient.g.cs
@@ -16,6 +16,7 @@ public sealed partial class TokenClient : global::Instill.ITokenClient, global::
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -29,13 +30,16 @@ public sealed partial class TokenClient : global::Instill.ITokenClient, global::
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public TokenClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}
diff --git a/src/libs/Instill/Generated/Instill.UserClient.GetAuthenticatedUser.g.cs b/src/libs/Instill/Generated/Instill.UserClient.GetAuthenticatedUser.g.cs
index c76f6ce..3e7f2ee 100644
--- a/src/libs/Instill/Generated/Instill.UserClient.GetAuthenticatedUser.g.cs
+++ b/src/libs/Instill/Generated/Instill.UserClient.GetAuthenticatedUser.g.cs
@@ -41,6 +41,13 @@ partial void ProcessGetAuthenticatedUserResponseContent(
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/Instill/Generated/Instill.UserClient.GetUser.g.cs b/src/libs/Instill/Generated/Instill.UserClient.GetUser.g.cs
index 8bddce9..949a396 100644
--- a/src/libs/Instill/Generated/Instill.UserClient.GetUser.g.cs
+++ b/src/libs/Instill/Generated/Instill.UserClient.GetUser.g.cs
@@ -54,6 +54,13 @@ partial void ProcessGetUserResponseContent(
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/Instill/Generated/Instill.UserClient.ListUsers.g.cs b/src/libs/Instill/Generated/Instill.UserClient.ListUsers.g.cs
index c128e1b..caa3124 100644
--- a/src/libs/Instill/Generated/Instill.UserClient.ListUsers.g.cs
+++ b/src/libs/Instill/Generated/Instill.UserClient.ListUsers.g.cs
@@ -67,6 +67,13 @@ partial void ProcessListUsersResponseContent(
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/Instill/Generated/Instill.UserClient.PatchAuthenticatedUser.g.cs b/src/libs/Instill/Generated/Instill.UserClient.PatchAuthenticatedUser.g.cs
index 4c5618d..9fd8a3a 100644
--- a/src/libs/Instill/Generated/Instill.UserClient.PatchAuthenticatedUser.g.cs
+++ b/src/libs/Instill/Generated/Instill.UserClient.PatchAuthenticatedUser.g.cs
@@ -49,6 +49,13 @@ partial void ProcessPatchAuthenticatedUserResponseContent(
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/Instill/Generated/Instill.UserClient.g.cs b/src/libs/Instill/Generated/Instill.UserClient.g.cs
index 52e07a2..b7248ec 100644
--- a/src/libs/Instill/Generated/Instill.UserClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.UserClient.g.cs
@@ -16,6 +16,7 @@ public sealed partial class UserClient : global::Instill.IUserClient, global::Sy
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -29,13 +30,16 @@ public sealed partial class UserClient : global::Instill.IUserClient, global::Sy
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public UserClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}
diff --git a/src/libs/Instill/Generated/Instill.UtilsClient.CheckNamespace.g.cs b/src/libs/Instill/Generated/Instill.UtilsClient.CheckNamespace.g.cs
index f6e6d5c..c7e000b 100644
--- a/src/libs/Instill/Generated/Instill.UtilsClient.CheckNamespace.g.cs
+++ b/src/libs/Instill/Generated/Instill.UtilsClient.CheckNamespace.g.cs
@@ -48,6 +48,13 @@ partial void ProcessCheckNamespaceResponseContent(
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/Instill/Generated/Instill.UtilsClient.g.cs b/src/libs/Instill/Generated/Instill.UtilsClient.g.cs
index eaeb30b..ea622f5 100644
--- a/src/libs/Instill/Generated/Instill.UtilsClient.g.cs
+++ b/src/libs/Instill/Generated/Instill.UtilsClient.g.cs
@@ -16,6 +16,7 @@ public sealed partial class UtilsClient : global::Instill.IUtilsClient, global::
public const string BaseUrl = "https://api.instill.tech";
private readonly global::System.Net.Http.HttpClient _httpClient;
+ private global::Instill.EndPointAuthorization? _authorization;
///
///
@@ -29,13 +30,16 @@ public sealed partial class UtilsClient : global::Instill.IUtilsClient, global::
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
///
- ///
+ ///
+ ///
public UtilsClient(
global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null)
+ global::System.Uri? baseUri = null,
+ global::Instill.EndPointAuthorization? authorization = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
+ _authorization = authorization;
Initialized(_httpClient);
}