Class: TeamBattlesSdk::Generated::Models::GameMatchDetailResponse

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

Overview

Envelope for GET /game/matches/matchId: the match plus a response timestamp.

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_response

Raises:

  • (StandardError)


23
24
25
26
# File 'lib/teambattles_sdk/generated/models/game_match_detail_response.rb', line 23

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



31
32
33
34
35
36
# File 'lib/teambattles_sdk/generated/models/game_match_detail_response.rb', line 31

def get_field_deserializers()
    return {
        "match" => lambda {|n| @match = n.get_object_value(lambda {|pn| TeamBattlesSdk::Generated::Models::GameMatchDetail.create_from_discriminator_value(pn) }) },
        "timestamp" => lambda {|n| @timestamp = n.get_string_value() },
    }
end

#matchObject

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

Returns:

  • a game_match_detail



41
42
43
# File 'lib/teambattles_sdk/generated/models/game_match_detail_response.rb', line 41

def match
    return @match
end

#match=(value) ⇒ Object

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

Parameters:

  • value

    Value to set for the match property.

Returns:

  • a void



49
50
51
# File 'lib/teambattles_sdk/generated/models/game_match_detail_response.rb', line 49

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


57
58
59
60
61
# File 'lib/teambattles_sdk/generated/models/game_match_detail_response.rb', line 57

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

#timestampObject

Gets the timestamp property value. Server response time (ISO 8601).

Returns:

  • a string



66
67
68
# File 'lib/teambattles_sdk/generated/models/game_match_detail_response.rb', line 66

def timestamp
    return @timestamp
end

#timestamp=(value) ⇒ Object

Sets the timestamp property value. Server response time (ISO 8601).

Parameters:

  • value

    Value to set for the timestamp property.

Returns:

  • a void



74
75
76
# File 'lib/teambattles_sdk/generated/models/game_match_detail_response.rb', line 74

def timestamp=(value)
    @timestamp = value
end