Class: Google::Apis::GamesV1::QuestMilestone

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 a Quest Milestone 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) ⇒ QuestMilestone

Returns a new instance of QuestMilestone.


3055
3056
3057
# File 'generated/google/apis/games_v1/classes.rb', line 3055

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

Instance Attribute Details

#completion_reward_dataString

The completion reward data of the milestone, represented as a Base64-encoded string. This is a developer-specified binary blob with size between 0 and 2 KB before encoding. Corresponds to the JSON property completionRewardData

Returns:

  • (String)

3026
3027
3028
# File 'generated/google/apis/games_v1/classes.rb', line 3026

def completion_reward_data
  @completion_reward_data
end

#criteriaArray<Google::Apis::GamesV1::QuestCriterion>

The criteria of the milestone. Corresponds to the JSON property criteria


3031
3032
3033
# File 'generated/google/apis/games_v1/classes.rb', line 3031

def criteria
  @criteria
end

#idString

The milestone ID. Corresponds to the JSON property id

Returns:

  • (String)

3036
3037
3038
# File 'generated/google/apis/games_v1/classes.rb', line 3036

def id
  @id
end

#kindString

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

Returns:

  • (String)

3042
3043
3044
# File 'generated/google/apis/games_v1/classes.rb', line 3042

def kind
  @kind
end

#stateString

The current state of the milestone. Possible values are:

  • "COMPLETED_NOT_CLAIMED" - The milestone is complete, but has not yet been claimed.
  • "CLAIMED" - The milestone is complete and has been claimed.
  • "NOT_COMPLETED" - The milestone has not yet been completed.
  • "NOT_STARTED" - The milestone is for a quest that has not yet been accepted. Corresponds to the JSON property state

Returns:

  • (String)

3053
3054
3055
# File 'generated/google/apis/games_v1/classes.rb', line 3053

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


3060
3061
3062
3063
3064
3065
3066
# File 'generated/google/apis/games_v1/classes.rb', line 3060

def update!(**args)
  @completion_reward_data = args[:completion_reward_data] if args.key?(:completion_reward_data)
  @criteria = args[:criteria] if args.key?(:criteria)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @state = args[:state] if args.key?(:state)
end