Class: TeamBattlesSdk::Generated::Models::GameScore

Inherits:
Object
  • Object
show all
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

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_score

Raises:

  • (StandardError)


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_atObject

Gets the confirmedAt property value. When the score was confirmed (ISO 8601).

Returns:

  • a game_score_confirmed_at



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

Parameters:

  • value

    Value to set for the confirmedAt property.

Returns:

  • a void



45
46
47
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 45

def confirmed_at=(value)
    @confirmed_at = value
end

#creator_team_scoreObject

Gets the creatorTeamScore property value. Score for the creator team.

Returns:

  • a integer



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.

Parameters:

  • value

    Value to set for the creatorTeamScore property.

Returns:

  • a void



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_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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_idObject

Gets the mapId property value. Identifier of the map that was played.

Returns:

  • a string



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.

Parameters:

  • value

    Value to set for the mapId property.

Returns:

  • a void



99
100
101
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 99

def map_id=(value)
    @map_id = value
end

#map_indexObject

Gets the mapIndex property value. Zero-based index of the map within the series.

Returns:

  • a integer



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.

Parameters:

  • value

    Value to set for the mapIndex property.

Returns:

  • a void



114
115
116
# File 'lib/teambattles_sdk/generated/models/game_score.rb', line 114

def map_index=(value)
    @map_index = value
end

#opponent_team_scoreObject

Gets the opponentTeamScore property value. Score for the opponent (accepted) team.

Returns:

  • a integer



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.

Parameters:

  • value

    Value to set for the opponentTeamScore property.

Returns:

  • a void



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_statusObject

Gets the scoreStatus property value. Confirmation state: “CONFIRMED” or “PENDING”.

Returns:

  • a string



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

Parameters:

  • value

    Value to set for the scoreStatus property.

Returns:

  • a void



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

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


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_atObject

Gets the submittedAt property value. When the score was submitted (ISO 8601).

Returns:

  • a game_score_submitted_at



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

def 
    return @submitted_at
end

#submitted_at=(value) ⇒ Object

Sets the submittedAt property value. When the score was submitted (ISO 8601).

Parameters:

  • value

    Value to set for the submittedAt property.

Returns:

  • a void



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

def (value)
    @submitted_at = value
end