Class: TeamBattlesSdk::Generated::Models::GameMatchDetail

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/teambattles_sdk/generated/models/game_match_detail.rb

Overview

Detailed match payload returned inside the game-developer match-detail response.

Defined Under Namespace

Classes: GameMatchDetailAcceptedTeamScore, GameMatchDetailCompletedAt, GameMatchDetailCreatedAt, GameMatchDetailCreatorTeamScore, GameMatchDetailLeagueId, GameMatchDetailLeagueSeasonId, GameMatchDetailLoserTeamId, GameMatchDetailScheduledAt, GameMatchDetailStartedAt, GameMatchDetailWinnerTeamId

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a game_match_detail

Raises:

  • (StandardError)


143
144
145
146
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 143

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return GameMatchDetail.new
end

Instance Method Details

#accepted_teamObject

Gets the acceptedTeam property value. The acceptedTeam property

Returns:

  • a game_detail_team



67
68
69
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 67

def accepted_team
    return @accepted_team
end

#accepted_team=(value) ⇒ Object

Sets the acceptedTeam property value. The acceptedTeam property

Parameters:

  • value

    Value to set for the acceptedTeam property.

Returns:

  • a void



75
76
77
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 75

def accepted_team=(value)
    @accepted_team = value
end

#accepted_team_scoreObject

Gets the acceptedTeamScore property value. The acceptedTeamScore property

Returns:

  • a game_match_detail_accepted_team_score



82
83
84
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 82

def accepted_team_score
    return @accepted_team_score
end

#accepted_team_score=(value) ⇒ Object

Sets the acceptedTeamScore property value. The acceptedTeamScore property

Parameters:

  • value

    Value to set for the acceptedTeamScore property.

Returns:

  • a void



90
91
92
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 90

def accepted_team_score=(value)
    @accepted_team_score = value
end

#best_ofObject

Gets the bestOf property value. Number of maps in the series (1, 3, 5, or 7).

Returns:

  • a integer



97
98
99
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 97

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).

Parameters:

  • value

    Value to set for the bestOf property.

Returns:

  • a void



105
106
107
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 105

def best_of=(value)
    @best_of = value
end

#completed_atObject

Gets the completedAt property value. Completion time (ISO 8601).

Returns:

  • a game_match_detail_completed_at



112
113
114
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 112

def completed_at
    return @completed_at
end

#completed_at=(value) ⇒ Object

Sets the completedAt property value. Completion time (ISO 8601).

Parameters:

  • value

    Value to set for the completedAt property.

Returns:

  • a void



120
121
122
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 120

def completed_at=(value)
    @completed_at = value
end

#created_atObject

Gets the createdAt property value. Creation time (ISO 8601).

Returns:

  • a game_match_detail_created_at



127
128
129
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 127

def created_at
    return @created_at
end

#created_at=(value) ⇒ Object

Sets the createdAt property value. Creation time (ISO 8601).

Parameters:

  • value

    Value to set for the createdAt property.

Returns:

  • a void



135
136
137
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 135

def created_at=(value)
    @created_at = value
end

#creator_teamObject

Gets the creatorTeam property value. The creatorTeam property

Returns:

  • a game_detail_team



151
152
153
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 151

def creator_team
    return @creator_team
end

#creator_team=(value) ⇒ Object

Sets the creatorTeam property value. The creatorTeam property

Parameters:

  • value

    Value to set for the creatorTeam property.

Returns:

  • a void



159
160
161
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 159

def creator_team=(value)
    @creator_team = value
end

#creator_team_scoreObject

Gets the creatorTeamScore property value. The creatorTeamScore property

Returns:

  • a game_match_detail_creator_team_score



166
167
168
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 166

def creator_team_score
    return @creator_team_score
end

#creator_team_score=(value) ⇒ Object

Sets the creatorTeamScore property value. The creatorTeamScore property

Parameters:

  • value

    Value to set for the creatorTeamScore property.

