예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EveryAction" /> class.
 /// </summary>
 /// <param name="interval">interval.</param>
 /// <param name="specific">specific.</param>
 /// <param name="actions">actions (required).</param>
 /// <param name="sequence">sequence.</param>
 public EveryAction(Interval interval = default(Interval), DateTimeOperand specific = default(DateTimeOperand), List <Action> actions = default(List <Action>), ActionSequence sequence = default(ActionSequence))
 {
     // to ensure "actions" is required (not null)
     if (actions == null)
     {
         throw new ArgumentNullException("actions is a required property for EveryAction and cannot be null");
     }
     this.Actions  = actions;
     this.Interval = interval;
     this.Specific = specific;
     this.Sequence = sequence;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Rule" /> class.
 /// </summary>
 /// <param name="name">The name for the Rule. Limit 100 characters. (required).</param>
 /// <param name="actions">actions (required).</param>
 /// <param name="sequence">sequence.</param>
 /// <param name="timeZoneId">The time zone ID for this Rule. This overrides the Location time zone ID, but is overridden by time zone ID provided by each operand individually..</param>
 /// <param name="id">Unique id for the Rule (required).</param>
 /// <param name="status">The status of the Rule (default to StatusEnum.Enabled).</param>
 /// <param name="ownerId">Owner id (required).</param>
 /// <param name="ownerType">The owner of the rule is either a location or user (required) (default to OwnerTypeEnum.Location).</param>
 /// <param name="creator">creator.</param>
 /// <param name="dateCreated">Created date time (required).</param>
 /// <param name="dateUpdated">Last updated date time (required).</param>
 public Rule(string name = default(string), List <Action> actions = default(List <Action>), ActionSequence sequence = default(ActionSequence), string timeZoneId = default(string), string id = default(string), StatusEnum?status = StatusEnum.Enabled, string ownerId = default(string), OwnerTypeEnum ownerType = OwnerTypeEnum.Location, Creator?creator = default(Creator?), string dateCreated = default(string), string dateUpdated = default(string))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new ArgumentNullException("name is a required property for Rule and cannot be null");
     }
     this.Name = name;
     // to ensure "actions" is required (not null)
     if (actions == null)
     {
         throw new ArgumentNullException("actions is a required property for Rule and cannot be null");
     }
     this.Actions = actions;
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new ArgumentNullException("id is a required property for Rule and cannot be null");
     }
     this.Id = id;
     // to ensure "ownerId" is required (not null)
     if (ownerId == null)
     {
         throw new ArgumentNullException("ownerId is a required property for Rule and cannot be null");
     }
     this.OwnerId   = ownerId;
     this.OwnerType = ownerType;
     // to ensure "dateCreated" is required (not null)
     if (dateCreated == null)
     {
         throw new ArgumentNullException("dateCreated is a required property for Rule and cannot be null");
     }
     this.DateCreated = dateCreated;
     // to ensure "dateUpdated" is required (not null)
     if (dateUpdated == null)
     {
         throw new ArgumentNullException("dateUpdated is a required property for Rule and cannot be null");
     }
     this.DateUpdated = dateUpdated;
     this.Sequence    = sequence;
     this.TimeZoneId  = timeZoneId;
     this.Status      = status;
     this.Creator     = creator;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RuleRequest" /> class.
 /// </summary>
 /// <param name="name">The name for the Rule. Limit 100 characters. (required).</param>
 /// <param name="actions">actions (required).</param>
 /// <param name="sequence">sequence.</param>
 /// <param name="timeZoneId">The time zone ID for this Rule. This overrides the Location time zone ID, but is overridden by time zone ID provided by each operand individually..</param>
 public RuleRequest(string name = default(string), List <Action> actions = default(List <Action>), ActionSequence sequence = default(ActionSequence), string timeZoneId = default(string))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new ArgumentNullException("name is a required property for RuleRequest and cannot be null");
     }
     this.Name = name;
     // to ensure "actions" is required (not null)
     if (actions == null)
     {
         throw new ArgumentNullException("actions is a required property for RuleRequest and cannot be null");
     }
     this.Actions    = actions;
     this.Sequence   = sequence;
     this.TimeZoneId = timeZoneId;
 }