using AnthropicClient.Utils;
namespace AnthropicClient.Models;
///
/// Attribute to describe a function parameter.
///
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class FunctionParameterAttribute : Attribute
{
///
/// The name of the parameter.
///
public string Name { get; }
///
/// The description of the parameter.
///
public string Description { get; }
///
/// Whether the parameter is required.
///
public bool Required { get; }
///
/// Initializes a new instance of the class.
///
/// The name of the parameter.
/// The description of the parameter.
/// Whether the parameter is required.
/// A new instance of the class.
public FunctionParameterAttribute(string description, string name = "", bool required = false)
{
ArgumentValidator.ThrowIfNullOrWhitespace(description, nameof(description));
ArgumentValidator.ThrowIfNull(name, nameof(name));
Name = name;
Description = description;
Required = required;
}
}