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_criterion.ex
# Copyright 2019 Google LLC
#
# 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 elixir code generator program.
# Do not edit the class manually.
defmodule GoogleApi.Games.V1.Model.QuestCriterion do
@moduledoc """
This is a JSON template for a Quest Criterion resource.
## Attributes
* `completionContribution` (*type:* `GoogleApi.Games.V1.Model.QuestContribution.t`, *default:* `nil`) - The total number of times the associated event must be incremented for the player to complete this quest.
* `currentContribution` (*type:* `GoogleApi.Games.V1.Model.QuestContribution.t`, *default:* `nil`) - The number of increments the player has made toward the completion count event increments required to complete the quest. This value will not exceed the completion contribution.
There will be no currentContribution until the player has accepted the quest.
* `eventId` (*type:* `String.t`, *default:* `nil`) - The ID of the event the criterion corresponds to.
* `initialPlayerProgress` (*type:* `GoogleApi.Games.V1.Model.QuestContribution.t`, *default:* `nil`) - The value of the event associated with this quest at the time that the quest was accepted. This value may change if event increments that took place before the start of quest are uploaded after the quest starts.
There will be no initialPlayerProgress until the player has accepted the quest.
* `kind` (*type:* `String.t`, *default:* `games#questCriterion`) - Uniquely identifies the type of this resource. Value is always the fixed string games#questCriterion.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:completionContribution => GoogleApi.Games.V1.Model.QuestContribution.t(),
:currentContribution => GoogleApi.Games.V1.Model.QuestContribution.t(),
:eventId => String.t(),
:initialPlayerProgress => GoogleApi.Games.V1.Model.QuestContribution.t(),
:kind => String.t()
}
field(:completionContribution, as: GoogleApi.Games.V1.Model.QuestContribution)
field(:currentContribution, as: GoogleApi.Games.V1.Model.QuestContribution)
field(:eventId)
field(:initialPlayerProgress, as: GoogleApi.Games.V1.Model.QuestContribution)
field(:kind)
end
defimpl Poison.Decoder, for: GoogleApi.Games.V1.Model.QuestCriterion do
def decode(value, options) do
GoogleApi.Games.V1.Model.QuestCriterion.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Games.V1.Model.QuestCriterion do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end