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



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

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

Instance Attribute Details

#accepted_timestamp_millisFixnum

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:

  • (Fixnum)


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

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)


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

def application_id
  @application_id
end

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

Returns:

  • (String)


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

def banner_url
  @banner_url
end

#descriptionString

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

Returns:

  • (String)


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

def description
  @description
end

#end_timestamp_millisFixnum

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

Returns:

  • (Fixnum)


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

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)


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

def icon_url
  @icon_url
end

#idString

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

Returns:

  • (String)


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

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)


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

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)


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

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)


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

def kind
  @kind
end

#last_updated_timestamp_millisFixnum

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:

  • (Fixnum)


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

def last_updated_timestamp_millis
  @last_updated_timestamp_millis
end

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

The quest milestones. Corresponds to the JSON property milestones



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

def milestones
  @milestones
end

#nameString

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

Returns:

  • (String)


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

def name
  @name
end

#notify_timestamp_millisFixnum

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:

  • (Fixnum)


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

def notify_timestamp_millis
  @notify_timestamp_millis
end

#start_timestamp_millisFixnum

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

Returns:

  • (Fixnum)


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

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)


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

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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