namespace ZB.MOM.WW.LmxProxy.Client
{
    /// <summary>
    /// API key information returned from CheckApiKey
    /// </summary>
    public class ApiKeyInfo
    {
        /// <summary>
        /// Whether the API key is valid
        /// </summary>
        public bool IsValid { get; }

        /// <summary>
        /// The role assigned to the API key
        /// </summary>
        public string Role { get; }

        /// <summary>
        /// Description of the API key
        /// </summary>
        public string Description { get; }

        /// <summary>
        /// Initializes a new instance of the ApiKeyInfo class
        /// </summary>
        /// <param name="isValid">Whether the API key is valid</param>
        /// <param name="role">The role assigned to the API key</param>
        /// <param name="description">Description of the API key</param>
        public ApiKeyInfo(bool isValid, string role, string description)
        {
            IsValid = isValid;
            Role = role ?? string.Empty;
            Description = description ?? string.Empty;
        }
    }
}
