class Google::Apis::GamesV1::AchievementDefinition

This is a JSON template for an achievement definition object.

Attributes

achievement_type[RW]

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` @return [String]

description[RW]

The description of the achievement. Corresponds to the JSON property `description` @return [String]

experience_points[RW]

Experience points which will be earned when unlocking this achievement. Corresponds to the JSON property `experiencePoints` @return [String]

formatted_total_steps[RW]

The total steps for an incremental achievement as a string. Corresponds to the JSON property `formattedTotalSteps` @return [String]

id[RW]

The ID of the achievement. Corresponds to the JSON property `id` @return [String]

initial_state[RW]

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` @return [String]

is_revealed_icon_url_default[RW]

Indicates whether the revealed icon image being returned is a default image, or is provided by the game. Corresponds to the JSON property `isRevealedIconUrlDefault` @return [Boolean]

is_revealed_icon_url_default?[RW]

Indicates whether the revealed icon image being returned is a default image, or is provided by the game. Corresponds to the JSON property `isRevealedIconUrlDefault` @return [Boolean]

is_unlocked_icon_url_default[RW]

Indicates whether the unlocked icon image being returned is a default image, or is game-provided. Corresponds to the JSON property `isUnlockedIconUrlDefault` @return [Boolean]

is_unlocked_icon_url_default?[RW]

Indicates whether the unlocked icon image being returned is a default image, or is game-provided. Corresponds to the JSON property `isUnlockedIconUrlDefault` @return [Boolean]

kind[RW]

Uniquely identifies the type of this resource. Value is always the fixed string games#achievementDefinition. Corresponds to the JSON property `kind` @return [String]

name[RW]

The name of the achievement. Corresponds to the JSON property `name` @return [String]

revealed_icon_url[RW]

The image URL for the revealed achievement icon. Corresponds to the JSON property `revealedIconUrl` @return [String]

total_steps[RW]

The total steps for an incremental achievement. Corresponds to the JSON property `totalSteps` @return [Fixnum]

unlocked_icon_url[RW]

The image URL for the unlocked achievement icon. Corresponds to the JSON property `unlockedIconUrl` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/games_v1/classes.rb, line 106
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# 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