Skip to content

Commit

Permalink
Merge pull request #4 from tryAGI/bot/update-openapi_202409141823
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 14, 2024
2 parents 489c5ba + 65f8687 commit 51f58f7
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial void ProcessPostGenerateImageResponseContent(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/generate", global::System.UriKind.RelativeOrAbsolute));
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ideogram.SourceGenerationContext.Default.GenerateImageRequest);
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -91,7 +91,7 @@ partial void ProcessPostGenerateImageResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GenerateImageResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GenerateImageResponse), JsonSerializerContext) as global::Ideogram.GenerateImageResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ partial void ProcessPostRemixImageResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GenerateImageResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GenerateImageResponse), JsonSerializerContext) as global::Ideogram.GenerateImageResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ partial void ProcessPostUpscaleImageResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GenerateImageResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GenerateImageResponse), JsonSerializerContext) as global::Ideogram.GenerateImageResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

Expand Down
8 changes: 6 additions & 2 deletions src/libs/Ideogram/Generated/Ideogram.GenerateClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public sealed partial class GenerateClient : global::System.IDisposable

private readonly global::System.Net.Http.HttpClient _httpClient;

/// <summary>
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Ideogram.SourceGenerationContext.Default;


/// <summary>
/// Creates a new instance of the GenerateClient.
Expand All @@ -27,8 +32,7 @@ public sealed partial class GenerateClient : global::System.IDisposable
/// <param name="baseUri"></param>
public GenerateClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null
)
global::System.Uri? baseUri = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
Expand Down
23 changes: 18 additions & 5 deletions src/libs/Ideogram/Generated/Ideogram.IdeogramApi.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,35 @@ public sealed partial class IdeogramApi : global::System.IDisposable

private readonly global::System.Net.Http.HttpClient _httpClient;

/// <summary>
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Ideogram.SourceGenerationContext.Default;


/// <summary>
/// All things related to generating content.
/// </summary>
public GenerateClient Generate => new GenerateClient(_httpClient);
public GenerateClient Generate => new GenerateClient(_httpClient)
{
JsonSerializerContext = JsonSerializerContext,
};

/// <summary>
/// Content related to managing API account and API access
/// </summary>
public ManageClient Manage => new ManageClient(_httpClient);
public ManageClient Manage => new ManageClient(_httpClient)
{
JsonSerializerContext = JsonSerializerContext,
};

/// <summary>
/// Operations related to understanding visual content
/// </summary>
public VisionClient Vision => new VisionClient(_httpClient);
public VisionClient Vision => new VisionClient(_httpClient)
{
JsonSerializerContext = JsonSerializerContext,
};

/// <summary>
/// Creates a new instance of the IdeogramApi.
Expand All @@ -42,8 +56,7 @@ public sealed partial class IdeogramApi : global::System.IDisposable
/// <param name="baseUri"></param>
public IdeogramApi(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null
)
global::System.Uri? baseUri = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ partial void ProcessCreateApiKeyResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.PostApiKeyResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.PostApiKeyResponse), JsonSerializerContext) as global::Ideogram.PostApiKeyResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ partial void ProcessGetApiKeysResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GetApiKeysResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GetApiKeysResponse), JsonSerializerContext) as global::Ideogram.GetApiKeysResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ partial void ProcessGetApiStripeSubscriptionResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.ManageApiStripeSubscriptionResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.ManageApiStripeSubscriptionResponse), JsonSerializerContext) as global::Ideogram.ManageApiStripeSubscriptionResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ partial void ProcessGetApiSubscriptionResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.ManageApiSubscriptionResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.ManageApiSubscriptionResponse), JsonSerializerContext) as global::Ideogram.ManageApiSubscriptionResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ partial void ProcessGetApiTermsResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.GetApiTermsResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.GetApiTermsResponse), JsonSerializerContext) as global::Ideogram.GetApiTermsResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ partial void ProcessPostApiSubscriptionResponseContent(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/manage/api/subscription", global::System.UriKind.RelativeOrAbsolute));
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ideogram.SourceGenerationContext.Default.PostApiSubscriptionRequest);
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down Expand Up @@ -90,7 +90,7 @@ partial void ProcessPostApiSubscriptionResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.PostApiSubscriptionResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.PostApiSubscriptionResponse), JsonSerializerContext) as global::Ideogram.PostApiSubscriptionResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ partial void ProcessPostApiTermsResponse(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/manage/api/terms", global::System.UriKind.RelativeOrAbsolute));
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ideogram.SourceGenerationContext.Default.PostApiTermsRequest);
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ partial void ProcessReactivateSubscriptionResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.PostApiReactivateResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.PostApiReactivateResponse), JsonSerializerContext) as global::Ideogram.PostApiReactivateResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/libs/Ideogram/Generated/Ideogram.ManageClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public sealed partial class ManageClient : global::System.IDisposable

private readonly global::System.Net.Http.HttpClient _httpClient;

/// <summary>
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Ideogram.SourceGenerationContext.Default;


/// <summary>
/// Creates a new instance of the ManageClient.
Expand All @@ -27,8 +32,7 @@ public sealed partial class ManageClient : global::System.IDisposable
/// <param name="baseUri"></param>
public ManageClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null
)
global::System.Uri? baseUri = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ partial void ProcessPostDescribeResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::Ideogram.SourceGenerationContext.Default.DescribeResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::Ideogram.DescribeResponse), JsonSerializerContext) as global::Ideogram.DescribeResponse ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

Expand Down
8 changes: 6 additions & 2 deletions src/libs/Ideogram/Generated/Ideogram.VisionClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public sealed partial class VisionClient : global::System.IDisposable

private readonly global::System.Net.Http.HttpClient _httpClient;

/// <summary>
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Ideogram.SourceGenerationContext.Default;


/// <summary>
/// Creates a new instance of the VisionClient.
Expand All @@ -27,8 +32,7 @@ public sealed partial class VisionClient : global::System.IDisposable
/// <param name="baseUri"></param>
public VisionClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null
)
global::System.Uri? baseUri = null)
{
_httpClient = httpClient ?? new global::System.Net.Http.HttpClient();
_httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl);
Expand Down

0 comments on commit 51f58f7

Please sign in to comment.