Class: TeamBattlesSdk::Generated::Models::GameMatchRostersResponse

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

Overview

Team rosters for a match, grouped by creator and accepted team.

Defined Under Namespace

Classes: GameMatchRostersResponseAcceptedTeamId

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 game_match_rosters_response

Raises:

  • (StandardError)


62
63
64
65
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 62

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

Instance Method Details

#accepted_rosterObject

Gets the acceptedRoster property value. Players on the accepted team (empty when unaccepted).

Returns:

  • a game_roster_player



31
32
33
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 31

def accepted_roster
    return @accepted_roster
end

#accepted_roster=(value) ⇒ Object

Sets the acceptedRoster property value. Players on the accepted team (empty when unaccepted).

Parameters:

  • value

    Value to set for the acceptedRoster property.

Returns:

  • a void



39
40
41
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 39

def accepted_roster=(value)
    @accepted_roster = value
end

#accepted_team_idObject

Gets the acceptedTeamId property value. ID of the team that accepted the match, or null if unaccepted.

Returns:

  • a game_match_rosters_response_accepted_team_id



46
47
48
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 46

def accepted_team_id
    return @accepted_team_id
end

#accepted_team_id=(value) ⇒ Object

Sets the acceptedTeamId property value. ID of the team that accepted the match, or null if unaccepted.

Parameters:

  • value

    Value to set for the acceptedTeamId property.

Returns:

  • a void



54
55
56
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 54

def accepted_team_id=(value)
    @accepted_team_id = value
end

#creator_rosterObject

Gets the creatorRoster property value. Players on the creator team.

Returns:

  • a game_roster_player



70
71
72
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 70

def creator_roster
    return @creator_roster
end

#creator_roster=(value) ⇒ Object

Sets the creatorRoster property value. Players on the creator team.

Parameters:

  • value

    Value to set for the creatorRoster property.

Returns:

  • a void



78
79
80
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 78

def creator_roster=(value)
    @creator_roster = value
end

#creator_team_idObject

Gets the creatorTeamId property value. ID of the team that created the match.

Returns:

  • a string



85
86
87
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 85

def creator_team_id
    return @creator_team_id
end

#creator_team_id=(value) ⇒ Object

Sets the creatorTeamId property value. ID of the team that created the match.

Parameters:

  • value

    Value to set for the creatorTeamId property.

Returns:

  • a void



93
94
95
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 93

def creator_team_id=(value)
    @creator_team_id = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



100
101
102
103
104
105
106
107
108
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 100

def get_field_deserializers()
    return {
        "acceptedRoster" => lambda {|n| @accepted_roster = n.get_collection_of_object_values(lambda {|pn| TeamBattlesSdk::Generated::Models::GameRosterPlayer.create_from_discriminator_value(pn) }) },
        "acceptedTeamId" => lambda {|n| @accepted_team_id = n.get_object_value(lambda {|pn| GameMatchRostersResponse::GameMatchRostersResponseAcceptedTeamId.create_from_discriminator_value(pn) }) },
        "creatorRoster" => lambda {|n| @creator_roster = n.get_collection_of_object_values(lambda {|pn| TeamBattlesSdk::Generated::Models::GameRosterPlayer.create_from_discriminator_value(pn) }) },
        "creatorTeamId" => lambda {|n| @creator_team_id = n.get_string_value() },
        "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)


114
115
116
117
118
119
120
121
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 114

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_collection_of_object_values("acceptedRoster", @accepted_roster)
    writer.write_object_value("acceptedTeamId", @accepted_team_id)
    writer.write_collection_of_object_values("creatorRoster", @creator_roster)
    writer.write_string_value("creatorTeamId", @creator_team_id)
    writer.write_string_value("timestamp", @timestamp)
end

#timestampObject

Gets the timestamp property value. Server response time (ISO 8601).

Returns:

  • a string



126
127
128
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 126

def timestamp
    return @timestamp
end

#timestamp=(value) ⇒ Object

Sets the timestamp property value. Server response time (ISO 8601).

Parameters:

  • value

    Value to set for the timestamp property.

Returns:

  • a void



134
135
136
# File 'lib/teambattles_sdk/generated/models/game_match_rosters_response.rb', line 134

def timestamp=(value)
    @timestamp = value
end