Class: TeamBattlesSdk::Generated::Models::GameMultiMatchScoreItem

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

Overview

One match’s single map score within a multi-match batch submission.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new GameMultiMatchScoreItem and sets the default values.



58
59
60
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 58

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_multi_match_score_item

Raises:

  • (StandardError)


66
67
68
69
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 66

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return GameMultiMatchScoreItem.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



43
44
45
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 43

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



51
52
53
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 51

def additional_data=(value)
    @additional_data = value
end

#creator_team_scoreObject

Gets the creatorTeamScore property value. Score for the creator team (integer, 0-1000).

Returns:

  • a integer



74
75
76
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 74

def creator_team_score
    return @creator_team_score
end

#creator_team_score=(value) ⇒ Object

Sets the creatorTeamScore property value. Score for the creator team (integer, 0-1000).

Parameters:

  • value

    Value to set for the creatorTeamScore property.

Returns:

  • a void



82
83
84
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 82

def creator_team_score=(value)
    @creator_team_score = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 89

def get_field_deserializers()
    return {
        "creatorTeamScore" => lambda {|n| @creator_team_score = n.get_number_value() },
        "mapId" => lambda {|n| @map_id = n.get_string_value() },
        "mapIndex" => lambda {|n| @map_index = n.get_number_value() },
        "matchId" => lambda {|n| @match_id = n.get_string_value() },
        "opponentTeamScore" => lambda {|n| @opponent_team_score = n.get_number_value() },
        "playerStats" => lambda {|n| @player_stats = n.get_object_value(lambda {|pn| TeamBattlesSdk::Generated::Models::GameMultiMatchScoreItemPlayerStats.create_from_discriminator_value(pn) }) },
        "screenshotStorageIds" => lambda {|n| @screenshot_storage_ids = n.get_collection_of_primitive_values(String) },
        "screenshotUrls" => lambda {|n| @screenshot_urls = n.get_collection_of_primitive_values(String) },
    }
end

#map_idObject

Gets the mapId property value. Identifier of the map that was played.

Returns:

  • a string



105
106
107
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 105

def map_id
    return @map_id
end

#map_id=(value) ⇒ Object

Sets the mapId property value. Identifier of the map that was played.

Parameters:

  • value

    Value to set for the mapId property.

Returns:

  • a void



113
114
115
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 113

def map_id=(value)
    @map_id = value
end

#map_indexObject

Gets the mapIndex property value. Zero-based index of the map within the series.

Returns:

  • a integer



120
121
122
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 120

def map_index
    return @map_index
end

#map_index=(value) ⇒ Object

Sets the mapIndex property value. Zero-based index of the map within the series.

Parameters:

  • value

    Value to set for the mapIndex property.

Returns:

  • a void



128
129
130
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 128

def map_index=(value)
    @map_index = value
end

#match_idObject

Gets the matchId property value. ID of the match this map score belongs to.

Returns:

  • a string



135
136
137
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 135

def match_id
    return @match_id
end

#match_id=(value) ⇒ Object

Sets the matchId property value. ID of the match this map score belongs to.

Parameters:

  • value

    Value to set for the matchId property.

Returns:

  • a void



143
144
145
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 143

def match_id=(value)
    @match_id = value
end

#opponent_team_scoreObject

Gets the opponentTeamScore property value. Score for the opponent (accepted) team (integer, 0-1000).

Returns:

  • a integer



150
151
152
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 150

def opponent_team_score
    return @opponent_team_score
end

#opponent_team_score=(value) ⇒ Object

Sets the opponentTeamScore property value. Score for the opponent (accepted) team (integer, 0-1000).

Parameters:

  • value

    Value to set for the opponentTeamScore property.

Returns:

  • a void



158
159
160
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 158

def opponent_team_score=(value)
    @opponent_team_score = value
end

#player_statsObject

Gets the playerStats property value. Optional per-player stats keyed by user ID.

Returns:

  • a game_multi_match_score_item_player_stats



165
166
167
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 165

def player_stats
    return @player_stats
end

#player_stats=(value) ⇒ Object

Sets the playerStats property value. Optional per-player stats keyed by user ID.

Parameters:

  • value

    Value to set for the playerStats property.

Returns:

  • a void



173
174
175
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 173

def player_stats=(value)
    @player_stats = value
end

#screenshot_storage_idsObject

Gets the screenshotStorageIds property value. Optional storage IDs for screenshots uploaded via POST /uploads/image-url. Preferred over screenshotUrls: each is validated (size, content-type, ownership) and resolved to a URL server-side.

Returns:

  • a string



180
181
182
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 180

def screenshot_storage_ids
    return @screenshot_storage_ids
end

#screenshot_storage_ids=(value) ⇒ Object

Sets the screenshotStorageIds property value. Optional storage IDs for screenshots uploaded via POST /uploads/image-url. Preferred over screenshotUrls: each is validated (size, content-type, ownership) and resolved to a URL server-side.

Parameters:

  • value

    Value to set for the screenshotStorageIds property.

Returns:

  • a void



188
189
190
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 188

def screenshot_storage_ids=(value)
    @screenshot_storage_ids = value
end

#screenshot_urlsObject

Gets the screenshotUrls property value. Optional external screenshot URLs supporting the reported score. Each must be a public https URL. Prefer screenshotStorageIds (validated blobs) where possible.

Returns:

  • a string



195
196
197
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 195

def screenshot_urls
    return @screenshot_urls
end

#screenshot_urls=(value) ⇒ Object

Sets the screenshotUrls property value. Optional external screenshot URLs supporting the reported score. Each must be a public https URL. Prefer screenshotStorageIds (validated blobs) where possible.

Parameters:

  • value

    Value to set for the screenshotUrls property.

Returns:

  • a void



203
204
205
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 203

def screenshot_urls=(value)
    @screenshot_urls = 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)


211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/teambattles_sdk/generated/models/game_multi_match_score_item.rb', line 211

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("creatorTeamScore", @creator_team_score)
    writer.write_string_value("mapId", @map_id)
    writer.write_number_value("mapIndex", @map_index)
    writer.write_string_value("matchId", @match_id)
    writer.write_number_value("opponentTeamScore", @opponent_team_score)
    writer.write_object_value("playerStats", @player_stats)
    writer.write_collection_of_primitive_values("screenshotStorageIds", @screenshot_storage_ids)
    writer.write_collection_of_primitive_values("screenshotUrls", @screenshot_urls)
    writer.write_additional_data(@additional_data)
end