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

An achievement definition object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AchievementDefinition

Returns a new instance of AchievementDefinition.



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

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

def achievement_type
  @achievement_type
end

#descriptionString

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

Returns:

  • (String)


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

def description
  @description
end

#experience_pointsFixnum

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

Returns:

  • (Fixnum)


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

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)


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

def formatted_total_steps
  @formatted_total_steps
end

#idString

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

Returns:

  • (String)


52
53
54
# File 'generated/google/apis/games_v1/classes.rb', line 52

def id
  @id
end

#initial_stateString

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

Returns:

  • (String)


57
58
59
# File 'generated/google/apis/games_v1/classes.rb', line 57

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)


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

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)


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

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)


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

def kind
  @kind
end

#nameString

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

Returns:

  • (String)


82
83
84
# File 'generated/google/apis/games_v1/classes.rb', line 82

def name
  @name
end

#revealed_icon_urlString

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

Returns:

  • (String)


87
88
89
# File 'generated/google/apis/games_v1/classes.rb', line 87

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)


92
93
94
# File 'generated/google/apis/games_v1/classes.rb', line 92

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)


97
98
99
# File 'generated/google/apis/games_v1/classes.rb', line 97

def unlocked_icon_url
  @unlocked_icon_url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'generated/google/apis/games_v1/classes.rb', line 104

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