Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Check" /> class.
 /// </summary>
 public Check(string name = default(string), string orgID = default(string), DashboardQuery query = default(DashboardQuery), TaskStatusType?status = default(TaskStatusType?), string every = default(string), string offset = default(string), List <CheckBaseTags> tags = default(List <CheckBaseTags>), string description = default(string), string statusMessageTemplate = default(string), List <Label> labels = default(List <Label>), CheckBaseLinks links = default(CheckBaseLinks)) : base(name, orgID, query, status, every, offset, tags, description, statusMessageTemplate, labels, links)
 {
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CheckBase" /> class.
 /// </summary>
 /// <param name="name">name (required).</param>
 /// <param name="orgID">the ID of the organization that owns this check. (required).</param>
 /// <param name="query">query (required).</param>
 /// <param name="status">status.</param>
 /// <param name="every">Check repetition interval.</param>
 /// <param name="offset">Duration to delay after the schedule, before executing check..</param>
 /// <param name="cron">Check repetition interval in the form &#39;* * * * * *&#39;;.</param>
 /// <param name="tags">tags to write to each status.</param>
 /// <param name="description">An optional description of the check.</param>
 /// <param name="statusMessageTemplate">template that is used to generate and write a status message.</param>
 /// <param name="labels">labels.</param>
 public CheckBase(string name = default(string), string orgID = default(string), DashboardQuery query = default(DashboardQuery), TaskStatusType?status = default(TaskStatusType?), string every = default(string), string offset = default(string), string cron = default(string), List <CheckBaseTags> tags = default(List <CheckBaseTags>), string description = default(string), string statusMessageTemplate = default(string), List <Label> labels = default(List <Label>))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new InvalidDataException("name is a required property for CheckBase and cannot be null");
     }
     else
     {
         this.Name = name;
     }
     // to ensure "orgID" is required (not null)
     if (orgID == null)
     {
         throw new InvalidDataException("orgID is a required property for CheckBase and cannot be null");
     }
     else
     {
         this.OrgID = orgID;
     }
     // to ensure "query" is required (not null)
     if (query == null)
     {
         throw new InvalidDataException("query is a required property for CheckBase and cannot be null");
     }
     else
     {
         this.Query = query;
     }
     this.Status                = status;
     this.Every                 = every;
     this.Offset                = offset;
     this.Cron                  = cron;
     this.Tags                  = tags;
     this.Description           = description;
     this.StatusMessageTemplate = statusMessageTemplate;
     this.Labels                = labels;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeadmanCheck" /> class.
 /// </summary>
 /// <param name="type">type.</param>
 /// <param name="timeSince">string duration before deadman triggers..</param>
 /// <param name="staleTime">string duration for time that a series is considered stale and should not trigger deadman..</param>
 /// <param name="reportZero">If only zero values reported since time, trigger an alert.</param>
 /// <param name="level">level.</param>
 public DeadmanCheck(TypeEnum?type = default(TypeEnum?), string timeSince = default(string), string staleTime = default(string), bool?reportZero = default(bool?), CheckStatusLevel level = default(CheckStatusLevel), string name = default(string), string orgID = default(string), DashboardQuery query = default(DashboardQuery), TaskStatusType?status = default(TaskStatusType?), string every = default(string), string offset = default(string), List <CheckBaseTags> tags = default(List <CheckBaseTags>), string description = default(string), string statusMessageTemplate = default(string), List <Label> labels = default(List <Label>), CheckBaseLinks links = default(CheckBaseLinks)) : base(name, orgID, query, status, every, offset, tags, description, statusMessageTemplate, labels, links)
 {
     this.Type       = type;
     this.TimeSince  = timeSince;
     this.StaleTime  = staleTime;
     this.ReportZero = reportZero;
     this.Level      = level;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ThresholdCheck" /> class.
 /// </summary>
 /// <param name="type">type.</param>
 /// <param name="thresholds">thresholds.</param>
 public ThresholdCheck(TypeEnum?type = default(TypeEnum?), List <Threshold> thresholds = default(List <Threshold>), string name = default(string), string orgID = default(string), DashboardQuery query = default(DashboardQuery), TaskStatusType?status = default(TaskStatusType?), string every = default(string), string offset = default(string), string cron = default(string), List <CheckBaseTags> tags = default(List <CheckBaseTags>), string description = default(string), string statusMessageTemplate = default(string), List <Label> labels = default(List <Label>)) : base(name, orgID, query, status, every, offset, cron, tags, description, statusMessageTemplate, labels)
 {
     this.Type       = type;
     this.Thresholds = thresholds;
 }