Class: TeamBattlesSdk::Generated::Models::MapScores

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

Overview

All map scores for a match with a series summary.

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 map_scores

Raises:

  • (StandardError)


26
27
28
29
# File 'lib/teambattles_sdk/generated/models/map_scores.rb', line 26

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



34
35
36
37
38
39
40
# File 'lib/teambattles_sdk/generated/models/map_scores.rb', line 34

def get_field_deserializers()
    return {
        "scores" => lambda {|n| @scores = n.get_collection_of_object_values(lambda {|pn| TeamBattlesSdk::Generated::Models::MapScoreItem.create_from_discriminator_value(pn) }) },
        "seriesScore" => lambda {|n| @series_score = n.get_object_value(lambda {|pn| TeamBattlesSdk::Generated::Models::MapScoresSeriesScore.create_from_discriminator_value(pn) }) },
        "timestamp" => lambda {|n| @timestamp = n.get_string_value() },
    }
end

#scoresObject

Gets the scores property value. The scores property

Returns:

  • a map_score_item



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

def scores
    return @scores
end

#scores=(value) ⇒ Object

Sets the scores property value. The scores property

Parameters:

  • value

    Value to set for the scores property.

Returns:

  • a void



53
54
55
# File 'lib/teambattles_sdk/generated/models/map_scores.rb', line 53

def scores=(value)
    @scores = 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)


61
62
63
64
65
66
# File 'lib/teambattles_sdk/generated/models/map_scores.rb', line 61

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_collection_of_object_values("scores", @scores)
    writer.write_object_value("seriesScore", @series_score)
    writer.write_string_value("timestamp", @timestamp)
end

#series_scoreObject

Gets the seriesScore property value. The seriesScore property

Returns:

  • a map_scores_series_score



71
72
73
# File 'lib/teambattles_sdk/generated/models/map_scores.rb', line 71

def series_score
    return @series_score
end

#series_score=(value) ⇒ Object

Sets the seriesScore property value. The seriesScore property

Parameters:

  • value

    Value to set for the seriesScore property.

Returns:

  • a void



79
80
81
# File 'lib/teambattles_sdk/generated/models/map_scores.rb', line 79

def series_score=(value)
    @series_score = value
end

#timestampObject

Gets the timestamp property value. Response timestamp (ISO 8601).

Returns:

  • a string



86
87
88
# File 'lib/teambattles_sdk/generated/models/map_scores.rb', line 86

def timestamp
    return @timestamp
end

#timestamp=(value) ⇒ Object

Sets the timestamp property value. Response timestamp (ISO 8601).

Parameters:

  • value

    Value to set for the timestamp property.

Returns:

  • a void



94
95
96
# File 'lib/teambattles_sdk/generated/models/map_scores.rb', line 94

def timestamp=(value)
    @timestamp = value
end