/// <summary> /// Initializes a new instance of the AlertDto class. /// </summary> /// <param name="severity">The severity level of the alert. Possible /// values include: 'Info', 'Success', 'Warn', 'Error', 'Fatal'</param> /// <param name="notificationName">The name of a specific type of /// notification, e.g. Robot.StatusChanged.NotResponding.</param> /// <param name="data">Stores data about the context in which the event /// occurred, in JSON format.</param> /// <param name="component">The component that raised the alert. /// Possible values include: 'Robots', 'Transactions', 'Schedules', /// 'Jobs', 'Process'</param> /// <param name="creationTime">The date and time when the alert was /// generated.</param> /// <param name="state">Defines if a specified notification has been /// read or not. /// <para />Members: Unread (0) - the specified notification has /// not been marked as read; Read (1) - the specified notification has /// been marked as read. Possible values include: 'Unread', /// 'Read'</param> /// <param name="userNotificationId">The database unique identifier for /// the alert notification sent to the current user.</param> public AlertDto(AlertDtoSeverity severity, string notificationName = default(string), string data = default(string), AlertDtoComponent?component = default(AlertDtoComponent?), System.DateTime?creationTime = default(System.DateTime?), AlertDtoState?state = default(AlertDtoState?), System.Guid?userNotificationId = default(System.Guid?), System.Guid?id = default(System.Guid?)) { NotificationName = notificationName; Data = data; Component = component; Severity = severity; CreationTime = creationTime; State = state; UserNotificationId = userNotificationId; Id = id; CustomInit(); }
internal static string ToSerializedValue(this AlertDtoSeverity value) { switch (value) { case AlertDtoSeverity.Info: return("Info"); case AlertDtoSeverity.Success: return("Success"); case AlertDtoSeverity.Warn: return("Warn"); case AlertDtoSeverity.Error: return("Error"); case AlertDtoSeverity.Fatal: return("Fatal"); } return(null); }