lib/google_api/analytics_admin/v1alpha/model/google_analytics_admin_v1alpha_account_summary.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 file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AnalyticsAdmin.V1alpha.Model.GoogleAnalyticsAdminV1alphaAccountSummary do
  @moduledoc """
  A virtual resource representing an overview of an account and all its child GA4 properties.

  ## Attributes

  *   `account` (*type:* `String.t`, *default:* `nil`) - Resource name of account referred to by this account summary Format: accounts/{account_id} Example: "accounts/1000"
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Display name for the account referred to in this account summary.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Resource name for this account summary. Format: accountSummaries/{account_id} Example: "accountSummaries/1000"
  *   `propertySummaries` (*type:* `list(GoogleApi.AnalyticsAdmin.V1alpha.Model.GoogleAnalyticsAdminV1alphaPropertySummary.t)`, *default:* `nil`) - List of summaries for child accounts of this account.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :account => String.t() | nil,
          :displayName => String.t() | nil,
          :name => String.t() | nil,
          :propertySummaries =>
            list(
              GoogleApi.AnalyticsAdmin.V1alpha.Model.GoogleAnalyticsAdminV1alphaPropertySummary.t()
            )
            | nil
        }

  field(:account)
  field(:displayName)
  field(:name)

  field(:propertySummaries,
    as: GoogleApi.AnalyticsAdmin.V1alpha.Model.GoogleAnalyticsAdminV1alphaPropertySummary,
    type: :list
  )
end

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

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