diff --git a/src/libs/Anam/Generated/Anam.AnamClient.Authorizations.Bearer.g.cs b/src/libs/Anam/Generated/Anam.AnamClient.Authorizations.Bearer.g.cs index dc32652..12d3a87 100644 --- a/src/libs/Anam/Generated/Anam.AnamClient.Authorizations.Bearer.g.cs +++ b/src/libs/Anam/Generated/Anam.AnamClient.Authorizations.Bearer.g.cs @@ -5,13 +5,23 @@ namespace Anam { public sealed partial class AnamClient { + /// public void AuthorizeUsingBearer( 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 == "Http" && + __authorization.Name == "Bearer") + { + Authorizations.RemoveAt(i); + } + } + Authorizations.Add(new global::Anam.EndPointAuthorization { Type = "Http", diff --git a/src/libs/Anam/Generated/Anam.AnamClient.Constructors.Bearer.g.cs b/src/libs/Anam/Generated/Anam.AnamClient.Constructors.Bearer.g.cs index 69f830c..f3a1310 100644 --- a/src/libs/Anam/Generated/Anam.AnamClient.Constructors.Bearer.g.cs +++ b/src/libs/Anam/Generated/Anam.AnamClient.Constructors.Bearer.g.cs @@ -6,6 +6,7 @@ namespace Anam public sealed partial class AnamClient { /// + public AnamClient( string apiKey, global::System.Net.Http.HttpClient? httpClient = null, diff --git a/src/libs/Anam/Generated/Anam.AnamClient.g.cs b/src/libs/Anam/Generated/Anam.AnamClient.g.cs index 0a46644..20962d3 100644 --- a/src/libs/Anam/Generated/Anam.AnamClient.g.cs +++ b/src/libs/Anam/Generated/Anam.AnamClient.g.cs @@ -13,7 +13,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true; diff --git a/src/libs/Anam/Generated/Anam.AuthClient.CreateSessionToken.g.cs b/src/libs/Anam/Generated/Anam.AuthClient.CreateSessionToken.g.cs index 0ec5f7d..f0a6f9d 100644 --- a/src/libs/Anam/Generated/Anam.AuthClient.CreateSessionToken.g.cs +++ b/src/libs/Anam/Generated/Anam.AuthClient.CreateSessionToken.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class AuthClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_CreateSessionTokenSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_CreateSessionTokenSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_CreateSessionTokenSecurityRequirement0, + }; partial void PrepareCreateSessionTokenArguments( global::System.Net.Http.HttpClient httpClient, global::Anam.CreateSessionTokenRequest request); @@ -41,9 +60,15 @@ partial void ProcessCreateSessionTokenResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateSessionTokenSecurityRequirements, + operationName: "CreateSessionTokenAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/auth/session-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 ProcessCreateSessionTokenResponseContent( __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/Anam/Generated/Anam.AuthClient.g.cs b/src/libs/Anam/Generated/Anam.AuthClient.g.cs index 37b9c42..83254f5 100644 --- a/src/libs/Anam/Generated/Anam.AuthClient.g.cs +++ b/src/libs/Anam/Generated/Anam.AuthClient.g.cs @@ -12,7 +12,7 @@ public sealed partial class AuthClient : global::Anam.IAuthClient, global::Syste /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true; diff --git a/src/libs/Anam/Generated/Anam.AvatarsClient.CreateAvatar.g.cs b/src/libs/Anam/Generated/Anam.AvatarsClient.CreateAvatar.g.cs index f63aa9f..b46f388 100644 --- a/src/libs/Anam/Generated/Anam.AvatarsClient.CreateAvatar.g.cs +++ b/src/libs/Anam/Generated/Anam.AvatarsClient.CreateAvatar.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class AvatarsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_CreateAvatarSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_CreateAvatarSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_CreateAvatarSecurityRequirement0, + }; partial void PrepareCreateAvatarArguments( global::System.Net.Http.HttpClient httpClient, global::Anam.CreateAvatarRequest request); @@ -41,9 +60,15 @@ partial void ProcessCreateAvatarResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateAvatarSecurityRequirements, + operationName: "CreateAvatarAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/avatars", - 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 ProcessCreateAvatarResponseContent( __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/Anam/Generated/Anam.AvatarsClient.DeleteAvatar.g.cs b/src/libs/Anam/Generated/Anam.AvatarsClient.DeleteAvatar.g.cs index defaab6..481f3d2 100644 --- a/src/libs/Anam/Generated/Anam.AvatarsClient.DeleteAvatar.g.cs +++ b/src/libs/Anam/Generated/Anam.AvatarsClient.DeleteAvatar.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class AvatarsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_DeleteAvatarSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_DeleteAvatarSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_DeleteAvatarSecurityRequirement0, + }; partial void PrepareDeleteAvatarArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -33,9 +52,15 @@ partial void ProcessDeleteAvatarResponse( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteAvatarSecurityRequirements, + operationName: "DeleteAvatarAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/avatars/{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 ProcessDeleteAvatarResponse( __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/Anam/Generated/Anam.AvatarsClient.GetAvatar.g.cs b/src/libs/Anam/Generated/Anam.AvatarsClient.GetAvatar.g.cs index f8da6c5..9692df5 100644 --- a/src/libs/Anam/Generated/Anam.AvatarsClient.GetAvatar.g.cs +++ b/src/libs/Anam/Generated/Anam.AvatarsClient.GetAvatar.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class AvatarsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetAvatarSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetAvatarSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetAvatarSecurityRequirement0, + }; partial void PrepareGetAvatarArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -38,9 +57,15 @@ partial void ProcessGetAvatarResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetAvatarSecurityRequirements, + operationName: "GetAvatarAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/avatars/{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.Get, @@ -50,7 +75,7 @@ partial void ProcessGetAvatarResponseContent( __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/Anam/Generated/Anam.AvatarsClient.ListAvatars.g.cs b/src/libs/Anam/Generated/Anam.AvatarsClient.ListAvatars.g.cs index 2287bde..e52d638 100644 --- a/src/libs/Anam/Generated/Anam.AvatarsClient.ListAvatars.g.cs +++ b/src/libs/Anam/Generated/Anam.AvatarsClient.ListAvatars.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class AvatarsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_ListAvatarsSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_ListAvatarsSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_ListAvatarsSecurityRequirement0, + }; partial void PrepareListAvatarsArguments( global::System.Net.Http.HttpClient httpClient, ref int? page, @@ -59,6 +78,12 @@ partial void ProcessListAvatarsResponseContent( search: ref search, onlyOneShot: ref onlyOneShot); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListAvatarsSecurityRequirements, + operationName: "ListAvatarsAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/avatars", baseUri: HttpClient.BaseAddress); @@ -67,7 +92,7 @@ partial void ProcessListAvatarsResponseContent( .AddOptionalParameter("perPage", perPage?.ToString()) .AddOptionalParameter("search", search) .AddOptionalParameter("onlyOneShot", onlyOneShot?.ToString().ToLowerInvariant()) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -77,7 +102,7 @@ partial void ProcessListAvatarsResponseContent( __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/Anam/Generated/Anam.AvatarsClient.UpdateAvatar.g.cs b/src/libs/Anam/Generated/Anam.AvatarsClient.UpdateAvatar.g.cs index 319c947..83f6e9b 100644 --- a/src/libs/Anam/Generated/Anam.AvatarsClient.UpdateAvatar.g.cs +++ b/src/libs/Anam/Generated/Anam.AvatarsClient.UpdateAvatar.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class AvatarsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_UpdateAvatarSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_UpdateAvatarSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_UpdateAvatarSecurityRequirement0, + }; partial void PrepareUpdateAvatarArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id, @@ -46,9 +65,15 @@ partial void ProcessUpdateAvatarResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateAvatarSecurityRequirements, + operationName: "UpdateAvatarAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/avatars/{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.Put, @@ -58,7 +83,7 @@ partial void ProcessUpdateAvatarResponseContent( __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/Anam/Generated/Anam.AvatarsClient.g.cs b/src/libs/Anam/Generated/Anam.AvatarsClient.g.cs index 298033e..a1a7b9b 100644 --- a/src/libs/Anam/Generated/Anam.AvatarsClient.g.cs +++ b/src/libs/Anam/Generated/Anam.AvatarsClient.g.cs @@ -12,7 +12,7 @@ public sealed partial class AvatarsClient : global::Anam.IAvatarsClient, global: /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true; diff --git a/src/libs/Anam/Generated/Anam.IAnamClient.Authorizations.Bearer.g.cs b/src/libs/Anam/Generated/Anam.IAnamClient.Authorizations.Bearer.g.cs index 4db54fe..84efa85 100644 --- a/src/libs/Anam/Generated/Anam.IAnamClient.Authorizations.Bearer.g.cs +++ b/src/libs/Anam/Generated/Anam.IAnamClient.Authorizations.Bearer.g.cs @@ -9,6 +9,7 @@ public partial interface IAnamClient /// Authorize using bearer authentication. /// /// + public void AuthorizeUsingBearer( string apiKey); } diff --git a/src/libs/Anam/Generated/Anam.KnowledgeClient.CreateKnowledgeGroup.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.CreateKnowledgeGroup.g.cs index 67e69de..2aab3d7 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.CreateKnowledgeGroup.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.CreateKnowledgeGroup.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_CreateKnowledgeGroupSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_CreateKnowledgeGroupSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_CreateKnowledgeGroupSecurityRequirement0, + }; partial void PrepareCreateKnowledgeGroupArguments( global::System.Net.Http.HttpClient httpClient, global::Anam.CreateKnowledgeGroupRequest request); @@ -41,9 +60,15 @@ partial void ProcessCreateKnowledgeGroupResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateKnowledgeGroupSecurityRequirements, + operationName: "CreateKnowledgeGroupAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/knowledge/groups", - 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 ProcessCreateKnowledgeGroupResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.DeleteKnowledgeDocument.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.DeleteKnowledgeDocument.g.cs index 7b00e9a..7ccdcd2 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.DeleteKnowledgeDocument.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.DeleteKnowledgeDocument.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_DeleteKnowledgeDocumentSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_DeleteKnowledgeDocumentSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_DeleteKnowledgeDocumentSecurityRequirement0, + }; partial void PrepareDeleteKnowledgeDocumentArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -33,9 +52,15 @@ partial void ProcessDeleteKnowledgeDocumentResponse( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteKnowledgeDocumentSecurityRequirements, + operationName: "DeleteKnowledgeDocumentAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/documents/{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 ProcessDeleteKnowledgeDocumentResponse( __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/Anam/Generated/Anam.KnowledgeClient.DeleteKnowledgeGroup.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.DeleteKnowledgeGroup.g.cs index e7f52f9..9721a3f 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.DeleteKnowledgeGroup.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.DeleteKnowledgeGroup.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_DeleteKnowledgeGroupSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_DeleteKnowledgeGroupSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_DeleteKnowledgeGroupSecurityRequirement0, + }; partial void PrepareDeleteKnowledgeGroupArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -33,9 +52,15 @@ partial void ProcessDeleteKnowledgeGroupResponse( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteKnowledgeGroupSecurityRequirements, + operationName: "DeleteKnowledgeGroupAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/groups/{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 ProcessDeleteKnowledgeGroupResponse( __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/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeDocument.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeDocument.g.cs index a0d118e..c442cfb 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeDocument.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeDocument.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetKnowledgeDocumentSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetKnowledgeDocumentSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetKnowledgeDocumentSecurityRequirement0, + }; partial void PrepareGetKnowledgeDocumentArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -38,9 +57,15 @@ partial void ProcessGetKnowledgeDocumentResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetKnowledgeDocumentSecurityRequirements, + operationName: "GetKnowledgeDocumentAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/documents/{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.Get, @@ -50,7 +75,7 @@ partial void ProcessGetKnowledgeDocumentResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeDocumentDownload.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeDocumentDownload.g.cs index 20db31b..11a9df0 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeDocumentDownload.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeDocumentDownload.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetKnowledgeDocumentDownloadSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetKnowledgeDocumentDownloadSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetKnowledgeDocumentDownloadSecurityRequirement0, + }; partial void PrepareGetKnowledgeDocumentDownloadArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -38,9 +57,15 @@ partial void ProcessGetKnowledgeDocumentDownloadResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetKnowledgeDocumentDownloadSecurityRequirements, + operationName: "GetKnowledgeDocumentDownloadAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/documents/{id}/download", - 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, @@ -50,7 +75,7 @@ partial void ProcessGetKnowledgeDocumentDownloadResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeGroup.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeGroup.g.cs index 92a4b34..3c12c5a 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeGroup.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.GetKnowledgeGroup.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetKnowledgeGroupSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetKnowledgeGroupSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetKnowledgeGroupSecurityRequirement0, + }; partial void PrepareGetKnowledgeGroupArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -38,9 +57,15 @@ partial void ProcessGetKnowledgeGroupResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetKnowledgeGroupSecurityRequirements, + operationName: "GetKnowledgeGroupAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/groups/{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.Get, @@ -50,7 +75,7 @@ partial void ProcessGetKnowledgeGroupResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.ListKnowledgeGroupDocuments.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.ListKnowledgeGroupDocuments.g.cs index ba28058..bac34db 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.ListKnowledgeGroupDocuments.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.ListKnowledgeGroupDocuments.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_ListKnowledgeGroupDocumentsSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_ListKnowledgeGroupDocumentsSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_ListKnowledgeGroupDocumentsSecurityRequirement0, + }; partial void PrepareListKnowledgeGroupDocumentsArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -38,9 +57,15 @@ partial void ProcessListKnowledgeGroupDocumentsResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListKnowledgeGroupDocumentsSecurityRequirements, + operationName: "ListKnowledgeGroupDocumentsAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/groups/{id}/documents", - 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, @@ -50,7 +75,7 @@ partial void ProcessListKnowledgeGroupDocumentsResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.ListKnowledgeGroups.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.ListKnowledgeGroups.g.cs index 458500b..8864dca 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.ListKnowledgeGroups.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.ListKnowledgeGroups.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_ListKnowledgeGroupsSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_ListKnowledgeGroupsSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_ListKnowledgeGroupsSecurityRequirement0, + }; partial void PrepareListKnowledgeGroupsArguments( global::System.Net.Http.HttpClient httpClient); partial void PrepareListKnowledgeGroupsRequest( @@ -33,9 +52,15 @@ partial void ProcessListKnowledgeGroupsResponseContent( PrepareListKnowledgeGroupsArguments( httpClient: HttpClient); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListKnowledgeGroupsSecurityRequirements, + operationName: "ListKnowledgeGroupsAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/knowledge/groups", - 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 ProcessListKnowledgeGroupsResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.SearchKnowledgeGroup.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.SearchKnowledgeGroup.g.cs index e3742fd..89aa461 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.SearchKnowledgeGroup.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.SearchKnowledgeGroup.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_SearchKnowledgeGroupSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_SearchKnowledgeGroupSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_SearchKnowledgeGroupSecurityRequirement0, + }; partial void PrepareSearchKnowledgeGroupArguments( global::System.Net.Http.HttpClient httpClient, ref string id, @@ -46,9 +65,15 @@ partial void ProcessSearchKnowledgeGroupResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_SearchKnowledgeGroupSecurityRequirements, + operationName: "SearchKnowledgeGroupAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/groups/{id}/search", - 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, @@ -58,7 +83,7 @@ partial void ProcessSearchKnowledgeGroupResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.UpdateKnowledgeDocument.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.UpdateKnowledgeDocument.g.cs index c0ad378..e4d6eac 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.UpdateKnowledgeDocument.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.UpdateKnowledgeDocument.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_UpdateKnowledgeDocumentSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_UpdateKnowledgeDocumentSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_UpdateKnowledgeDocumentSecurityRequirement0, + }; partial void PrepareUpdateKnowledgeDocumentArguments( global::System.Net.Http.HttpClient httpClient, ref string id, @@ -46,9 +65,15 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateKnowledgeDocumentSecurityRequirements, + operationName: "UpdateKnowledgeDocumentAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/documents/{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.Put, @@ -58,7 +83,7 @@ partial void ProcessUpdateKnowledgeDocumentResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.UpdateKnowledgeGroup.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.UpdateKnowledgeGroup.g.cs index c798d23..5914ff5 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.UpdateKnowledgeGroup.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.UpdateKnowledgeGroup.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_UpdateKnowledgeGroupSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_UpdateKnowledgeGroupSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_UpdateKnowledgeGroupSecurityRequirement0, + }; partial void PrepareUpdateKnowledgeGroupArguments( global::System.Net.Http.HttpClient httpClient, ref string id, @@ -46,9 +65,15 @@ partial void ProcessUpdateKnowledgeGroupResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateKnowledgeGroupSecurityRequirements, + operationName: "UpdateKnowledgeGroupAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/groups/{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.Put, @@ -58,7 +83,7 @@ partial void ProcessUpdateKnowledgeGroupResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.UploadKnowledgeGroupDocument.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.UploadKnowledgeGroupDocument.g.cs index 1a36c26..edb021e 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.UploadKnowledgeGroupDocument.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.UploadKnowledgeGroupDocument.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class KnowledgeClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_UploadKnowledgeGroupDocumentSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_UploadKnowledgeGroupDocumentSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_UploadKnowledgeGroupDocumentSecurityRequirement0, + }; partial void PrepareUploadKnowledgeGroupDocumentArguments( global::System.Net.Http.HttpClient httpClient, ref string id, @@ -46,9 +65,15 @@ partial void ProcessUploadKnowledgeGroupDocumentResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadKnowledgeGroupDocumentSecurityRequirements, + operationName: "UploadKnowledgeGroupDocumentAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/knowledge/groups/{id}/documents", - 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, @@ -58,7 +83,7 @@ partial void ProcessUploadKnowledgeGroupDocumentResponseContent( __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/Anam/Generated/Anam.KnowledgeClient.g.cs b/src/libs/Anam/Generated/Anam.KnowledgeClient.g.cs index d0993fd..c1cd85e 100644 --- a/src/libs/Anam/Generated/Anam.KnowledgeClient.g.cs +++ b/src/libs/Anam/Generated/Anam.KnowledgeClient.g.cs @@ -12,7 +12,7 @@ public sealed partial class KnowledgeClient : global::Anam.IKnowledgeClient, glo /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true; diff --git a/src/libs/Anam/Generated/Anam.LLMsClient.CreateLlm.g.cs b/src/libs/Anam/Generated/Anam.LLMsClient.CreateLlm.g.cs index 716c2c6..3411237 100644 --- a/src/libs/Anam/Generated/Anam.LLMsClient.CreateLlm.g.cs +++ b/src/libs/Anam/Generated/Anam.LLMsClient.CreateLlm.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class LLMsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_CreateLlmSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_CreateLlmSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_CreateLlmSecurityRequirement0, + }; partial void PrepareCreateLlmArguments( global::System.Net.Http.HttpClient httpClient, global::Anam.CreateLlmRequest request); @@ -41,9 +60,15 @@ partial void ProcessCreateLlmResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateLlmSecurityRequirements, + operationName: "CreateLlmAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/llms", - 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 ProcessCreateLlmResponseContent( __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/Anam/Generated/Anam.LLMsClient.DeleteLlm.g.cs b/src/libs/Anam/Generated/Anam.LLMsClient.DeleteLlm.g.cs index a5c13ec..e1686bf 100644 --- a/src/libs/Anam/Generated/Anam.LLMsClient.DeleteLlm.g.cs +++ b/src/libs/Anam/Generated/Anam.LLMsClient.DeleteLlm.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class LLMsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_DeleteLlmSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_DeleteLlmSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_DeleteLlmSecurityRequirement0, + }; partial void PrepareDeleteLlmArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -33,9 +52,15 @@ partial void ProcessDeleteLlmResponse( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteLlmSecurityRequirements, + operationName: "DeleteLlmAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/llms/{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 ProcessDeleteLlmResponse( __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/Anam/Generated/Anam.LLMsClient.GetLlm.g.cs b/src/libs/Anam/Generated/Anam.LLMsClient.GetLlm.g.cs index 020af47..9a017a4 100644 --- a/src/libs/Anam/Generated/Anam.LLMsClient.GetLlm.g.cs +++ b/src/libs/Anam/Generated/Anam.LLMsClient.GetLlm.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class LLMsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetLlmSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetLlmSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetLlmSecurityRequirement0, + }; partial void PrepareGetLlmArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -38,9 +57,15 @@ partial void ProcessGetLlmResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetLlmSecurityRequirements, + operationName: "GetLlmAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/llms/{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.Get, @@ -50,7 +75,7 @@ partial void ProcessGetLlmResponseContent( __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/Anam/Generated/Anam.LLMsClient.ListLlms.g.cs b/src/libs/Anam/Generated/Anam.LLMsClient.ListLlms.g.cs index ccebf26..9cbd4ce 100644 --- a/src/libs/Anam/Generated/Anam.LLMsClient.ListLlms.g.cs +++ b/src/libs/Anam/Generated/Anam.LLMsClient.ListLlms.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class LLMsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_ListLlmsSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_ListLlmsSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_ListLlmsSecurityRequirement0, + }; partial void PrepareListLlmsArguments( global::System.Net.Http.HttpClient httpClient, ref int? page, @@ -53,6 +72,12 @@ partial void ProcessListLlmsResponseContent( search: ref search, includeDefaults: ref includeDefaults); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListLlmsSecurityRequirements, + operationName: "ListLlmsAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/llms", baseUri: HttpClient.BaseAddress); @@ -61,7 +86,7 @@ partial void ProcessListLlmsResponseContent( .AddOptionalParameter("perPage", perPage?.ToString()) .AddOptionalParameter("search", search) .AddOptionalParameter("includeDefaults", includeDefaults?.ToString().ToLowerInvariant()) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -71,7 +96,7 @@ partial void ProcessListLlmsResponseContent( __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/Anam/Generated/Anam.LLMsClient.UpdateLlm.g.cs b/src/libs/Anam/Generated/Anam.LLMsClient.UpdateLlm.g.cs index a699797..e01dd33 100644 --- a/src/libs/Anam/Generated/Anam.LLMsClient.UpdateLlm.g.cs +++ b/src/libs/Anam/Generated/Anam.LLMsClient.UpdateLlm.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class LLMsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_UpdateLlmSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_UpdateLlmSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_UpdateLlmSecurityRequirement0, + }; partial void PrepareUpdateLlmArguments( global::System.Net.Http.HttpClient httpClient, ref string id, @@ -46,9 +65,15 @@ partial void ProcessUpdateLlmResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateLlmSecurityRequirements, + operationName: "UpdateLlmAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/llms/{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.Put, @@ -58,7 +83,7 @@ partial void ProcessUpdateLlmResponseContent( __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/Anam/Generated/Anam.LLMsClient.g.cs b/src/libs/Anam/Generated/Anam.LLMsClient.g.cs index 2f9aca9..a9a0920 100644 --- a/src/libs/Anam/Generated/Anam.LLMsClient.g.cs +++ b/src/libs/Anam/Generated/Anam.LLMsClient.g.cs @@ -12,7 +12,7 @@ public sealed partial class LLMsClient : global::Anam.ILLMsClient, global::Syste /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true; diff --git a/src/libs/Anam/Generated/Anam.PathBuilder.g.cs b/src/libs/Anam/Generated/Anam.PathBuilder.g.cs index 187c367..198b234 100644 --- a/src/libs/Anam/Generated/Anam.PathBuilder.g.cs +++ b/src/libs/Anam/Generated/Anam.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/Anam/Generated/Anam.PersonasClient.CreatePersona.g.cs b/src/libs/Anam/Generated/Anam.PersonasClient.CreatePersona.g.cs index 44138e4..e615b27 100644 --- a/src/libs/Anam/Generated/Anam.PersonasClient.CreatePersona.g.cs +++ b/src/libs/Anam/Generated/Anam.PersonasClient.CreatePersona.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class PersonasClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_CreatePersonaSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_CreatePersonaSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_CreatePersonaSecurityRequirement0, + }; partial void PrepareCreatePersonaArguments( global::System.Net.Http.HttpClient httpClient, global::Anam.PersonaConfig request); @@ -41,9 +60,15 @@ partial void ProcessCreatePersonaResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreatePersonaSecurityRequirements, + operationName: "CreatePersonaAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/personas", - 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 ProcessCreatePersonaResponseContent( __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/Anam/Generated/Anam.PersonasClient.DeletePersona.g.cs b/src/libs/Anam/Generated/Anam.PersonasClient.DeletePersona.g.cs index f5cd001..e906880 100644 --- a/src/libs/Anam/Generated/Anam.PersonasClient.DeletePersona.g.cs +++ b/src/libs/Anam/Generated/Anam.PersonasClient.DeletePersona.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class PersonasClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_DeletePersonaSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_DeletePersonaSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_DeletePersonaSecurityRequirement0, + }; partial void PrepareDeletePersonaArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -33,9 +52,15 @@ partial void ProcessDeletePersonaResponse( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeletePersonaSecurityRequirements, + operationName: "DeletePersonaAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/personas/{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 ProcessDeletePersonaResponse( __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/Anam/Generated/Anam.PersonasClient.GetPersona.g.cs b/src/libs/Anam/Generated/Anam.PersonasClient.GetPersona.g.cs index 9ba5c71..c616622 100644 --- a/src/libs/Anam/Generated/Anam.PersonasClient.GetPersona.g.cs +++ b/src/libs/Anam/Generated/Anam.PersonasClient.GetPersona.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class PersonasClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetPersonaSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetPersonaSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetPersonaSecurityRequirement0, + }; partial void PrepareGetPersonaArguments( global::System.Net.Http.HttpClient httpClient, ref string id); @@ -38,9 +57,15 @@ partial void ProcessGetPersonaResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetPersonaSecurityRequirements, + operationName: "GetPersonaAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/personas/{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.Get, @@ -50,7 +75,7 @@ partial void ProcessGetPersonaResponseContent( __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/Anam/Generated/Anam.PersonasClient.ListPersonas.g.cs b/src/libs/Anam/Generated/Anam.PersonasClient.ListPersonas.g.cs index 64a34f7..e9c028c 100644 --- a/src/libs/Anam/Generated/Anam.PersonasClient.ListPersonas.g.cs +++ b/src/libs/Anam/Generated/Anam.PersonasClient.ListPersonas.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class PersonasClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_ListPersonasSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_ListPersonasSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_ListPersonasSecurityRequirement0, + }; partial void PrepareListPersonasArguments( global::System.Net.Http.HttpClient httpClient, ref int? page, @@ -52,6 +71,12 @@ partial void ProcessListPersonasResponseContent( perPage: ref perPage, search: ref search); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListPersonasSecurityRequirements, + operationName: "ListPersonasAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/personas", baseUri: HttpClient.BaseAddress); @@ -59,7 +84,7 @@ partial void ProcessListPersonasResponseContent( .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("perPage", perPage?.ToString()) .AddOptionalParameter("search", search) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -69,7 +94,7 @@ partial void ProcessListPersonasResponseContent( __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/Anam/Generated/Anam.PersonasClient.UpdatePersona.g.cs b/src/libs/Anam/Generated/Anam.PersonasClient.UpdatePersona.g.cs index a9a64cd..2438398 100644 --- a/src/libs/Anam/Generated/Anam.PersonasClient.UpdatePersona.g.cs +++ b/src/libs/Anam/Generated/Anam.PersonasClient.UpdatePersona.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class PersonasClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_UpdatePersonaSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_UpdatePersonaSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_UpdatePersonaSecurityRequirement0, + }; partial void PrepareUpdatePersonaArguments( global::System.Net.Http.HttpClient httpClient, ref string id, @@ -46,9 +65,15 @@ partial void ProcessUpdatePersonaResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdatePersonaSecurityRequirements, + operationName: "UpdatePersonaAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/personas/{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.Put, @@ -58,7 +83,7 @@ partial void ProcessUpdatePersonaResponseContent( __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/Anam/Generated/Anam.PersonasClient.g.cs b/src/libs/Anam/Generated/Anam.PersonasClient.g.cs index a1b3cde..ae17b31 100644 --- a/src/libs/Anam/Generated/Anam.PersonasClient.g.cs +++ b/src/libs/Anam/Generated/Anam.PersonasClient.g.cs @@ -12,7 +12,7 @@ public sealed partial class PersonasClient : global::Anam.IPersonasClient, globa /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true; diff --git a/src/libs/Anam/Generated/Anam.Security.g.cs b/src/libs/Anam/Generated/Anam.Security.g.cs new file mode 100644 index 0000000..45ae136 --- /dev/null +++ b/src/libs/Anam/Generated/Anam.Security.g.cs @@ -0,0 +1,145 @@ +#nullable enable + +namespace Anam +{ + 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/Anam/Generated/Anam.SessionsClient.GetSession.g.cs b/src/libs/Anam/Generated/Anam.SessionsClient.GetSession.g.cs index 6db0c9e..311cbd8 100644 --- a/src/libs/Anam/Generated/Anam.SessionsClient.GetSession.g.cs +++ b/src/libs/Anam/Generated/Anam.SessionsClient.GetSession.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class SessionsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetSessionSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetSessionSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetSessionSecurityRequirement0, + }; partial void PrepareGetSessionArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -38,9 +57,15 @@ partial void ProcessGetSessionResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSessionSecurityRequirements, + operationName: "GetSessionAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/sessions/{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.Get, @@ -50,7 +75,7 @@ partial void ProcessGetSessionResponseContent( __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/Anam/Generated/Anam.SessionsClient.GetSessionRecording.g.cs b/src/libs/Anam/Generated/Anam.SessionsClient.GetSessionRecording.g.cs index 1a3e430..cc7280d 100644 --- a/src/libs/Anam/Generated/Anam.SessionsClient.GetSessionRecording.g.cs +++ b/src/libs/Anam/Generated/Anam.SessionsClient.GetSessionRecording.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class SessionsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetSessionRecordingSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetSessionRecordingSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetSessionRecordingSecurityRequirement0, + }; partial void PrepareGetSessionRecordingArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -38,9 +57,15 @@ partial void ProcessGetSessionRecordingResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSessionRecordingSecurityRequirements, + operationName: "GetSessionRecordingAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/sessions/{id}/recording", - 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, @@ -50,7 +75,7 @@ partial void ProcessGetSessionRecordingResponseContent( __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/Anam/Generated/Anam.SessionsClient.GetSessionTranscript.g.cs b/src/libs/Anam/Generated/Anam.SessionsClient.GetSessionTranscript.g.cs index 2be986a..46d1496 100644 --- a/src/libs/Anam/Generated/Anam.SessionsClient.GetSessionTranscript.g.cs +++ b/src/libs/Anam/Generated/Anam.SessionsClient.GetSessionTranscript.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class SessionsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetSessionTranscriptSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetSessionTranscriptSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetSessionTranscriptSecurityRequirement0, + }; partial void PrepareGetSessionTranscriptArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -38,9 +57,15 @@ partial void ProcessGetSessionTranscriptResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSessionTranscriptSecurityRequirements, + operationName: "GetSessionTranscriptAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/sessions/{id}/transcript", - 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, @@ -50,7 +75,7 @@ partial void ProcessGetSessionTranscriptResponseContent( __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/Anam/Generated/Anam.SessionsClient.ListSessions.g.cs b/src/libs/Anam/Generated/Anam.SessionsClient.ListSessions.g.cs index 495f6da..eb255c0 100644 --- a/src/libs/Anam/Generated/Anam.SessionsClient.ListSessions.g.cs +++ b/src/libs/Anam/Generated/Anam.SessionsClient.ListSessions.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class SessionsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_ListSessionsSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_ListSessionsSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_ListSessionsSecurityRequirement0, + }; partial void PrepareListSessionsArguments( global::System.Net.Http.HttpClient httpClient, ref int? page, @@ -62,6 +81,12 @@ partial void ProcessListSessionsResponseContent( apiKeyId: ref apiKeyId, personaId: ref personaId); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListSessionsSecurityRequirements, + operationName: "ListSessionsAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/sessions", baseUri: HttpClient.BaseAddress); @@ -71,7 +96,7 @@ partial void ProcessListSessionsResponseContent( .AddOptionalParameter("search", search) .AddOptionalParameter("apiKeyId", apiKeyId?.ToString()) .AddOptionalParameter("personaId", personaId?.ToString()) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -81,7 +106,7 @@ partial void ProcessListSessionsResponseContent( __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/Anam/Generated/Anam.SessionsClient.g.cs b/src/libs/Anam/Generated/Anam.SessionsClient.g.cs index 18e0756..fbcacdf 100644 --- a/src/libs/Anam/Generated/Anam.SessionsClient.g.cs +++ b/src/libs/Anam/Generated/Anam.SessionsClient.g.cs @@ -12,7 +12,7 @@ public sealed partial class SessionsClient : global::Anam.ISessionsClient, globa /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true; diff --git a/src/libs/Anam/Generated/Anam.ShareLinksClient.CreateShareLink.g.cs b/src/libs/Anam/Generated/Anam.ShareLinksClient.CreateShareLink.g.cs index e15c4aa..422a656 100644 --- a/src/libs/Anam/Generated/Anam.ShareLinksClient.CreateShareLink.g.cs +++ b/src/libs/Anam/Generated/Anam.ShareLinksClient.CreateShareLink.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ShareLinksClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_CreateShareLinkSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_CreateShareLinkSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_CreateShareLinkSecurityRequirement0, + }; partial void PrepareCreateShareLinkArguments( global::System.Net.Http.HttpClient httpClient, global::Anam.CreateShareLinkRequest request); @@ -41,9 +60,15 @@ partial void ProcessCreateShareLinkResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateShareLinkSecurityRequirements, + operationName: "CreateShareLinkAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/share-links", - 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 ProcessCreateShareLinkResponseContent( __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/Anam/Generated/Anam.ShareLinksClient.DeleteShareLink.g.cs b/src/libs/Anam/Generated/Anam.ShareLinksClient.DeleteShareLink.g.cs index 97ee13d..6c77d17 100644 --- a/src/libs/Anam/Generated/Anam.ShareLinksClient.DeleteShareLink.g.cs +++ b/src/libs/Anam/Generated/Anam.ShareLinksClient.DeleteShareLink.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ShareLinksClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_DeleteShareLinkSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_DeleteShareLinkSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_DeleteShareLinkSecurityRequirement0, + }; partial void PrepareDeleteShareLinkArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -33,9 +52,15 @@ partial void ProcessDeleteShareLinkResponse( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteShareLinkSecurityRequirements, + operationName: "DeleteShareLinkAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/share-links/{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 ProcessDeleteShareLinkResponse( __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/Anam/Generated/Anam.ShareLinksClient.GetShareLink.g.cs b/src/libs/Anam/Generated/Anam.ShareLinksClient.GetShareLink.g.cs index 1565c3d..a7c036e 100644 --- a/src/libs/Anam/Generated/Anam.ShareLinksClient.GetShareLink.g.cs +++ b/src/libs/Anam/Generated/Anam.ShareLinksClient.GetShareLink.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ShareLinksClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetShareLinkSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetShareLinkSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetShareLinkSecurityRequirement0, + }; partial void PrepareGetShareLinkArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -38,9 +57,15 @@ partial void ProcessGetShareLinkResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetShareLinkSecurityRequirements, + operationName: "GetShareLinkAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/share-links/{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.Get, @@ -50,7 +75,7 @@ partial void ProcessGetShareLinkResponseContent( __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/Anam/Generated/Anam.ShareLinksClient.ListShareLinks.g.cs b/src/libs/Anam/Generated/Anam.ShareLinksClient.ListShareLinks.g.cs index 8155cad..e621789 100644 --- a/src/libs/Anam/Generated/Anam.ShareLinksClient.ListShareLinks.g.cs +++ b/src/libs/Anam/Generated/Anam.ShareLinksClient.ListShareLinks.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ShareLinksClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_ListShareLinksSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_ListShareLinksSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_ListShareLinksSecurityRequirement0, + }; partial void PrepareListShareLinksArguments( global::System.Net.Http.HttpClient httpClient, ref int? page, @@ -57,6 +76,12 @@ partial void ProcessListShareLinksResponseContent( search: ref search, personaId: ref personaId); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListShareLinksSecurityRequirements, + operationName: "ListShareLinksAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/share-links", baseUri: HttpClient.BaseAddress); @@ -65,7 +90,7 @@ partial void ProcessListShareLinksResponseContent( .AddOptionalParameter("perPage", perPage?.ToString()) .AddOptionalParameter("search", search) .AddOptionalParameter("personaId", personaId?.ToString()) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -75,7 +100,7 @@ partial void ProcessListShareLinksResponseContent( __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/Anam/Generated/Anam.ShareLinksClient.UpdateShareLink.g.cs b/src/libs/Anam/Generated/Anam.ShareLinksClient.UpdateShareLink.g.cs index 042562c..4305061 100644 --- a/src/libs/Anam/Generated/Anam.ShareLinksClient.UpdateShareLink.g.cs +++ b/src/libs/Anam/Generated/Anam.ShareLinksClient.UpdateShareLink.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ShareLinksClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_UpdateShareLinkSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_UpdateShareLinkSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_UpdateShareLinkSecurityRequirement0, + }; partial void PrepareUpdateShareLinkArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id, @@ -46,9 +65,15 @@ partial void ProcessUpdateShareLinkResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateShareLinkSecurityRequirements, + operationName: "UpdateShareLinkAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/share-links/{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.Put, @@ -58,7 +83,7 @@ partial void ProcessUpdateShareLinkResponseContent( __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/Anam/Generated/Anam.ShareLinksClient.g.cs b/src/libs/Anam/Generated/Anam.ShareLinksClient.g.cs index 04ad1c0..35fd875 100644 --- a/src/libs/Anam/Generated/Anam.ShareLinksClient.g.cs +++ b/src/libs/Anam/Generated/Anam.ShareLinksClient.g.cs @@ -12,7 +12,7 @@ public sealed partial class ShareLinksClient : global::Anam.IShareLinksClient, g /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true; diff --git a/src/libs/Anam/Generated/Anam.ToolsClient.CreateTool.g.cs b/src/libs/Anam/Generated/Anam.ToolsClient.CreateTool.g.cs index 8ae424e..14e3aed 100644 --- a/src/libs/Anam/Generated/Anam.ToolsClient.CreateTool.g.cs +++ b/src/libs/Anam/Generated/Anam.ToolsClient.CreateTool.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ToolsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_CreateToolSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_CreateToolSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_CreateToolSecurityRequirement0, + }; partial void PrepareCreateToolArguments( global::System.Net.Http.HttpClient httpClient, global::Anam.CreateToolRequest request); @@ -41,9 +60,15 @@ partial void ProcessCreateToolResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateToolSecurityRequirements, + operationName: "CreateToolAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/tools", - 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 ProcessCreateToolResponseContent( __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/Anam/Generated/Anam.ToolsClient.DeleteTool.g.cs b/src/libs/Anam/Generated/Anam.ToolsClient.DeleteTool.g.cs index b6f54cc..e63798e 100644 --- a/src/libs/Anam/Generated/Anam.ToolsClient.DeleteTool.g.cs +++ b/src/libs/Anam/Generated/Anam.ToolsClient.DeleteTool.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ToolsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_DeleteToolSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_DeleteToolSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_DeleteToolSecurityRequirement0, + }; partial void PrepareDeleteToolArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -33,9 +52,15 @@ partial void ProcessDeleteToolResponse( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteToolSecurityRequirements, + operationName: "DeleteToolAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/tools/{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 ProcessDeleteToolResponse( __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/Anam/Generated/Anam.ToolsClient.GetTool.g.cs b/src/libs/Anam/Generated/Anam.ToolsClient.GetTool.g.cs index 29b1a71..a3ce985 100644 --- a/src/libs/Anam/Generated/Anam.ToolsClient.GetTool.g.cs +++ b/src/libs/Anam/Generated/Anam.ToolsClient.GetTool.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ToolsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetToolSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetToolSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetToolSecurityRequirement0, + }; partial void PrepareGetToolArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -38,9 +57,15 @@ partial void ProcessGetToolResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetToolSecurityRequirements, + operationName: "GetToolAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/tools/{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.Get, @@ -50,7 +75,7 @@ partial void ProcessGetToolResponseContent( __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/Anam/Generated/Anam.ToolsClient.ListTools.g.cs b/src/libs/Anam/Generated/Anam.ToolsClient.ListTools.g.cs index f00a2df..3116467 100644 --- a/src/libs/Anam/Generated/Anam.ToolsClient.ListTools.g.cs +++ b/src/libs/Anam/Generated/Anam.ToolsClient.ListTools.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ToolsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_ListToolsSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_ListToolsSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_ListToolsSecurityRequirement0, + }; partial void PrepareListToolsArguments( global::System.Net.Http.HttpClient httpClient, ref int? page, @@ -52,6 +71,12 @@ partial void ProcessListToolsResponseContent( perPage: ref perPage, search: ref search); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListToolsSecurityRequirements, + operationName: "ListToolsAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/tools", baseUri: HttpClient.BaseAddress); @@ -59,7 +84,7 @@ partial void ProcessListToolsResponseContent( .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("perPage", perPage?.ToString()) .AddOptionalParameter("search", search) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -69,7 +94,7 @@ partial void ProcessListToolsResponseContent( __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/Anam/Generated/Anam.ToolsClient.UpdateTool.g.cs b/src/libs/Anam/Generated/Anam.ToolsClient.UpdateTool.g.cs index 9ce2d8e..3f9781e 100644 --- a/src/libs/Anam/Generated/Anam.ToolsClient.UpdateTool.g.cs +++ b/src/libs/Anam/Generated/Anam.ToolsClient.UpdateTool.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class ToolsClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_UpdateToolSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_UpdateToolSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_UpdateToolSecurityRequirement0, + }; partial void PrepareUpdateToolArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id, @@ -46,9 +65,15 @@ partial void ProcessUpdateToolResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateToolSecurityRequirements, + operationName: "UpdateToolAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/tools/{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.Put, @@ -58,7 +83,7 @@ partial void ProcessUpdateToolResponseContent( __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/Anam/Generated/Anam.ToolsClient.g.cs b/src/libs/Anam/Generated/Anam.ToolsClient.g.cs index 307c841..e1e0188 100644 --- a/src/libs/Anam/Generated/Anam.ToolsClient.g.cs +++ b/src/libs/Anam/Generated/Anam.ToolsClient.g.cs @@ -12,7 +12,7 @@ public sealed partial class ToolsClient : global::Anam.IToolsClient, global::Sys /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true; diff --git a/src/libs/Anam/Generated/Anam.VoicesClient.CreateVoice.g.cs b/src/libs/Anam/Generated/Anam.VoicesClient.CreateVoice.g.cs index 59ff47c..6ea2943 100644 --- a/src/libs/Anam/Generated/Anam.VoicesClient.CreateVoice.g.cs +++ b/src/libs/Anam/Generated/Anam.VoicesClient.CreateVoice.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class VoicesClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_CreateVoiceSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_CreateVoiceSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_CreateVoiceSecurityRequirement0, + }; partial void PrepareCreateVoiceArguments( global::System.Net.Http.HttpClient httpClient, global::Anam.CreateVoiceRequest request); @@ -41,9 +60,15 @@ partial void ProcessCreateVoiceResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateVoiceSecurityRequirements, + operationName: "CreateVoiceAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/voices", - 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 ProcessCreateVoiceResponseContent( __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/Anam/Generated/Anam.VoicesClient.DeleteVoice.g.cs b/src/libs/Anam/Generated/Anam.VoicesClient.DeleteVoice.g.cs index 8f3dcc1..afb1cd6 100644 --- a/src/libs/Anam/Generated/Anam.VoicesClient.DeleteVoice.g.cs +++ b/src/libs/Anam/Generated/Anam.VoicesClient.DeleteVoice.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class VoicesClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_DeleteVoiceSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_DeleteVoiceSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_DeleteVoiceSecurityRequirement0, + }; partial void PrepareDeleteVoiceArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -33,9 +52,15 @@ partial void ProcessDeleteVoiceResponse( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteVoiceSecurityRequirements, + operationName: "DeleteVoiceAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/voices/{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 ProcessDeleteVoiceResponse( __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/Anam/Generated/Anam.VoicesClient.GetVoice.g.cs b/src/libs/Anam/Generated/Anam.VoicesClient.GetVoice.g.cs index 2461b39..7668763 100644 --- a/src/libs/Anam/Generated/Anam.VoicesClient.GetVoice.g.cs +++ b/src/libs/Anam/Generated/Anam.VoicesClient.GetVoice.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class VoicesClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_GetVoiceSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_GetVoiceSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_GetVoiceSecurityRequirement0, + }; partial void PrepareGetVoiceArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id); @@ -38,9 +57,15 @@ partial void ProcessGetVoiceResponseContent( httpClient: HttpClient, id: ref id); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetVoiceSecurityRequirements, + operationName: "GetVoiceAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/voices/{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.Get, @@ -50,7 +75,7 @@ partial void ProcessGetVoiceResponseContent( __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/Anam/Generated/Anam.VoicesClient.ListVoices.g.cs b/src/libs/Anam/Generated/Anam.VoicesClient.ListVoices.g.cs index 788cfcb..e570ab5 100644 --- a/src/libs/Anam/Generated/Anam.VoicesClient.ListVoices.g.cs +++ b/src/libs/Anam/Generated/Anam.VoicesClient.ListVoices.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class VoicesClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_ListVoicesSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_ListVoicesSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_ListVoicesSecurityRequirement0, + }; partial void PrepareListVoicesArguments( global::System.Net.Http.HttpClient httpClient, ref int? page, @@ -52,6 +71,12 @@ partial void ProcessListVoicesResponseContent( perPage: ref perPage, search: ref search); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListVoicesSecurityRequirements, + operationName: "ListVoicesAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: "/v1/voices", baseUri: HttpClient.BaseAddress); @@ -59,7 +84,7 @@ partial void ProcessListVoicesResponseContent( .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("perPage", perPage?.ToString()) .AddOptionalParameter("search", search) - ; + ; var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, @@ -69,7 +94,7 @@ partial void ProcessListVoicesResponseContent( __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/Anam/Generated/Anam.VoicesClient.UpdateVoice.g.cs b/src/libs/Anam/Generated/Anam.VoicesClient.UpdateVoice.g.cs index 09f2286..dbad795 100644 --- a/src/libs/Anam/Generated/Anam.VoicesClient.UpdateVoice.g.cs +++ b/src/libs/Anam/Generated/Anam.VoicesClient.UpdateVoice.g.cs @@ -5,6 +5,25 @@ namespace Anam { public partial class VoicesClient { + + + private static readonly global::Anam.EndPointSecurityRequirement s_UpdateVoiceSecurityRequirement0 = + new global::Anam.EndPointSecurityRequirement + { + Authorizations = new global::Anam.EndPointAuthorizationRequirement[] + { new global::Anam.EndPointAuthorizationRequirement + { + Type = "Http", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Anam.EndPointSecurityRequirement[] s_UpdateVoiceSecurityRequirements = + new global::Anam.EndPointSecurityRequirement[] + { s_UpdateVoiceSecurityRequirement0, + }; partial void PrepareUpdateVoiceArguments( global::System.Net.Http.HttpClient httpClient, ref global::System.Guid id, @@ -46,9 +65,15 @@ partial void ProcessUpdateVoiceResponseContent( id: ref id, request: request); + + var __authorizations = global::Anam.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UpdateVoiceSecurityRequirements, + operationName: "UpdateVoiceAsync"); + var __pathBuilder = new global::Anam.PathBuilder( path: $"/v1/voices/{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.Put, @@ -58,7 +83,7 @@ partial void ProcessUpdateVoiceResponseContent( __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/Anam/Generated/Anam.VoicesClient.g.cs b/src/libs/Anam/Generated/Anam.VoicesClient.g.cs index 397e786..4406cd1 100644 --- a/src/libs/Anam/Generated/Anam.VoicesClient.g.cs +++ b/src/libs/Anam/Generated/Anam.VoicesClient.g.cs @@ -12,7 +12,7 @@ public sealed partial class VoicesClient : global::Anam.IVoicesClient, global::S /// /// Anam API /// - public const string DefaultBaseUrl = "https://api.anam.ai"; + public const string DefaultBaseUrl = "https://api.anam.ai/"; private bool _disposeHttpClient = true;