Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessagesIcs" /> class.
 /// </summary>
 /// <param name="id">Schedule ID. (required).</param>
 /// <param name="nextSend">The next send date in [ISO 8601](https://en.wikipedia.org/?title&#x3D;ISO_8601) format.  (required).</param>
 /// <param name="rrule">[iCal RRULE](http://www.kanzaki.com/docs/ical/rrule.html) string.  (required).</param>
 /// <param name="session">session (required).</param>
 /// <param name="lastSent">The date and time when the last message was sent. (required).</param>
 /// <param name="contactName">Aggregated contact information. If the message was scheduled to be sent to a single contact, a full name will be returned here. Otherwise, a total amount of contacts will be returned. (required).</param>
 /// <param name="parameters">parameters (required).</param>
 /// <param name="type">type (required).</param>
 /// <param name="summary">A human-readable summary of the sending schedule. (required).</param>
 /// <param name="textParameters">textParameters (required).</param>
 /// <param name="firstOccurrence">First occurence date. (required).</param>
 /// <param name="lastOccurrence">Last occurence date (could be &#x60;null&#x60; if the schedule is endless). (required).</param>
 /// <param name="recipientsCount">Amount of actual recipients. (required).</param>
 /// <param name="timezone">User-friendly timezone name (with spaces replaced by underscores). (required).</param>
 /// <param name="completed">Indicates that scheduling has been completed. (required).</param>
 /// <param name="avatar">A relative link to the contact avatar. (required).</param>
 /// <param name="createdAt">Scheduling creation time. (required).</param>
 public MessagesIcs(int?id = default(int?), DateTime?nextSend = default(DateTime?), string rrule = default(string), MessageSession session = default(MessageSession), DateTime?lastSent = default(DateTime?), string contactName = default(string), MessagesIcsParameters parameters = default(MessagesIcsParameters), TypeEnum type = default(TypeEnum), string summary = default(string), MessagesIcsTextParameters textParameters = default(MessagesIcsTextParameters), DateTime?firstOccurrence = default(DateTime?), DateTime?lastOccurrence = default(DateTime?), int?recipientsCount = default(int?), string timezone = default(string), bool?completed = default(bool?), string avatar = default(string), DateTime?createdAt = default(DateTime?))
 {
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new InvalidDataException("id is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.Id = id;
     }
     // to ensure "nextSend" is required (not null)
     if (nextSend == null)
     {
         throw new InvalidDataException("nextSend is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.NextSend = nextSend;
     }
     // to ensure "rrule" is required (not null)
     if (rrule == null)
     {
         throw new InvalidDataException("rrule is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.Rrule = rrule;
     }
     // to ensure "session" is required (not null)
     if (session == null)
     {
         throw new InvalidDataException("session is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.Session = session;
     }
     // to ensure "lastSent" is required (not null)
     if (lastSent == null)
     {
         throw new InvalidDataException("lastSent is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.LastSent = lastSent;
     }
     // to ensure "contactName" is required (not null)
     if (contactName == null)
     {
         throw new InvalidDataException("contactName is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.ContactName = contactName;
     }
     // to ensure "parameters" is required (not null)
     if (parameters == null)
     {
         throw new InvalidDataException("parameters is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.Parameters = parameters;
     }
     // to ensure "type" is required (not null)
     if (type == null)
     {
         throw new InvalidDataException("type is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.Type = type;
     }
     // to ensure "summary" is required (not null)
     if (summary == null)
     {
         throw new InvalidDataException("summary is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.Summary = summary;
     }
     // to ensure "textParameters" is required (not null)
     if (textParameters == null)
     {
         throw new InvalidDataException("textParameters is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.TextParameters = textParameters;
     }
     // to ensure "firstOccurrence" is required (not null)
     if (firstOccurrence == null)
     {
         throw new InvalidDataException("firstOccurrence is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.FirstOccurrence = firstOccurrence;
     }
     // to ensure "lastOccurrence" is required (not null)
     if (lastOccurrence == null)
     {
         throw new InvalidDataException("lastOccurrence is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.LastOccurrence = lastOccurrence;
     }
     // to ensure "recipientsCount" is required (not null)
     if (recipientsCount == null)
     {
         throw new InvalidDataException("recipientsCount is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.RecipientsCount = recipientsCount;
     }
     // to ensure "timezone" is required (not null)
     if (timezone == null)
     {
         throw new InvalidDataException("timezone is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.Timezone = timezone;
     }
     // to ensure "completed" is required (not null)
     if (completed == null)
     {
         throw new InvalidDataException("completed is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.Completed = completed;
     }
     // to ensure "avatar" is required (not null)
     if (avatar == null)
     {
         throw new InvalidDataException("avatar is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.Avatar = avatar;
     }
     // to ensure "createdAt" is required (not null)
     if (createdAt == null)
     {
         throw new InvalidDataException("createdAt is a required property for MessagesIcs and cannot be null");
     }
     else
     {
         this.CreatedAt = createdAt;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BulkSession" /> class.
 /// </summary>
 /// <param name="id">Bulk Session ID. (required).</param>
 /// <param name="status">* **n** – bulk session is just created * **w** - work in progress * **f** - failed * **c** - completed with success * **s** - suspended  (required).</param>
 /// <param name="itemsProcessed">Amount of messages already processed. (required).</param>
 /// <param name="itemsTotal">Total amount of messages to be processed. (required).</param>
 /// <param name="createdAt">Creation date and time of a Bulk Session. (required).</param>
 /// <param name="session">session (required).</param>
 /// <param name="text">Message text of a Bulk Session. (required).</param>
 public BulkSession(int?id = default(int?), StatusEnum status = default(StatusEnum), int?itemsProcessed = default(int?), int?itemsTotal = default(int?), DateTime?createdAt = default(DateTime?), MessageSession session = default(MessageSession), string text = default(string))
 {
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new InvalidDataException("id is a required property for BulkSession and cannot be null");
     }
     else
     {
         this.Id = id;
     }
     // to ensure "status" is required (not null)
     if (status == null)
     {
         throw new InvalidDataException("status is a required property for BulkSession and cannot be null");
     }
     else
     {
         this.Status = status;
     }
     // to ensure "itemsProcessed" is required (not null)
     if (itemsProcessed == null)
     {
         throw new InvalidDataException("itemsProcessed is a required property for BulkSession and cannot be null");
     }
     else
     {
         this.ItemsProcessed = itemsProcessed;
     }
     // to ensure "itemsTotal" is required (not null)
     if (itemsTotal == null)
     {
         throw new InvalidDataException("itemsTotal is a required property for BulkSession and cannot be null");
     }
     else
     {
         this.ItemsTotal = itemsTotal;
     }
     // to ensure "createdAt" is required (not null)
     if (createdAt == null)
     {
         throw new InvalidDataException("createdAt is a required property for BulkSession and cannot be null");
     }
     else
     {
         this.CreatedAt = createdAt;
     }
     // to ensure "session" is required (not null)
     if (session == null)
     {
         throw new InvalidDataException("session is a required property for BulkSession and cannot be null");
     }
     else
     {
         this.Session = session;
     }
     // to ensure "text" is required (not null)
     if (text == null)
     {
         throw new InvalidDataException("text is a required property for BulkSession and cannot be null");
     }
     else
     {
         this.Text = text;
     }
 }