# 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.GoogleAnalyticsAdminV1alphaExpandedDataSet do
  @moduledoc """
  A resource message representing an `ExpandedDataSet`.

  ## Attributes

  *   `dataCollectionStartTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when expanded data set began (or will begin) collecing data.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. The description of the ExpandedDataSet. Max 50 chars.
  *   `dimensionFilterExpression` (*type:* `GoogleApi.AnalyticsAdmin.V1alpha.Model.GoogleAnalyticsAdminV1alphaExpandedDataSetFilterExpression.t`, *default:* `nil`) - Immutable. A logical expression of ExpandedDataSet filters applied to dimension included in the ExpandedDataSet. This filter is used to reduce the number of rows and thus the chance of encountering `other` row.
  *   `dimensionNames` (*type:* `list(String.t)`, *default:* `nil`) - Immutable. The list of dimensions included in the ExpandedDataSet. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The display name of the ExpandedDataSet. Max 200 chars.
  *   `metricNames` (*type:* `list(String.t)`, *default:* `nil`) - Immutable. The list of metrics included in the ExpandedDataSet. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of dimension names.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name for this ExpandedDataSet resource. Format: properties/{property_id}/expandedDataSets/{expanded_data_set}
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dataCollectionStartTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :dimensionFilterExpression =>
            GoogleApi.AnalyticsAdmin.V1alpha.Model.GoogleAnalyticsAdminV1alphaExpandedDataSetFilterExpression.t()
            | nil,
          :dimensionNames => list(String.t()) | nil,
          :displayName => String.t() | nil,
          :metricNames => list(String.t()) | nil,
          :name => String.t() | nil
        }

  field(:dataCollectionStartTime, as: DateTime)
  field(:description)

  field(:dimensionFilterExpression,
    as:
      GoogleApi.AnalyticsAdmin.V1alpha.Model.GoogleAnalyticsAdminV1alphaExpandedDataSetFilterExpression
  )

  field(:dimensionNames, type: :list)
  field(:displayName)
  field(:metricNames, type: :list)
  field(:name)
end

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

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