Class: Azure::MobileEngagement::Mgmt::V2014_12_01::Models::Campaign

Inherits:
CampaignLocalization show all
Includes:
MsRestAzure
Defined in:
lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb

Overview

Model object.

Direct Known Subclasses

CampaignResult

Instance Attribute Summary collapse

Attributes inherited from CampaignLocalization

#action_button_text, #action_url, #body, #exit_button_text, #notification_image, #notification_message, #notification_options, #notification_title, #payload, #title

Class Method Summary collapse

Instance Attribute Details

#audienceCampaignAudience

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.

Returns:



27
28
29
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 27

def audience
  @audience
end

#categoryString

the application side to customize campaigns.

Returns:

  • (String)

    Category of the campaign. Categories can be used on



31
32
33
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 31

def category
  @category
end

#delivery_activitiesArray<String>

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.

Returns:

  • (Array<String>)

    Announcements/polls only. Array containing the



76
77
78
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 76

def delivery_activities
  @delivery_activities
end

#delivery_timeDeliveryTimes

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’

Returns:



67
68
69
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 67

def delivery_time
  @delivery_time
end

#end_timeString

date shall conform to the following format: ‘yyyy-MM-ddTHH:mm:ssZ`. Example: `2011-11-21 15:23Z`

Returns:

  • (String)

    The date at which the campaign should be finished. The



90
91
92
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 90

def end_time
  @end_time
end

#localizationHash{String => CampaignLocalization}

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.

Returns:



142
143
144
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 142

def localization
  @localization
end

#nameString

Returns Unique name of the campaign.

Returns:

  • (String)

    Unique name of the campaign.



17
18
19
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 17

def name
  @name
end

#notification_badgeBoolean

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 .

Returns:

  • (Boolean)

    A flag indicating whether or not you want the native



135
136
137
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 135

def notification_badge
  @notification_badge
end

#notification_closeableBoolean

notification to be closeable. Default value: true .

Returns:

  • (Boolean)

    A flag indicating whether or not you want the



111
112
113
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 111

def notification_closeable
  @notification_closeable
end

#notification_iconBoolean

the resource icon in notification content. Default value: true .

Returns:

  • (Boolean)

    A flag indicating whether or not you want to display



107
108
109
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 107

def notification_icon
  @notification_icon
end

#notification_soundBoolean

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 .

Returns:

  • (Boolean)
    • ‘Android`: A flag indicating whether or not you



128
129
130
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 128

def notification_sound
  @notification_sound
end

#notification_typeNotificationTypes

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’ .

Returns:



103
104
105
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 103

def notification_type
  @notification_type
end

#notification_vibrateBoolean

want the system notification to make a vibration. The notificationType property must be set to system. Default value: false .

Returns:

  • (Boolean)

    Android only. A flag indicating whether or not you



116
117
118
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 116

def notification_vibrate
  @notification_vibrate
end

#push_modePushModes

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’ .

Returns:

  • (PushModes)

    Announcements/polls only. Defines how the campaign



44
45
46
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 44

def push_mode
  @push_mode
end

#questionsArray<PollQuestion>

Returns Poll questions.

Returns:



145
146
147
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 145

def questions
  @questions
end

