# 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.MarketingPlatformAdmin.V1alpha.Model.AnalyticsAccountLink do
  @moduledoc """
  A resource message representing the link between a Google Analytics account and a Google Marketing Platform organization.

  ## Attributes

  *   `analyticsAccount` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. The resource name of the AnalyticsAdmin API account. The account ID will be used as the ID of this AnalyticsAccountLink resource, which will become the final component of the resource name. Format: analyticsadmin.googleapis.com/accounts/{account_id}
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. The human-readable name for the Analytics account.
  *   `linkVerificationState` (*type:* `String.t`, *default:* `nil`) - Output only. The verification state of the link between the Analytics account and the parent organization.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Resource name of this AnalyticsAccountLink. Note the resource ID is the same as the ID of the Analtyics account. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} Example: "organizations/xyz/analyticsAccountLinks/1234"
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :analyticsAccount => String.t() | nil,
          :displayName => String.t() | nil,
          :linkVerificationState => String.t() | nil,
          :name => String.t() | nil
        }

  field(:analyticsAccount)
  field(:displayName)
  field(:linkVerificationState)
  field(:name)
end

defimpl Poison.Decoder, for: GoogleApi.MarketingPlatformAdmin.V1alpha.Model.AnalyticsAccountLink do
  def decode(value, options) do
    GoogleApi.MarketingPlatformAdmin.V1alpha.Model.AnalyticsAccountLink.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.MarketingPlatformAdmin.V1alpha.Model.AnalyticsAccountLink do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
