Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PushCampaignPostRequest" /> class.
        /// </summary>
        /// <param name="appId">appId (required).</param>
        /// <param name="title">Push campaign subject (required).</param>
        /// <param name="content">content (required).</param>
        /// <param name="actions">actions.</param>
        /// <param name="geoOptions">geoOptions.</param>
        /// <param name="notificationOptions">notificationOptions.</param>
        public PushCampaignPostRequest(string appId = default(string), string title = default(string), CampaignPushContent content = default(CampaignPushContent), PushCampaignPostRequestActions actions = default(PushCampaignPostRequestActions), PushCampaignPostRequestGeoOptions geoOptions = default(PushCampaignPostRequestGeoOptions), PushCampaignPostRequestNotificationOptions notificationOptions = default(PushCampaignPostRequestNotificationOptions))
        {
            // to ensure "appId" is required (not null)
            if (appId == null)
            {
                throw new InvalidDataException("appId is a required property for PushCampaignPostRequest and cannot be null");
            }
            else
            {
                this.AppId = appId;
            }

            // to ensure "title" is required (not null)
            if (title == null)
            {
                throw new InvalidDataException("title is a required property for PushCampaignPostRequest and cannot be null");
            }
            else
            {
                this.Title = title;
            }

            // to ensure "content" is required (not null)
            if (content == null)
            {
                throw new InvalidDataException("content is a required property for PushCampaignPostRequest and cannot be null");
            }
            else
            {
                this.Content = content;
            }

            this.Actions             = actions;
            this.GeoOptions          = geoOptions;
            this.NotificationOptions = notificationOptions;
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PushCampaignPatchRequest" /> class.
 /// </summary>
 /// <param name="title">Push campaign subject.</param>
 /// <param name="content">content.</param>
 /// <param name="actions">actions.</param>
 /// <param name="geoOptions">geoOptions.</param>
 /// <param name="notificationOptions">notificationOptions.</param>
 public PushCampaignPatchRequest(string title = default(string), PushCampaignPatchRequestContent content = default(PushCampaignPatchRequestContent), PushCampaignPostRequestActions actions = default(PushCampaignPostRequestActions), PushCampaignPatchRequestGeoOptions geoOptions = default(PushCampaignPatchRequestGeoOptions), PushCampaignPostRequestNotificationOptions notificationOptions = default(PushCampaignPostRequestNotificationOptions))
 {
     this.Title               = title;
     this.Content             = content;
     this.Actions             = actions;
     this.GeoOptions          = geoOptions;
     this.NotificationOptions = notificationOptions;
 }