Class: Google::Apis::GamesV1::RoomP2PStatus

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 an update on the status of a peer in a room.

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) ⇒ RoomP2PStatus

Returns a new instance of RoomP2PStatus.



3378
3379
3380
# File 'generated/google/apis/games_v1/classes.rb', line 3378

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

Instance Attribute Details

#connection_setup_latency_millisFixnum

The amount of time in milliseconds it took to establish connections with this peer. Corresponds to the JSON property connectionSetupLatencyMillis

Returns:

  • (Fixnum)


3332
3333
3334
# File 'generated/google/apis/games_v1/classes.rb', line 3332

def connection_setup_latency_millis
  @connection_setup_latency_millis
end

#errorString

The error code in event of a failure. Possible values are:

  • "P2P_FAILED" - The client failed to establish a P2P connection with the peer.

  • "PRESENCE_FAILED" - The client failed to register to receive P2P connections.

  • "RELAY_SERVER_FAILED" - The client received an error when trying to use the relay server to establish a P2P connection with the peer. Corresponds to the JSON property error

Returns:

  • (String)


3344
3345
3346
# File 'generated/google/apis/games_v1/classes.rb', line 3344

def error
  @error
end

#error_reasonString

More detailed diagnostic message returned in event of a failure. Corresponds to the JSON property error_reason

Returns:

  • (String)


3349
3350
3351
# File 'generated/google/apis/games_v1/classes.rb', line 3349

def error_reason
  @error_reason
end

#kindString

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

Returns:

  • (String)


3355
3356
3357
# File 'generated/google/apis/games_v1/classes.rb', line 3355

def kind
  @kind
end

#participant_idString

The ID of the participant. Corresponds to the JSON property participantId

Returns:

  • (String)


3360
3361
3362
# File 'generated/google/apis/games_v1/classes.rb', line 3360

def participant_id
  @participant_id
end

#statusString

The status of the peer in the room. Possible values are:

  • "CONNECTION_ESTABLISHED" - The client established a P2P connection with the peer.
  • "CONNECTION_FAILED" - The client failed to establish directed presence with the peer. Corresponds to the JSON property status

Returns:

  • (String)


3370
3371
3372
# File 'generated/google/apis/games_v1/classes.rb', line 3370

def status
  @status
end

#unreliable_roundtrip_latency_millisFixnum

The amount of time in milliseconds it took to send packets back and forth on the unreliable channel with this peer. Corresponds to the JSON property unreliableRoundtripLatencyMillis

Returns:

  • (Fixnum)


3376
3377
3378
# File 'generated/google/apis/games_v1/classes.rb', line 3376

def unreliable_roundtrip_latency_millis
  @unreliable_roundtrip_latency_millis
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3383
3384
3385
3386
3387
3388
3389
3390
3391
# File 'generated/google/apis/games_v1/classes.rb', line 3383

def update!(**args)
  @connection_setup_latency_millis = args[:connection_setup_latency_millis] if args.key?(:connection_setup_latency_millis)
  @error = args[:error] if args.key?(:error)
  @error_reason = args[:error_reason] if args.key?(:error_reason)
  @kind = args[:kind] if args.key?(:kind)
  @participant_id = args[:participant_id] if args.key?(:participant_id)
  @status = args[:status] if args.key?(:status)
  @unreliable_roundtrip_latency_millis = args[:unreliable_roundtrip_latency_millis] if args.key?(:unreliable_roundtrip_latency_millis)
end