Class: Google::Apis::GamesConfigurationV1configuration::AchievementConfiguration

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

Overview

An achievement configuration resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AchievementConfiguration

Returns a new instance of AchievementConfiguration.



70
71
72
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 70

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

Instance Attribute Details

#achievement_typeString

The type of the achievement. Corresponds to the JSON property achievementType

Returns:

  • (String)


32
33
34
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 32

def achievement_type
  @achievement_type
end

#draftGoogle::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail

An achievement configuration detail. Corresponds to the JSON property draft



37
38
39
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 37

def draft
  @draft
end

#idString

The ID of the achievement. Corresponds to the JSON property id

Returns:

  • (String)


42
43
44
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 42

def id
  @id
end

#initial_stateString

The initial state of the achievement. Corresponds to the JSON property initialState

Returns:

  • (String)


47
48
49
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 47

def initial_state
  @initial_state
end

#kindString

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

Returns:

  • (String)


53
54
55
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 53

def kind
  @kind
end

#publishedGoogle::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail

An achievement configuration detail. Corresponds to the JSON property published



58
59
60
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 58

def published
  @published
end

#steps_to_unlockFixnum

Steps to unlock. Only applicable to incremental achievements. Corresponds to the JSON property stepsToUnlock

Returns:

  • (Fixnum)


63
64
65
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 63

def steps_to_unlock
  @steps_to_unlock
end

#tokenString

The token for this resource. Corresponds to the JSON property token

Returns:

  • (String)


68
69
70
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 68

def token
  @token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



75
76
77
78
79
80
81
82
83
84
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 75

def update!(**args)
  @achievement_type = args[:achievement_type] if args.key?(:achievement_type)
  @draft = args[:draft] if args.key?(:draft)
  @id = args[:id] if args.key?(:id)
  @initial_state = args[:initial_state] if args.key?(:initial_state)
  @kind = args[:kind] if args.key?(:kind)
  @published = args[:published] if args.key?(:published)
  @steps_to_unlock = args[:steps_to_unlock] if args.key?(:steps_to_unlock)
  @token = args[:token] if args.key?(:token)
end