/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.analyticsadmin.v1alpha.model;

/**
 * A logical expression of Audience dimension, metric, or event filters.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Analytics Admin API. For a detailed
 * explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleAnalyticsAdminV1alphaAudienceFilterExpression extends com.google.api.client.json.GenericJson {

  /**
   * A list of expressions to be AND’ed together. It can only contain AudienceFilterExpressions with
   * or_group. This must be set for the top level AudienceFilterExpression.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList andGroup;

  /**
   * A filter on a single dimension or metric. This cannot be set on the top level
   * AudienceFilterExpression.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter dimensionOrMetricFilter;

  /**
   * Creates a filter that matches a specific event. This cannot be set on the top level
   * AudienceFilterExpression.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAnalyticsAdminV1alphaAudienceEventFilter eventFilter;

  /**
   * A filter expression to be NOT'ed (For example, inverted, complemented). It can only include a
   * dimension_or_metric_filter. This cannot be set on the top level AudienceFilterExpression.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAnalyticsAdminV1alphaAudienceFilterExpression notExpression;

  /**
   * A list of expressions to OR’ed together. It cannot contain AudienceFilterExpressions with
   * and_group or or_group.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList orGroup;

  /**
   * A list of expressions to be AND’ed together. It can only contain AudienceFilterExpressions with
   * or_group. This must be set for the top level AudienceFilterExpression.
   * @return value or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList getAndGroup() {
    return andGroup;
  }

  /**
   * A list of expressions to be AND’ed together. It can only contain AudienceFilterExpressions with
   * or_group. This must be set for the top level AudienceFilterExpression.
   * @param andGroup andGroup or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpression setAndGroup(GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList andGroup) {
    this.andGroup = andGroup;
    return this;
  }

  /**
   * A filter on a single dimension or metric. This cannot be set on the top level
   * AudienceFilterExpression.
   * @return value or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter getDimensionOrMetricFilter() {
    return dimensionOrMetricFilter;
  }

  /**
   * A filter on a single dimension or metric. This cannot be set on the top level
   * AudienceFilterExpression.
   * @param dimensionOrMetricFilter dimensionOrMetricFilter or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpression setDimensionOrMetricFilter(GoogleAnalyticsAdminV1alphaAudienceDimensionOrMetricFilter dimensionOrMetricFilter) {
    this.dimensionOrMetricFilter = dimensionOrMetricFilter;
    return this;
  }

  /**
   * Creates a filter that matches a specific event. This cannot be set on the top level
   * AudienceFilterExpression.
   * @return value or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceEventFilter getEventFilter() {
    return eventFilter;
  }

  /**
   * Creates a filter that matches a specific event. This cannot be set on the top level
   * AudienceFilterExpression.
   * @param eventFilter eventFilter or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpression setEventFilter(GoogleAnalyticsAdminV1alphaAudienceEventFilter eventFilter) {
    this.eventFilter = eventFilter;
    return this;
  }

  /**
   * A filter expression to be NOT'ed (For example, inverted, complemented). It can only include a
   * dimension_or_metric_filter. This cannot be set on the top level AudienceFilterExpression.
   * @return value or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpression getNotExpression() {
    return notExpression;
  }

  /**
   * A filter expression to be NOT'ed (For example, inverted, complemented). It can only include a
   * dimension_or_metric_filter. This cannot be set on the top level AudienceFilterExpression.
   * @param notExpression notExpression or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpression setNotExpression(GoogleAnalyticsAdminV1alphaAudienceFilterExpression notExpression) {
    this.notExpression = notExpression;
    return this;
  }

  /**
   * A list of expressions to OR’ed together. It cannot contain AudienceFilterExpressions with
   * and_group or or_group.
   * @return value or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList getOrGroup() {
    return orGroup;
  }

  /**
   * A list of expressions to OR’ed together. It cannot contain AudienceFilterExpressions with
   * and_group or or_group.
   * @param orGroup orGroup or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpression setOrGroup(GoogleAnalyticsAdminV1alphaAudienceFilterExpressionList orGroup) {
    this.orGroup = orGroup;
    return this;
  }

  @Override
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpression set(String fieldName, Object value) {
    return (GoogleAnalyticsAdminV1alphaAudienceFilterExpression) super.set(fieldName, value);
  }

  @Override
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpression clone() {
    return (GoogleAnalyticsAdminV1alphaAudienceFilterExpression) super.clone();
  }

}
