igetui-ruby-nolock 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,90 @@
1
+ module IGeTui
2
+ class NotyPopLoadTemplate < BaseTemplate
3
+ STRING_ATTRIBUTES = %i(
4
+ title text logo logo_url
5
+ pop_title pop_text pop_image
6
+ pop_button_1 pop_button_2
7
+ load_icon load_title load_url
8
+ android_mask symbia_mask ios_mask
9
+ ).freeze
10
+ BOOLEAN_ATTRIBUTES_OF_TRUE = %i(is_ring is_vibrate is_clearable).freeze
11
+ BOOLEAN_ATTRIBUTES_OF_FALSE = %i(is_auto_install is_active).freeze
12
+
13
+ attr_accessor *STRING_ATTRIBUTES, *BOOLEAN_ATTRIBUTES_OF_TRUE, *BOOLEAN_ATTRIBUTES_OF_FALSE
14
+
15
+ def initialize
16
+ super
17
+
18
+ STRING_ATTRIBUTES.each { |attr| instance_variable_set("@#{attr}", '') }
19
+ BOOLEAN_ATTRIBUTES_OF_TRUE.each { |attr| instance_variable_set("@#{attr}", true) }
20
+ BOOLEAN_ATTRIBUTES_OF_FALSE.each { |attr| instance_variable_set("@#{attr}", false) }
21
+ end
22
+
23
+ def get_action_chain
24
+ # set actionchain
25
+ action_chain_1 = GtReq::ActionChain.new
26
+ action_chain_1.actionId = 1
27
+ action_chain_1.type = GtReq::ActionChain::Type::Goto
28
+ action_chain_1.next = 10000
29
+
30
+ # notification
31
+ action_chain_2 = GtReq::ActionChain.new
32
+ action_chain_2.actionId = 10000
33
+ action_chain_2.type = GtReq::ActionChain::Type::Notification
34
+ action_chain_2.title = title
35
+ action_chain_2.text = text
36
+ action_chain_2.logo = logo
37
+ action_chain_2.logoURL = logo_url
38
+ action_chain_2.ring = is_ring
39
+ action_chain_2.clearable = is_clearable
40
+ action_chain_2.buzz = is_vibrate
41
+ action_chain_2.next = 10010
42
+
43
+ # goto
44
+ action_chain_3 = GtReq::ActionChain.new
45
+ action_chain_3.actionId = 10010
46
+ action_chain_3.type = GtReq::ActionChain::Type::Goto
47
+ action_chain_3.next = 10020
48
+
49
+ action_chain_4 = GtReq::ActionChain.new
50
+
51
+ button_1 = GtReq::Button.new
52
+ button_1.text = pop_button_1
53
+ button_1.next = 10040
54
+ button_2 = GtReq::Button.new
55
+ button_2.text = pop_button_2
56
+ button_2.next = 100
57
+
58
+ action_chain_4.actionId = 10020
59
+ action_chain_4.type = GtReq::ActionChain::Type::Popup
60
+ action_chain_4.title = pop_title
61
+ action_chain_4.text = pop_text
62
+ action_chain_4.img = pop_image
63
+ action_chain_4.buttons = [button_1, button_2]
64
+ action_chain_4.next = 6
65
+
66
+ app_start_up = GtReq::AppStartUp.new(android: '', symbia: '', ios: '')
67
+ action_chain_5 = GtReq::ActionChain.new
68
+ action_chain_5.actionId = 10040
69
+ action_chain_5.type = GtReq::ActionChain::Type::Appdownload
70
+ action_chain_5.name = load_title
71
+ action_chain_5.url = load_url
72
+ action_chain_5.logo = load_icon
73
+ action_chain_5.autoInstall = is_auto_install
74
+ action_chain_5.autostart = is_active
75
+ action_chain_5.appstartupid = app_start_up
76
+ action_chain_5.next = 6
77
+
78
+ # end
79
+ action_chain_6 = GtReq::ActionChain.new
80
+ action_chain_6.actionId = 100
81
+ action_chain_6.type = GtReq::ActionChain::Type::Eoa
82
+
83
+ [action_chain_1, action_chain_2, action_chain_3, action_chain_4, action_chain_5, action_chain_6]
84
+ end
85
+
86
+ def get_push_type
87
+ "NotyPopLoadMsg"
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,40 @@
1
+ module IGeTui
2
+ class TransmissionTemplate < BaseTemplate
3
+ def initialize
4
+ super
5
+ end
6
+
7
+ def get_action_chain
8
+ # set actionChain
9
+ action_chain_1 = GtReq::ActionChain.new
10
+ action_chain_1.actionId = 1
11
+ action_chain_1.type = GtReq::ActionChain::Type::Goto
12
+ action_chain_1.next = 10030
13
+
14
+ # appStartUp
15
+ app_start_up = GtReq::AppStartUp.new(android: '', symbia: '', ios: '')
16
+
17
+ # start up app
18
+ action_chain_2 = GtReq::ActionChain.new
19
+ action_chain_2.actionId = 10030
20
+ action_chain_2.type = GtReq::ActionChain::Type::Startapp
21
+ action_chain_2.appid = ''
22
+ action_chain_2.autostart = transmission_type == 1
23
+ action_chain_2.appstartupid = app_start_up
24
+ action_chain_2.failedAction = 100
25
+ action_chain_2.next = 100
26
+
27
+ # end
28
+ action_chain_3 = GtReq::ActionChain.new
29
+ action_chain_3.actionId = 100
30
+ action_chain_3.type = GtReq::ActionChain::Type::Eoa
31
+
32
+ [action_chain_1, action_chain_2, action_chain_3]
33
+ end
34
+
35
+ def get_push_type
36
+ "TransmissionMsg"
37
+ end
38
+
39
+ end
40
+ end
@@ -0,0 +1,5 @@
1
+ require 'igetui/template/base_template'
2
+ require 'igetui/template/transmission_template'
3
+ require 'igetui/template/link_template'
4
+ require 'igetui/template/notification_template'
5
+ require 'igetui/template/noty_pop_load_template'
@@ -0,0 +1,126 @@
1
+ module IGeTui
2
+ class Validate
3
+ def validate(args = {})
4
+ # payload_map = get_payload(args)
5
+
6
+ # json = JSON.generate payload_map
7
+ # if (json.length > 256)
8
+ # raise ArgumentError.new("PushInfo length over limit: #{json.length}. Allowed: 256.")
9
+ # end
10
+
11
+ is_validate = validate_payload(args)
12
+ unless is_validate
13
+ payload_len = validate_payload_length(args)
14
+ raise ArgumentError.new("PushInfo length over limit: #{payload_len.length}. Allowed: 256.")
15
+ end
16
+ end
17
+
18
+ def validate_payload(args)
19
+ length = validate_payload_length(args)
20
+ length <= 256
21
+ end
22
+
23
+ def validate_payload_length(args)
24
+ json = process_payload(args)
25
+ json.length
26
+ end
27
+
28
+ def process_payload(args)
29
+ is_valid = false
30
+ pb = Payload.new
31
+ if !args[:loc_key].nil? && args[:loc_key].length > 0
32
+ pb.alert_loc_key = args[:loc_key]
33
+ if !args[:loc_args].nil? && args[:loc_args].length > 0
34
+ pb.alert_loc_args = args[:loc_args].split(",")
35
+ end
36
+ is_valid = true
37
+ end
38
+
39
+ if !args[:message].nil? && args[:message].length > 0
40
+ pb.alert_body = args[:message]
41
+ is_valid = true
42
+ end
43
+
44
+ if !args[:action_loc_key].nil? && args[:action_loc_key].length > 0
45
+ pb.alert_action_loc_key = args[:action_loc_key]
46
+ end
47
+
48
+ if !args[:launch_image].nil? && args[:launch_image].length > 0
49
+ pb.alert_launch_image = args[:launch_image]
50
+ end
51
+
52
+ badge_num = args[:badge].to_i
53
+
54
+ if badge_num >= 0
55
+ pb.badge = badge_num
56
+ is_valid = true
57
+ end
58
+
59
+ if !args[:sound].nil? && args[:sound].length > 0
60
+ pb.sound = args[:sound]
61
+ end
62
+
63
+ if !args[:payload].nil? && args[:payload].length > 0
64
+ pb.add_param("payload", payload)
65
+ end
66
+
67
+ unless is_valid
68
+ puts "one of the params(locKey,message,badge) must not be null"
69
+ end
70
+
71
+ json = pb.to_s
72
+
73
+ if json.nil?
74
+ puts "payload json is null"
75
+ end
76
+
77
+ json
78
+
79
+ # do something
80
+ end
81
+
82
+ def get_payload(args = {})
83
+ apnsMap = Hash.new
84
+
85
+ sound = "default" unless validate_length(args, :sound)
86
+ apnsMap["sound"] = args[:sound]
87
+
88
+ alertMap = Hash.new
89
+ if validate_length(args, :launch_image)
90
+ alertMap["launch-image"] = args[:launch_image]
91
+ end
92
+
93
+ if validate_length(args, :loc_key)
94
+ alertMap["loc-key"] = args[:loc_key]
95
+ if validate_length(args, :loc_args)
96
+ alertMap["loc-args"] = args[:loc_args].split(", ")
97
+ end
98
+ elsif validate_length(nil, args[:message])
99
+ alertMap["body"] = args[:message]
100
+ end
101
+
102
+ apnsMap["alert"] = alertMap
103
+ if validate_length(args, :action_loc_key)
104
+ apnsMap["action-loc-key"] = args[:action_loc_key]
105
+ end
106
+
107
+ apnsMap["badge"] = args[:badge]
108
+
109
+ h = Hash.new
110
+ h["aps"] = apnsMap
111
+ h["payload"] = args[:payload] if validate_length(nil, args[:payload])
112
+
113
+ return h
114
+ end
115
+
116
+ private
117
+
118
+ def validate_length(args = {}, key)
119
+ if key.class == Symbol
120
+ args[key] && args[key].length > 0
121
+ else
122
+ key && key.length > 0
123
+ end
124
+ end
125
+ end
126
+ end
@@ -0,0 +1,3 @@
1
+ module IGeTui
2
+ VERSION = "1.2.2"
3
+ end
data/lib/igetui.rb ADDED
@@ -0,0 +1,36 @@
1
+ require 'forwardable'
2
+ require 'net/http'
3
+ require 'uri'
4
+ require 'json'
5
+ require 'digest/md5'
6
+ require 'base64'
7
+
8
+ module IGeTui
9
+ class << self
10
+ extend Forwardable
11
+
12
+ API_URL = "http://sdk.open.api.igexin.com/apiex.htm"
13
+
14
+ attr_reader :pusher
15
+
16
+ def_delegators :pusher, :push_message_to_single
17
+ def_delegators :pusher, :push_message_to_list
18
+ def_delegators :pusher, :push_message_to_app
19
+ def_delegators :pusher, :stop
20
+ def_delegators :pusher, :get_client_id_status
21
+ def_delegators :pusher, :get_content_id, :cancel_content_id
22
+
23
+ def pusher(app_id, api_key, master_secret)
24
+ @pusher = IGeTui::Pusher.new(API_URL, app_id, api_key, master_secret)
25
+ end
26
+
27
+ end
28
+ end
29
+
30
+ require "igetui/version"
31
+ require 'protobuf/GtReq.pb'
32
+ require "igetui/template"
33
+ require "igetui/validate"
34
+ require "igetui/message"
35
+ require "igetui/pusher"
36
+ require "igetui/client"
@@ -0,0 +1 @@
1
+ require 'igetui'
@@ -0,0 +1,399 @@
1
+ #!/usr/bin/env ruby
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # make sure 'gem install ruby-protocol-buffers' at first.
4
+ # https://rubygems.org/gems/ruby-protocol-buffers
5
+ require 'protocol_buffers'
6
+
7
+ module GtReq
8
+ # forward declarations
9
+ class GtAuth < ::ProtocolBuffers::Message; end
10
+ class GtAuthResult < ::ProtocolBuffers::Message; end
11
+ class ReqServList < ::ProtocolBuffers::Message; end
12
+ class ReqServListResult < ::ProtocolBuffers::Message; end
13
+ class PushListResult < ::ProtocolBuffers::Message; end
14
+ class PushResult < ::ProtocolBuffers::Message; end
15
+ class PushOSSingleMessage < ::ProtocolBuffers::Message; end
16
+ class PushMMPSingleMessage < ::ProtocolBuffers::Message; end
17
+ class StartMMPBatchTask < ::ProtocolBuffers::Message; end
18
+ class StartOSBatchTask < ::ProtocolBuffers::Message; end
19
+ class PushListMessage < ::ProtocolBuffers::Message; end
20
+ class EndBatchTask < ::ProtocolBuffers::Message; end
21
+ class PushMMPAppMessage < ::ProtocolBuffers::Message; end
22
+ class ServerNotify < ::ProtocolBuffers::Message; end
23
+ class ServerNotifyResult < ::ProtocolBuffers::Message; end
24
+ class OSMessage < ::ProtocolBuffers::Message; end
25
+ class MMPMessage < ::ProtocolBuffers::Message; end
26
+ class Transparent < ::ProtocolBuffers::Message; end
27
+ class PushInfo < ::ProtocolBuffers::Message; end
28
+ class ActionChain < ::ProtocolBuffers::Message; end
29
+ class AppStartUp < ::ProtocolBuffers::Message; end
30
+ class Button < ::ProtocolBuffers::Message; end
31
+ class Target < ::ProtocolBuffers::Message; end
32
+
33
+ # enums
34
+ module CmdID
35
+ include ::ProtocolBuffers::Enum
36
+
37
+ set_fully_qualified_name "GtReq.CmdID"
38
+
39
+ GTHEARDBT = 0
40
+ GTAUTH = 1
41
+ GTAUTH_RESULT = 2
42
+ REQSERVHOST = 3
43
+ REQSERVHOSTRESULT = 4
44
+ PUSHRESULT = 5
45
+ PUSHOSSINGLEMESSAGE = 6
46
+ PUSHMMPSINGLEMESSAGE = 7
47
+ STARTMMPBATCHTASK = 8
48
+ STARTOSBATCHTASK = 9
49
+ PUSHLISTMESSAGE = 10
50
+ ENDBATCHTASK = 11
51
+ PUSHMMPAPPMESSAGE = 12
52
+ SERVERNOTIFY = 13
53
+ PUSHLISTRESULT = 14
54
+ SERVERNOTIFYRESULT = 15
55
+ end
56
+
57
+ module SMSStatus
58
+ include ::ProtocolBuffers::Enum
59
+
60
+ set_fully_qualified_name "GtReq.SMSStatus"
61
+
62
+ Unread = 0
63
+ Read = 1
64
+ end
65
+
66
+ class GtAuth < ::ProtocolBuffers::Message
67
+ set_fully_qualified_name "GtReq.GtAuth"
68
+
69
+ required :string, :sign, 1
70
+ required :string, :appkey, 2
71
+ required :int64, :timestamp, 3
72
+ optional :string, :seqId, 4
73
+ end
74
+
75
+ class GtAuthResult < ::ProtocolBuffers::Message
76
+ # forward declarations
77
+
78
+ # enums
79
+ module GtAuthResultCode
80
+ include ::ProtocolBuffers::Enum
81
+
82
+ set_fully_qualified_name "GtReq.GtAuthResult.GtAuthResultCode"
83
+
84
+ Successed = 0
85
+ Failed_noSign = 1
86
+ Failed_noAppkey = 2
87
+ Failed_noTimestamp = 3
88
+ Failed_AuthIllegal = 4
89
+ Redirect = 5
90
+ end
91
+
92
+ set_fully_qualified_name "GtReq.GtAuthResult"
93
+
94
+ required :int32, :code, 1
95
+ optional :string, :redirectAddress, 2
96
+ optional :string, :seqId, 3
97
+ optional :string, :info, 4
98
+ end
99
+
100
+ class ReqServList < ::ProtocolBuffers::Message
101
+ set_fully_qualified_name "GtReq.ReqServList"
102
+
103
+ optional :string, :seqId, 1
104
+ required :int64, :timestamp, 3
105
+ end
106
+
107
+ class ReqServListResult < ::ProtocolBuffers::Message
108
+ # forward declarations
109
+
110
+ # enums
111
+ module ReqServHostResultCode
112
+ include ::ProtocolBuffers::Enum
113
+
114
+ set_fully_qualified_name "GtReq.ReqServListResult.ReqServHostResultCode"
115
+
116
+ Successed = 0
117
+ Failed = 1
118
+ Busy = 2
119
+ end
120
+
121
+ set_fully_qualified_name "GtReq.ReqServListResult"
122
+
123
+ required :int32, :code, 1
124
+ repeated :string, :host, 2
125
+ optional :string, :seqId, 3
126
+ end
127
+
128
+ class PushListResult < ::ProtocolBuffers::Message
129
+ set_fully_qualified_name "GtReq.PushListResult"
130
+
131
+ repeated ::GtReq::PushResult, :results, 1
132
+ end
133
+
134
+ class PushResult < ::ProtocolBuffers::Message
135
+ # forward declarations
136
+
137
+ # enums
138
+ module EPushResult
139
+ include ::ProtocolBuffers::Enum
140
+
141
+ set_fully_qualified_name "GtReq.PushResult.EPushResult"
142
+
143
+ Successed_online = 0
144
+ Successed_offline = 1
145
+ Successed_ignore = 2
146
+ Failed = 3
147
+ Busy = 4
148
+ Success_startBatch = 5
149
+ Success_endBatch = 6
150
+ end
151
+
152
+ set_fully_qualified_name "GtReq.PushResult"
153
+
154
+ required ::GtReq::PushResult::EPushResult, :result, 1
155
+ required :string, :taskId, 2
156
+ required :string, :messageId, 3
157
+ required :string, :seqId, 4
158
+ required :string, :target, 5
159
+ optional :string, :info, 6
160
+ optional :string, :traceId, 7
161
+ end
162
+
163
+ class PushOSSingleMessage < ::ProtocolBuffers::Message
164
+ set_fully_qualified_name "GtReq.PushOSSingleMessage"
165
+
166
+ required :string, :seqId, 1
167
+ required ::GtReq::OSMessage, :message, 2
168
+ required ::GtReq::Target, :target, 3
169
+ end
170
+
171
+ class PushMMPSingleMessage < ::ProtocolBuffers::Message
172
+ set_fully_qualified_name "GtReq.PushMMPSingleMessage"
173
+
174
+ required :string, :seqId, 1
175
+ required ::GtReq::MMPMessage, :message, 2
176
+ required ::GtReq::Target, :target, 3
177
+ end
178
+
179
+ class StartMMPBatchTask < ::ProtocolBuffers::Message
180
+ set_fully_qualified_name "GtReq.StartMMPBatchTask"
181
+
182
+ required ::GtReq::MMPMessage, :message, 1
183
+ required :int64, :expire, 2, :default => 72
184
+ optional :string, :seqId, 3
185
+ end
186
+
187
+ class StartOSBatchTask < ::ProtocolBuffers::Message
188
+ set_fully_qualified_name "GtReq.StartOSBatchTask"
189
+
190
+ required ::GtReq::OSMessage, :message, 1
191
+ required :int64, :expire, 2, :default => 72
192
+ end
193
+
194
+ class PushListMessage < ::ProtocolBuffers::Message
195
+ set_fully_qualified_name "GtReq.PushListMessage"
196
+
197
+ required :string, :seqId, 1
198
+ required :string, :taskId, 2
199
+ repeated ::GtReq::Target, :targets, 3
200
+ end
201
+
202
+ class EndBatchTask < ::ProtocolBuffers::Message
203
+ set_fully_qualified_name "GtReq.EndBatchTask"
204
+
205
+ required :string, :taskId, 1
206
+ optional :string, :seqId, 2
207
+ end
208
+
209
+ class PushMMPAppMessage < ::ProtocolBuffers::Message
210
+ set_fully_qualified_name "GtReq.PushMMPAppMessage"
211
+
212
+ required ::GtReq::MMPMessage, :message, 1
213
+ repeated :string, :appIdList, 2
214
+ repeated :string, :phoneTypeList, 3
215
+ repeated :string, :provinceList, 4
216
+ optional :string, :seqId, 5
217
+ end
218
+
219
+ class ServerNotify < ::ProtocolBuffers::Message
220
+ # forward declarations
221
+
222
+ # enums
223
+ module NotifyType
224
+ include ::ProtocolBuffers::Enum
225
+
226
+ set_fully_qualified_name "GtReq.ServerNotify.NotifyType"
227
+
228
+ Normal = 0
229
+ ServerListChanged = 1
230
+ Exception = 2
231
+ end
232
+
233
+ set_fully_qualified_name "GtReq.ServerNotify"
234
+
235
+ required ::GtReq::ServerNotify::NotifyType, :type, 1
236
+ optional :string, :info, 2
237
+ optional :bytes, :extradata, 3
238
+ optional :string, :seqId, 4
239
+ end
240
+
241
+ class ServerNotifyResult < ::ProtocolBuffers::Message
242
+ set_fully_qualified_name "GtReq.ServerNotifyResult"
243
+
244
+ required :string, :seqId, 1
245
+ optional :string, :info, 2
246
+ end
247
+
248
+ class OSMessage < ::ProtocolBuffers::Message
249
+ set_fully_qualified_name "GtReq.OSMessage"
250
+
251
+ required :bool, :isOffline, 2
252
+ required :int64, :offlineExpireTime, 3, :default => 1
253
+ optional ::GtReq::Transparent, :transparent, 4
254
+ optional :string, :extraData, 5
255
+ optional :int32, :msgType, 6
256
+ optional :int32, :msgTraceFlag, 7
257
+ optional :int32, :priority, 8
258
+ end
259
+
260
+ class MMPMessage < ::ProtocolBuffers::Message
261
+ set_fully_qualified_name "GtReq.MMPMessage"
262
+
263
+ optional ::GtReq::Transparent, :transparent, 2
264
+ optional :string, :extraData, 3
265
+ optional :int32, :msgType, 4
266
+ optional :int32, :msgTraceFlag, 5
267
+ optional :int64, :msgOfflineExpire, 6
268
+ optional :bool, :isOffline, 7, :default => true
269
+ optional :int32, :priority, 8
270
+ end
271
+
272
+ class Transparent < ::ProtocolBuffers::Message
273
+ set_fully_qualified_name "GtReq.Transparent"
274
+
275
+ required :string, :id, 1
276
+ required :string, :action, 2
277
+ required :string, :taskId, 3
278
+ required :string, :appKey, 4
279
+ required :string, :appId, 5
280
+ required :string, :messageId, 6
281
+ optional ::GtReq::PushInfo, :pushInfo, 7
282
+ repeated ::GtReq::ActionChain, :actionChain, 8
283
+ end
284
+
285
+ class PushInfo < ::ProtocolBuffers::Message
286
+ set_fully_qualified_name "GtReq.PushInfo"
287
+
288
+ optional :string, :message, 1
289
+ optional :string, :actionKey, 2
290
+ optional :string, :sound, 3
291
+ optional :string, :badge, 4
292
+ optional :string, :payload, 5
293
+ optional :string, :locKey, 6
294
+ optional :string, :locArgs, 7
295
+ optional :string, :actionLocKey, 8
296
+ optional :string, :launchImage, 9
297
+ end
298
+
299
+ class ActionChain < ::ProtocolBuffers::Message
300
+ # forward declarations
301
+
302
+ # enums
303
+ module Type
304
+ include ::ProtocolBuffers::Enum
305
+
306
+ set_fully_qualified_name "GtReq.ActionChain.Type"
307
+
308
+ Goto = 0
309
+ Notification = 1
310
+ Popup = 2
311
+ Startapp = 3
312
+ Startweb = 4
313
+ Smsinbox = 5
314
+ Checkapp = 6
315
+ Eoa = 7
316
+ Appdownload = 8
317
+ Startsms = 9
318
+ Httpproxy = 10
319
+ Smsinbox2 = 11
320
+ Mmsinbox2 = 12
321
+ Popupweb = 13
322
+ Dial = 14
323
+ Reportbindapp = 15
324
+ Reportaddphoneinfo = 16
325
+ Reportapplist = 17
326
+ Terminatetask = 18
327
+ Reportapp = 19
328
+ Enablelog = 20
329
+ Disablelog = 21
330
+ Uploadlog = 22
331
+ end
332
+
333
+ set_fully_qualified_name "GtReq.ActionChain"
334
+
335
+ required :int32, :actionId, 1
336
+ required ::GtReq::ActionChain::Type, :type, 2
337
+ optional :int32, :next, 3
338
+ optional :string, :logo, 100
339
+ optional :string, :logoURL, 101
340
+ optional :string, :title, 102
341
+ optional :string, :text, 103
342
+ optional :bool, :clearable, 104
343
+ optional :bool, :ring, 105
344
+ optional :bool, :buzz, 106
345
+ optional :string, :bannerURL, 107
346
+ optional :string, :img, 120
347
+ repeated ::GtReq::Button, :buttons, 121
348
+ optional :string, :appid, 140
349
+ optional ::GtReq::AppStartUp, :appstartupid, 141
350
+ optional :bool, :autostart, 142
351
+ optional :int32, :failedAction, 143
352
+ optional :string, :url, 160
353
+ optional :string, :withcid, 161
354
+ optional :bool, :is_withnettype, 162, :default => false
355
+ optional :string, :address, 180
356
+ optional :string, :content, 181
357
+ optional :int64, :ct, 182
358
+ optional ::GtReq::SMSStatus, :flag, 183
359
+ optional :int32, :successedAction, 200
360
+ optional :int32, :uninstalledAction, 201
361
+ optional :string, :name, 220
362
+ optional :bool, :autoInstall, 223
363
+ optional :bool, :wifiAutodownload, 225
364
+ optional :bool, :forceDownload, 226
365
+ optional :bool, :showProgress, 227
366
+ optional :string, :post, 241
367
+ optional :string, :headers, 242
368
+ optional :bool, :groupable, 260
369
+ optional :string, :mmsTitle, 280
370
+ optional :string, :mmsURL, 281
371
+ optional :bool, :preload, 300
372
+ optional :string, :taskid, 320
373
+ optional :int64, :duration, 340
374
+ optional :string, :date, 360
375
+ end
376
+
377
+ class AppStartUp < ::ProtocolBuffers::Message
378
+ set_fully_qualified_name "GtReq.AppStartUp"
379
+
380
+ optional :string, :android, 1
381
+ optional :string, :symbia, 2
382
+ optional :string, :ios, 3
383
+ end
384
+
385
+ class Button < ::ProtocolBuffers::Message
386
+ set_fully_qualified_name "GtReq.Button"
387
+
388
+ optional :string, :text, 1
389
+ optional :int32, :next, 2
390
+ end
391
+
392
+ class Target < ::ProtocolBuffers::Message
393
+ set_fully_qualified_name "GtReq.Target"
394
+
395
+ required :string, :appId, 1
396
+ required :string, :clientId, 2
397
+ end
398
+
399
+ end