Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public void AuthorizeUsingBearer(
Authorizations.Add(new global::Anam.EndPointAuthorization
{
Type = "Http",
SchemeId = "HttpBearer",
Location = "Header",
Name = "Bearer",
Value = apiKey,
Expand Down
47 changes: 38 additions & 9 deletions src/libs/Anam/Generated/Anam.AnamClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
#if DEBUG
= true;
#endif

/// <inheritdoc/>
public global::Anam.AutoSDKClientOptions Options { get; }
/// <summary>
///
/// </summary>
Expand All @@ -40,7 +43,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public AuthClient Auth => new AuthClient(HttpClient, authorizations: Authorizations)
public AuthClient Auth => new AuthClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -49,7 +52,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public AvatarsClient Avatars => new AvatarsClient(HttpClient, authorizations: Authorizations)
public AvatarsClient Avatars => new AvatarsClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -58,7 +61,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public KnowledgeClient Knowledge => new KnowledgeClient(HttpClient, authorizations: Authorizations)
public KnowledgeClient Knowledge => new KnowledgeClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -67,7 +70,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public LLMsClient LLMs => new LLMsClient(HttpClient, authorizations: Authorizations)
public LLMsClient LLMs => new LLMsClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -76,7 +79,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public PersonasClient Personas => new PersonasClient(HttpClient, authorizations: Authorizations)
public PersonasClient Personas => new PersonasClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -85,7 +88,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public SessionsClient Sessions => new SessionsClient(HttpClient, authorizations: Authorizations)
public SessionsClient Sessions => new SessionsClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -94,7 +97,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public ShareLinksClient ShareLinks => new ShareLinksClient(HttpClient, authorizations: Authorizations)
public ShareLinksClient ShareLinks => new ShareLinksClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -103,7 +106,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public ToolsClient Tools => new ToolsClient(HttpClient, authorizations: Authorizations)
public ToolsClient Tools => new ToolsClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -112,7 +115,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public VoicesClient Voices => new VoicesClient(HttpClient, authorizations: Authorizations)
public VoicesClient Voices => new VoicesClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -131,11 +134,37 @@ public AnamClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::Anam.EndPointAuthorization>? authorizations = null,
bool disposeHttpClient = true) : this(
httpClient,
baseUri,
authorizations,
options: null,
disposeHttpClient: disposeHttpClient)
{
}

/// <summary>
/// Creates a new instance of the AnamClient.
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
/// <param name="httpClient">The HttpClient instance. If not provided, a new one will be created.</param>
/// <param name="baseUri">The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.</param>
/// <param name="authorizations">The authorizations to use for the requests.</param>
/// <param name="options">Client-wide request defaults such as headers, query parameters, retries, and timeout.</param>
/// <param name="disposeHttpClient">Dispose the HttpClient when the instance is disposed. True by default.</param>
public AnamClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::Anam.EndPointAuthorization>? authorizations = null,
global::Anam.AutoSDKClientOptions? options = null,
bool disposeHttpClient = true)
{

HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
Authorizations = authorizations ?? new global::System.Collections.Generic.List<global::Anam.EndPointAuthorization>();
Options = options ?? new global::Anam.AutoSDKClientOptions();
_disposeHttpClient = disposeHttpClient;

Initialized(HttpClient);
Expand Down
Loading