Skip to content

Commit 9e6aeac

Browse files
authored
Merge pull request #143 from tryAGI/bot/update-openapi_202603180112
feat:@coderabbitai
2 parents 823197c + 16b5c8c commit 9e6aeac

55 files changed

Lines changed: 891 additions & 205 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/libs/Ideogram/Generated/Ideogram.BatchClient.GetMaybeBatchResults.g.cs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ partial void ProcessGetMaybeBatchResultsResponseContent(
9898
}
9999
else
100100
{
101-
var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
101+
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
102102
}
103103
}
104104
catch (global::System.Exception __ex)
@@ -131,7 +131,7 @@ partial void ProcessGetMaybeBatchResultsResponseContent(
131131
}
132132
else
133133
{
134-
var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
134+
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
135135
}
136136
}
137137
catch (global::System.Exception __ex)
@@ -164,7 +164,7 @@ partial void ProcessGetMaybeBatchResultsResponseContent(
164164
}
165165
else
166166
{
167-
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
167+
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
168168
}
169169
}
170170
catch (global::System.Exception __ex)
@@ -197,7 +197,7 @@ partial void ProcessGetMaybeBatchResultsResponseContent(
197197
}
198198
else
199199
{
200-
var __contentStream_500 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
200+
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
201201
}
202202
}
203203
catch (global::System.Exception __ex)
@@ -276,11 +276,25 @@ partial void ProcessGetMaybeBatchResultsResponseContent(
276276
}
277277
catch (global::System.Exception __ex)
278278
{
279+
string? __content = null;
280+
try
281+
{
282+
__content = await __response.Content.ReadAsStringAsync(
283+
#if NET5_0_OR_GREATER
284+
cancellationToken
285+
#endif
286+
).ConfigureAwait(false);
287+
}
288+
catch (global::System.Exception)
289+
{
290+
}
291+
279292
throw new global::Ideogram.ApiException(
280-
message: __response.ReasonPhrase ?? string.Empty,
293+
message: __content ?? __response.ReasonPhrase ?? string.Empty,
281294
innerException: __ex,
282295
statusCode: __response.StatusCode)
283296
{
297+
ResponseBody = __content,
284298
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
285299
__response.Headers,
286300
h => h.Key,

src/libs/Ideogram/Generated/Ideogram.BatchClient.PostBatch.g.cs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ partial void ProcessPostBatchResponseContent(
108108
}
109109
else
110110
{
111-
var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
111+
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
112112
}
113113
}
114114
catch (global::System.Exception __ex)
@@ -141,7 +141,7 @@ partial void ProcessPostBatchResponseContent(
141141
}
142142
else
143143
{
144-
var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
144+
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
145145
}
146146
}
147147
catch (global::System.Exception __ex)
@@ -174,7 +174,7 @@ partial void ProcessPostBatchResponseContent(
174174
}
175175
else
176176
{
177-
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
177+
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
178178
}
179179
}
180180
catch (global::System.Exception __ex)
@@ -207,7 +207,7 @@ partial void ProcessPostBatchResponseContent(
207207
}
208208
else
209209
{
210-
var __contentStream_500 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
210+
__content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
211211
}
212212
}
213213
catch (global::System.Exception __ex)
@@ -286,11 +286,25 @@ partial void ProcessPostBatchResponseContent(
286286
}
287287
catch (global::System.Exception __ex)
288288
{
289+
string? __content = null;
290+
try
291+
{
292+
__content = await __response.Content.ReadAsStringAsync(
293+
#if NET5_0_OR_GREATER
294+
cancellationToken
295+
#endif
296+
).ConfigureAwait(false);
297+
}
298+
catch (global::System.Exception)
299+
{
300+
}
301+
289302
throw new global::Ideogram.ApiException(
290-
message: __response.ReasonPhrase ?? string.Empty,
303+
message: __content ?? __response.ReasonPhrase ?? string.Empty,
291304
innerException: __ex,
292305
statusCode: __response.StatusCode)
293306
{
307+
ResponseBody = __content,
294308
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
295309
__response.Headers,
296310
h => h.Key,

src/libs/Ideogram/Generated/Ideogram.DatasetsClient.CreateDataset.g.cs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ partial void ProcessCreateDatasetResponseContent(
107107
}
108108
else
109109
{
110-
var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
110+
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
111111
}
112112
}
113113
catch (global::System.Exception __ex)
@@ -140,7 +140,7 @@ partial void ProcessCreateDatasetResponseContent(
140140
}
141141
else
142142
{
143-
var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
143+
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
144144
}
145145
}
146146
catch (global::System.Exception __ex)
@@ -219,11 +219,25 @@ partial void ProcessCreateDatasetResponseContent(
219219
}
220220
catch (global::System.Exception __ex)
221221
{
222+
string? __content = null;
223+
try
224+
{
225+
__content = await __response.Content.ReadAsStringAsync(
226+
#if NET5_0_OR_GREATER
227+
cancellationToken
228+
#endif
229+
).ConfigureAwait(false);
230+
}
231+
catch (global::System.Exception)
232+
{
233+
}
234+
222235
throw new global::Ideogram.ApiException(
223-
message: __response.ReasonPhrase ?? string.Empty,
236+
message: __content ?? __response.ReasonPhrase ?? string.Empty,
224237
innerException: __ex,
225238
statusCode: __response.StatusCode)
226239
{
240+
ResponseBody = __content,
227241
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
228242
__response.Headers,
229243
h => h.Key,

src/libs/Ideogram/Generated/Ideogram.DatasetsClient.ListDatasets.g.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ partial void ProcessListDatasetsResponseContent(
9292
}
9393
else
9494
{
95-
var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
95+
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
9696
}
9797
}
9898
catch (global::System.Exception __ex)
@@ -171,11 +171,25 @@ partial void ProcessListDatasetsResponseContent(
171171
}
172172
catch (global::System.Exception __ex)
173173
{
174+
string? __content = null;
175+
try
176+
{
177+
__content = await __response.Content.ReadAsStringAsync(
178+
#if NET5_0_OR_GREATER
179+
cancellationToken
180+
#endif
181+
).ConfigureAwait(false);
182+
}
183+
catch (global::System.Exception)
184+
{
185+
}
186+
174187
throw new global::Ideogram.ApiException(
175-
message: __response.ReasonPhrase ?? string.Empty,
188+
message: __content ?? __response.ReasonPhrase ?? string.Empty,
176189
innerException: __ex,
177190
statusCode: __response.StatusCode)
178191
{
192+
ResponseBody = __content,
179193
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
180194
__response.Headers,
181195
h => h.Key,

src/libs/Ideogram/Generated/Ideogram.DatasetsClient.TrainDatasetModel.g.cs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ partial void ProcessTrainDatasetModelResponseContent(
113113
}
114114
else
115115
{
116-
var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
116+
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
117117
}
118118
}
119119
catch (global::System.Exception __ex)
@@ -146,7 +146,7 @@ partial void ProcessTrainDatasetModelResponseContent(
146146
}
147147
else
148148
{
149-
var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
149+
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
150150
}
151151
}
152152
catch (global::System.Exception __ex)
@@ -179,7 +179,7 @@ partial void ProcessTrainDatasetModelResponseContent(
179179
}
180180
else
181181
{
182-
var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
182+
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
183183
}
184184
}
185185
catch (global::System.Exception __ex)
@@ -258,11 +258,25 @@ partial void ProcessTrainDatasetModelResponseContent(
258258
}
259259
catch (global::System.Exception __ex)
260260
{
261+
string? __content = null;
262+
try
263+
{
264+
__content = await __response.Content.ReadAsStringAsync(
265+
#if NET5_0_OR_GREATER
266+
cancellationToken
267+
#endif
268+
).ConfigureAwait(false);
269+
}
270+
catch (global::System.Exception)
271+
{
272+
}
273+
261274
throw new global::Ideogram.ApiException(
262-
message: __response.ReasonPhrase ?? string.Empty,
275+
message: __content ?? __response.ReasonPhrase ?? string.Empty,
263276
innerException: __ex,
264277
statusCode: __response.StatusCode)
265278
{
279+
ResponseBody = __content,
266280
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
267281
__response.Headers,
268282
h => h.Key,

src/libs/Ideogram/Generated/Ideogram.DatasetsClient.UploadDatasetAssets.g.cs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ partial void ProcessUploadDatasetAssetsResponseContent(
115115
}
116116
else
117117
{
118-
var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
118+
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
119119
}
120120
}
121121
catch (global::System.Exception __ex)
@@ -148,7 +148,7 @@ partial void ProcessUploadDatasetAssetsResponseContent(
148148
}
149149
else
150150
{
151-
var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
151+
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
152152
}
153153
}
154154
catch (global::System.Exception __ex)
@@ -181,7 +181,7 @@ partial void ProcessUploadDatasetAssetsResponseContent(
181181
}
182182
else
183183
{
184-
var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
184+
__content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
185185
}
186186
}
187187
catch (global::System.Exception __ex)
@@ -260,11 +260,25 @@ partial void ProcessUploadDatasetAssetsResponseContent(
260260
}
261261
catch (global::System.Exception __ex)
262262
{
263+
string? __content = null;
264+
try
265+
{
266+
__content = await __response.Content.ReadAsStringAsync(
267+
#if NET5_0_OR_GREATER
268+
cancellationToken
269+
#endif
270+
).ConfigureAwait(false);
271+
}
272+
catch (global::System.Exception)
273+
{
274+
}
275+
263276
throw new global::Ideogram.ApiException(
264-
message: __response.ReasonPhrase ?? string.Empty,
277+
message: __content ?? __response.ReasonPhrase ?? string.Empty,
265278
innerException: __ex,
266279
statusCode: __response.StatusCode)
267280
{
281+
ResponseBody = __content,
268282
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
269283
__response.Headers,
270284
h => h.Key,

src/libs/Ideogram/Generated/Ideogram.Exceptions.g.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ public partial class ApiException : global::System.Exception
1313
/// </summary>
1414
public global::System.Net.HttpStatusCode StatusCode { get; }
1515
/// <summary>
16-
/// The response body.
16+
/// The response body as a string, or <c>null</c> if the body could not be read.
17+
/// This is always populated for error responses regardless of the <c>ReadResponseAsString</c> setting.
18+
/// For success-path failures (e.g. deserialization errors), the client attempts a best-effort read.
1719
/// </summary>
1820
public string? ResponseBody { get; set; }
1921
/// <summary>

src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImage.g.cs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ partial void ProcessPostEditImageResponseContent(
158158
}
159159
else
160160
{
161-
var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
161+
__content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
162162
}
163163
}
164164
catch (global::System.Exception __ex)
@@ -191,7 +191,7 @@ partial void ProcessPostEditImageResponseContent(
191191
}
192192
else
193193
{
194-
var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
194+
__content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
195195
}
196196
}
197197
catch (global::System.Exception __ex)
@@ -226,8 +226,9 @@ partial void ProcessPostEditImageResponseContent(
226226
}
227227
else
228228
{
229-
var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
230-
__value_422 = await global::Ideogram.GenerateImageSafetyError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false);
229+
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
230+
231+
__value_422 = global::Ideogram.GenerateImageSafetyError.FromJson(__content_422, JsonSerializerContext);
231232
}
232233
}
233234
catch (global::System.Exception __ex)
@@ -261,7 +262,7 @@ partial void ProcessPostEditImageResponseContent(
261262
}
262263
else
263264
{
264-
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
265+
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
265266
}
266267
}
267268
catch (global::System.Exception __ex)
@@ -340,11 +341,25 @@ partial void ProcessPostEditImageResponseContent(
340341
}
341342
catch (global::System.Exception __ex)
342343
{
344+
string? __content = null;
345+
try
346+
{
347+
__content = await __response.Content.ReadAsStringAsync(
348+
#if NET5_0_OR_GREATER
349+
cancellationToken
350+
#endif
351+
).ConfigureAwait(false);
352+
}
353+
catch (global::System.Exception)
354+
{
355+
}
356+
343357
throw new global::Ideogram.ApiException(
344-
message: __response.ReasonPhrase ?? string.Empty,
358+
message: __content ?? __response.ReasonPhrase ?? string.Empty,
345359
innerException: __ex,
346360
statusCode: __response.StatusCode)
347361
{
362+
ResponseBody = __content,
348363
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
349364
__response.Headers,
350365
h => h.Key,

0 commit comments

Comments
 (0)