Packages
Google Play Games Services API client library. The Google Play Games Service allows developers to enhance games with social leaderboards, achievements, game state, sign-in with Google, and more.
Current section
Files
Jump to
Current section
Files
lib/google_api/games/v1/model/quest.ex
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule GoogleApi.Games.V1.Model.Quest do
@moduledoc """
This is a JSON template for a Quest resource.
## Attributes
- acceptedTimestampMillis (String): 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. Defaults to: `null`.
- applicationId (String): The ID of the application this quest is part of. Defaults to: `null`.
- bannerUrl (String): The banner image URL for the quest. Defaults to: `null`.
- description (String): The description of the quest. Defaults to: `null`.
- endTimestampMillis (String): The timestamp at which the quest ceases to be active in milliseconds since the epoch in UTC. Defaults to: `null`.
- iconUrl (String): The icon image URL for the quest. Defaults to: `null`.
- id (String): The ID of the quest. Defaults to: `null`.
- isDefaultBannerUrl (Boolean): Indicates whether the banner image being returned is a default image, or is game-provided. Defaults to: `null`.
- isDefaultIconUrl (Boolean): Indicates whether the icon image being returned is a default image, or is game-provided. Defaults to: `null`.
- kind (String): Uniquely identifies the type of this resource. Value is always the fixed string games#quest. Defaults to: `null`.
- lastUpdatedTimestampMillis (String): 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. Defaults to: `null`.
- milestones (List[QuestMilestone]): The quest milestones. Defaults to: `null`.
- name (String): The name of the quest. Defaults to: `null`.
- notifyTimestampMillis (String): The timestamp at which the user should be notified that the quest will end soon in milliseconds since the epoch in UTC. Defaults to: `null`.
- startTimestampMillis (String): The timestamp at which the quest becomes active in milliseconds since the epoch in UTC. Defaults to: `null`.
- state (String): 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. Defaults to: `null`.
"""
defstruct [
:"acceptedTimestampMillis",
:"applicationId",
:"bannerUrl",
:"description",
:"endTimestampMillis",
:"iconUrl",
:"id",
:"isDefaultBannerUrl",
:"isDefaultIconUrl",
:"kind",
:"lastUpdatedTimestampMillis",
:"milestones",
:"name",
:"notifyTimestampMillis",
:"startTimestampMillis",
:"state"
]
end
defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.Quest do
import GoogleApi.Games.V1.Deserializer
def decode(value, options) do
value
|> deserialize(:"milestones", :list, GoogleApi.Games.V1.Model.QuestMilestone, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.Quest do
def encode(value, options) do
GoogleApi.Games.V1.Deserializer.serialize_non_nil(value, options)
end
end