Class: Google::Apis::GamesV1::ParticipantResult

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 result for a match participant.

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

Returns a new instance of ParticipantResult



1827
1828
1829
# File 'generated/google/apis/games_v1/classes.rb', line 1827

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

Instance Attribute Details

#kindString

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

Returns:

  • (String)


1798
1799
1800
# File 'generated/google/apis/games_v1/classes.rb', line 1798

def kind
  @kind
end

#participant_idString

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

Returns:

  • (String)


1803
1804
1805
# File 'generated/google/apis/games_v1/classes.rb', line 1803

def participant_id
  @participant_id
end

#placingFixnum

The placement or ranking of the participant in the match results; a number from one to the number of participants in the match. Multiple participants may have the same placing value in case of a type. Corresponds to the JSON property placing

Returns:

  • (Fixnum)


1810
1811
1812
# File 'generated/google/apis/games_v1/classes.rb', line 1810

def placing
  @placing
end

#resultString

The result of the participant for this match. Possible values are:

  • "MATCH_RESULT_WIN" - The participant won the match.
  • "MATCH_RESULT_LOSS" - The participant lost the match.
  • "MATCH_RESULT_TIE" - The participant tied the match.
  • "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or loses this kind of game.)
  • "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the match.
  • "MATCH_RESULT_DISAGREED" - Different clients reported different results for this participant. Corresponds to the JSON property result

Returns:

  • (String)


1825
1826
1827
# File 'generated/google/apis/games_v1/classes.rb', line 1825

def result
  @result
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1832
1833
1834
1835
1836
1837
# File 'generated/google/apis/games_v1/classes.rb', line 1832

def update!(**args)
  @kind = args[:kind] if args.key?(:kind)
  @participant_id = args[:participant_id] if args.key?(:participant_id)
  @placing = args[:placing] if args.key?(:placing)
  @result = args[:result] if args.key?(:result)
end