/// <summary>
 /// Initializes a new instance of the <see cref="NotificationRuleBase" /> class.
 /// </summary>
 /// <param name="endpointID">endpointID (required).</param>
 /// <param name="orgID">The ID of the organization that owns this notification rule. (required).</param>
 /// <param name="status">status (required).</param>
 /// <param name="name">Human-readable name describing the notification rule. (required).</param>
 /// <param name="sleepUntil">sleepUntil.</param>
 /// <param name="every">The notification repetition interval..</param>
 /// <param name="offset">Duration to delay after the schedule, before executing check..</param>
 /// <param name="runbookLink">runbookLink.</param>
 /// <param name="limitEvery">Don&#39;t notify me more than &lt;limit&gt; times every &lt;limitEvery&gt; seconds. If set, limit cannot be empty..</param>
 /// <param name="limit">Don&#39;t notify me more than &lt;limit&gt; times every &lt;limitEvery&gt; seconds. If set, limitEvery cannot be empty..</param>
 /// <param name="tagRules">List of tag rules the notification rule attempts to match. (required).</param>
 /// <param name="description">An optional description of the notification rule..</param>
 /// <param name="statusRules">List of status rules the notification rule attempts to match. (required).</param>
 /// <param name="labels">labels.</param>
 /// <param name="links">links.</param>
 public NotificationRuleBase(string endpointID = default(string), string orgID = default(string), TaskStatusType status = default(TaskStatusType), string name = default(string), string sleepUntil = default(string), string every = default(string), string offset = default(string), string runbookLink = default(string), int?limitEvery = default(int?), int?limit = default(int?), List <TagRule> tagRules = default(List <TagRule>), string description = default(string), List <StatusRule> statusRules = default(List <StatusRule>), List <Label> labels = default(List <Label>), NotificationRuleBaseLinks links = default(NotificationRuleBaseLinks)) : base()
 {
     // to ensure "endpointID" is required (not null)
     if (endpointID == null)
     {
         throw new InvalidDataException("endpointID is a required property for NotificationRuleBase and cannot be null");
     }
     else
     {
         this.EndpointID = endpointID;
     }
     // to ensure "orgID" is required (not null)
     if (orgID == null)
     {
         throw new InvalidDataException("orgID is a required property for NotificationRuleBase and cannot be null");
     }
     else
     {
         this.OrgID = orgID;
     }
     // to ensure "status" is required (not null)
     if (status == null)
     {
         throw new InvalidDataException("status is a required property for NotificationRuleBase and cannot be null");
     }
     else
     {
         this.Status = status;
     }
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for NotificationRuleBase and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "tagRules" is required (not null)
     if (tagRules == null)
     {
         throw new InvalidDataException("tagRules is a required property for NotificationRuleBase and cannot be null");
     }
     else
     {
         this.TagRules = tagRules;
     }
     // to ensure "statusRules" is required (not null)
     if (statusRules == null)
     {
         throw new InvalidDataException("statusRules is a required property for NotificationRuleBase and cannot be null");
     }
     else
     {
         this.StatusRules = statusRules;
     }
     this.SleepUntil  = sleepUntil;
     this.Every       = every;
     this.Offset      = offset;
     this.RunbookLink = runbookLink;
     this.LimitEvery  = limitEvery;
     this.Limit       = limit;
     this.Description = description;
     this.Labels      = labels;
     this.Links       = links;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationRule" /> class.
 /// </summary>
 public NotificationRule(string endpointID = default(string), string orgID = default(string), TaskStatusType status = default(TaskStatusType), string name = default(string), string sleepUntil = default(string), string every = default(string), string offset = default(string), string runbookLink = default(string), int?limitEvery = default(int?), int?limit = default(int?), List <TagRule> tagRules = default(List <TagRule>), string description = default(string), List <StatusRule> statusRules = default(List <StatusRule>), List <Label> labels = default(List <Label>), NotificationRuleBaseLinks links = default(NotificationRuleBaseLinks)) : base(endpointID, orgID, status, name, sleepUntil, every, offset, runbookLink, limitEvery, limit, tagRules, description, statusRules, labels, links)
 {
 }