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
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down Expand Up @@ -57,18 +58,18 @@ internal static partial class AvatarsCreateAvatarsCommandApiCommand
{
Description = @"Controls image preprocessing. `optimize` improves the image for better avatar results. `none` uses the image as-is; quality not guaranteed.",
};
private static Option<string?> Input { get; } = new("--input")
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
};

private static Option<string?> RequestJson { get; } = new("--request-json")
private static Option<string?> RequestJson { get; } = new(@"--request-json")
{
Description = "Request body as JSON.",
Hidden = true,
};

private static Option<string?> RequestFile { get; } = new("--request-file")
private static Option<string?> RequestFile { get; } = new(@"--request-file")
{
Description = "Path to a JSON request file, or '-' for stdin.",
Hidden = true,
Expand Down Expand Up @@ -117,7 +118,7 @@ public static Command Create()
var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0);
if (specifiedCount > 1)
{
result.AddError("Specify at most one of --input, --request-json, or --request-file.");
result.AddError(@"Specify at most one of --input, --request-json, or --request-file.");
}
});

Expand All @@ -135,10 +136,10 @@ await CliRuntime.RunAsync(async () =>
var xRunwayVersion = parseResult.GetRequiredValue(XRunwayVersion);
var referenceImage = parseResult.GetRequiredValue(ReferenceImage);
var personality = parseResult.GetRequiredValue(Personality);
var startScript = parseResult.GetValue(StartScript) ?? __requestBase?.StartScript;
var startScript = CliRuntime.WasSpecified(parseResult, StartScript) ? parseResult.GetValue(StartScript) : __requestBase is not null ? __requestBase.StartScript : default;
var voice = parseResult.GetRequiredValue(Voice);
var documentIds = parseResult.GetValue(DocumentIds) ?? __requestBase?.DocumentIds;
var imageProcessing = parseResult.GetValue(ImageProcessing) ?? __requestBase?.ImageProcessing;
var documentIds = CliRuntime.WasSpecified(parseResult, DocumentIds) ? parseResult.GetValue(DocumentIds) : __requestBase is not null ? __requestBase.DocumentIds : default;
var imageProcessing = CliRuntime.WasSpecified(parseResult, ImageProcessing) ? parseResult.GetValue(ImageProcessing) : __requestBase is not null ? __requestBase.ImageProcessing : default;
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down Expand Up @@ -60,18 +61,18 @@ internal static partial class AvatarsEditAvatarsByIdCommandApiCommand
{
Description = @"Controls image preprocessing. `optimize` improves the image for better avatar results. `none` uses the image as-is; quality not guaranteed.",
};
private static Option<string?> Input { get; } = new("--input")
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
};

private static Option<string?> RequestJson { get; } = new("--request-json")
private static Option<string?> RequestJson { get; } = new(@"--request-json")
{
Description = "Request body as JSON.",
Hidden = true,
};

private static Option<string?> RequestFile { get; } = new("--request-file")
private static Option<string?> RequestFile { get; } = new(@"--request-file")
{
Description = "Path to a JSON request file, or '-' for stdin.",
Hidden = true,
Expand Down Expand Up @@ -121,7 +122,7 @@ public static Command Create()
var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0);
if (specifiedCount > 1)
{
result.AddError("Specify at most one of --input, --request-json, or --request-file.");
result.AddError(@"Specify at most one of --input, --request-json, or --request-file.");
}
});

