Class: TeamBattlesSdk::Generated::Models::GameBatchMatchScoreResult

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

Overview

Outcome for a single (match, map) item in a multi-match batch.

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_batch_match_score_result

Raises:

  • (StandardError)


29
30
31
32
# File 'lib/teambattles_sdk/generated/models/game_batch_match_score_result.rb', line 29

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

Instance Method Details

#errorObject

Gets the error property value. Bare machine-readable error code (e.g. error_game_scope_mismatch), present only when status is failed. Never the raw message.

Returns:

  • a string



37
38
39
# File 'lib/teambattles_sdk/generated/models/game_batch_match_score_result.rb', line 37

def error
    return @error
end

#error=(value) ⇒ Object

Sets the error property value. Bare machine-readable error code (e.g. error_game_scope_mismatch), present only when status is failed. Never the raw message.

Parameters:

  • value

    Value to set for the error property.

Returns:

  • a void



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

def error=(value)
    @error = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



52
53
54
55
56
57
58
59
# File 'lib/teambattles_sdk/generated/models/game_batch_match_score_result.rb', line 52

def get_field_deserializers()
    return {
        "error" => lambda {|n| @error = n.get_string_value() },
        "mapIndex" => lambda {|n| @map_index = n.get_number_value() },
        "matchId" => lambda {|n| @match_id = n.get_string_value() },
        "status" => lambda {|n| @status = n.get_string_value() },
    }
end

#map_indexObject

Gets the mapIndex property value. Index of the map this result refers to.

Returns:

  • a integer



64
65
66
# File 'lib/teambattles_sdk/generated/models/game_batch_match_score_result.rb', line 64

def map_index
    return @map_index
end

#map_index=(value) ⇒ Object

Sets the mapIndex property value. Index of the map this result refers to.

Parameters:

  • value

    Value to set for the mapIndex property.

Returns:

  • a void



72
73
74
# File 'lib/teambattles_sdk/generated/models/game_batch_match_score_result.rb', line 72

def map_index=(value)
    @map_index = value
end

#match_idObject

Gets the matchId property value. Match ID this result refers to.

Returns:

  • a string



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

def match_id
    return @match_id
end

#match_id=(value) ⇒ Object

Sets the matchId property value. Match ID this result refers to.

Parameters:

  • value

    Value to set for the matchId property.

Returns:

  • a void



87
88
89
# File 'lib/teambattles_sdk/generated/models/game_batch_match_score_result.rb', line 87

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


95
96
97
98
99
100
101
# File 'lib/teambattles_sdk/generated/models/game_batch_match_score_result.rb', line 95

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("error", @error)
    writer.write_number_value("mapIndex", @map_index)
    writer.write_string_value("matchId", @match_id)
    writer.write_string_value("status", @status)
end

#statusObject

Gets the status property value. Per-item outcome: “confirmed” on success, “failed” otherwise.

Returns:

  • a string



106
107
108
# File 'lib/teambattles_sdk/generated/models/game_batch_match_score_result.rb', line 106

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. Per-item outcome: “confirmed” on success, “failed” otherwise.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



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

def status=(value)
    @status = value
end