Class: TeamBattlesSdk::Generated::Models::LeagueGames

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

Overview

Games configured for a league.

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 league_games

Raises:

  • (StandardError)


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

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

Instance Method Details

#countObject

Gets the count property value. Number of configured games returned.

Returns:

  • a integer



25
26
27
# File 'lib/teambattles_sdk/generated/models/league_games.rb', line 25

def count
    return @count
end

#count=(value) ⇒ Object

Sets the count property value. Number of configured games returned.

Parameters:

  • value

    Value to set for the count property.

Returns:

  • a void



33
34
35
# File 'lib/teambattles_sdk/generated/models/league_games.rb', line 33

def count=(value)
    @count = value
end

#gamesObject

Gets the games property value. Games configured for the league.

Returns:

  • a league_games_games



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

def games
    return @games
end

#games=(value) ⇒ Object

Sets the games property value. Games configured for the league.

Parameters:

  • value

    Value to set for the games property.

Returns:

  • a void



57
58
59
# File 'lib/teambattles_sdk/generated/models/league_games.rb', line 57

def games=(value)
    @games = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



64
65
66
67
68
69
70
# File 'lib/teambattles_sdk/generated/models/league_games.rb', line 64

def get_field_deserializers()
    return {
        "count" => lambda {|n| @count = n.get_number_value() },
        "games" => lambda {|n| @games = n.get_collection_of_object_values(lambda {|pn| TeamBattlesSdk::Generated::Models::LeagueGamesGames.create_from_discriminator_value(pn) }) },
        "timestamp" => lambda {|n| @timestamp = n.get_string_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/league_games.rb', line 76

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

#timestampObject

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

Returns:

  • a string



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

def timestamp
    return @timestamp
end

#timestamp=(value) ⇒ Object

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

Parameters:

  • value

    Value to set for the timestamp property.

Returns:

  • a void



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

def timestamp=(value)
    @timestamp = value
end