Class: TeamBattlesSdk::Generated::Models::GamePlayerStatsBody
- Inherits:
-
Object
- Object
- TeamBattlesSdk::Generated::Models::GamePlayerStatsBody
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/teambattles_sdk/generated/models/game_player_stats_body.rb
Overview
Request body for submitting or updating player stats for an existing map score.
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#additional_data ⇒ Object
Gets the AdditionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the AdditionalData property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new GamePlayerStatsBody and sets the default values.
-
#map_index ⇒ Object
Gets the mapIndex property value.
-
#map_index=(value) ⇒ Object
Sets the mapIndex property value.
-
#player_stats ⇒ Object
Gets the playerStats property value.
-
#player_stats=(value) ⇒ Object
Sets the playerStats property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Constructor Details
#initialize ⇒ Object
Instantiates a new GamePlayerStatsBody and sets the default values.
40 41 42 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 40 def initialize() @additional_data = Hash.new end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
48 49 50 51 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 48 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return GamePlayerStatsBody.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
25 26 27 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 25 def additional_data return @additional_data end |
#additional_data=(value) ⇒ Object
Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
33 34 35 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 33 def additional_data=(value) @additional_data = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
56 57 58 59 60 61 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 56 def get_field_deserializers() return { "mapIndex" => lambda {|n| @map_index = n.get_number_value() }, "playerStats" => lambda {|n| @player_stats = n.get_object_value(lambda {|pn| TeamBattlesSdk::Generated::Models::GamePlayerStatsBodyPlayerStats.create_from_discriminator_value(pn) }) }, } end |
#map_index ⇒ Object
Gets the mapIndex property value. Zero-based index of the map whose stats are being updated.
66 67 68 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 66 def map_index return @map_index end |
#map_index=(value) ⇒ Object
Sets the mapIndex property value. Zero-based index of the map whose stats are being updated.
74 75 76 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 74 def map_index=(value) @map_index = value end |
#player_stats ⇒ Object
Gets the playerStats property value. Per-player stats keyed by user ID. The map score must already exist.
81 82 83 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 81 def player_stats return @player_stats end |
#player_stats=(value) ⇒ Object
Sets the playerStats property value. Per-player stats keyed by user ID. The map score must already exist.
89 90 91 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 89 def player_stats=(value) @player_stats = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
97 98 99 100 101 102 |
# File 'lib/teambattles_sdk/generated/models/game_player_stats_body.rb', line 97 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_number_value("mapIndex", @map_index) writer.write_object_value("playerStats", @player_stats) writer.write_additional_data(@additional_data) end |