Class: TeamBattlesSdk::Generated::Models::GameForfeitBody
- Inherits:
-
Object
- Object
- TeamBattlesSdk::Generated::Models::GameForfeitBody
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/teambattles_sdk/generated/models/game_forfeit_body.rb
Overview
Request body for forfeiting a match on behalf of one participating team.
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
-
#additional_data ⇒ Object
Gets the AdditionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the AdditionalData property value.
-
#forfeiting_team_id ⇒ Object
Gets the forfeitingTeamId property value.
-
#forfeiting_team_id=(value) ⇒ Object
Sets the forfeitingTeamId property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new GameForfeitBody and sets the default values.
-
#reason ⇒ Object
Gets the reason property value.
-
#reason=(value) ⇒ Object
Sets the reason property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Constructor Details
#initialize ⇒ Object
Instantiates a new GameForfeitBody and sets the default values.
40 41 42 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 40 def initialize() @additional_data = Hash.new end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
48 49 50 51 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 48 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return GameForfeitBody.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
25 26 27 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 25 def additional_data return @additional_data end |
#additional_data=(value) ⇒ Object
Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
33 34 35 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 33 def additional_data=(value) @additional_data = value end |
#forfeiting_team_id ⇒ Object
Gets the forfeitingTeamId property value. ID of the team that forfeits. Must be a participant of the match.
56 57 58 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 56 def forfeiting_team_id return @forfeiting_team_id end |
#forfeiting_team_id=(value) ⇒ Object
Sets the forfeitingTeamId property value. ID of the team that forfeits. Must be a participant of the match.
64 65 66 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 64 def forfeiting_team_id=(value) @forfeiting_team_id = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
71 72 73 74 75 76 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 71 def get_field_deserializers() return { "forfeitingTeamId" => lambda {|n| @forfeiting_team_id = n.get_string_value() }, "reason" => lambda {|n| @reason = n.get_string_value() }, } end |
#reason ⇒ Object
Gets the reason property value. Optional human-readable forfeit reason, recorded on the match.
81 82 83 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 81 def reason return @reason end |
#reason=(value) ⇒ Object
Sets the reason property value. Optional human-readable forfeit reason, recorded on the match.
89 90 91 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 89 def reason=(value) @reason = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
97 98 99 100 101 102 |
# File 'lib/teambattles_sdk/generated/models/game_forfeit_body.rb', line 97 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_string_value("forfeitingTeamId", @forfeiting_team_id) writer.write_string_value("reason", @reason) writer.write_additional_data(@additional_data) end |