class Azure::MobileEngagement::Mgmt::V2014_12_01::Models::Campaign
Model object.
Attributes
@return [CampaignAudience] Specify which users will be targeted by this campaign. By default, all users will be targeted. If you set `pushMode` property to `manual`, the only thing you can specify in the audience is the push quota filter. An audience is a boolean expression made of criteria (variables) operators (`not`, `and` or `or`) and parenthesis. Additionally, a set of filters can be added to an audience. 65535 bytes max as per JSON encoding.
@return [String] Category of the campaign. Categories can be used on the application side to customize campaigns.
@return [Array<String>] Announcements/polls only. Array containing the list of activities in which the campaign can be delivered. deliveryTime must be set to session. If the platform is iOS, this option can also be set if deliveryTime is set to any. In that case, if the campaign is received when the application is launched, it will be delivered only in the specified list of activities.
@return [DeliveryTimes] Announcements/polls only. Defines when the campaign should be delivered. Valid values are: * `any`: Campaign
will be delivered as soon as possible. * `background`: iOS only. Campaign
will be only delivered when the application is in background (out of app). * `session`: Campaign
will be delivered when the application is running. . Possible values include: 'any', 'background', 'session'
@return [String] The date at which the campaign should be finished. The date shall conform to the following format: `yyyy-MM-ddTHH:mm:ssZ`. Example: `2011-11-21 15:23Z`
@return [Hash{String => CampaignLocalization}] Push campaigns can be localized using an optional JSON object. The JSON key is a two-character language code as specified by the ISO 639-1 standard. The corresponding value is an object containing the localizable properties.
@return [String] Unique name of the campaign.
@return [Boolean] A flag indicating whether or not you want the native Apple Push notification to update the badge icon to the number of unread messages. The `deliveryTime` property must be set to `any` or `background`. . Default value: false .
@return [Boolean] A flag indicating whether or not you want the notification to be closeable. Default value: true .
@return [Boolean] A flag indicating whether or not you want to display the resource icon in notification content. Default value: true .
@return [Boolean] * `Android`: A flag indicating whether or not you want the system notification to make a sound. The `notificationType` property must be set to `system`. * `iOS`: A flag indicating whether or not you want the native Apple Push notification to make a sound. The `deliveryTime` property must be set to `any` or `background`. This will play the 'default' sound. If you want to play a custom sound, see the `notificationOptions` property. * `Windows`: A flag indicating whether or not you want the native Windows Notification Service to make a sound. The `deliveryTime` property must be set to `any`. . Default value: false .
@return [NotificationTypes] Android only. Defines how the notification should be displayed. Valid values are: * `system`: Display the notification using a standard system notification. * `popup`: Display the notification using a in-app banner notification. . Possible values include: 'system', 'popup'. Default value: 'popup' .
@return [Boolean] Android only. A flag indicating whether or not you want the system notification to make a vibration. The notificationType property must be set to system. Default value: false .
@return [PushModes] Announcements/polls only. Defines how the campaign is pushed. Valid values are: * `real-time`: Never ending campaign, the campaign will be delivered to your existing users and also to your new users. * `one-shot`: In this mode, the campaign will be delivered only to your existing users (campaign will stop after that). * `manual`: In this mode, the campaign will not be pushed automatically to devices. You will have to use the Push campaign command to push the campaign to your end-users. Campaigns
can be pushed multiple times to the same device. . Possible values include: 'real-time', 'one-shot', 'manual'. Default value: 'real-time' .
@return [Array<PollQuestion>] Poll questions.
@return [String] The date at which the campaign should be started. The date shall conform to the following format: `yyyy-MM-ddTHH:mm:ssZ`. * If you set pushMode property to manual, this attribute will be ignored.
-
If you set pushMode property to one-shot, then the timezone attribute
must be specified. Example: `2011-11-21 15:23Z`
@return [String] The id of the time zone to use for the startTime and endTime dates. If not provided, the two date attributes will be expressed using the device timezone. Example: America/Los_Angeles
@return [CampaignTypes] Applicable only to announcements and data pushes. Type of announcement. Valid values are: * `text/plain`: Text-only announcement: `body` property should only contain plain text.
-
`text/html`: HTML announcement: `body` attribute can contain HTML
code. * `only_notif`: Notification-only announcement. With this kind of announcements, the `body`, `title`, `actionButtonText` and `exitButtonText` are ignored. Type of data push. Valid values are: * `text/plain`: Text only data push: `body` property must be plain text.
-
`text/base64`: Base 64 data push: `body` property must be encoded in
base 64. . Possible values include: 'text/plain', 'text/html', 'only_notif', 'text/base64'
Private Class Methods
Mapper for Campaign
class as Ruby Hash. This will be used for serialization/deserialization.
# File lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb, line 152 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'Campaign', type: { name: 'Composite', class_name: 'Campaign', model_properties: { notification_title: { client_side_validation: true, required: false, serialized_name: 'notificationTitle', constraints: { MaxLength: 2000 }, type: { name: 'String' } }, notification_message: { client_side_validation: true, required: false, serialized_name: 'notificationMessage', constraints: { MaxLength: 4000 }, type: { name: 'String' } }, notification_image: { client_side_validation: true, required: false, serialized_name: 'notificationImage', constraints: { MaxLength: 65535 }, type: { name: 'ByteArray' } }, notification_options: { client_side_validation: true, required: false, serialized_name: 'notificationOptions', type: { name: 'Composite', class_name: 'NotificationOptions' } }, title: { client_side_validation: true, required: false, serialized_name: 'title', constraints: { MaxLength: 128 }, type: { name: 'String' } }, body: { client_side_validation: true, required: false, serialized_name: 'body', constraints: { MaxLength: 65535 }, type: { name: 'String' } }, action_button_text: { client_side_validation: true, required: false, serialized_name: 'actionButtonText', constraints: { MaxLength: 64 }, type: { name: 'String' } }, exit_button_text: { client_side_validation: true, required: false, serialized_name: 'exitButtonText', constraints: { MaxLength: 64 }, type: { name: 'String' } }, action_url: { client_side_validation: true, required: false, serialized_name: 'actionUrl', constraints: { MaxLength: 2000 }, type: { name: 'String' } }, payload: { client_side_validation: true, required: false, serialized_name: 'payload', type: { name: 'Object' } }, name: { client_side_validation: true, required: false, serialized_name: 'name', constraints: { MaxLength: 64 }, type: { name: 'String' } }, audience: { client_side_validation: true, required: false, serialized_name: 'audience', type: { name: 'Composite', class_name: 'CampaignAudience' } }, category: { client_side_validation: true, required: false, serialized_name: 'category', constraints: { MaxLength: 64 }, type: { name: 'String' } }, push_mode: { client_side_validation: true, required: false, serialized_name: 'pushMode', default_value: 'real-time', type: { name: 'String' } }, type: { client_side_validation: true, required: false, serialized_name: 'type', type: { name: 'String' } }, delivery_time: { client_side_validation: true, required: false, serialized_name: 'deliveryTime', type: { name: 'String' } }, delivery_activities: { client_side_validation: true, required: false, serialized_name: 'deliveryActivities', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { name: 'String' } } } }, start_time: { client_side_validation: true, required: false, serialized_name: 'startTime', type: { name: 'String' } }, end_time: { client_side_validation: true, required: false, serialized_name: 'endTime', type: { name: 'String' } }, timezone: { client_side_validation: true, required: false, serialized_name: 'timezone', type: { name: 'String' } }, notification_type: { client_side_validation: true, required: false, serialized_name: 'notificationType', default_value: 'popup', type: { name: 'String' } }, notification_icon: { client_side_validation: true, required: false, serialized_name: 'notificationIcon', default_value: true, type: { name: 'Boolean' } }, notification_closeable: { client_side_validation: true, required: false, serialized_name: 'notificationCloseable', default_value: true, type: { name: 'Boolean' } }, notification_vibrate: { client_side_validation: true, required: false, serialized_name: 'notificationVibrate', default_value: false, type: { name: 'Boolean' } }, notification_sound: { client_side_validation: true, required: false, serialized_name: 'notificationSound', default_value: false, type: { name: 'Boolean' } }, notification_badge: { client_side_validation: true, required: false, serialized_name: 'notificationBadge', default_value: false, type: { name: 'Boolean' } }, localization: { client_side_validation: true, required: false, serialized_name: 'localization', type: { name: 'Dictionary', value: { client_side_validation: true, required: false, serialized_name: 'CampaignLocalizationElementType', type: { name: 'Composite', class_name: 'CampaignLocalization' } } } }, questions: { client_side_validation: true, required: false, serialized_name: 'questions', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'PollQuestionElementType', type: { name: 'Composite', class_name: 'PollQuestion' } } } } } } } end