Class: TeamBattlesSdk::Generated::Models::GameSingleMapScoreResponse

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

Overview

Result of submitting a single map score.

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_single_map_score_response

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return GameSingleMapScoreResponse.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/game_single_map_score_response.rb', line 34

def get_field_deserializers()
    return {
        "mapIndex" => lambda {|n| @map_index = n.get_number_value() },
        "scoreStatus" => lambda {|n| @score_status = n.get_string_value() },
        "success" => lambda {|n| @success = n.get_boolean_value() },
    }
end

#map_indexObject

Gets the mapIndex property value. Index of the map that was scored.

Returns:

  • a integer



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

def map_index
    return @map_index
end

#map_index=(value) ⇒ Object

Sets the mapIndex property value. Index of the map that was scored.

Parameters:

  • value

    Value to set for the mapIndex property.

Returns:

  • a void



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

def map_index=(value)
    @map_index = value
end

#score_statusObject

Gets the scoreStatus property value. Confirmation state, always “CONFIRMED” on success.

Returns:

  • a string



60
61
62
# File 'lib/teambattles_sdk/generated/models/game_single_map_score_response.rb', line 60

def score_status
    return @score_status
end

#score_status=(value) ⇒ Object

Sets the scoreStatus property value. Confirmation state, always “CONFIRMED” on success.

Parameters:

  • value

    Value to set for the scoreStatus property.

Returns:

  • a void



68
69
70
# File 'lib/teambattles_sdk/generated/models/game_single_map_score_response.rb', line 68

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)


76
77
78
79
80
81
# File 'lib/teambattles_sdk/generated/models/game_single_map_score_response.rb', line 76

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("mapIndex", @map_index)
    writer.write_string_value("scoreStatus", @score_status)
    writer.write_boolean_value("success", @success)
end

#successObject

Gets the success property value. The success property

Returns:

  • a boolean



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

def success
    return @success
end

#success=(value) ⇒ Object

Sets the success property value. The success property

Parameters:

  • value

    Value to set for the success property.

Returns:

  • a void



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

def success=(value)
    @success = value
end