using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace API.Controllers.Requests; public record CreateNotificationConnectorRecord(string Name, string Url, string HttpMethod, string Body, Dictionary Headers) { /// /// The Name of the Notification Connector /// [Required] [Description("The Name of the Notification Connector")] public string Name { get; init; } = Name; /// /// The Url of the Instance /// /// Formatting placeholders: "%title" and "%text" will be replaced when notifications are sent [Required] [Url] [Description("The Url of the Instance")] public string Url { get; internal set; } = Url; /// /// The HTTP Request Method to use for notifications /// [Required] [Description("The HTTP Request Method to use for notifications")] public string HttpMethod { get; internal set; } = HttpMethod; /// /// The Request Body to use to send notifications /// /// Formatting placeholders: "%title" and "%text" will be replaced when notifications are sent [Required] [Description("The Request Body to use to send notifications")] public string Body { get; internal set; } = Body; /// /// The Request Headers to use to send notifications /// /// Formatting placeholders: "%title" and "%text" will be replaced when notifications are sent [Required] [Description("The Request Headers to use to send notifications")] public Dictionary Headers { get; internal set; } = Headers; }