Class: TeamBattlesSdk::Generated::Models::LeaguePenalties
- Inherits:
-
Object
- Object
- TeamBattlesSdk::Generated::Models::LeaguePenalties
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/teambattles_sdk/generated/models/league_penalties.rb
Overview
Penalties and cooldowns for a league.
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#cooldowns ⇒ Object
Gets the cooldowns property value.
-
#cooldowns=(value) ⇒ Object
Sets the cooldowns property value.
-
#count ⇒ Object
Gets the count property value.
-
#count=(value) ⇒ Object
Sets the count property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#penalties ⇒ Object
Gets the penalties property value.
-
#penalties=(value) ⇒ Object
Sets the penalties property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#timestamp ⇒ Object
Gets the timestamp property value.
-
#timestamp=(value) ⇒ Object
Sets the timestamp property value.
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
59 60 61 62 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 59 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return LeaguePenalties.new end |
Instance Method Details
#cooldowns ⇒ Object
Gets the cooldowns property value. Enriched member cooldown records (empty when type is penalties).
28 29 30 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 28 def cooldowns return @cooldowns end |
#cooldowns=(value) ⇒ Object
Sets the cooldowns property value. Enriched member cooldown records (empty when type is penalties).
36 37 38 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 36 def cooldowns=(value) @cooldowns = value end |
#count ⇒ Object
Gets the count property value. Combined number of penalties and cooldowns returned.
43 44 45 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 43 def count return @count end |
#count=(value) ⇒ Object
Sets the count property value. Combined number of penalties and cooldowns returned.
51 52 53 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 51 def count=(value) @count = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
67 68 69 70 71 72 73 74 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 67 def get_field_deserializers() return { "cooldowns" => lambda {|n| @cooldowns = n.get_collection_of_object_values(lambda {|pn| TeamBattlesSdk::Generated::Models::LeaguePenaltiesCooldowns.create_from_discriminator_value(pn) }) }, "count" => lambda {|n| @count = n.get_number_value() }, "penalties" => lambda {|n| @penalties = n.get_collection_of_object_values(lambda {|pn| TeamBattlesSdk::Generated::Models::LeaguePenaltiesPenalties.create_from_discriminator_value(pn) }) }, "timestamp" => lambda {|n| @timestamp = n.get_string_value() }, } end |
#penalties ⇒ Object
Gets the penalties property value. Enriched penalty records (empty when type is cooldowns).
79 80 81 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 79 def penalties return @penalties end |
#penalties=(value) ⇒ Object
Sets the penalties property value. Enriched penalty records (empty when type is cooldowns).
87 88 89 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 87 def penalties=(value) @penalties = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
95 96 97 98 99 100 101 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 95 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_collection_of_object_values("cooldowns", @cooldowns) writer.write_number_value("count", @count) writer.write_collection_of_object_values("penalties", @penalties) writer.write_string_value("timestamp", @timestamp) end |
#timestamp ⇒ Object
Gets the timestamp property value. Response generation time (ISO 8601).
106 107 108 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 106 def return @timestamp end |
#timestamp=(value) ⇒ Object
Sets the timestamp property value. Response generation time (ISO 8601).
114 115 116 |
# File 'lib/teambattles_sdk/generated/models/league_penalties.rb', line 114 def (value) @timestamp = value end |