Class: TeamBattlesSdk::Generated::Models::GameCreateMatchBody
- Inherits:
-
Object
- Object
- TeamBattlesSdk::Generated::Models::GameCreateMatchBody
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/teambattles_sdk/generated/models/game_create_match_body.rb
Overview
Request body for creating a two-sided game-originated match. The match is created ACCEPTED + PUBLISHED for the key’s bound game. Supports an optional Idempotency-Key header for safe retries.
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
-
#accepted_team_id ⇒ Object
Gets the acceptedTeamId property value.
-
#accepted_team_id=(value) ⇒ Object
Sets the acceptedTeamId property value.
-
#additional_data ⇒ Object
Gets the AdditionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the AdditionalData property value.
-
#best_of ⇒ Object
Gets the bestOf property value.
-
#best_of=(value) ⇒ Object
Sets the bestOf property value.
-
#creator_team_id ⇒ Object
Gets the creatorTeamId property value.
-
#creator_team_id=(value) ⇒ Object
Sets the creatorTeamId property value.
-
#game_mode_id ⇒ Object
Gets the gameModeId property value.
-
#game_mode_id=(value) ⇒ Object
Sets the gameModeId property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new GameCreateMatchBody and sets the default values.
-
#input_device ⇒ Object
Gets the inputDevice property value.
-
#input_device=(value) ⇒ Object
Sets the inputDevice property value.
-
#map_preference_mode ⇒ Object
Gets the mapPreferenceMode property value.
-
#map_preference_mode=(value) ⇒ Object
Sets the mapPreferenceMode property value.
-
#map_selection_type ⇒ Object
Gets the mapSelectionType property value.
-
#map_selection_type=(value) ⇒ Object
Sets the mapSelectionType property value.
-
#platform ⇒ Object
Gets the platform property value.
-
#platform=(value) ⇒ Object
Sets the platform property value.
-
#region ⇒ Object
Gets the region property value.
-
#region=(value) ⇒ Object
Sets the region property value.
-
#scheduled_at ⇒ Object
Gets the scheduledAt property value.
-
#scheduled_at=(value) ⇒ Object
Sets the scheduledAt property value.
-
#selected_maps ⇒ Object
Gets the selectedMaps property value.
-
#selected_maps=(value) ⇒ Object
Sets the selectedMaps property value.
-
#selected_objectives ⇒ Object
Gets the selectedObjectives property value.
-
#selected_objectives=(value) ⇒ Object
Sets the selectedObjectives property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#team_size ⇒ Object
Gets the teamSize property value.
-
#team_size=(value) ⇒ Object
Sets the teamSize property value.
Constructor Details
#initialize ⇒ Object
Instantiates a new GameCreateMatchBody and sets the default values.
103 104 105 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 103 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
111 112 113 114 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 111 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return GameCreateMatchBody.new end |
Instance Method Details
#accepted_team_id ⇒ Object
Gets the acceptedTeamId property value. ID of the opposing team. Required - game-originated matches are two-sided. Must belong to the key’s bound game.
58 59 60 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 58 def accepted_team_id return @accepted_team_id end |
#accepted_team_id=(value) ⇒ Object
Sets the acceptedTeamId property value. ID of the opposing team. Required - game-originated matches are two-sided. Must belong to the key’s bound game.
66 67 68 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 66 def accepted_team_id=(value) @accepted_team_id = value end |
#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.
73 74 75 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 73 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.
81 82 83 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 81 def additional_data=(value) @additional_data = value end |
#best_of ⇒ Object
Gets the bestOf property value. Number of maps in the series. One of 1, 3, 5, or 7.
88 89 90 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 88 def best_of return @best_of end |
#best_of=(value) ⇒ Object
Sets the bestOf property value. Number of maps in the series. One of 1, 3, 5, or 7.
96 97 98 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 96 def best_of=(value) @best_of = value end |
#creator_team_id ⇒ Object
Gets the creatorTeamId property value. ID of the creating team. Must belong to the key’s bound game.
119 120 121 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 119 def creator_team_id return @creator_team_id end |
#creator_team_id=(value) ⇒ Object
Sets the creatorTeamId property value. ID of the creating team. Must belong to the key’s bound game.
127 128 129 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 127 def creator_team_id=(value) @creator_team_id = value end |
#game_mode_id ⇒ Object
Gets the gameModeId property value. Game mode identifier (e.g. search_and_destroy).
134 135 136 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 134 def game_mode_id return @game_mode_id end |
#game_mode_id=(value) ⇒ Object
Sets the gameModeId property value. Game mode identifier (e.g. search_and_destroy).
142 143 144 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 142 def game_mode_id=(value) @game_mode_id = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 149 def get_field_deserializers() return { "acceptedTeamId" => lambda {|n| @accepted_team_id = n.get_string_value() }, "bestOf" => lambda {|n| @best_of = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) }, "creatorTeamId" => lambda {|n| @creator_team_id = n.get_string_value() }, "gameModeId" => lambda {|n| @game_mode_id = n.get_string_value() }, "inputDevice" => lambda {|n| @input_device = n.get_enum_value(TeamBattlesSdk::Generated::Models::GameCreateMatchBodyInputDevice) }, "mapPreferenceMode" => lambda {|n| @map_preference_mode = n.get_enum_value(TeamBattlesSdk::Generated::Models::GameCreateMatchBodyMapPreferenceMode) }, "mapSelectionType" => lambda {|n| @map_selection_type = n.get_enum_value(TeamBattlesSdk::Generated::Models::GameCreateMatchBodyMapSelectionType) }, "platform" => lambda {|n| @platform = n.get_enum_value(TeamBattlesSdk::Generated::Models::GameCreateMatchBodyPlatform) }, "region" => lambda {|n| @region = n.get_enum_value(TeamBattlesSdk::Generated::Models::GameCreateMatchBodyRegion) }, "scheduledAt" => lambda {|n| @scheduled_at = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) }, "selectedMaps" => lambda {|n| @selected_maps = n.get_collection_of_primitive_values(String) }, "selectedObjectives" => lambda {|n| @selected_objectives = n.get_collection_of_primitive_values(String) }, "teamSize" => lambda {|n| @team_size = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) }, } end |
#input_device ⇒ Object
Gets the inputDevice property value. Allowed input device (e.g. ALL).
170 171 172 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 170 def input_device return @input_device end |
#input_device=(value) ⇒ Object
Sets the inputDevice property value. Allowed input device (e.g. ALL).
178 179 180 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 178 def input_device=(value) @input_device = value end |
#map_preference_mode ⇒ Object
Gets the mapPreferenceMode property value. Map preference mode (PREFERRED, VETO, or MANUAL).
185 186 187 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 185 def map_preference_mode return @map_preference_mode end |
#map_preference_mode=(value) ⇒ Object
Sets the mapPreferenceMode property value. Map preference mode (PREFERRED, VETO, or MANUAL).
193 194 195 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 193 def map_preference_mode=(value) @map_preference_mode = value end |
#map_selection_type ⇒ Object
Gets the mapSelectionType property value. Map selection type (COMPETITIVE or FLEX).
200 201 202 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 200 def map_selection_type return @map_selection_type end |
#map_selection_type=(value) ⇒ Object
Sets the mapSelectionType property value. Map selection type (COMPETITIVE or FLEX).
208 209 210 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 208 def map_selection_type=(value) @map_selection_type = value end |
#platform ⇒ Object
Gets the platform property value. Match platform (e.g. CROSSPLAY).
215 216 217 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 215 def platform return @platform end |
#platform=(value) ⇒ Object
Sets the platform property value. Match platform (e.g. CROSSPLAY).
223 224 225 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 223 def platform=(value) @platform = value end |
#region ⇒ Object
Gets the region property value. Match region (e.g. NONE).
230 231 232 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 230 def region return @region end |
#region=(value) ⇒ Object
Sets the region property value. Match region (e.g. NONE).
238 239 240 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 238 def region=(value) @region = value end |
#scheduled_at ⇒ Object
Gets the scheduledAt property value. Optional scheduled start time (epoch ms).
245 246 247 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 245 def scheduled_at return @scheduled_at end |
#scheduled_at=(value) ⇒ Object
Sets the scheduledAt property value. Optional scheduled start time (epoch ms).
253 254 255 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 253 def scheduled_at=(value) @scheduled_at = value end |
#selected_maps ⇒ Object
Gets the selectedMaps property value. Optional pre-selected map IDs.
260 261 262 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 260 def selected_maps return @selected_maps end |
#selected_maps=(value) ⇒ Object
Sets the selectedMaps property value. Optional pre-selected map IDs.
268 269 270 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 268 def selected_maps=(value) @selected_maps = value end |
#selected_objectives ⇒ Object
Gets the selectedObjectives property value. Optional pre-selected objective IDs.
275 276 277 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 275 def selected_objectives return @selected_objectives end |
#selected_objectives=(value) ⇒ Object
Sets the selectedObjectives property value. Optional pre-selected objective IDs.
283 284 285 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 283 def selected_objectives=(value) @selected_objectives = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 291 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_string_value("acceptedTeamId", @accepted_team_id) writer.write_object_value("bestOf", @best_of) writer.write_string_value("creatorTeamId", @creator_team_id) writer.write_string_value("gameModeId", @game_mode_id) writer.write_enum_value("inputDevice", @input_device) writer.write_enum_value("mapPreferenceMode", @map_preference_mode) writer.write_enum_value("mapSelectionType", @map_selection_type) writer.write_enum_value("platform", @platform) writer.write_enum_value("region", @region) writer.write_object_value("scheduledAt", @scheduled_at) writer.write_collection_of_primitive_values("selectedMaps", @selected_maps) writer.write_collection_of_primitive_values("selectedObjectives", @selected_objectives) writer.write_object_value("teamSize", @team_size) writer.write_additional_data(@additional_data) end |
#team_size ⇒ Object
Gets the teamSize property value. Players per team (validated against the game’s min/max).
312 313 314 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 312 def team_size return @team_size end |
#team_size=(value) ⇒ Object
Sets the teamSize property value. Players per team (validated against the game’s min/max).
320 321 322 |
# File 'lib/teambattles_sdk/generated/models/game_create_match_body.rb', line 320 def team_size=(value) @team_size = value end |