# 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 file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AnalyticsReporting.V4.Model.GoalData do
  @moduledoc """
  Represents all the details pertaining to a goal.

  ## Attributes

  *   `goalCompletionLocation` (*type:* `String.t`, *default:* `nil`) - URL of the page where this goal was completed.
  *   `goalCompletions` (*type:* `String.t`, *default:* `nil`) - Total number of goal completions in this activity.
  *   `goalIndex` (*type:* `integer()`, *default:* `nil`) - This identifies the goal as configured for the profile.
  *   `goalName` (*type:* `String.t`, *default:* `nil`) - Name of the goal.
  *   `goalPreviousStep1` (*type:* `String.t`, *default:* `nil`) - URL of the page one step prior to the goal completion.
  *   `goalPreviousStep2` (*type:* `String.t`, *default:* `nil`) - URL of the page two steps prior to the goal completion.
  *   `goalPreviousStep3` (*type:* `String.t`, *default:* `nil`) - URL of the page three steps prior to the goal completion.
  *   `goalValue` (*type:* `float()`, *default:* `nil`) - Value in this goal.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :goalCompletionLocation => String.t() | nil,
          :goalCompletions => String.t() | nil,
          :goalIndex => integer() | nil,
          :goalName => String.t() | nil,
          :goalPreviousStep1 => String.t() | nil,
          :goalPreviousStep2 => String.t() | nil,
          :goalPreviousStep3 => String.t() | nil,
          :goalValue => float() | nil
        }

  field(:goalCompletionLocation)
  field(:goalCompletions)
  field(:goalIndex)
  field(:goalName)
  field(:goalPreviousStep1)
  field(:goalPreviousStep2)
  field(:goalPreviousStep3)
  field(:goalValue)
end

defimpl Poison.Decoder, for: GoogleApi.AnalyticsReporting.V4.Model.GoalData do
  def decode(value, options) do
    GoogleApi.AnalyticsReporting.V4.Model.GoalData.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AnalyticsReporting.V4.Model.GoalData do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