Returns:

  • a void



174
175
176
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 174

def creator_team_score=(value)
    @creator_team_score = value
end

#game_idObject

Gets the gameId property value. Game ID the match belongs to.

Returns:

  • a string



181
182
183
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 181

def game_id
    return @game_id
end

#game_id=(value) ⇒ Object

Sets the gameId property value. Game ID the match belongs to.

Parameters:

  • value

    Value to set for the gameId property.

Returns:

  • a void



189
190
191
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 189

def game_id=(value)
    @game_id = value
end

#game_modeObject

Gets the gameMode property value. Game mode identifier (from the match’s gameModeId).

Returns:

  • a string



196
197
198
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 196

def game_mode
    return @game_mode
end

#game_mode=(value) ⇒ Object

Sets the gameMode property value. Game mode identifier (from the match’s gameModeId).

Parameters:

  • value

    Value to set for the gameMode property.

Returns:

  • a void



204
205
206
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 204

def game_mode=(value)
    @game_mode = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 211

def get_field_deserializers()
    return {
        "acceptedTeam" => lambda {|n| @accepted_team = n.get_object_value(lambda {|pn| TeamBattlesSdk::Generated::Models::GameDetailTeam.create_from_discriminator_value(pn) }) },
        "acceptedTeamScore" => lambda {|n| @accepted_team_score = n.get_object_value(lambda {|pn| GameMatchDetail::GameMatchDetailAcceptedTeamScore.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| GameMatchDetail::GameMatchDetailCompletedAt.create_from_discriminator_value(pn) }) },
        "createdAt" => lambda {|n| @created_at = n.get_object_value(lambda {|pn| GameMatchDetail::GameMatchDetailCreatedAt.create_from_discriminator_value(pn) }) },
        "creatorTeam" => lambda {|n| @creator_team = n.get_object_value(lambda {|pn| TeamBattlesSdk::Generated::Models::GameDetailTeam.create_from_discriminator_value(pn) }) },
        "creatorTeamScore" => lambda {|n| @creator_team_score = n.get_object_value(lambda {|pn| GameMatchDetail::GameMatchDetailCreatorTeamScore.create_from_discriminator_value(pn) }) },
        "gameId" => lambda {|n| @game_id = n.get_string_value() },
        "gameMode" => lambda {|n| @game_mode = n.get_string_value() },
        "id" => lambda {|n| @id = n.get_string_value() },
        "leagueId" => lambda {|n| @league_id = n.get_object_value(lambda {|pn| GameMatchDetail::GameMatchDetailLeagueId.create_from_discriminator_value(pn) }) },
        "leagueSeasonId" => lambda {|n| @league_season_id = n.get_object_value(lambda {|pn| GameMatchDetail::GameMatchDetailLeagueSeasonId.create_from_discriminator_value(pn) }) },
        "loserTeamId" => lambda {|n| @loser_team_id = n.get_object_value(lambda {|pn| GameMatchDetail::GameMatchDetailLoserTeamId.create_from_discriminator_value(pn) }) },
        "scheduledAt" => lambda {|n| @scheduled_at = n.get_object_value(lambda {|pn| GameMatchDetail::GameMatchDetailScheduledAt.create_from_discriminator_value(pn) }) },
        "startedAt" => lambda {|n| @started_at = n.get_object_value(lambda {|pn| GameMatchDetail::GameMatchDetailStartedAt.create_from_discriminator_value(pn) }) },
        "status" => lambda {|n| @status = n.get_enum_value(TeamBattlesSdk::Generated::Models::MatchStatus) },
        "winnerTeamId" => lambda {|n| @winner_team_id = n.get_object_value(lambda {|pn| GameMatchDetail::GameMatchDetailWinnerTeamId.create_from_discriminator_value(pn) }) },
    }
end

#idObject

Gets the id property value. The id property

Returns:

  • a string



236
237
238
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 236

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. The id property

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



