Yuna/Yuna.Website/Yuna.Website.Server/Model/YandexDevice/YandexProp.cs

34 lines
903 B
C#

using System.Text.Json.Serialization;
namespace Yuna.Website.Server.Model.YandexDevice
{
public class YandexProp
{
public YandexProp()
{ }
public YandexProp(YandexPropType type, bool retrievable, bool reportable, YandexParameter parameter)
{
Type = type;
Retrievable = retrievable;
Reportable = reportable;
Parameter = parameter;
}
[JsonIgnore]
public YandexPropType Type { get; set; }
[JsonPropertyName("type")]
public string JsonPropName => Type.ToJsonName();
[JsonPropertyName("retrievable")]
public bool Retrievable { get; set; } = true;
[JsonPropertyName("reportable")]
public bool Reportable { get; set; } = true;
[JsonPropertyName("parameters")]
public YandexParameter Parameter { get; set; } = null!;
}
}