Class: Google::Apis::GamesV1::AchievementDefinition

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 achievement definition object.

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

Returns a new instance of AchievementDefinition



106
107
108
# File 'generated/google/apis/games_v1/classes.rb', line 106

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_v1/classes.rb', line 35

def achievement_type
  @achievement_type
end

#descriptionString

The description of the achievement. Corresponds to the JSON property description

Returns:

  • (String)


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

def description
  @description
end

#experience_pointsFixnum

Experience points which will be earned when unlocking this achievement. Corresponds to the JSON property experiencePoints

Returns:

  • (Fixnum)


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

def experience_points
  @experience_points
end

#formatted_total_stepsString

The total steps for an incremental achievement as a string. Corresponds to the JSON property formattedTotalSteps

Returns:

  • (String)


50
51
52
# File 'generated/google/apis/games_v1/classes.rb', line 50

def formatted_total_steps
  @formatted_total_steps
end

#idString

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

Returns:

  • (String)


55
56
57
# File 'generated/google/apis/games_v1/classes.rb', line 55

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)


64
65
66
# File 'generated/google/apis/games_v1/classes.rb', line 64

def initial_state
  @initial_state
end

#is_revealed_icon_url_defaultBoolean Also known as: is_revealed_icon_url_default?

Indicates whether the revealed icon image being returned is a default image, or is provided by the game. Corresponds to the JSON property isRevealedIconUrlDefault

Returns:

  • (Boolean)


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

def is_revealed_icon_url_default
  @is_revealed_icon_url_default
end

#is_unlocked_icon_url_defaultBoolean Also known as: is_unlocked_icon_url_default?

Indicates whether the unlocked icon image being returned is a default image, or is game-provided. Corresponds to the JSON property isUnlockedIconUrlDefault

Returns:

  • (Boolean)


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

def is_unlocked_icon_url_default
  @is_unlocked_icon_url_default
end

#kindString

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

Returns:

  • (String)


84
85
86
# File 'generated/google/apis/games_v1/classes.rb', line 84

def kind
  @kind
end

#nameString

The name of the achievement. Corresponds to the JSON property name

Returns:

  • (String)


89
90
91
# File 'generated/google/apis/games_v1/classes.rb', line 89

def name
  @name
end

#revealed_icon_urlString

The image URL for the revealed achievement icon. Corresponds to the JSON property revealedIconUrl

Returns:

  • (String)


94
95
96
# File 'generated/google/apis/games_v1/classes.rb', line 94

def revealed_icon_url
  @revealed_icon_url
end

#total_stepsFixnum

The total steps for an incremental achievement. Corresponds to the JSON property totalSteps

Returns:

  • (Fixnum)


99
100
101
# File 'generated/google/apis/games_v1/classes.rb', line 99

def total_steps
  @total_steps
end

#unlocked_icon_urlString

The image URL for the unlocked achievement icon. Corresponds to the JSON property unlockedIconUrl

Returns:

  • (String)


104
105
106
# File 'generated/google/apis/games_v1/classes.rb', line 104

def unlocked_icon_url
  @unlocked_icon_url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'generated/google/apis/games_v1/classes.rb', line 111

def update!(**args)
  @achievement_type = args[:achievement_type] if args.key?(:achievement_type)
  @description = args[:description] if args.key?(:description)
  @experience_points = args[:experience_points] if args.key?(:experience_points)
  @formatted_total_steps = args[:formatted_total_steps] if args.key?(:formatted_total_steps)
  @id = args[:id] if args.key?(:id)
  @initial_state = args[:initial_state] if args.key?(:initial_state)
  @is_revealed_icon_url_default = args[:is_revealed_icon_url_default] if args.key?(:is_revealed_icon_url_default)
  @is_unlocked_icon_url_default = args[:is_unlocked_icon_url_default] if args.key?(:is_unlocked_icon_url_default)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @revealed_icon_url = args[:revealed_icon_url] if args.key?(:revealed_icon_url)
  @total_steps = args[:total_steps] if args.key?(:total_steps)
  @unlocked_icon_url = args[:unlocked_icon_url] if args.key?(:unlocked_icon_url)
end