Class: TeamBattlesSdk::Generated::Models::OngoingMatchesResponse

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

Overview

Ongoing matches for the API key owner’s active teams.

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 ongoing_matches_response

Raises:

  • (StandardError)


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

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

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

#matchesObject

Gets the matches property value. The matches property

Returns:

  • a api_match_detail



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

def matches
    return @matches
end

#matches=(value) ⇒ Object

Sets the matches property value. The matches property

Parameters:

  • value

    Value to set for the matches property.

Returns:

  • a void



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

def matches=(value)
    @matches = 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/ongoing_matches_response.rb', line 57

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

#timestampObject

Gets the timestamp property value. The timestamp property

Returns:

  • a string



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

def timestamp
    return @timestamp
end

#timestamp=(value) ⇒ Object

Sets the timestamp property value. The timestamp property

Parameters:

  • value

    Value to set for the timestamp property.

Returns:

  • a void



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

def timestamp=(value)
    @timestamp = value
end