Class: Google::Apis::GamesV1::PlayerEvent

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/games_v1/classes.rb,
generated/google/apis/games_v1/representations.rb,
generated/google/apis/games_v1/representations.rb

Overview

This is a JSON template for an event status resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PlayerEvent

Returns a new instance of PlayerEvent.



2230
2231
2232
# File 'generated/google/apis/games_v1/classes.rb', line 2230

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#definition_idString

The ID of the event definition. Corresponds to the JSON property definitionId

Returns:

  • (String)


2205
2206
2207
# File 'generated/google/apis/games_v1/classes.rb', line 2205

def definition_id
  @definition_id
end

#formatted_num_eventsString

The current number of times this event has occurred, as a string. The formatting of this string depends on the configuration of your event in the Play Games Developer Console. Corresponds to the JSON property formattedNumEvents

Returns:

  • (String)


2212
2213
2214
# File 'generated/google/apis/games_v1/classes.rb', line 2212

def formatted_num_events
  @formatted_num_events
end

#kindString

Uniquely identifies the type of this resource. Value is always the fixed string games#playerEvent. Corresponds to the JSON property kind

Returns:

  • (String)


2218
2219
2220
# File 'generated/google/apis/games_v1/classes.rb', line 2218

def kind
  @kind
end

#num_eventsFixnum

The current number of times this event has occurred. Corresponds to the JSON property numEvents

Returns:

  • (Fixnum)


2223
2224
2225
# File 'generated/google/apis/games_v1/classes.rb', line 2223

def num_events
  @num_events
end

#player_idString

The ID of the player. Corresponds to the JSON property playerId

Returns:

  • (String)


2228
2229
2230
# File 'generated/google/apis/games_v1/classes.rb', line 2228

def player_id
  @player_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2235
2236
2237
2238
2239
2240
2241
# File 'generated/google/apis/games_v1/classes.rb', line 2235

def update!(**args)
  @definition_id = args[:definition_id] if args.key?(:definition_id)
  @formatted_num_events = args[:formatted_num_events] if args.key?(:formatted_num_events)
  @kind = args[:kind] if args.key?(:kind)
  @num_events = args[:num_events] if args.key?(:num_events)
  @player_id = args[:player_id] if args.key?(:player_id)
end