|
| 1 | +using PnP.Core.Model.Security; |
| 2 | +using System; |
| 3 | + |
| 4 | +namespace PnP.Core.Model.SharePoint |
| 5 | +{ |
| 6 | + /// <summary> |
| 7 | + /// Alert class, write your custom code here |
| 8 | + /// </summary> |
| 9 | + [SharePointType("SP.Alert", Target = typeof(Web), Uri = "_api/Web/Alerts(guid'{Id}')", Get = "_api/Web/Alerts", LinqGet = "_api/Web/Alerts")] |
| 10 | + internal sealed class Alert : BaseDataModel<IAlert>, IAlert |
| 11 | + { |
| 12 | + #region Construction |
| 13 | + public Alert() |
| 14 | + { |
| 15 | + } |
| 16 | + #endregion |
| 17 | + |
| 18 | + #region Properties |
| 19 | + |
| 20 | + public AlertFrequency AlertFrequency { get => GetValue<AlertFrequency>(); set => SetValue(value); } |
| 21 | + |
| 22 | + public string AlertTemplateName { get => GetValue<string>(); set => SetValue(value); } |
| 23 | + |
| 24 | + public DateTime AlertTime { get => GetValue<DateTime>(); set => SetValue(value); } |
| 25 | + |
| 26 | + public AlertType AlertType { get => GetValue<AlertType>(); set => SetValue(value); } |
| 27 | + |
| 28 | + public bool AlwaysNotify { get => GetValue<bool>(); set => SetValue(value); } |
| 29 | + |
| 30 | + public AlertDeliveryMethod DeliveryChannels { get => GetValue<AlertDeliveryMethod>(); set => SetValue(value); } |
| 31 | + |
| 32 | + public AlertEventType EventType { get => GetValue<AlertEventType>(); set => SetValue(value); } |
| 33 | + |
| 34 | + public string Filter { get => GetValue<string>(); set => SetValue(value); } |
| 35 | + |
| 36 | + public Guid Id { get => GetValue<Guid>(); set => SetValue(value); } |
| 37 | + |
| 38 | + public int ItemID { get => GetValue<int>(); set => SetValue(value); } |
| 39 | + |
| 40 | + public Guid ListId { get => GetValue<Guid>(); set => SetValue(value); } |
| 41 | + |
| 42 | + public string ListUrl { get => GetValue<string>(); set => SetValue(value); } |
| 43 | + |
| 44 | + public AlertStatus Status { get => GetValue<AlertStatus>(); set => SetValue(value); } |
| 45 | + |
| 46 | + public string Title { get => GetValue<string>(); set => SetValue(value); } |
| 47 | + |
| 48 | + public int UserId { get => GetValue<int>(); set => SetValue(value); } |
| 49 | + |
| 50 | + public IPropertyValues AllProperties { get => GetModelValue<IPropertyValues>(); } |
| 51 | + |
| 52 | + public IListItem Item { get => GetModelValue<IListItem>(); } |
| 53 | + |
| 54 | + public IList List { get => GetModelValue<IList>(); } |
| 55 | + |
| 56 | + public ISharePointUser User { get => GetModelValue<ISharePointUser>(); } |
| 57 | + |
| 58 | + [KeyProperty(nameof(Id))] |
| 59 | + public override object Key { get => Id; set => Id = Guid.Parse(value.ToString()); } |
| 60 | + |
| 61 | + [SharePointProperty("*")] |
| 62 | + public object All { get => null; } |
| 63 | + |
| 64 | + #endregion |
| 65 | + |
| 66 | + } |
| 67 | +} |
0 commit comments