Class: Google::Apis::GamesV1::Quest

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

Returns a new instance of Quest.


2882
2883
2884
# File 'generated/google/apis/games_v1/classes.rb', line 2882

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

Instance Attribute Details

#accepted_timestamp_millisString

The timestamp at which the user accepted the quest in milliseconds since the epoch in UTC. Only present if the player has accepted the quest. Corresponds to the JSON property acceptedTimestampMillis

Returns:

  • (String)

2786
2787
2788
# File 'generated/google/apis/games_v1/classes.rb', line 2786

def accepted_timestamp_millis
  @accepted_timestamp_millis
end

#application_idString

The ID of the application this quest is part of. Corresponds to the JSON property applicationId

Returns:

  • (String)

2791
2792
2793
# File 'generated/google/apis/games_v1/classes.rb', line 2791

def application_id
  @application_id
end

The banner image URL for the quest. Corresponds to the JSON property bannerUrl

Returns:

  • (String)

2796
2797
2798
# File 'generated/google/apis/games_v1/classes.rb', line 2796

def banner_url
  @banner_url
end

#descriptionString

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

Returns:

  • (String)

2801
2802
2803
# File 'generated/google/apis/games_v1/classes.rb', line 2801

def description
  @description
end

#end_timestamp_millisString

The timestamp at which the quest ceases to be active in milliseconds since the epoch in UTC. Corresponds to the JSON property endTimestampMillis

Returns:

  • (String)

2807
2808
2809
# File 'generated/google/apis/games_v1/classes.rb', line 2807

def end_timestamp_millis
  @end_timestamp_millis
end

#icon_urlString

The icon image URL for the quest. Corresponds to the JSON property iconUrl

Returns:

  • (String)

2812
2813
2814
# File 'generated/google/apis/games_v1/classes.rb', line 2812

def icon_url
  @icon_url
end

#idString

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

Returns:

  • (String)

2817
2818
2819
# File 'generated/google/apis/games_v1/classes.rb', line 2817

def id
  @id
end

#is_default_banner_urlBoolean Also known as: is_default_banner_url?

Indicates whether the banner image being returned is a default image, or is game-provided. Corresponds to the JSON property isDefaultBannerUrl

Returns:

  • (Boolean)

2823
2824
2825
# File 'generated/google/apis/games_v1/classes.rb', line 2823

def is_default_banner_url
  @is_default_banner_url
end

#is_default_icon_urlBoolean Also known as: is_default_icon_url?

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

Returns:

  • (Boolean)

2830
2831
2832
# File 'generated/google/apis/games_v1/classes.rb', line 2830

def is_default_icon_url
  @is_default_icon_url
end

#kindString

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

Returns:

  • (String)

2837
2838
2839
# File 'generated/google/apis/games_v1/classes.rb', line 2837

def kind
  @kind
end

#last_updated_timestamp_millisString

The timestamp at which the quest was last updated by the user in milliseconds since the epoch in UTC. Only present if the player has accepted the quest. Corresponds to the JSON property lastUpdatedTimestampMillis

Returns:

  • (String)

2843
2844
2845
# File 'generated/google/apis/games_v1/classes.rb', line 2843

def last_updated_timestamp_millis
  @last_updated_timestamp_millis
end

#milestonesArray<Google::Apis::GamesV1::QuestMilestone>

The quest milestones. Corresponds to the JSON property milestones


2848
2849
2850
# File 'generated/google/apis/games_v1/classes.rb', line 2848

def milestones
  @milestones
end

#nameString

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

Returns:

  • (String)

2853
2854
2855
# File 'generated/google/apis/games_v1/classes.rb', line 2853

def name
  @name
end

#notify_timestamp_millisString

The timestamp at which the user should be notified that the quest will end soon in milliseconds since the epoch in UTC. Corresponds to the JSON property notifyTimestampMillis

Returns:

  • (String)

2859
2860
2861
# File 'generated/google/apis/games_v1/classes.rb', line 2859

def notify_timestamp_millis
  @notify_timestamp_millis
end

#start_timestamp_millisString

The timestamp at which the quest becomes active in milliseconds since the epoch in UTC. Corresponds to the JSON property startTimestampMillis

Returns:

  • (String)

2865
2866
2867
# File 'generated/google/apis/games_v1/classes.rb', line 2865

def start_timestamp_millis
  @start_timestamp_millis
end

#stateString

The state of the quest. Possible values are:

  • "UPCOMING": The quest is upcoming. The user can see the quest, but cannot accept it until it is open.
  • "OPEN": The quest is currently open and may be accepted at this time.
  • "ACCEPTED": The user is currently participating in this quest.
  • "COMPLETED": The user has completed the quest.
  • "FAILED": The quest was attempted but was not completed before the deadline expired.
  • "EXPIRED": The quest has expired and was not accepted.
  • "DELETED": The quest should be deleted from the local database. Corresponds to the JSON property state

Returns:

  • (String)

2880
2881
2882
# File 'generated/google/apis/games_v1/classes.rb', line 2880

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
# File 'generated/google/apis/games_v1/classes.rb', line 2887

def update!(**args)
  @accepted_timestamp_millis = args[:accepted_timestamp_millis] if args.key?(:accepted_timestamp_millis)
  @application_id = args[:application_id] if args.key?(:application_id)
  @banner_url = args[:banner_url] if args.key?(:banner_url)
  @description = args[:description] if args.key?(:description)
  @end_timestamp_millis = args[:end_timestamp_millis] if args.key?(:end_timestamp_millis)
  @icon_url = args[:icon_url] if args.key?(:icon_url)
  @id = args[:id] if args.key?(:id)
  @is_default_banner_url = args[:is_default_banner_url] if args.key?(:is_default_banner_url)
  @is_default_icon_url = args[:is_default_icon_url] if args.key?(:is_default_icon_url)
  @kind = args[:kind] if args.key?(:kind)
  @last_updated_timestamp_millis = args[:last_updated_timestamp_millis] if args.key?(:last_updated_timestamp_millis)
  @milestones = args[:milestones] if args.key?(:milestones)
  @name = args[:name] if args.key?(:name)
  @notify_timestamp_millis = args[:notify_timestamp_millis] if args.key?(:notify_timestamp_millis)
  @start_timestamp_millis = args[:start_timestamp_millis] if args.key?(:start_timestamp_millis)
  @state = args[:state] if args.key?(:state)
end