Class: TeamBattlesSdk::Generated::Models::GameScore
- Inherits:
-
Object
- Object
- TeamBattlesSdk::Generated::Models::GameScore
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/teambattles_sdk/generated/models/game_score.rb
Overview
A single map score as returned when reading scores.
Defined Under Namespace
Classes: GameScoreConfirmedAt, GameScoreSubmittedAt
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
-
#confirmed_at ⇒ Object
Gets the confirmedAt property value.
-
#confirmed_at=(value) ⇒ Object
Sets the confirmedAt property value.
-
#creator_team_score ⇒ Object
Gets the creatorTeamScore property value.
-
#creator_team_score=(value) ⇒ Object
Sets the creatorTeamScore property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#map_id ⇒ Object
Gets the mapId property value.
-
#map_id=(value) ⇒ Object
Sets the mapId property value.
-
#map_index ⇒ Object
Gets the mapIndex property value.
-
#map_index=(value) ⇒ Object
Sets the mapIndex property value.
-
#opponent_team_score ⇒ Object
Gets the opponentTeamScore property value.
-
#opponent_team_score=(value) ⇒ Object
Sets the opponentTeamScore property value.
-
#score_status ⇒ Object
Gets the scoreStatus property value.
-
#score_status=(value) ⇒ Object
Sets the scoreStatus property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#submitted_at ⇒ Object
Gets the submittedAt property value.
-
#submitted_at=(value) ⇒ Object
Sets the submittedAt property value.
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
53 54 55 56 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 53 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return GameScore.new end |
Instance Method Details
#confirmed_at ⇒ Object
Gets the confirmedAt property value. When the score was confirmed (ISO 8601).
37 38 39 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 37 def confirmed_at return @confirmed_at end |
#confirmed_at=(value) ⇒ Object
Sets the confirmedAt property value. When the score was confirmed (ISO 8601).
45 46 47 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 45 def confirmed_at=(value) @confirmed_at = value end |
#creator_team_score ⇒ Object
Gets the creatorTeamScore property value. Score for the creator team.
61 62 63 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 61 def creator_team_score return @creator_team_score end |
#creator_team_score=(value) ⇒ Object
Sets the creatorTeamScore property value. Score for the creator team.
69 70 71 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 69 def creator_team_score=(value) @creator_team_score = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 76 def get_field_deserializers() return { "confirmedAt" => lambda {|n| @confirmed_at = n.get_object_value(lambda {|pn| GameScore::GameScoreConfirmedAt.create_from_discriminator_value(pn) }) }, "creatorTeamScore" => lambda {|n| @creator_team_score = n.get_number_value() }, "mapId" => lambda {|n| @map_id = n.get_string_value() }, "mapIndex" => lambda {|n| @map_index = n.get_number_value() }, "opponentTeamScore" => lambda {|n| @opponent_team_score = n.get_number_value() }, "scoreStatus" => lambda {|n| @score_status = n.get_string_value() }, "submittedAt" => lambda {|n| @submitted_at = n.get_object_value(lambda {|pn| GameScore::GameScoreSubmittedAt.create_from_discriminator_value(pn) }) }, } end |
#map_id ⇒ Object
Gets the mapId property value. Identifier of the map that was played.
91 92 93 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 91 def map_id return @map_id end |
#map_id=(value) ⇒ Object
Sets the mapId property value. Identifier of the map that was played.
99 100 101 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 99 def map_id=(value) @map_id = value end |
#map_index ⇒ Object
Gets the mapIndex property value. Zero-based index of the map within the series.
106 107 108 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 106 def map_index return @map_index end |
#map_index=(value) ⇒ Object
Sets the mapIndex property value. Zero-based index of the map within the series.
114 115 116 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 114 def map_index=(value) @map_index = value end |
#opponent_team_score ⇒ Object
Gets the opponentTeamScore property value. Score for the opponent (accepted) team.
121 122 123 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 121 def opponent_team_score return @opponent_team_score end |
#opponent_team_score=(value) ⇒ Object
Sets the opponentTeamScore property value. Score for the opponent (accepted) team.
129 130 131 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 129 def opponent_team_score=(value) @opponent_team_score = value end |
#score_status ⇒ Object
Gets the scoreStatus property value. Confirmation state: “CONFIRMED” or “PENDING”.
136 137 138 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 136 def score_status return @score_status end |
#score_status=(value) ⇒ Object
Sets the scoreStatus property value. Confirmation state: “CONFIRMED” or “PENDING”.
144 145 146 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 144 def score_status=(value) @score_status = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
152 153 154 155 156 157 158 159 160 161 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 152 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_object_value("confirmedAt", @confirmed_at) writer.write_number_value("creatorTeamScore", @creator_team_score) writer.write_string_value("mapId", @map_id) writer.write_number_value("mapIndex", @map_index) writer.write_number_value("opponentTeamScore", @opponent_team_score) writer.write_string_value("scoreStatus", @score_status) writer.write_object_value("submittedAt", @submitted_at) end |
#submitted_at ⇒ Object
Gets the submittedAt property value. When the score was submitted (ISO 8601).
166 167 168 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 166 def submitted_at return @submitted_at end |
#submitted_at=(value) ⇒ Object
Sets the submittedAt property value. When the score was submitted (ISO 8601).
174 175 176 |
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 174 def submitted_at=(value) @submitted_at = value end |