diff --git a/src/libs/Simli/Generated/Simli.ISimliClient.Authorizations.ApiKeyInHeader.g.cs b/src/libs/Simli/Generated/Simli.ISimliClient.Authorizations.ApiKeyInHeader.g.cs
index 8532c0c..7769e29 100644
--- a/src/libs/Simli/Generated/Simli.ISimliClient.Authorizations.ApiKeyInHeader.g.cs
+++ b/src/libs/Simli/Generated/Simli.ISimliClient.Authorizations.ApiKeyInHeader.g.cs
@@ -9,6 +9,7 @@ public partial interface ISimliClient
/// Authorize using ApiKey authentication.
///
///
+
public void AuthorizeUsingApiKeyInHeader(
string apiKey);
}
diff --git a/src/libs/Simli/Generated/Simli.PathBuilder.g.cs b/src/libs/Simli/Generated/Simli.PathBuilder.g.cs
index 4f32b4d..4aaf50f 100644
--- a/src/libs/Simli/Generated/Simli.PathBuilder.g.cs
+++ b/src/libs/Simli/Generated/Simli.PathBuilder.g.cs
@@ -224,6 +224,40 @@ public PathBuilder AddOptionalParameter(
return this;
}
+ ///
+ /// Adds a pre-serialized query string fragment to the URL.
+ ///
+ /// The serialized query string value.
+ /// The current instance.
+ public PathBuilder AddRawQueryString(
+ string value)
+ {
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ return this;
+ }
+
+ value = value.TrimStart('?', '&');
+ if (value.Length == 0)
+ {
+ return this;
+ }
+
+ if (_firstParameter)
+ {
+ _stringBuilder.Append('?');
+ _firstParameter = false;
+ }
+ else
+ {
+ _stringBuilder.Append('&');
+ }
+
+ _stringBuilder.Append(value);
+
+ return this;
+ }
+
///
/// Returns the constructed URL as a string.
///
diff --git a/src/libs/Simli/Generated/Simli.Realtime.PathBuilder.g.cs b/src/libs/Simli/Generated/Simli.Realtime.PathBuilder.g.cs
index 162352f..a00b3f7 100644
--- a/src/libs/Simli/Generated/Simli.Realtime.PathBuilder.g.cs
+++ b/src/libs/Simli/Generated/Simli.Realtime.PathBuilder.g.cs
@@ -224,6 +224,40 @@ public PathBuilder AddOptionalParameter(
return this;
}
+ ///
+ /// Adds a pre-serialized query string fragment to the URL.
+ ///
+ /// The serialized query string value.
+ /// The current instance.
+ public PathBuilder AddRawQueryString(
+ string value)
+ {
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ return this;
+ }
+
+ value = value.TrimStart('?', '&');
+ if (value.Length == 0)
+ {
+ return this;
+ }
+
+ if (_firstParameter)
+ {
+ _stringBuilder.Append('?');
+ _firstParameter = false;
+ }
+ else
+ {
+ _stringBuilder.Append('&');
+ }
+
+ _stringBuilder.Append(value);
+
+ return this;
+ }
+
///
/// Returns the constructed URL as a string.
///
diff --git a/src/libs/Simli/Generated/Simli.Security.g.cs b/src/libs/Simli/Generated/Simli.Security.g.cs
new file mode 100644
index 0000000..2e83e33
--- /dev/null
+++ b/src/libs/Simli/Generated/Simli.Security.g.cs
@@ -0,0 +1,145 @@
+#nullable enable
+
+namespace Simli
+{
+ internal sealed class EndPointAuthorizationRequirement
+ {
+ internal string Type { get; set; } = string.Empty;
+
+ internal string Location { get; set; } = string.Empty;
+
+ internal string Name { get; set; } = string.Empty;
+
+ internal string FriendlyName { get; set; } = string.Empty;
+ }
+
+ internal sealed class EndPointSecurityRequirement
+ {
+ internal global::System.Collections.Generic.IReadOnlyList Authorizations { get; set; } =
+ global::System.Array.Empty();
+ }
+
+ internal static class EndPointSecurityResolver
+ {
+ internal static global::System.Collections.Generic.List ResolveAuthorizations(
+ global::System.Collections.Generic.IReadOnlyList availableAuthorizations,
+ global::System.Collections.Generic.IReadOnlyList securityRequirements,
+ string operationName)
+ {
+ availableAuthorizations = availableAuthorizations ?? throw new global::System.ArgumentNullException(nameof(availableAuthorizations));
+ securityRequirements = securityRequirements ?? throw new global::System.ArgumentNullException(nameof(securityRequirements));
+ operationName = operationName ?? throw new global::System.ArgumentNullException(nameof(operationName));
+
+ if (securityRequirements.Count == 0)
+ {
+ return new global::System.Collections.Generic.List();
+ }
+
+ var allowsAnonymous = false;
+
+ foreach (var requirement in securityRequirements)
+ {
+ if (requirement.Authorizations.Count == 0)
+ {
+ allowsAnonymous = true;
+ continue;
+ }
+
+ var selected = new global::System.Collections.Generic.List(requirement.Authorizations.Count);
+ var satisfied = true;
+
+ foreach (var requiredAuthorization in requirement.Authorizations)
+ {
+ var found = false;
+
+ for (var i = 0; i < availableAuthorizations.Count; i++)
+ {
+ if (!Matches(availableAuthorizations[i], requiredAuthorization))
+ {
+ continue;
+ }
+
+ selected.Add(availableAuthorizations[i]);
+ found = true;
+ break;
+ }
+
+ if (!found)
+ {
+ satisfied = false;
+ break;
+ }
+ }
+
+ if (satisfied)
+ {
+ return selected;
+ }
+ }
+
+ if (allowsAnonymous)
+ {
+ return new global::System.Collections.Generic.List();
+ }
+
+ throw new global::System.InvalidOperationException(
+ $"Operation '{operationName}' requires one of the configured security alternatives: {DescribeRequirements(securityRequirements)}.");
+ }
+
+ private static bool Matches(
+ EndPointAuthorization availableAuthorization,
+ EndPointAuthorizationRequirement requiredAuthorization)
+ {
+ if (!string.Equals(availableAuthorization.Type, requiredAuthorization.Type, global::System.StringComparison.Ordinal))
+ {
+ return false;
+ }
+
+ return requiredAuthorization.Type switch
+ {
+ "OAuth2" => true,
+ "Http" => string.Equals(
+ availableAuthorization.Name,
+ requiredAuthorization.Name,
+ global::System.StringComparison.Ordinal),
+ "ApiKey" => string.Equals(
+ availableAuthorization.Location,
+ requiredAuthorization.Location,
+ global::System.StringComparison.Ordinal) &&
+ string.Equals(
+ availableAuthorization.Name,
+ requiredAuthorization.Name,
+ global::System.StringComparison.Ordinal),
+ _ => string.Equals(
+ availableAuthorization.Location,
+ requiredAuthorization.Location,
+ global::System.StringComparison.Ordinal) &&
+ string.Equals(
+ availableAuthorization.Name,
+ requiredAuthorization.Name,
+ global::System.StringComparison.Ordinal),
+ };
+ }
+
+ private static string DescribeRequirements(
+ global::System.Collections.Generic.IReadOnlyList securityRequirements)
+ {
+ var parts = new global::System.Collections.Generic.List(securityRequirements.Count);
+
+ foreach (var requirement in securityRequirements)
+ {
+ if (requirement.Authorizations.Count == 0)
+ {
+ parts.Add("anonymous");
+ continue;
+ }
+
+ parts.Add(string.Join(
+ " + ",
+ global::System.Linq.Enumerable.Select(requirement.Authorizations, static x => x.FriendlyName)));
+ }
+
+ return string.Join(" or ", parts);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs
index 7cad017..97154cf 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.AudioToVideoInterfaceStaticAudioPost.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_AudioToVideoInterfaceStaticAudioPostSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_AudioToVideoInterfaceStaticAudioPostSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_AudioToVideoInterfaceStaticAudioPostSecurityRequirement0,
+ };
partial void PrepareAudioToVideoInterfaceStaticAudioPostArguments(
global::System.Net.Http.HttpClient httpClient,
global::Simli.AudioToVideoRequest request);
@@ -41,9 +60,15 @@ partial void ProcessAudioToVideoInterfaceStaticAudioPostResponseContent(
httpClient: HttpClient,
request: request);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_AudioToVideoInterfaceStaticAudioPostSecurityRequirements,
+ operationName: "AudioToVideoInterfaceStaticAudioPostAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: "/static/audio",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
@@ -53,7 +78,7 @@ partial void ProcessAudioToVideoInterfaceStaticAudioPostResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.Authorizations.ApiKeyInHeader.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.Authorizations.ApiKeyInHeader.g.cs
index 1cb0704..d50b76b 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.Authorizations.ApiKeyInHeader.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.Authorizations.ApiKeyInHeader.g.cs
@@ -5,13 +5,24 @@ namespace Simli
{
public sealed partial class SimliClient
{
+
///
public void AuthorizeUsingApiKeyInHeader(
string apiKey)
{
apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey));
- Authorizations.Clear();
+ for (var i = Authorizations.Count - 1; i >= 0; i--)
+ {
+ var __authorization = Authorizations[i];
+ if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header" &&
+ __authorization.Name == "x-simli-api-key")
+ {
+ Authorizations.RemoveAt(i);
+ }
+ }
+
Authorizations.Add(new global::Simli.EndPointAuthorization
{
Type = "ApiKey",
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.Constructors.ApiKeyInHeader.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.Constructors.ApiKeyInHeader.g.cs
index de36a0d..49914c3 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.Constructors.ApiKeyInHeader.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.Constructors.ApiKeyInHeader.g.cs
@@ -6,6 +6,7 @@ namespace Simli
public sealed partial class SimliClient
{
///
+
public SimliClient(
string apiKey,
global::System.Net.Http.HttpClient? httpClient = null,
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.DeleteFacesTrinityById.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.DeleteFacesTrinityById.g.cs
index 183b12c..fa9c661 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.DeleteFacesTrinityById.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.DeleteFacesTrinityById.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_DeleteFacesTrinityByIdSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_DeleteFacesTrinityByIdSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_DeleteFacesTrinityByIdSecurityRequirement0,
+ };
partial void PrepareDeleteFacesTrinityByIdArguments(
global::System.Net.Http.HttpClient httpClient,
ref global::System.Guid id);
@@ -33,9 +52,15 @@ partial void ProcessDeleteFacesTrinityByIdResponse(
httpClient: HttpClient,
id: ref id);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_DeleteFacesTrinityByIdSecurityRequirements,
+ operationName: "DeleteFacesTrinityByIdAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: $"/faces/trinity/{id}",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Delete,
@@ -45,7 +70,7 @@ partial void ProcessDeleteFacesTrinityByIdResponse(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs
index 9d0c066..b0ddba7 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.EnqueueGSAGenerationFacesGsCreatePost.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_EnqueueGSAGenerationFacesGsCreatePostSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_EnqueueGSAGenerationFacesGsCreatePostSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_EnqueueGSAGenerationFacesGsCreatePostSecurityRequirement0,
+ };
partial void PrepareEnqueueGSAGenerationFacesGsCreatePostArguments(
global::System.Net.Http.HttpClient httpClient,
ref global::Simli.TrinityVersion? gsVersion,
@@ -54,13 +73,19 @@ partial void ProcessEnqueueGSAGenerationFacesGsCreatePostResponseContent(
faceName: ref faceName,
request: request);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_EnqueueGSAGenerationFacesGsCreatePostSecurityRequirements,
+ operationName: "EnqueueGSAGenerationFacesGsCreatePostAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: "/faces/trinity",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("gsVersion", gsVersion?.ToString())
.AddOptionalParameter("face_name", faceName)
- ;
+ ;
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
@@ -70,7 +95,7 @@ partial void ProcessEnqueueGSAGenerationFacesGsCreatePostResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.GetCachedVideoMp4StaticMp4MachineIPFileGet.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.GetCachedVideoMp4StaticMp4MachineIPFileGet.g.cs
index c4f7d2a..4f90e3f 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.GetCachedVideoMp4StaticMp4MachineIPFileGet.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.GetCachedVideoMp4StaticMp4MachineIPFileGet.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_GetCachedVideoMp4StaticMp4MachineIPFileGetSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_GetCachedVideoMp4StaticMp4MachineIPFileGetSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_GetCachedVideoMp4StaticMp4MachineIPFileGetSecurityRequirement0,
+ };
partial void PrepareGetCachedVideoMp4StaticMp4MachineIPFileGetArguments(
global::System.Net.Http.HttpClient httpClient,
ref string destination,
@@ -42,9 +61,15 @@ partial void ProcessGetCachedVideoMp4StaticMp4MachineIPFileGetResponseContent(
destination: ref destination,
file: ref file);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetCachedVideoMp4StaticMp4MachineIPFileGetSecurityRequirements,
+ operationName: "GetCachedVideoMp4StaticMp4MachineIPFileGetAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: $"/static/mp4/{destination}/{file}",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
@@ -54,7 +79,7 @@ partial void ProcessGetCachedVideoMp4StaticMp4MachineIPFileGetResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.GetCachedVideoStaticHlsMachineIPFileGet.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.GetCachedVideoStaticHlsMachineIPFileGet.g.cs
index a7a4456..d42632d 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.GetCachedVideoStaticHlsMachineIPFileGet.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.GetCachedVideoStaticHlsMachineIPFileGet.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_GetCachedVideoStaticHlsMachineIPFileGetSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_GetCachedVideoStaticHlsMachineIPFileGetSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_GetCachedVideoStaticHlsMachineIPFileGetSecurityRequirement0,
+ };
partial void PrepareGetCachedVideoStaticHlsMachineIPFileGetArguments(
global::System.Net.Http.HttpClient httpClient,
ref string destination,
@@ -43,9 +62,15 @@ partial void ProcessGetCachedVideoStaticHlsMachineIPFileGetResponseContent(
destination: ref destination,
file: ref file);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetCachedVideoStaticHlsMachineIPFileGetSecurityRequirements,
+ operationName: "GetCachedVideoStaticHlsMachineIPFileGetAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: $"/static/hls/{destination}/{file}",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
@@ -55,7 +80,7 @@ partial void ProcessGetCachedVideoStaticHlsMachineIPFileGetResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.GetFaces.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.GetFaces.g.cs
index 1467f50..ded157d 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.GetFaces.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.GetFaces.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_GetFacesSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_GetFacesSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_GetFacesSecurityRequirement0,
+ };
partial void PrepareGetFacesArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareGetFacesRequest(
@@ -32,9 +51,15 @@ partial void ProcessGetFacesResponseContent(
PrepareGetFacesArguments(
httpClient: HttpClient);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetFacesSecurityRequirements,
+ operationName: "GetFacesAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: "/faces",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
@@ -44,7 +69,7 @@ partial void ProcessGetFacesResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.GetHistorySessions.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.GetHistorySessions.g.cs
index 07851f0..ed6b99d 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.GetHistorySessions.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.GetHistorySessions.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_GetHistorySessionsSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_GetHistorySessionsSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_GetHistorySessionsSecurityRequirement0,
+ };
partial void PrepareGetHistorySessionsArguments(
global::System.Net.Http.HttpClient httpClient,
ref int? start,
@@ -47,13 +66,19 @@ partial void ProcessGetHistorySessionsResponseContent(
start: ref start,
end: ref end);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetHistorySessionsSecurityRequirements,
+ operationName: "GetHistorySessionsAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: "/history/sessions",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("start", start?.ToString())
.AddOptionalParameter("end", end?.ToString())
- ;
+ ;
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
@@ -63,7 +88,7 @@ partial void ProcessGetHistorySessionsResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.GetIceServersComposeIceGet.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.GetIceServersComposeIceGet.g.cs
index bd11797..8e21aa2 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.GetIceServersComposeIceGet.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.GetIceServersComposeIceGet.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_GetIceServersComposeIceGetSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_GetIceServersComposeIceGetSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_GetIceServersComposeIceGetSecurityRequirement0,
+ };
partial void PrepareGetIceServersComposeIceGetArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareGetIceServersComposeIceGetRequest(
@@ -33,9 +52,15 @@ partial void ProcessGetIceServersComposeIceGetResponseContent(
PrepareGetIceServersComposeIceGetArguments(
httpClient: HttpClient);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetIceServersComposeIceGetSecurityRequirements,
+ operationName: "GetIceServersComposeIceGetAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: "/compose/ice",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
@@ -45,7 +70,7 @@ partial void ProcessGetIceServersComposeIceGetResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.GetRatelimiterSessions.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.GetRatelimiterSessions.g.cs
index 4b87aa1..0c0c3bf 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.GetRatelimiterSessions.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.GetRatelimiterSessions.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_GetRatelimiterSessionsSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_GetRatelimiterSessionsSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_GetRatelimiterSessionsSecurityRequirement0,
+ };
partial void PrepareGetRatelimiterSessionsArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareGetRatelimiterSessionsRequest(
@@ -32,9 +51,15 @@ partial void ProcessGetRatelimiterSessionsResponseContent(
PrepareGetRatelimiterSessionsArguments(
httpClient: HttpClient);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetRatelimiterSessionsSecurityRequirements,
+ operationName: "GetRatelimiterSessionsAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: "/ratelimiter/sessions",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
@@ -44,7 +69,7 @@ partial void ProcessGetRatelimiterSessionsResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.GetRequestStatusFacesGsStatusGet.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.GetRequestStatusFacesGsStatusGet.g.cs
index 046eca9..019d9a1 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.GetRequestStatusFacesGsStatusGet.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.GetRequestStatusFacesGsStatusGet.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_GetRequestStatusFacesGsStatusGetSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_GetRequestStatusFacesGsStatusGetSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_GetRequestStatusFacesGsStatusGetSecurityRequirement0,
+ };
partial void PrepareGetRequestStatusFacesGsStatusGetArguments(
global::System.Net.Http.HttpClient httpClient,
ref string? faceId);
@@ -37,12 +56,18 @@ partial void ProcessGetRequestStatusFacesGsStatusGetResponseContent(
httpClient: HttpClient,
faceId: ref faceId);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetRequestStatusFacesGsStatusGetSecurityRequirements,
+ operationName: "GetRequestStatusFacesGsStatusGetAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: "/faces/trinity/generation_status",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("face_id", faceId)
- ;
+ ;
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
@@ -52,7 +77,7 @@ partial void ProcessGetRequestStatusFacesGsStatusGetResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.InitIntegrationsLivekitAgentsPost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.InitIntegrationsLivekitAgentsPost.g.cs
index 03f00e8..872344a 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.InitIntegrationsLivekitAgentsPost.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.InitIntegrationsLivekitAgentsPost.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_InitIntegrationsLivekitAgentsPostSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_InitIntegrationsLivekitAgentsPostSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_InitIntegrationsLivekitAgentsPostSecurityRequirement0,
+ };
partial void PrepareInitIntegrationsLivekitAgentsPostArguments(
global::System.Net.Http.HttpClient httpClient,
global::Simli.LiveKitInitializationRequest request);
@@ -40,9 +59,15 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent(
httpClient: HttpClient,
request: request);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_InitIntegrationsLivekitAgentsPostSecurityRequirements,
+ operationName: "InitIntegrationsLivekitAgentsPostAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: "/integrations/livekit/agents",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
@@ -52,7 +77,7 @@ partial void ProcessInitIntegrationsLivekitAgentsPostResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
diff --git a/src/libs/Simli/Generated/Simli.SimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs b/src/libs/Simli/Generated/Simli.SimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs
index d7e1cf9..3816d56 100644
--- a/src/libs/Simli/Generated/Simli.SimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs
+++ b/src/libs/Simli/Generated/Simli.SimliClient.StartAudioToVideoSessionComposeTokenPost.g.cs
@@ -5,6 +5,25 @@ namespace Simli
{
public partial class SimliClient
{
+
+
+ private static readonly global::Simli.EndPointSecurityRequirement s_StartAudioToVideoSessionComposeTokenPostSecurityRequirement0 =
+ new global::Simli.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Simli.EndPointAuthorizationRequirement[]
+ { new global::Simli.EndPointAuthorizationRequirement
+ {
+ Type = "ApiKey",
+ Location = "Header",
+ Name = "x-simli-api-key",
+ FriendlyName = "ApiKeyInHeader",
+ },
+ },
+ };
+ private static readonly global::Simli.EndPointSecurityRequirement[] s_StartAudioToVideoSessionComposeTokenPostSecurityRequirements =
+ new global::Simli.EndPointSecurityRequirement[]
+ { s_StartAudioToVideoSessionComposeTokenPostSecurityRequirement0,
+ };
partial void PrepareStartAudioToVideoSessionComposeTokenPostArguments(
global::System.Net.Http.HttpClient httpClient,
global::Simli.StartStreamingSessionRequest request);
@@ -41,9 +60,15 @@ partial void ProcessStartAudioToVideoSessionComposeTokenPostResponseContent(
httpClient: HttpClient,
request: request);
+
+ var __authorizations = global::Simli.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_StartAudioToVideoSessionComposeTokenPostSecurityRequirements,
+ operationName: "StartAudioToVideoSessionComposeTokenPostAsync");
+
var __pathBuilder = new global::Simli.PathBuilder(
path: "/compose/token",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
@@ -53,7 +78,7 @@ partial void ProcessStartAudioToVideoSessionComposeTokenPostResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif
- foreach (var __authorization in Authorizations)
+ foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")