/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the pinpoint-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.Pinpoint.Model { /// /// Specifies the content and settings for a push notification that's sent to recipients /// of a campaign. /// public partial class Message { private Action _action; private string _body; private string _imageIconUrl; private string _imageSmallIconUrl; private string _imageUrl; private string _jsonBody; private string _mediaUrl; private string _rawContent; private bool? _silentPush; private int? _timeToLive; private string _title; private string _url; /// /// Gets and sets the property Action. /// /// The action to occur if a recipient taps the push notification. Valid values are: /// /// /// public Action Action { get { return this._action; } set { this._action = value; } } // Check to see if Action property is set internal bool IsSetAction() { return this._action != null; } /// /// Gets and sets the property Body. /// /// The body of the notification message. The maximum number of characters is 200. /// /// public string Body { get { return this._body; } set { this._body = value; } } // Check to see if Body property is set internal bool IsSetBody() { return this._body != null; } /// /// Gets and sets the property ImageIconUrl. /// /// The URL of the image to display as the push-notification icon, such as the icon for /// the app. /// /// public string ImageIconUrl { get { return this._imageIconUrl; } set { this._imageIconUrl = value; } } // Check to see if ImageIconUrl property is set internal bool IsSetImageIconUrl() { return this._imageIconUrl != null; } /// /// Gets and sets the property ImageSmallIconUrl. /// /// The URL of the image to display as the small, push-notification icon, such as a small /// version of the icon for the app. /// /// public string ImageSmallIconUrl { get { return this._imageSmallIconUrl; } set { this._imageSmallIconUrl = value; } } // Check to see if ImageSmallIconUrl property is set internal bool IsSetImageSmallIconUrl() { return this._imageSmallIconUrl != null; } /// /// Gets and sets the property ImageUrl. /// /// The URL of an image to display in the push notification. /// /// public string ImageUrl { get { return this._imageUrl; } set { this._imageUrl = value; } } // Check to see if ImageUrl property is set internal bool IsSetImageUrl() { return this._imageUrl != null; } /// /// Gets and sets the property JsonBody. /// /// The JSON payload to use for a silent push notification. /// /// public string JsonBody { get { return this._jsonBody; } set { this._jsonBody = value; } } // Check to see if JsonBody property is set internal bool IsSetJsonBody() { return this._jsonBody != null; } /// /// Gets and sets the property MediaUrl. /// /// The URL of the image or video to display in the push notification. /// /// public string MediaUrl { get { return this._mediaUrl; } set { this._mediaUrl = value; } } // Check to see if MediaUrl property is set internal bool IsSetMediaUrl() { return this._mediaUrl != null; } /// /// Gets and sets the property RawContent. /// /// The raw, JSON-formatted string to use as the payload for the notification message. /// If specified, this value overrides all other content for the message. /// /// public string RawContent { get { return this._rawContent; } set { this._rawContent = value; } } // Check to see if RawContent property is set internal bool IsSetRawContent() { return this._rawContent != null; } /// /// Gets and sets the property SilentPush. /// /// Specifies whether the notification is a silent push notification, which is a push /// notification that doesn't display on a recipient's device. Silent push notifications /// can be used for cases such as updating an app's configuration, displaying messages /// in an in-app message center, or supporting phone home functionality. /// /// public bool SilentPush { get { return this._silentPush.GetValueOrDefault(); } set { this._silentPush = value; } } // Check to see if SilentPush property is set internal bool IsSetSilentPush() { return this._silentPush.HasValue; } /// /// Gets and sets the property TimeToLive. /// /// The number of seconds that the push-notification service should keep the message, /// if the service is unable to deliver the notification the first time. This value is /// converted to an expiration value when it's sent to a push-notification service. If /// this value is 0, the service treats the notification as if it expires immediately /// and the service doesn't store or try to deliver the notification again. /// /// /// /// This value doesn't apply to messages that are sent through the Amazon Device Messaging /// (ADM) service. /// /// public int TimeToLive { get { return this._timeToLive.GetValueOrDefault(); } set { this._timeToLive = value; } } // Check to see if TimeToLive property is set internal bool IsSetTimeToLive() { return this._timeToLive.HasValue; } /// /// Gets and sets the property Title. /// /// The title to display above the notification message on a recipient's device. /// /// public string Title { get { return this._title; } set { this._title = value; } } // Check to see if Title property is set internal bool IsSetTitle() { return this._title != null; } /// /// Gets and sets the property Url. /// /// The URL to open in a recipient's default mobile browser, if a recipient taps the push /// notification and the value of the Action property is URL. /// /// public string Url { get { return this._url; } set { this._url = value; } } // Check to see if Url property is set internal bool IsSetUrl() { return this._url != null; } } }