File: classes.rb

package info (click to toggle)
ruby-google-api-client 0.53.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 75,104 kB
  • sloc: ruby: 626,567; makefile: 4
file content (490 lines) | stat: -rw-r--r-- 18,232 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License 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.

require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'

module Google
  module Apis
    module GamesConfigurationV1configuration
      
      # An achievement configuration resource.
      class AchievementConfiguration
        include Google::Apis::Core::Hashable
      
        # The type of the achievement.
        # Corresponds to the JSON property `achievementType`
        # @return [String]
        attr_accessor :achievement_type
      
        # An achievement configuration detail.
        # Corresponds to the JSON property `draft`
        # @return [Google::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail]
        attr_accessor :draft
      
        # The ID of the achievement.
        # Corresponds to the JSON property `id`
        # @return [String]
        attr_accessor :id
      
        # The initial state of the achievement.
        # Corresponds to the JSON property `initialState`
        # @return [String]
        attr_accessor :initial_state
      
        # Uniquely identifies the type of this resource. Value is always the fixed
        # string `gamesConfiguration#achievementConfiguration`.
        # Corresponds to the JSON property `kind`
        # @return [String]
        attr_accessor :kind
      
        # An achievement configuration detail.
        # Corresponds to the JSON property `published`
        # @return [Google::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail]
        attr_accessor :published
      
        # Steps to unlock. Only applicable to incremental achievements.
        # Corresponds to the JSON property `stepsToUnlock`
        # @return [Fixnum]
        attr_accessor :steps_to_unlock
      
        # The token for this resource.
        # Corresponds to the JSON property `token`
        # @return [String]
        attr_accessor :token
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @achievement_type = args[:achievement_type] if args.key?(:achievement_type)
          @draft = args[:draft] if args.key?(:draft)
          @id = args[:id] if args.key?(:id)
          @initial_state = args[:initial_state] if args.key?(:initial_state)
          @kind = args[:kind] if args.key?(:kind)
          @published = args[:published] if args.key?(:published)
          @steps_to_unlock = args[:steps_to_unlock] if args.key?(:steps_to_unlock)
          @token = args[:token] if args.key?(:token)
        end
      end
      
      # An achievement configuration detail.
      class AchievementConfigurationDetail
        include Google::Apis::Core::Hashable
      
        # A localized string bundle resource.
        # Corresponds to the JSON property `description`
        # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle]
        attr_accessor :description
      
        # The icon url of this achievement. Writes to this field are ignored.
        # Corresponds to the JSON property `iconUrl`
        # @return [String]
        attr_accessor :icon_url
      
        # Uniquely identifies the type of this resource. Value is always the fixed
        # string `gamesConfiguration#achievementConfigurationDetail`.
        # Corresponds to the JSON property `kind`
        # @return [String]
        attr_accessor :kind
      
        # A localized string bundle resource.
        # Corresponds to the JSON property `name`
        # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle]
        attr_accessor :name
      
        # Point value for the achievement.
        # Corresponds to the JSON property `pointValue`
        # @return [Fixnum]
        attr_accessor :point_value
      
        # The sort rank of this achievement. Writes to this field are ignored.
        # Corresponds to the JSON property `sortRank`
        # @return [Fixnum]
        attr_accessor :sort_rank
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @description = args[:description] if args.key?(:description)
          @icon_url = args[:icon_url] if args.key?(:icon_url)
          @kind = args[:kind] if args.key?(:kind)
          @name = args[:name] if args.key?(:name)
          @point_value = args[:point_value] if args.key?(:point_value)
          @sort_rank = args[:sort_rank] if args.key?(:sort_rank)
        end
      end
      
      # A ListConfigurations response.
      class ListAchievementConfigurationResponse
        include Google::Apis::Core::Hashable
      
        # The achievement configurations.
        # Corresponds to the JSON property `items`
        # @return [Array<Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration>]
        attr_accessor :items
      
        # Uniquely identifies the type of this resource. Value is always the fixed
        # string `gamesConfiguration#achievementConfigurationListResponse`.
        # Corresponds to the JSON property `kind`
        # @return [String]
        attr_accessor :kind
      
        # The pagination token for the next page of results.
        # Corresponds to the JSON property `nextPageToken`
        # @return [String]
        attr_accessor :next_page_token
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @items = args[:items] if args.key?(:items)
          @kind = args[:kind] if args.key?(:kind)
          @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
        end
      end
      
      # A number affix resource.
      class GamesNumberAffixConfiguration
        include Google::Apis::Core::Hashable
      
        # A localized string bundle resource.
        # Corresponds to the JSON property `few`
        # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle]
        attr_accessor :few
      
        # A localized string bundle resource.
        # Corresponds to the JSON property `many`
        # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle]
        attr_accessor :many
      
        # A localized string bundle resource.
        # Corresponds to the JSON property `one`
        # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle]
        attr_accessor :one
      
        # A localized string bundle resource.
        # Corresponds to the JSON property `other`
        # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle]
        attr_accessor :other
      
        # A localized string bundle resource.
        # Corresponds to the JSON property `two`
        # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle]
        attr_accessor :two
      
        # A localized string bundle resource.
        # Corresponds to the JSON property `zero`
        # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle]
        attr_accessor :zero
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @few = args[:few] if args.key?(:few)
          @many = args[:many] if args.key?(:many)
          @one = args[:one] if args.key?(:one)
          @other = args[:other] if args.key?(:other)
          @two = args[:two] if args.key?(:two)
          @zero = args[:zero] if args.key?(:zero)
        end
      end
      
      # A number format resource.
      class GamesNumberFormatConfiguration
        include Google::Apis::Core::Hashable
      
        # The curreny code string. Only used for CURRENCY format type.
        # Corresponds to the JSON property `currencyCode`
        # @return [String]
        attr_accessor :currency_code
      
        # The number of decimal places for number. Only used for NUMERIC format type.
        # Corresponds to the JSON property `numDecimalPlaces`
        # @return [Fixnum]
        attr_accessor :num_decimal_places
      
        # The formatting for the number.
        # Corresponds to the JSON property `numberFormatType`
        # @return [String]
        attr_accessor :number_format_type
      
        # A number affix resource.
        # Corresponds to the JSON property `suffix`
        # @return [Google::Apis::GamesConfigurationV1configuration::GamesNumberAffixConfiguration]
        attr_accessor :suffix
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @currency_code = args[:currency_code] if args.key?(:currency_code)
          @num_decimal_places = args[:num_decimal_places] if args.key?(:num_decimal_places)
          @number_format_type = args[:number_format_type] if args.key?(:number_format_type)
          @suffix = args[:suffix] if args.key?(:suffix)
        end
      end
      
      # An image configuration resource.
      class ImageConfiguration
        include Google::Apis::Core::Hashable
      
        # The image type for the image.
        # Corresponds to the JSON property `imageType`
        # @return [String]
        attr_accessor :image_type
      
        # Uniquely identifies the type of this resource. Value is always the fixed
        # string `gamesConfiguration#imageConfiguration`.
        # Corresponds to the JSON property `kind`
        # @return [String]
        attr_accessor :kind
      
        # The resource ID of resource which the image belongs to.
        # Corresponds to the JSON property `resourceId`
        # @return [String]
        attr_accessor :resource_id
      
        # The url for this image.
        # Corresponds to the JSON property `url`
        # @return [String]
        attr_accessor :url
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @image_type = args[:image_type] if args.key?(:image_type)
          @kind = args[:kind] if args.key?(:kind)
          @resource_id = args[:resource_id] if args.key?(:resource_id)
          @url = args[:url] if args.key?(:url)
        end
      end
      
      # An leaderboard configuration resource.
      class LeaderboardConfiguration
        include Google::Apis::Core::Hashable
      
        # A leaderboard configuration detail.
        # Corresponds to the JSON property `draft`
        # @return [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfigurationDetail]
        attr_accessor :draft
      
        # The ID of the leaderboard.
        # Corresponds to the JSON property `id`
        # @return [String]
        attr_accessor :id
      
        # Uniquely identifies the type of this resource. Value is always the fixed
        # string `gamesConfiguration#leaderboardConfiguration`.
        # Corresponds to the JSON property `kind`
        # @return [String]
        attr_accessor :kind
      
        # A leaderboard configuration detail.
        # Corresponds to the JSON property `published`
        # @return [Google::Apis::GamesConfigurationV1configuration::LeaderboardConfigurationDetail]
        attr_accessor :published
      
        # Maximum score that can be posted to this leaderboard.
        # Corresponds to the JSON property `scoreMax`
        # @return [Fixnum]
        attr_accessor :score_max
      
        # Minimum score that can be posted to this leaderboard.
        # Corresponds to the JSON property `scoreMin`
        # @return [Fixnum]
        attr_accessor :score_min
      
        # 
        # Corresponds to the JSON property `scoreOrder`
        # @return [String]
        attr_accessor :score_order
      
        # The token for this resource.
        # Corresponds to the JSON property `token`
        # @return [String]
        attr_accessor :token
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @draft = args[:draft] if args.key?(:draft)
          @id = args[:id] if args.key?(:id)
          @kind = args[:kind] if args.key?(:kind)
          @published = args[:published] if args.key?(:published)
          @score_max = args[:score_max] if args.key?(:score_max)
          @score_min = args[:score_min] if args.key?(:score_min)
          @score_order = args[:score_order] if args.key?(:score_order)
          @token = args[:token] if args.key?(:token)
        end
      end
      
      # A leaderboard configuration detail.
      class LeaderboardConfigurationDetail
        include Google::Apis::Core::Hashable
      
        # The icon url of this leaderboard. Writes to this field are ignored.
        # Corresponds to the JSON property `iconUrl`
        # @return [String]
        attr_accessor :icon_url
      
        # Uniquely identifies the type of this resource. Value is always the fixed
        # string `gamesConfiguration#leaderboardConfigurationDetail`.
        # Corresponds to the JSON property `kind`
        # @return [String]
        attr_accessor :kind
      
        # A localized string bundle resource.
        # Corresponds to the JSON property `name`
        # @return [Google::Apis::GamesConfigurationV1configuration::LocalizedStringBundle]
        attr_accessor :name
      
        # A number format resource.
        # Corresponds to the JSON property `scoreFormat`
        # @return [Google::Apis::GamesConfigurationV1configuration::GamesNumberFormatConfiguration]
        attr_accessor :score_format
      
        # The sort rank of this leaderboard. Writes to this field are ignored.
        # Corresponds to the JSON property `sortRank`
        # @return [Fixnum]
        attr_accessor :sort_rank
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @icon_url = args[:icon_url] if args.key?(:icon_url)
          @kind = args[:kind] if args.key?(:kind)
          @name = args[:name] if args.key?(:name)
          @score_format = args[:score_format] if args.key?(:score_format)
          @sort_rank = args[:sort_rank] if args.key?(:sort_rank)
        end
      end
      
      # A ListConfigurations response.
      class ListLeaderboardConfigurationResponse
        include Google::Apis::Core::Hashable
      
        # The leaderboard configurations.
        # Corresponds to the JSON property `items`
        # @return [Array<Google::Apis::GamesConfigurationV1configuration::LeaderboardConfiguration>]
        attr_accessor :items
      
        # Uniquely identifies the type of this resource. Value is always the fixed
        # string `gamesConfiguration#leaderboardConfigurationListResponse`.
        # Corresponds to the JSON property `kind`
        # @return [String]
        attr_accessor :kind
      
        # The pagination token for the next page of results.
        # Corresponds to the JSON property `nextPageToken`
        # @return [String]
        attr_accessor :next_page_token
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @items = args[:items] if args.key?(:items)
          @kind = args[:kind] if args.key?(:kind)
          @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
        end
      end
      
      # A localized string resource.
      class LocalizedString
        include Google::Apis::Core::Hashable
      
        # Uniquely identifies the type of this resource. Value is always the fixed
        # string `gamesConfiguration#localizedString`.
        # Corresponds to the JSON property `kind`
        # @return [String]
        attr_accessor :kind
      
        # The locale string.
        # Corresponds to the JSON property `locale`
        # @return [String]
        attr_accessor :locale
      
        # The string value.
        # Corresponds to the JSON property `value`
        # @return [String]
        attr_accessor :value
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @kind = args[:kind] if args.key?(:kind)
          @locale = args[:locale] if args.key?(:locale)
          @value = args[:value] if args.key?(:value)
        end
      end
      
      # A localized string bundle resource.
      class LocalizedStringBundle
        include Google::Apis::Core::Hashable
      
        # Uniquely identifies the type of this resource. Value is always the fixed
        # string `gamesConfiguration#localizedStringBundle`.
        # Corresponds to the JSON property `kind`
        # @return [String]
        attr_accessor :kind
      
        # The locale strings.
        # Corresponds to the JSON property `translations`
        # @return [Array<Google::Apis::GamesConfigurationV1configuration::LocalizedString>]
        attr_accessor :translations
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @kind = args[:kind] if args.key?(:kind)
          @translations = args[:translations] if args.key?(:translations)
        end
      end
    end
  end
end