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

This is a JSON template for an achievement configuration resource.

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

Returns a new instance of AchievementConfiguration



77
78
79
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 77

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

Instance Attribute Details

#achievement_typeString

The type of the achievement. Possible values are:

  • "STANDARD" - Achievement is either locked or unlocked.
  • "INCREMENTAL" - Achievement is incremental. Corresponds to the JSON property achievementType

Returns:

  • (String)


35
36
37
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 35

def achievement_type
  @achievement_type
end

#draftGoogle::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail

This is a JSON template for an achievement configuration detail. Corresponds to the JSON property draft



40
41
42
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 40

def draft
  @draft
end

#idString

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

Returns:

  • (String)


45
46
47
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 45

def id
  @id
end

#initial_stateString

The initial state of the achievement. Possible values are:

  • "HIDDEN" - Achievement is hidden.
  • "REVEALED" - Achievement is revealed.
  • "UNLOCKED" - Achievement is unlocked. Corresponds to the JSON property initialState

Returns:

  • (String)


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

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)


60
61
62
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 60

def kind
  @kind
end

#publishedGoogle::Apis::GamesConfigurationV1configuration::AchievementConfigurationDetail

This is a JSON template for an achievement configuration detail. Corresponds to the JSON property published



65
66
67
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 65

def published
  @published
end

#steps_to_unlockFixnum

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

Returns:

  • (Fixnum)


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

def steps_to_unlock
  @steps_to_unlock
end

#tokenString

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

Returns:

  • (String)


75
76
77
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 75

def token
  @token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



82
83
84
85
86
87
88
89
90
91
# File 'generated/google/apis/games_configuration_v1configuration/classes.rb', line 82

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