#start_timeString

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`

Returns:

  • (String)

    The date at which the campaign should be started. The



84
85
86
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 84

def start_time
  @start_time
end

#timezoneString

endTime dates. If not provided, the two date attributes will be expressed using the device timezone. Example: America/Los_Angeles

Returns:

  • (String)

    The id of the time zone to use for the startTime and



96
97
98
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 96

def timezone
  @timezone
end

#typeCampaignTypes

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’

Returns:



58
59
60
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 58

def type
  @type
end

Class Method Details

.mapperObject

Mapper for Campaign class as Ruby Hash. This will be used for serialization/deserialization.



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/campaign.rb', line 152

def self.mapper()
  {
    required: false,
    serialized_name: 'Campaign',
    type: {
      name: 'Composite',
      class_name: 'Campaign',
      model_properties: {
        notification_title: {
          required: false,
          serialized_name: 'notificationTitle',
          constraints: {
            MaxLength: 2000
          },
          type: {
            name: 'String'
          }
        },
        notification_message: {
          required: false,
          serialized_name: 'notificationMessage',
          constraints: {
            MaxLength: 4000
          },
          type: {
            name: 'String'
          }
        },
        notification_image: {
          required: false,
          serialized_name: 'notificationImage',
          constraints: {
            MaxLength: 65535
          },
          type: {
            name: 'ByteArray'
          }
        },
        notification_options: {
          required: false,
          serialized_name: 'notificationOptions',
          type: {
            name: 'Composite',
            class_name: 'NotificationOptions'
          }
        },
        title: {
          required: false,
          serialized_name: 'title',
          constraints: {
            MaxLength: 128
          },
          type: {
            name: 'String'
          }
        },
        body: {
          required: false,
          serialized_name: 'body',
          constraints: {
            MaxLength: 65535
          },
          type: {
            name: 'String'
          }
        },
        action_button_text: {
          required: false,
          serialized_name: 'actionButtonText',
          constraints: {
            MaxLength: 64
          },
          type: {
            name: 'String'
          }
        },
        exit_button_text: {
          required: false,
          serialized_name: 'exitButtonText',
          constraints: {
            MaxLength: 64
          },
          type: {
            name: 'String'
          }
        },
        action_url: {
          required: false,
          serialized_name: 'actionUrl',
          constraints: {
            MaxLength: 2000
          },
          type: {
            name: 'String'
          }
        },
        payload: {
          required: false,
          serialized_name: 'payload',
          type: {
            name: 'Object'
          }
        },
        name: {
          required: false,
          serialized_name: 'name',
          constraints: {
            MaxLength: 64
          },
          type: {
            name: 'String'
          }
        },
        audience: {
          required: false,
          serialized_name: 'audience',
          type: {
            name: 'Composite',
            class_name: 'CampaignAudience'
          }
        },
        category: {
          required: false,
          serialized_name: 'category',
          constraints: {
            MaxLength: 64
          },
          type: {
            name: 'String'
          }
        },
        push_mode: {
          required: false,
          serialized_name: 'pushMode',
          default_value: 'real-time',
          type: {
            name: 'String'
          }
        },
        type: {
          required: false,
          serialized_name: 'type',
          type: {
            name: 'String'
          }
        },
        delivery_time: {
          required: false,
          serialized_name: 'deliveryTime',
          type: {
            name: 'String'
          }
        },
        delivery_activities: {
          required: false,
          serialized_name: 'deliveryActivities',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        start_time: {
          required: false,
          serialized_name: 'startTime',
          type: {
            name: 'String'
          }
        },
        end_time: {
          required: false,
          serialized_name: 'endTime',
          type: {
            name: 'String'
          }
        },
        timezone: {
          required: false,
          serialized_name: 'timezone',
          type: {
            name: 'String'
          }
        },
        notification_type: {
          required: false,
          serialized_name: 'notificationType',
          default_value: 'popup',
          type: {
            name: 'String'
          }
        },
        notification_icon: {
          required: false,
          serialized_name: 'notificationIcon',
          default_value: true,
          type: {
            name: 'Boolean'
          }
        },
        notification_closeable: {
          required: false,
          serialized_name: 'notificationCloseable',
          default_value: true,
          type: {
            name: 'Boolean'
          }
        },
        notification_vibrate: {
          required: false,
          serialized_name: 'notificationVibrate',
          default_value: false,
          type: {
            name: 'Boolean'
          }
        },
        notification_sound: {
          required: false,
          serialized_name: 'notificationSound',
          default_value: false,
          type: {
            name: 'Boolean'
          }
        },
        notification_badge: {
          required: false,
          serialized_name: 'notificationBadge',
          default_value: false,
          type: {
            name: 'Boolean'
          }
        },
        localization: {
          required: false,
          serialized_name: 'localization',
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serialized_name: 'CampaignLocalizationElementType',
                type: {
                  name: 'Composite',
                  class_name: 'CampaignLocalization'
                }
            }
          }
        },
        questions: {
          required: false,
          serialized_name: 'questions',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'PollQuestionElementType',
                type: {
                  name: 'Composite',
                  class_name: 'PollQuestion'
                }
            }
          }
        }
      }
    }
  }
end