Class: Google::Apis::GamesV1::QuestCriterion

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 Criterion 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) ⇒ QuestCriterion

Returns a new instance of QuestCriterion.



2971
2972
2973
# File 'generated/google/apis/games_v1/classes.rb', line 2971

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

Instance Attribute Details

#completion_contributionGoogle::Apis::GamesV1::QuestContribution

This is a JSON template for a Quest Criterion Contribution resource. Corresponds to the JSON property completionContribution



2948
2949
2950
# File 'generated/google/apis/games_v1/classes.rb', line 2948

def completion_contribution
  @completion_contribution
end

#current_contributionGoogle::Apis::GamesV1::QuestContribution

This is a JSON template for a Quest Criterion Contribution resource. Corresponds to the JSON property currentContribution



2953
2954
2955
# File 'generated/google/apis/games_v1/classes.rb', line 2953

def current_contribution
  @current_contribution
end

#event_idString

The ID of the event the criterion corresponds to. Corresponds to the JSON property eventId

Returns:

  • (String)


2958
2959
2960
# File 'generated/google/apis/games_v1/classes.rb', line 2958

def event_id
  @event_id
end

#initial_player_progressGoogle::Apis::GamesV1::QuestContribution

This is a JSON template for a Quest Criterion Contribution resource. Corresponds to the JSON property initialPlayerProgress



2963
2964
2965
# File 'generated/google/apis/games_v1/classes.rb', line 2963

def initial_player_progress
  @initial_player_progress
end

#kindString

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

Returns:

  • (String)


2969
2970
2971
# File 'generated/google/apis/games_v1/classes.rb', line 2969

def kind
  @kind
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2976
2977
2978
2979
2980
2981
2982
# File 'generated/google/apis/games_v1/classes.rb', line 2976

def update!(**args)
  @completion_contribution = args[:completion_contribution] if args.key?(:completion_contribution)
  @current_contribution = args[:current_contribution] if args.key?(:current_contribution)
  @event_id = args[:event_id] if args.key?(:event_id)
  @initial_player_progress = args[:initial_player_progress] if args.key?(:initial_player_progress)
  @kind = args[:kind] if args.key?(:kind)
end