Class: Google::Apis::GamesV1::CreateRoomRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/games_v1/classes.rb,
generated/google/apis/games_v1/representations.rb,
generated/google/apis/games_v1/representations.rb

Overview

This is a JSON template for a room creation request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CreateRoomRequest

Returns a new instance of CreateRoomRequest.



3072
3073
3074
# File 'generated/google/apis/games_v1/classes.rb', line 3072

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#auto_matching_criteriaGoogle::Apis::GamesV1::RoomAutoMatchingCriteria

This is a JSON template for a room auto-match criteria object. Corresponds to the JSON property autoMatchingCriteria



3031
3032
3033
# File 'generated/google/apis/games_v1/classes.rb', line 3031

def auto_matching_criteria
  @auto_matching_criteria
end

#capabilitiesArray<String>

The capabilities that this client supports for realtime communication. Corresponds to the JSON property capabilities

Returns:

  • (Array<String>)


3036
3037
3038
# File 'generated/google/apis/games_v1/classes.rb', line 3036

def capabilities
  @capabilities
end

#client_addressGoogle::Apis::GamesV1::RoomClientAddress

This is a JSON template for the client address when setting up a room. Corresponds to the JSON property clientAddress



3041
3042
3043
# File 'generated/google/apis/games_v1/classes.rb', line 3041

def client_address
  @client_address
end

#invited_player_idsArray<String>

The player IDs to invite to the room. Corresponds to the JSON property invitedPlayerIds

Returns:

  • (Array<String>)


3046
3047
3048
# File 'generated/google/apis/games_v1/classes.rb', line 3046

def invited_player_ids
  @invited_player_ids
end

#kindString

Uniquely identifies the type of this resource. Value is always the fixed string games#roomCreateRequest. Corresponds to the JSON property kind

Returns:

  • (String)


3052
3053
3054
# File 'generated/google/apis/games_v1/classes.rb', line 3052

def kind
  @kind
end

#network_diagnosticsGoogle::Apis::GamesV1::NetworkDiagnostics

This is a JSON template for network diagnostics reported for a client. Corresponds to the JSON property networkDiagnostics



3057
3058
3059
# File 'generated/google/apis/games_v1/classes.rb', line 3057

def network_diagnostics
  @network_diagnostics
end

#request_idFixnum

A randomly generated numeric ID. This number is used at the server to ensure that the request is handled correctly across retries. Corresponds to the JSON property requestId

Returns:

  • (Fixnum)


3063
3064
3065
# File 'generated/google/apis/games_v1/classes.rb', line 3063

def request_id
  @request_id
end

#variantFixnum

The variant / mode of the application to be played. This can be any integer value, or left blank. You should use a small number of variants to keep the auto-matching pool as large as possible. Corresponds to the JSON property variant

Returns:

  • (Fixnum)


3070
3071
3072
# File 'generated/google/apis/games_v1/classes.rb', line 3070

def variant
  @variant
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
# File 'generated/google/apis/games_v1/classes.rb', line 3077

def update!(**args)
  @auto_matching_criteria = args[:auto_matching_criteria] if args.key?(:auto_matching_criteria)
  @capabilities = args[:capabilities] if args.key?(:capabilities)
  @client_address = args[:client_address] if args.key?(:client_address)
  @invited_player_ids = args[:invited_player_ids] if args.key?(:invited_player_ids)
  @kind = args[:kind] if args.key?(:kind)
  @network_diagnostics = args[:network_diagnostics] if args.key?(:network_diagnostics)
  @request_id = args[:request_id] if args.key?(:request_id)
  @variant = args[:variant] if args.key?(:variant)
end