Expand All @@ -137,13 +138,13 @@ await CliRuntime.RunAsync(async () =>
cancellationToken).ConfigureAwait(false);
var id = parseResult.GetRequiredValue(Id);
var xRunwayVersion = parseResult.GetRequiredValue(XRunwayVersion);
var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name;
var referenceImage = parseResult.GetValue(ReferenceImage) ?? __requestBase?.ReferenceImage;
var personality = parseResult.GetValue(Personality) ?? __requestBase?.Personality;
var startScript = parseResult.GetValue(StartScript) ?? __requestBase?.StartScript;
var voice = parseResult.GetValue(Voice) ?? __requestBase?.Voice;
var documentIds = parseResult.GetValue(DocumentIds) ?? __requestBase?.DocumentIds;
var imageProcessing = parseResult.GetValue(ImageProcessing) ?? __requestBase?.ImageProcessing;
var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default;
var referenceImage = CliRuntime.WasSpecified(parseResult, ReferenceImage) ? parseResult.GetValue(ReferenceImage) : __requestBase is not null ? __requestBase.ReferenceImage : default;
var personality = CliRuntime.WasSpecified(parseResult, Personality) ? parseResult.GetValue(Personality) : __requestBase is not null ? __requestBase.Personality : default;
var startScript = CliRuntime.WasSpecified(parseResult, StartScript) ? parseResult.GetValue(StartScript) : __requestBase is not null ? __requestBase.StartScript : default;
var voice = CliRuntime.WasSpecified(parseResult, Voice) ? parseResult.GetValue(Voice) : __requestBase is not null ? __requestBase.Voice : default;
var documentIds = CliRuntime.WasSpecified(parseResult, DocumentIds) ? parseResult.GetValue(DocumentIds) : __requestBase is not null ? __requestBase.DocumentIds : default;
var imageProcessing = CliRuntime.WasSpecified(parseResult, ImageProcessing) ? parseResult.GetValue(ImageProcessing) : __requestBase is not null ? __requestBase.ImageProcessing : default;
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down Expand Up @@ -30,18 +31,18 @@ internal static partial class KnowledgeEditDocumentsByIdCommandApiCommand
{
Description = @"New markdown or plain text content for the document.",
};
private static Option<string?> Input { get; } = new("--input")
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
};

private static Option<string?> RequestJson { get; } = new("--request-json")
private static Option<string?> RequestJson { get; } = new(@"--request-json")
{
Description = "Request body as JSON.",
Hidden = true,
};

private static Option<string?> RequestFile { get; } = new("--request-file")
private static Option<string?> RequestFile { get; } = new(@"--request-file")
{
Description = "Path to a JSON request file, or '-' for stdin.",
Hidden = true,
Expand All @@ -66,7 +67,7 @@ public static Command Create()
var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0);
if (specifiedCount > 1)
{
result.AddError("Specify at most one of --input, --request-json, or --request-file.");
result.AddError(@"Specify at most one of --input, --request-json, or --request-file.");
}
});

Expand All @@ -82,8 +83,8 @@ await CliRuntime.RunAsync(async () =>
cancellationToken).ConfigureAwait(false);
var id = parseResult.GetRequiredValue(Id);
var xRunwayVersion = parseResult.GetRequiredValue(XRunwayVersion);
var name = parseResult.GetValue(NameOption) ?? __requestBase?.Name;
var content = parseResult.GetValue(Content) ?? __requestBase?.Content;
var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : __requestBase is not null ? __requestBase.Name : default;
var content = CliRuntime.WasSpecified(parseResult, Content) ? parseResult.GetValue(Content) : __requestBase is not null ? __requestBase.Content : default;
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand All @@ -24,18 +25,18 @@ internal static partial class OrganizationCreateOrganizationUsageCommandApiComma
{
Description = @"The end date of the usage data in ISO-8601 format (YYYY-MM-DD), not inclusive. If unspecified, it will default to thirty days after the start date. Must be less than or equal to 90 days after the start date. All dates are in UTC.",
};
private static Option<string?> Input { get; } = new("--input")
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
};

private static Option<string?> RequestJson { get; } = new("--request-json")
private static Option<string?> RequestJson { get; } = new(@"--request-json")
{
Description = "Request body as JSON.",
Hidden = true,
};

private static Option<string?> RequestFile { get; } = new("--request-file")
private static Option<string?> RequestFile { get; } = new(@"--request-file")
{
Description = "Path to a JSON request file, or '-' for stdin.",
Hidden = true,
Expand Down Expand Up @@ -79,7 +80,7 @@ public static Command Create()
var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0);
if (specifiedCount > 1)
{
result.AddError("Specify at most one of --input, --request-json, or --request-file.");
result.AddError(@"Specify at most one of --input, --request-json, or --request-file.");
}
});

