Class: TeamBattlesSdk::Generated::Models::GameMatch
- Inherits:
-
Object
- Object
- TeamBattlesSdk::Generated::Models::GameMatch
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/teambattles_sdk/generated/models/game_match.rb
Overview
Match as returned by the game-developer endpoints (includes scores, omits the game object).
Defined Under Namespace
Classes: GameMatchAcceptedTeamScore, GameMatchCompletedAt, GameMatchCreatedAt, GameMatchCreatorTeamScore, GameMatchScheduledAt, GameMatchStartedAt
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
-
#accepted_team ⇒ Object
Gets the acceptedTeam property value.
-
#accepted_team=(value) ⇒ Object
Sets the acceptedTeam property value.
-
#accepted_team_score ⇒ Object
Gets the acceptedTeamScore property value.
-
#accepted_team_score=(value) ⇒ Object
Sets the acceptedTeamScore property value.
-
#best_of ⇒ Object
Gets the bestOf property value.
-
#best_of=(value) ⇒ Object
Sets the bestOf property value.
-
#completed_at ⇒ Object
Gets the completedAt property value.
-
#completed_at=(value) ⇒ Object
Sets the completedAt property value.
-
#created_at ⇒ Object
Gets the createdAt property value.
-
#created_at=(value) ⇒ Object
Sets the createdAt property value.
-
#creator_team ⇒ Object
Gets the creatorTeam property value.
-
#creator_team=(value) ⇒ Object
Sets the creatorTeam property value.
-
#creator_team_score ⇒ Object
Gets the creatorTeamScore property value.
-
#creator_team_score=(value) ⇒ Object
Sets the creatorTeamScore property value.
-
#game_mode ⇒ Object
Gets the gameMode property value.
-
#game_mode=(value) ⇒ Object
Sets the gameMode property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#id ⇒ Object
Gets the id property value.
-
#id=(value) ⇒ Object
Sets the id property value.
-
#scheduled_at ⇒ Object
Gets the scheduledAt property value.
-
#scheduled_at=(value) ⇒ Object
Sets the scheduledAt property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#started_at ⇒ Object
Gets the startedAt property value.
-
#started_at=(value) ⇒ Object
Sets the startedAt property value.
-
#status ⇒ Object
Gets the status property value.
-
#status=(value) ⇒ Object
Sets the status property value.
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
128 129 130 131 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 128 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return GameMatch.new end |
Instance Method Details
#accepted_team ⇒ Object
Gets the acceptedTeam property value. The acceptedTeam property
52 53 54 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 52 def accepted_team return @accepted_team end |
#accepted_team=(value) ⇒ Object
Sets the acceptedTeam property value. The acceptedTeam property
60 61 62 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 60 def accepted_team=(value) @accepted_team = value end |
#accepted_team_score ⇒ Object
Gets the acceptedTeamScore property value. The acceptedTeamScore property
67 68 69 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 67 def accepted_team_score return @accepted_team_score end |
#accepted_team_score=(value) ⇒ Object
Sets the acceptedTeamScore property value. The acceptedTeamScore property
75 76 77 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 75 def accepted_team_score=(value) @accepted_team_score = value end |
#best_of ⇒ Object
Gets the bestOf property value. Number of maps in the series (1, 3, 5, or 7).
82 83 84 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 82 def best_of return @best_of end |
#best_of=(value) ⇒ Object
Sets the bestOf property value. Number of maps in the series (1, 3, 5, or 7).
90 91 92 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 90 def best_of=(value) @best_of = value end |
#completed_at ⇒ Object
Gets the completedAt property value. Completion time (ISO 8601).
97 98 99 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 97 def completed_at return @completed_at end |
#completed_at=(value) ⇒ Object
Sets the completedAt property value. Completion time (ISO 8601).
105 106 107 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 105 def completed_at=(value) @completed_at = value end |
#created_at ⇒ Object
Gets the createdAt property value. Creation time (ISO 8601).
112 113 114 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 112 def created_at return @created_at end |
#created_at=(value) ⇒ Object
Sets the createdAt property value. Creation time (ISO 8601).
120 121 122 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 120 def created_at=(value) @created_at = value end |
#creator_team ⇒ Object
Gets the creatorTeam property value. The creatorTeam property
136 137 138 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 136 def creator_team return @creator_team end |
#creator_team=(value) ⇒ Object
Sets the creatorTeam property value. The creatorTeam property
144 145 146 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 144 def creator_team=(value) @creator_team = value end |
#creator_team_score ⇒ Object
Gets the creatorTeamScore property value. The creatorTeamScore property
151 152 153 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 151 def creator_team_score return @creator_team_score end |
#creator_team_score=(value) ⇒ Object
Sets the creatorTeamScore property value. The creatorTeamScore property
159 160 161 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 159 def creator_team_score=(value) @creator_team_score = value end |
#game_mode ⇒ Object
Gets the gameMode property value. Game mode identifier (from the match’s gameModeId).
166 167 168 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 166 def game_mode return @game_mode end |
#game_mode=(value) ⇒ Object
Sets the gameMode property value. Game mode identifier (from the match’s gameModeId).
174 175 176 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 174 def game_mode=(value) @game_mode = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 181 def get_field_deserializers() return { "acceptedTeam" => lambda {|n| @accepted_team = n.get_object_value(lambda {|pn| TeamBattlesSdk::Generated::Models::Team.create_from_discriminator_value(pn) }) }, "acceptedTeamScore" => lambda {|n| @accepted_team_score = n.get_object_value(lambda {|pn| GameMatch::GameMatchAcceptedTeamScore.create_from_discriminator_value(pn) }) }, "bestOf" => lambda {|n| @best_of = n.get_number_value() }, "completedAt" => lambda {|n| @completed_at = n.get_object_value(lambda {|pn| GameMatch::GameMatchCompletedAt.create_from_discriminator_value(pn) }) }, "createdAt" => lambda {|n| @created_at = n.get_object_value(lambda {|pn| GameMatch::GameMatchCreatedAt.create_from_discriminator_value(pn) }) }, "creatorTeam" => lambda {|n| @creator_team = n.get_object_value(lambda {|pn| TeamBattlesSdk::Generated::Models::Team.create_from_discriminator_value(pn) }) }, "creatorTeamScore" => lambda {|n| @creator_team_score = n.get_object_value(lambda {|pn| GameMatch::GameMatchCreatorTeamScore.create_from_discriminator_value(pn) }) }, "gameMode" => lambda {|n| @game_mode = n.get_string_value() }, "id" => lambda {|n| @id = n.get_string_value() }, "scheduledAt" => lambda {|n| @scheduled_at = n.get_object_value(lambda {|pn| GameMatch::GameMatchScheduledAt.create_from_discriminator_value(pn) }) }, "startedAt" => lambda {|n| @started_at = n.get_object_value(lambda {|pn| GameMatch::GameMatchStartedAt.create_from_discriminator_value(pn) }) }, "status" => lambda {|n| @status = n.get_enum_value(TeamBattlesSdk::Generated::Models::MatchStatus) }, } end |
#id ⇒ Object
Gets the id property value. The id property
201 202 203 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 201 def id return @id end |
#id=(value) ⇒ Object
Sets the id property value. The id property
209 210 211 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 209 def id=(value) @id = value end |
#scheduled_at ⇒ Object
Gets the scheduledAt property value. Scheduled start time (ISO 8601).
216 217 218 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 216 def scheduled_at return @scheduled_at end |
#scheduled_at=(value) ⇒ Object
Sets the scheduledAt property value. Scheduled start time (ISO 8601).
224 225 226 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 224 def scheduled_at=(value) @scheduled_at = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 232 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_object_value("acceptedTeam", @accepted_team) writer.write_object_value("acceptedTeamScore", @accepted_team_score) writer.write_number_value("bestOf", @best_of) writer.write_object_value("completedAt", @completed_at) writer.write_object_value("createdAt", @created_at) writer.write_object_value("creatorTeam", @creator_team) writer.write_object_value("creatorTeamScore", @creator_team_score) writer.write_string_value("gameMode", @game_mode) writer.write_string_value("id", @id) writer.write_object_value("scheduledAt", @scheduled_at) writer.write_object_value("startedAt", @started_at) writer.write_enum_value("status", @status) end |
#started_at ⇒ Object
Gets the startedAt property value. Actual start time (ISO 8601).
251 252 253 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 251 def started_at return @started_at end |
#started_at=(value) ⇒ Object
Sets the startedAt property value. Actual start time (ISO 8601).
259 260 261 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 259 def started_at=(value) @started_at = value end |
#status ⇒ Object
Gets the status property value. Lifecycle status of a match.
266 267 268 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 266 def status return @status end |
#status=(value) ⇒ Object
Sets the status property value. Lifecycle status of a match.
274 275 276 |
# File 'lib/teambattles_sdk/generated/models/game_match.rb', line 274 def status=(value) @status = value end |