244
245
246
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 244

def id=(value)
    @id = value
end

#league_idObject

Gets the leagueId property value. League this match belongs to, if any (SP-7 league wave).

Returns:

  • a game_match_detail_league_id



251
252
253
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 251

def league_id
    return @league_id
end

#league_id=(value) ⇒ Object

Sets the leagueId property value. League this match belongs to, if any (SP-7 league wave).

Parameters:

  • value

    Value to set for the leagueId property.

Returns:

  • a void



259
260
261
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 259

def league_id=(value)
    @league_id = value
end

#league_season_idObject

Gets the leagueSeasonId property value. League season this match belongs to, if any.

Returns:

  • a game_match_detail_league_season_id



266
267
268
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 266

def league_season_id
    return @league_season_id
end

#league_season_id=(value) ⇒ Object

Sets the leagueSeasonId property value. League season this match belongs to, if any.

Parameters:

  • value

    Value to set for the leagueSeasonId property.

Returns:

  • a void



274
275
276
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 274

def league_season_id=(value)
    @league_season_id = value
end

#loser_team_idObject

Gets the loserTeamId property value. Losing team ID once the match completes.

Returns:

  • a game_match_detail_loser_team_id



281
282
283
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 281

def loser_team_id
    return @loser_team_id
end

#loser_team_id=(value) ⇒ Object

Sets the loserTeamId property value. Losing team ID once the match completes.

Parameters:

  • value

    Value to set for the loserTeamId property.

Returns:

  • a void



289
290
291
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 289

def loser_team_id=(value)
    @loser_team_id = value
end

#scheduled_atObject

Gets the scheduledAt property value. Scheduled start time (ISO 8601).

Returns:

  • a game_match_detail_scheduled_at



296
297
298
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 296

def scheduled_at
    return @scheduled_at
end

#scheduled_at=(value) ⇒ Object

Sets the scheduledAt property value. Scheduled start time (ISO 8601).

Parameters:

  • value

    Value to set for the scheduledAt property.

Returns:

  • a void



304
305
306
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 304

def scheduled_at=(value)
    @scheduled_at = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 312

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("gameId", @game_id)
    writer.write_string_value("gameMode", @game_mode)
    writer.write_string_value("id", @id)
    writer.write_object_value("leagueId", @league_id)
    writer.write_object_value("leagueSeasonId", @league_season_id)
    writer.write_object_value("loserTeamId", @loser_team_id)
    writer.write_object_value("scheduledAt", @scheduled_at)
    writer.write_object_value("startedAt", @started_at)
    writer.write_enum_value("status", @status)
    writer.write_object_value("winnerTeamId", @winner_team_id)
end

#started_atObject

Gets the startedAt property value. Actual start time (ISO 8601).

Returns:

  • a game_match_detail_started_at



336
337
338
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 336

def started_at
    return @started_at
end

#started_at=(value) ⇒ Object

Sets the startedAt property value. Actual start time (ISO 8601).

Parameters:

  • value

    Value to set for the startedAt property.

Returns:

  • a void



344
345
346
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 344

def started_at=(value)
    @started_at = value
end

#statusObject

Gets the status property value. Lifecycle status of a match.

Returns:

  • a match_status



351
352
353
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 351

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. Lifecycle status of a match.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



359
360
361
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 359

def status=(value)
    @status = value
end

#winner_team_idObject

Gets the winnerTeamId property value. Winning team ID once the match completes.

Returns:

  • a game_match_detail_winner_team_id



366
367
368
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 366

def winner_team_id
    return @winner_team_id
end

#winner_team_id=(value) ⇒ Object

Sets the winnerTeamId property value. Winning team ID once the match completes.

Parameters:

  • value

    Value to set for the winnerTeamId property.

Returns:

  • a void



374
375
376
# File 'lib/teambattles_sdk/generated/models/game_match_detail.rb', line 374

def winner_team_id=(value)
    @winner_team_id = value
end