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 @@ -124,13 +124,41 @@ partial void ProcessCreateRodinTaskResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Tier}"),
content: new global::System.Net.Http.StringContent(request.Tier ?? string.Empty),
name: "\"tier\"");
}
if (request.Images != default)
{

var __contentImages = new global::System.Net.Http.ByteArrayContent(request.Images ?? global::System.Array.Empty<byte>());
__contentImages.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Imagesname is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Imagesname) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentImages,
name: "\"images\"",
Expand All @@ -144,91 +172,91 @@ partial void ProcessCreateRodinTaskResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Prompt}"),
content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty),
name: "\"prompt\"");
}
if (request.UseOriginalAlpha != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.UseOriginalAlpha}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.UseOriginalAlpha, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"use_original_alpha\"");
}
if (request.ConditionMode != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ConditionMode?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.ConditionMode).HasValue ? (request.ConditionMode).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"condition_mode\"");
}
if (request.Seed != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Seed}"),
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.Seed, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"seed\"");
}
if (request.GeometryFileFormat != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.GeometryFileFormat?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.GeometryFileFormat).HasValue ? (request.GeometryFileFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"geometry_file_format\"");
}
if (request.Material != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Material?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.Material).HasValue ? (request.Material).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"material\"");
}
if (request.Quality != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Quality?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.Quality).HasValue ? (request.Quality).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"quality\"");
}
if (request.QualityOverride != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.QualityOverride}"),
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.QualityOverride, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"quality_override\"");
}
if (request.TAPose != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.TAPose}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.TAPose, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"TAPose\"");
}
if (request.BboxCondition != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.BboxCondition, x => x))}]"),
content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.BboxCondition, x => global::System.Convert.ToString(x, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty))}]"),
name: "\"bbox_condition\"");
}
if (request.MeshMode != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.MeshMode?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.MeshMode).HasValue ? (request.MeshMode).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"mesh_mode\"");
}
if (request.MeshSimplify != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.MeshSimplify}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.MeshSimplify, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"mesh_simplify\"");
}
if (request.MeshSmooth != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.MeshSmooth}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.MeshSmooth, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"mesh_smooth\"");
}
if (request.Addons != default)
Expand All @@ -242,14 +270,14 @@ partial void ProcessCreateRodinTaskResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.PreviewRender}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.PreviewRender, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"preview_render\"");
}
if (request.HdTexture != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.HdTexture}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.HdTexture, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"hd_texture\"");
}
__httpRequest.Content = __httpRequestContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,34 @@ partial void ProcessCreateTextureTaskResponseContent(
{

var __contentImage = new global::System.Net.Http.ByteArrayContent(request.Image ?? global::System.Array.Empty<byte>());
__contentImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Imagename is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Imagename) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentImage,
name: "\"image\"",
Expand All @@ -134,6 +162,34 @@ partial void ProcessCreateTextureTaskResponseContent(
{

var __contentModel = new global::System.Net.Http.ByteArrayContent(request.Model ?? global::System.Array.Empty<byte>());
__contentModel.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Modelname is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Modelname) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentModel,
name: "\"model\"",
Expand All @@ -147,42 +203,42 @@ partial void ProcessCreateTextureTaskResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Prompt}"),
content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty),
name: "\"prompt\"");
}
if (request.Seed != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Seed}"),
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.Seed, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"seed\"");
}
if (request.ReferenceScale != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ReferenceScale}"),
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.ReferenceScale, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"reference_scale\"");
}
if (request.GeometryFileFormat != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.GeometryFileFormat?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.GeometryFileFormat).HasValue ? (request.GeometryFileFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"geometry_file_format\"");
}
if (request.Material != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Material?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.Material).HasValue ? (request.Material).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"material\"");
}
if (request.Resolution != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Resolution?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.Resolution).HasValue ? (request.Resolution).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"resolution\"");
}
__httpRequest.Content = __httpRequestContent;
Expand Down