/// <summary> /// Initializes a new instance of the <see cref="Actions" /> class. /// </summary> /// <param name="Data">Data.</param> /// <param name="Ddid">Destination Device ID..</param> /// <param name="Sdid">Destination Device ID..</param> /// <param name="Ts">Timestamp (past, present or future). Defaults to current time if not provided..</param> /// <param name="Type">Type - action. (default to "action").</param> public Actions(ActionArray Data = null, string Ddid = null, string Sdid = null, long?Ts = null, string Type = null) { this.Data = Data; this.Ddid = Ddid; this.Sdid = Sdid; this.Ts = Ts; // use default value if no "Type" provided if (Type == null) { this.Type = "action"; } else { this.Type = Type; } }
/// <summary> /// Initializes a new instance of the <see cref="NormalizedAction" /> class. /// </summary> /// <param name="Cts">Cts (required).</param> /// <param name="Ts">Ts (required).</param> /// <param name="Mid">Mid (required).</param> /// <param name="Sdid">Sdid.</param> /// <param name="Ddid">Ddid (required).</param> /// <param name="Ddtid">Ddtid (required).</param> /// <param name="Uid">Uid (required).</param> /// <param name="Mv">Mv (required).</param> /// <param name="Data">Data (required).</param> public NormalizedAction(long?Cts = null, long?Ts = null, string Mid = null, string Sdid = null, string Ddid = null, string Ddtid = null, string Uid = null, int?Mv = null, ActionArray Data = null) { // to ensure "Cts" is required (not null) if (Cts == null) { throw new InvalidDataException("Cts is a required property for NormalizedAction and cannot be null"); } else { this.Cts = Cts; } // to ensure "Ts" is required (not null) if (Ts == null) { throw new InvalidDataException("Ts is a required property for NormalizedAction and cannot be null"); } else { this.Ts = Ts; } // to ensure "Mid" is required (not null) if (Mid == null) { throw new InvalidDataException("Mid is a required property for NormalizedAction and cannot be null"); } else { this.Mid = Mid; } // to ensure "Ddid" is required (not null) if (Ddid == null) { throw new InvalidDataException("Ddid is a required property for NormalizedAction and cannot be null"); } else { this.Ddid = Ddid; } // to ensure "Ddtid" is required (not null) if (Ddtid == null) { throw new InvalidDataException("Ddtid is a required property for NormalizedAction and cannot be null"); } else { this.Ddtid = Ddtid; } // to ensure "Uid" is required (not null) if (Uid == null) { throw new InvalidDataException("Uid is a required property for NormalizedAction and cannot be null"); } else { this.Uid = Uid; } // to ensure "Mv" is required (not null) if (Mv == null) { throw new InvalidDataException("Mv is a required property for NormalizedAction and cannot be null"); } else { this.Mv = Mv; } // to ensure "Data" is required (not null) if (Data == null) { throw new InvalidDataException("Data is a required property for NormalizedAction and cannot be null"); } else { this.Data = Data; } this.Sdid = Sdid; }