Class: TeamBattlesSdk::Generated::Models::GameForfeitBody

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeObject

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

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a game_forfeit_body

Raises:

  • (StandardError)


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_dataObject

Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



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.

Parameters:

  • value

    Value to set for the AdditionalData property.

Returns:

  • a void



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_idObject

Gets the forfeitingTeamId property value. ID of the team that forfeits. Must be a participant of the match.

Returns:

  • a string



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.

Parameters:

  • value

    Value to set for the forfeitingTeamId property.

Returns:

  • a void



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_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

#reasonObject

Gets the reason property value. Optional human-readable forfeit reason, recorded on the match.

Returns:

  • a string



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.

Parameters:

  • value

    Value to set for the reason property.

Returns:

  • a void



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

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


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