lib/google_api/analytics_data/v1alpha/model/filter_expression.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.AnalyticsData.V1alpha.Model.FilterExpression do
  @moduledoc """
  To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics.

  ## Attributes

  *   `andGroup` (*type:* `GoogleApi.AnalyticsData.V1alpha.Model.FilterExpressionList.t`, *default:* `nil`) - The FilterExpressions in and_group have an AND relationship.
  *   `filter` (*type:* `GoogleApi.AnalyticsData.V1alpha.Model.Filter.t`, *default:* `nil`) - A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
  *   `notExpression` (*type:* `GoogleApi.AnalyticsData.V1alpha.Model.FilterExpression.t`, *default:* `nil`) - The FilterExpression is NOT of not_expression.
  *   `orGroup` (*type:* `GoogleApi.AnalyticsData.V1alpha.Model.FilterExpressionList.t`, *default:* `nil`) - The FilterExpressions in or_group have an OR relationship.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :andGroup => GoogleApi.AnalyticsData.V1alpha.Model.FilterExpressionList.t() | nil,
          :filter => GoogleApi.AnalyticsData.V1alpha.Model.Filter.t() | nil,
          :notExpression => GoogleApi.AnalyticsData.V1alpha.Model.FilterExpression.t() | nil,
          :orGroup => GoogleApi.AnalyticsData.V1alpha.Model.FilterExpressionList.t() | nil
        }

  field(:andGroup, as: GoogleApi.AnalyticsData.V1alpha.Model.FilterExpressionList)
  field(:filter, as: GoogleApi.AnalyticsData.V1alpha.Model.Filter)
  field(:notExpression, as: GoogleApi.AnalyticsData.V1alpha.Model.FilterExpression)
  field(:orGroup, as: GoogleApi.AnalyticsData.V1alpha.Model.FilterExpressionList)
end

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

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