Expand All @@ -94,8 +95,8 @@ await CliRuntime.RunAsync(async () =>
global::Runway.SourceGenerationContext.Default,
cancellationToken).ConfigureAwait(false);
var xRunwayVersion = parseResult.GetRequiredValue(XRunwayVersion);
var startDate = parseResult.GetValue(StartDate) ?? __requestBase?.StartDate;
var beforeDate = parseResult.GetValue(BeforeDate) ?? __requestBase?.BeforeDate;
var startDate = CliRuntime.WasSpecified(parseResult, StartDate) ? parseResult.GetValue(StartDate) : __requestBase is not null ? __requestBase.StartDate : default;
var beforeDate = CliRuntime.WasSpecified(parseResult, BeforeDate) ? parseResult.GetValue(BeforeDate) : __requestBase is not null ? __requestBase.BeforeDate : default;
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down Expand Up @@ -50,18 +51,18 @@ internal static partial class RealtimeSessionsCreateRealtimeSessionsCommandApiCo
{
Description = @"Tools available to the avatar during the session.",
};
private static Option<string?> Input { get; } = new("--input")
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
};

private static Option<string?> RequestJson { get; } = new("--request-json")
private static Option<string?> RequestJson { get; } = new(@"--request-json")
{
Description = "Request body as JSON.",
Hidden = true,
};

private static Option<string?> RequestFile { get; } = new("--request-file")
private static Option<string?> RequestFile { get; } = new(@"--request-file")
{
Description = "Path to a JSON request file, or '-' for stdin.",
Hidden = true,
Expand Down Expand Up @@ -109,7 +110,7 @@ public static Command Create()
var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0);
if (specifiedCount > 1)
{
result.AddError("Specify at most one of --input, --request-json, or --request-file.");
result.AddError(@"Specify at most one of --input, --request-json, or --request-file.");
}
});

Expand All @@ -126,10 +127,10 @@ await CliRuntime.RunAsync(async () =>
var xRunwayVersion = parseResult.GetRequiredValue(XRunwayVersion);
var model = parseResult.GetRequiredValue(Model);
var avatar = parseResult.GetRequiredValue(Avatar);
var maxDuration = parseResult.GetValue(MaxDuration) ?? __requestBase?.MaxDuration;
var personality = parseResult.GetValue(Personality) ?? __requestBase?.Personality;
var startScript = parseResult.GetValue(StartScript) ?? __requestBase?.StartScript;
var tools = parseResult.GetValue(Tools) ?? __requestBase?.Tools;
var maxDuration = CliRuntime.WasSpecified(parseResult, MaxDuration) ? parseResult.GetValue(MaxDuration) : __requestBase is not null ? __requestBase.MaxDuration : default;
var personality = CliRuntime.WasSpecified(parseResult, Personality) ? parseResult.GetValue(Personality) : __requestBase is not null ? __requestBase.Personality : default;
var startScript = CliRuntime.WasSpecified(parseResult, StartScript) ? parseResult.GetValue(StartScript) : __requestBase is not null ? __requestBase.StartScript : default;
var tools = CliRuntime.WasSpecified(parseResult, Tools) ? parseResult.GetValue(Tools) : __requestBase is not null ? __requestBase.Tools : default;
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

Expand All @@ -12,18 +13,18 @@ internal static partial class StartGeneratingCreateCharacterPerformanceCommandAp
Description = @"The version of the RunwayML API being used. You can read more about versioning [here](/api-details/versioning).",
DefaultValueFactory = _ => "2024-11-06",
};
private static Option<string?> Input { get; } = new("--input")
private static Option<string?> Input { get; } = new(@"--input")
{
Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.",
};

private static Option<string?> RequestJson { get; } = new("--request-json")
private static Option<string?> RequestJson { get; } = new(@"--request-json")
{
Description = "Request body as JSON.",
Hidden = true,
};

private static Option<string?> RequestFile { get; } = new("--request-file")
private static Option<string?> RequestFile { get; } = new(@"--request-file")
{
Description = "Path to a JSON request file, or '-' for stdin.",
Hidden = true,
Expand Down Expand Up @@ -65,7 +66,7 @@ public static Command Create()
var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0);
if (specifiedCount != 1)
{
result.AddError("Specify exactly one of --input, --request-json, or --request-file.");
result.AddError(@"Specify exactly one of --input, --request-json, or --request-file.");
}
});

Expand Down
Loading
Loading