using System;
namespace Unity.Pipeline.Commands
{
///
/// Information about a CLI command parameter.
/// Contains metadata needed for parameter validation and CLI help generation.
///
public class CommandParameterInfo
{
///
/// Name of the parameter for CLI arguments.
///
public string Name { get; }
///
/// Human-readable description of the parameter.
///
public string Description { get; }
///
/// Whether this parameter is required for command execution.
///
public bool Required { get; }
///
/// Type of the parameter for validation and conversion.
///
public Type ParameterType { get; }
///
/// Default value for optional parameters.
///
public object DefaultValue { get; }
///
/// Create parameter information from discovery.
///
public CommandParameterInfo(string name, string description, bool required,
Type parameterType, object defaultValue = null)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
Description = description ?? throw new ArgumentNullException(nameof(description));
ParameterType = parameterType ?? throw new ArgumentNullException(nameof(parameterType));
Required = required;
DefaultValue = defaultValue;
}
public override string ToString()
{
return $"{Name} Required:{Required} Type:{ParameterType}";
}
}
}