// ****************************** // GENERATED CODE, DO NOT EDIT. // RUN FORMATTER AFTER GENERATE // ****************************** using System.ComponentModel; using BililiveRecorder.FlvProcessor; using HierarchicalPropertyDefault; using Newtonsoft.Json; #nullable enable namespace BililiveRecorder.Core.Config.V2 { [JsonObject(MemberSerialization.OptIn)] public sealed partial class RoomConfig : HierarchicalObject { /// /// 房间号 /// public int RoomId { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRoomId { get => this.GetPropertyHasValue(nameof(this.RoomId)); set => this.SetPropertyHasValue(value, nameof(this.RoomId)); } [JsonProperty(nameof(RoomId)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRoomId { get => this.GetPropertyValueOptional(nameof(this.RoomId)); set => this.SetPropertyValueOptional(value, nameof(this.RoomId)); } /// /// 是否启用自动录制 /// public bool AutoRecord { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasAutoRecord { get => this.GetPropertyHasValue(nameof(this.AutoRecord)); set => this.SetPropertyHasValue(value, nameof(this.AutoRecord)); } [JsonProperty(nameof(AutoRecord)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalAutoRecord { get => this.GetPropertyValueOptional(nameof(this.AutoRecord)); set => this.SetPropertyValueOptional(value, nameof(this.AutoRecord)); } /// /// 录制文件自动切割模式 /// public AutoCuttingMode CuttingMode { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasCuttingMode { get => this.GetPropertyHasValue(nameof(this.CuttingMode)); set => this.SetPropertyHasValue(value, nameof(this.CuttingMode)); } [JsonProperty(nameof(CuttingMode)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalCuttingMode { get => this.GetPropertyValueOptional(nameof(this.CuttingMode)); set => this.SetPropertyValueOptional(value, nameof(this.CuttingMode)); } /// /// 录制文件自动切割数值(分钟/MiB) /// public uint CuttingNumber { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasCuttingNumber { get => this.GetPropertyHasValue(nameof(this.CuttingNumber)); set => this.SetPropertyHasValue(value, nameof(this.CuttingNumber)); } [JsonProperty(nameof(CuttingNumber)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalCuttingNumber { get => this.GetPropertyValueOptional(nameof(this.CuttingNumber)); set => this.SetPropertyValueOptional(value, nameof(this.CuttingNumber)); } /// /// 是否同时录制弹幕 /// public bool RecordDanmaku { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmaku { get => this.GetPropertyHasValue(nameof(this.RecordDanmaku)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmaku)); } [JsonProperty(nameof(RecordDanmaku)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmaku { get => this.GetPropertyValueOptional(nameof(this.RecordDanmaku)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmaku)); } /// /// 是否记录弹幕原始数据 /// public bool RecordDanmakuRaw { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmakuRaw { get => this.GetPropertyHasValue(nameof(this.RecordDanmakuRaw)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmakuRaw)); } [JsonProperty(nameof(RecordDanmakuRaw)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmakuRaw { get => this.GetPropertyValueOptional(nameof(this.RecordDanmakuRaw)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmakuRaw)); } /// /// 是否同时录制 SuperChat /// public bool RecordDanmakuSuperChat { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmakuSuperChat { get => this.GetPropertyHasValue(nameof(this.RecordDanmakuSuperChat)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmakuSuperChat)); } [JsonProperty(nameof(RecordDanmakuSuperChat)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmakuSuperChat { get => this.GetPropertyValueOptional(nameof(this.RecordDanmakuSuperChat)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmakuSuperChat)); } /// /// 是否同时录制 礼物 /// public bool RecordDanmakuGift { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmakuGift { get => this.GetPropertyHasValue(nameof(this.RecordDanmakuGift)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmakuGift)); } [JsonProperty(nameof(RecordDanmakuGift)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmakuGift { get => this.GetPropertyValueOptional(nameof(this.RecordDanmakuGift)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmakuGift)); } /// /// 是否同时录制 上船 /// public bool RecordDanmakuGuard { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmakuGuard { get => this.GetPropertyHasValue(nameof(this.RecordDanmakuGuard)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmakuGuard)); } [JsonProperty(nameof(RecordDanmakuGuard)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmakuGuard { get => this.GetPropertyValueOptional(nameof(this.RecordDanmakuGuard)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmakuGuard)); } /// /// 启用的功能 /// public EnabledFeature EnabledFeature => this.GetPropertyValue(); /// /// 剪辑-过去的时长(秒) /// public uint ClipLengthPast => this.GetPropertyValue(); /// /// 剪辑-将来的时长(秒) /// public uint ClipLengthFuture => this.GetPropertyValue(); /// /// 录制断开重连时间间隔 毫秒 /// public uint TimingStreamRetry => this.GetPropertyValue(); /// /// 连接直播服务器超时时间 毫秒 /// public uint TimingStreamConnect => this.GetPropertyValue(); /// /// 弹幕服务器重连时间间隔 毫秒 /// public uint TimingDanmakuRetry => this.GetPropertyValue(); /// /// HTTP API 检查时间间隔 秒 /// public uint TimingCheckInterval => this.GetPropertyValue(); /// /// 最大未收到新直播数据时间 毫秒 /// public uint TimingWatchdogTimeout => this.GetPropertyValue(); /// /// 触发 的弹幕个数 /// public uint RecordDanmakuFlushInterval => this.GetPropertyValue(); /// /// 请求 API 时使用的 Cookie /// public string? Cookie => this.GetPropertyValue(); /// /// 录制文件写入结束 Webhook 地址 每行一个 /// public string? WebHookUrls => this.GetPropertyValue(); /// /// 替换 api.live.bilibili.com 服务器为其他反代,可以支持在云服务器上录制 /// public string? LiveApiHost => this.GetPropertyValue(); /// /// 录制文件名模板 /// public string? RecordFilenameFormat => this.GetPropertyValue(); /// /// 剪辑文件名模板 /// public string? ClipFilenameFormat => this.GetPropertyValue(); } [JsonObject(MemberSerialization.OptIn)] public sealed partial class GlobalConfig : HierarchicalObject { /// /// 启用的功能 /// public EnabledFeature EnabledFeature { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasEnabledFeature { get => this.GetPropertyHasValue(nameof(this.EnabledFeature)); set => this.SetPropertyHasValue(value, nameof(this.EnabledFeature)); } [JsonProperty(nameof(EnabledFeature)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalEnabledFeature { get => this.GetPropertyValueOptional(nameof(this.EnabledFeature)); set => this.SetPropertyValueOptional(value, nameof(this.EnabledFeature)); } /// /// 剪辑-过去的时长(秒) /// public uint ClipLengthPast { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasClipLengthPast { get => this.GetPropertyHasValue(nameof(this.ClipLengthPast)); set => this.SetPropertyHasValue(value, nameof(this.ClipLengthPast)); } [JsonProperty(nameof(ClipLengthPast)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalClipLengthPast { get => this.GetPropertyValueOptional(nameof(this.ClipLengthPast)); set => this.SetPropertyValueOptional(value, nameof(this.ClipLengthPast)); } /// /// 剪辑-将来的时长(秒) /// public uint ClipLengthFuture { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasClipLengthFuture { get => this.GetPropertyHasValue(nameof(this.ClipLengthFuture)); set => this.SetPropertyHasValue(value, nameof(this.ClipLengthFuture)); } [JsonProperty(nameof(ClipLengthFuture)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalClipLengthFuture { get => this.GetPropertyValueOptional(nameof(this.ClipLengthFuture)); set => this.SetPropertyValueOptional(value, nameof(this.ClipLengthFuture)); } /// /// 录制断开重连时间间隔 毫秒 /// public uint TimingStreamRetry { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasTimingStreamRetry { get => this.GetPropertyHasValue(nameof(this.TimingStreamRetry)); set => this.SetPropertyHasValue(value, nameof(this.TimingStreamRetry)); } [JsonProperty(nameof(TimingStreamRetry)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalTimingStreamRetry { get => this.GetPropertyValueOptional(nameof(this.TimingStreamRetry)); set => this.SetPropertyValueOptional(value, nameof(this.TimingStreamRetry)); } /// /// 连接直播服务器超时时间 毫秒 /// public uint TimingStreamConnect { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasTimingStreamConnect { get => this.GetPropertyHasValue(nameof(this.TimingStreamConnect)); set => this.SetPropertyHasValue(value, nameof(this.TimingStreamConnect)); } [JsonProperty(nameof(TimingStreamConnect)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalTimingStreamConnect { get => this.GetPropertyValueOptional(nameof(this.TimingStreamConnect)); set => this.SetPropertyValueOptional(value, nameof(this.TimingStreamConnect)); } /// /// 弹幕服务器重连时间间隔 毫秒 /// public uint TimingDanmakuRetry { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasTimingDanmakuRetry { get => this.GetPropertyHasValue(nameof(this.TimingDanmakuRetry)); set => this.SetPropertyHasValue(value, nameof(this.TimingDanmakuRetry)); } [JsonProperty(nameof(TimingDanmakuRetry)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalTimingDanmakuRetry { get => this.GetPropertyValueOptional(nameof(this.TimingDanmakuRetry)); set => this.SetPropertyValueOptional(value, nameof(this.TimingDanmakuRetry)); } /// /// HTTP API 检查时间间隔 秒 /// public uint TimingCheckInterval { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasTimingCheckInterval { get => this.GetPropertyHasValue(nameof(this.TimingCheckInterval)); set => this.SetPropertyHasValue(value, nameof(this.TimingCheckInterval)); } [JsonProperty(nameof(TimingCheckInterval)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalTimingCheckInterval { get => this.GetPropertyValueOptional(nameof(this.TimingCheckInterval)); set => this.SetPropertyValueOptional(value, nameof(this.TimingCheckInterval)); } /// /// 最大未收到新直播数据时间 毫秒 /// public uint TimingWatchdogTimeout { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasTimingWatchdogTimeout { get => this.GetPropertyHasValue(nameof(this.TimingWatchdogTimeout)); set => this.SetPropertyHasValue(value, nameof(this.TimingWatchdogTimeout)); } [JsonProperty(nameof(TimingWatchdogTimeout)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalTimingWatchdogTimeout { get => this.GetPropertyValueOptional(nameof(this.TimingWatchdogTimeout)); set => this.SetPropertyValueOptional(value, nameof(this.TimingWatchdogTimeout)); } /// /// 触发 的弹幕个数 /// public uint RecordDanmakuFlushInterval { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmakuFlushInterval { get => this.GetPropertyHasValue(nameof(this.RecordDanmakuFlushInterval)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmakuFlushInterval)); } [JsonProperty(nameof(RecordDanmakuFlushInterval)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmakuFlushInterval { get => this.GetPropertyValueOptional(nameof(this.RecordDanmakuFlushInterval)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmakuFlushInterval)); } /// /// 请求 API 时使用的 Cookie /// public string? Cookie { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasCookie { get => this.GetPropertyHasValue(nameof(this.Cookie)); set => this.SetPropertyHasValue(value, nameof(this.Cookie)); } [JsonProperty(nameof(Cookie)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalCookie { get => this.GetPropertyValueOptional(nameof(this.Cookie)); set => this.SetPropertyValueOptional(value, nameof(this.Cookie)); } /// /// 录制文件写入结束 Webhook 地址 每行一个 /// public string? WebHookUrls { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasWebHookUrls { get => this.GetPropertyHasValue(nameof(this.WebHookUrls)); set => this.SetPropertyHasValue(value, nameof(this.WebHookUrls)); } [JsonProperty(nameof(WebHookUrls)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalWebHookUrls { get => this.GetPropertyValueOptional(nameof(this.WebHookUrls)); set => this.SetPropertyValueOptional(value, nameof(this.WebHookUrls)); } /// /// 替换 api.live.bilibili.com 服务器为其他反代,可以支持在云服务器上录制 /// public string? LiveApiHost { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasLiveApiHost { get => this.GetPropertyHasValue(nameof(this.LiveApiHost)); set => this.SetPropertyHasValue(value, nameof(this.LiveApiHost)); } [JsonProperty(nameof(LiveApiHost)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalLiveApiHost { get => this.GetPropertyValueOptional(nameof(this.LiveApiHost)); set => this.SetPropertyValueOptional(value, nameof(this.LiveApiHost)); } /// /// 录制文件名模板 /// public string? RecordFilenameFormat { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordFilenameFormat { get => this.GetPropertyHasValue(nameof(this.RecordFilenameFormat)); set => this.SetPropertyHasValue(value, nameof(this.RecordFilenameFormat)); } [JsonProperty(nameof(RecordFilenameFormat)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordFilenameFormat { get => this.GetPropertyValueOptional(nameof(this.RecordFilenameFormat)); set => this.SetPropertyValueOptional(value, nameof(this.RecordFilenameFormat)); } /// /// 剪辑文件名模板 /// public string? ClipFilenameFormat { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasClipFilenameFormat { get => this.GetPropertyHasValue(nameof(this.ClipFilenameFormat)); set => this.SetPropertyHasValue(value, nameof(this.ClipFilenameFormat)); } [JsonProperty(nameof(ClipFilenameFormat)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalClipFilenameFormat { get => this.GetPropertyValueOptional(nameof(this.ClipFilenameFormat)); set => this.SetPropertyValueOptional(value, nameof(this.ClipFilenameFormat)); } /// /// 录制文件自动切割模式 /// public AutoCuttingMode CuttingMode { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasCuttingMode { get => this.GetPropertyHasValue(nameof(this.CuttingMode)); set => this.SetPropertyHasValue(value, nameof(this.CuttingMode)); } [JsonProperty(nameof(CuttingMode)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalCuttingMode { get => this.GetPropertyValueOptional(nameof(this.CuttingMode)); set => this.SetPropertyValueOptional(value, nameof(this.CuttingMode)); } /// /// 录制文件自动切割数值(分钟/MiB) /// public uint CuttingNumber { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasCuttingNumber { get => this.GetPropertyHasValue(nameof(this.CuttingNumber)); set => this.SetPropertyHasValue(value, nameof(this.CuttingNumber)); } [JsonProperty(nameof(CuttingNumber)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalCuttingNumber { get => this.GetPropertyValueOptional(nameof(this.CuttingNumber)); set => this.SetPropertyValueOptional(value, nameof(this.CuttingNumber)); } /// /// 是否同时录制弹幕 /// public bool RecordDanmaku { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmaku { get => this.GetPropertyHasValue(nameof(this.RecordDanmaku)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmaku)); } [JsonProperty(nameof(RecordDanmaku)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmaku { get => this.GetPropertyValueOptional(nameof(this.RecordDanmaku)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmaku)); } /// /// 是否记录弹幕原始数据 /// public bool RecordDanmakuRaw { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmakuRaw { get => this.GetPropertyHasValue(nameof(this.RecordDanmakuRaw)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmakuRaw)); } [JsonProperty(nameof(RecordDanmakuRaw)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmakuRaw { get => this.GetPropertyValueOptional(nameof(this.RecordDanmakuRaw)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmakuRaw)); } /// /// 是否同时录制 SuperChat /// public bool RecordDanmakuSuperChat { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmakuSuperChat { get => this.GetPropertyHasValue(nameof(this.RecordDanmakuSuperChat)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmakuSuperChat)); } [JsonProperty(nameof(RecordDanmakuSuperChat)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmakuSuperChat { get => this.GetPropertyValueOptional(nameof(this.RecordDanmakuSuperChat)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmakuSuperChat)); } /// /// 是否同时录制 礼物 /// public bool RecordDanmakuGift { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmakuGift { get => this.GetPropertyHasValue(nameof(this.RecordDanmakuGift)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmakuGift)); } [JsonProperty(nameof(RecordDanmakuGift)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmakuGift { get => this.GetPropertyValueOptional(nameof(this.RecordDanmakuGift)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmakuGift)); } /// /// 是否同时录制 上船 /// public bool RecordDanmakuGuard { get => this.GetPropertyValue(); set => this.SetPropertyValue(value); } public bool HasRecordDanmakuGuard { get => this.GetPropertyHasValue(nameof(this.RecordDanmakuGuard)); set => this.SetPropertyHasValue(value, nameof(this.RecordDanmakuGuard)); } [JsonProperty(nameof(RecordDanmakuGuard)), EditorBrowsable(EditorBrowsableState.Never)] public Optional OptionalRecordDanmakuGuard { get => this.GetPropertyValueOptional(nameof(this.RecordDanmakuGuard)); set => this.SetPropertyValueOptional(value, nameof(this.RecordDanmakuGuard)); } } public sealed partial class DefaultConfig { internal static readonly DefaultConfig Instance = new DefaultConfig(); private DefaultConfig() { } public EnabledFeature EnabledFeature => EnabledFeature.RecordOnly; public uint ClipLengthPast => 20; public uint ClipLengthFuture => 10; public uint TimingStreamRetry => 6 * 1000; public uint TimingStreamConnect => 5 * 1000; public uint TimingDanmakuRetry => 15 * 1000; public uint TimingCheckInterval => 5 * 60; public uint TimingWatchdogTimeout => 10 * 1000; public uint RecordDanmakuFlushInterval => 20; public string Cookie => string.Empty; public string WebHookUrls => string.Empty; public string LiveApiHost => "https://api.live.bilibili.com"; public string RecordFilenameFormat => @"{roomid}-{name}/录制-{roomid}-{date}-{time}-{title}.flv"; public string ClipFilenameFormat => @"{roomid}-{name}/剪辑片段-{roomid}-{date}-{time}-{title}.flv"; public AutoCuttingMode CuttingMode => AutoCuttingMode.Disabled; public uint CuttingNumber => 100; public bool RecordDanmaku => false; public bool RecordDanmakuRaw => false; public bool RecordDanmakuSuperChat => true; public bool RecordDanmakuGift => false; public bool RecordDanmakuGuard => true; } }