using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
namespace PSProxmox.Models
{
///
/// Represents a role in Proxmox VE.
///
public class ProxmoxRole
{
///
/// Gets or sets the role ID.
///
[JsonProperty("roleid")]
public string RoleID { get; set; }
///
/// Gets or sets the role's privileges.
///
[JsonProperty("privs")]
public string Privileges { get; set; }
///
/// Gets or sets a value indicating whether the role is a special role.
///
[JsonProperty("special")]
public bool Special { get; set; }
///
/// Gets the role's privileges as a list.
///
[JsonIgnore]
public List PrivilegesList => Privileges?.Split(',').ToList() ?? new List();
}
}