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
12 changes: 12 additions & 0 deletions src/libs/Ideogram/Generated/Ideogram..JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ namespace Ideogram
typeof(global::Ideogram.JsonConverters.StylePresetV3NullableJsonConverter),
typeof(global::Ideogram.JsonConverters.InternalTestingEnumFieldJsonConverter),
typeof(global::Ideogram.JsonConverters.InternalTestingEnumFieldNullableJsonConverter),
typeof(global::Ideogram.JsonConverters.ToolTypeJsonConverter),
typeof(global::Ideogram.JsonConverters.ToolTypeNullableJsonConverter),
typeof(global::Ideogram.JsonConverters.ModelVersionJsonConverter),
typeof(global::Ideogram.JsonConverters.ModelVersionNullableJsonConverter),
typeof(global::Ideogram.JsonConverters.SegmentByJsonConverter),
typeof(global::Ideogram.JsonConverters.SegmentByNullableJsonConverter),
typeof(global::Ideogram.JsonConverters.ApiProfileTypeJsonConverter),
typeof(global::Ideogram.JsonConverters.ApiProfileTypeNullableJsonConverter),
typeof(global::Ideogram.JsonConverters.ApiProfileRoleJsonConverter),
typeof(global::Ideogram.JsonConverters.ApiProfileRoleNullableJsonConverter),
typeof(global::Ideogram.JsonConverters.ApiKeyStatusJsonConverter),
typeof(global::Ideogram.JsonConverters.ApiKeyStatusNullableJsonConverter),
typeof(global::Ideogram.JsonConverters.ColorPaletteWithPresetNameOrMembersJsonConverter),
typeof(global::Ideogram.JsonConverters.UnixTimestampJsonConverter),
})]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#nullable enable

namespace Ideogram
{
public partial interface IManageClient
{
/// <summary>
/// Add members to a specific organization
/// </summary>
/// <param name="organizationId"></param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task AddOrganizationMembersAsync(
string organizationId,
global::Ideogram.AddOrganizationMembersRequest request,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Add members to a specific organization
/// </summary>
/// <param name="organizationId"></param>
/// <param name="members">
/// List of organization members to add
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task AddOrganizationMembersAsync(
string organizationId,
global::System.Collections.Generic.IList<global::Ideogram.LiteOrganizationMember> members,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#nullable enable

namespace Ideogram
{
public partial interface IManageClient
{
/// <summary>
/// Create an API key for a specific organization
/// </summary>
/// <param name="organizationId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.CreateApiKeyResponse> CreateApiKeyV2Async(
string organizationId,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#nullable enable

namespace Ideogram
{
public partial interface IManageClient
{
/// <summary>
/// Deactivate an API key for a specific organization
/// </summary>
/// <param name="apiKeyId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task DeactivateOrganizationApiKeyAsync(
string apiKeyId,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#nullable enable

namespace Ideogram
{
public partial interface IManageClient
{
/// <summary>
/// Retrieve the user's current API profiles
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.GetApiProfilesResponse> GetApiProfilesAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#nullable enable

namespace Ideogram
{
public partial interface IManageClient
{
/// <summary>
/// Retrieve members of a specific organization
/// </summary>
/// <param name="organizationId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.GetOrganizationMembersResponse> GetOrganizationMembersAsync(
string organizationId,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#nullable enable

namespace Ideogram
{
public partial interface IManageClient
{
/// <summary>
/// Retrieve usage information segmented by time period with tool-specific breakdowns
/// </summary>
/// <param name="organizationId"></param>
/// <param name="segmentBy">
/// Time segment granularity for usage breakdown<br/>
/// Example: DAY
/// </param>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <param name="modelVersions"></param>
/// <param name="tools"></param>
/// <param name="apiKeyIds"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.GetUsageInfoResponse> GetUsageInfoAsync(
string organizationId,
global::Ideogram.SegmentBy segmentBy,
global::System.DateTime startTime,
global::System.DateTime? endTime = default,
global::System.Collections.Generic.IList<global::Ideogram.ModelVersion>? modelVersions = default,
global::System.Collections.Generic.IList<global::Ideogram.ToolType>? tools = default,
global::System.Collections.Generic.IList<string>? apiKeyIds = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ public partial interface IManageClient
/// Retrieve user credit information and spending metrics
/// </summary>
/// <param name="organizationId"></param>
/// <param name="startDate"></param>
/// <param name="endDate"></param>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.GetUserCreditsResponse> GetUserCreditsAsync(
string organizationId,
global::System.DateTime startDate,
global::System.DateTime? endDate = default,
global::System.DateTime startTime,
global::System.DateTime? endTime = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ public partial interface IManageClient
/// Retrieve user spend commit information
/// </summary>
/// <param name="organizationId"></param>
/// <param name="postpaidOnly"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.SpendCommitInfoResponse> GetUserSpendCommitInfoAsync(
string organizationId,
bool? postpaidOnly = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#nullable enable

namespace Ideogram
{
public partial interface IManageClient
{
/// <summary>
/// Promote members to OWNER role in a specific organization
/// </summary>
/// <param name="organizationId"></param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task PromoteOrganizationMembersAsync(
string organizationId,
global::Ideogram.PromoteOrganizationMembersRequest request,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Promote members to OWNER role in a specific organization
/// </summary>
/// <param name="organizationId"></param>
/// <param name="members">
/// List of organization members to promote to OWNER role
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task PromoteOrganizationMembersAsync(
string organizationId,
global::System.Collections.Generic.IList<global::Ideogram.LiteOrganizationMember> members,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#nullable enable

namespace Ideogram
{
public partial interface IManageClient
{
/// <summary>
/// Remove members from a specific organization
/// </summary>
/// <param name="organizationId"></param>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task RemoveOrganizationMembersAsync(
string organizationId,
global::Ideogram.RemoveOrganizationMembersRequest request,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Remove members from a specific organization
/// </summary>
/// <param name="organizationId"></param>
/// <param name="members">
/// List of organization members to remove
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task RemoveOrganizationMembersAsync(
string organizationId,
global::System.Collections.Generic.IList<global::Ideogram.LiteOrganizationMember> members,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Ideogram.JsonConverters
{
/// <inheritdoc />
public sealed class ApiKeyStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Ideogram.ApiKeyStatus>
{
/// <inheritdoc />
public override global::Ideogram.ApiKeyStatus Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Ideogram.ApiKeyStatusExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Ideogram.ApiKeyStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Ideogram.ApiKeyStatus);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Ideogram.ApiKeyStatus value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Ideogram.ApiKeyStatusExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace Ideogram.JsonConverters
{
/// <inheritdoc />
public sealed class ApiKeyStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Ideogram.ApiKeyStatus?>
{
/// <inheritdoc />
public override global::Ideogram.ApiKeyStatus? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Ideogram.ApiKeyStatusExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Ideogram.ApiKeyStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Ideogram.ApiKeyStatus?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Ideogram.ApiKeyStatus? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::Ideogram.ApiKeyStatusExtensions.ToValueString(value.Value));
}
}
}
}
Loading
Loading