/*
 * 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 filter that matches events of a single event name. If an event parameter is specified, only the
 * subset of events that match both the single event name and the parameter filter expressions match
 * this event filter.
 *
 * <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 GoogleAnalyticsAdminV1alphaAudienceEventFilter extends com.google.api.client.json.GenericJson {

  /**
   * Required. Immutable. The name of the event to match against.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String eventName;

  /**
   * Optional. If specified, this filter matches events that match both the single event name and
   * the parameter filter expressions. AudienceEventFilter inside the parameter filter expression
   * cannot be set (i.e., nested event filters are not supported). This should be a single and_group
   * of dimension_or_metric_filter or not_expression; ANDs of ORs are not supported. Also, if it
   * includes a filter for "eventCount", only that one will be considered; all the other filters
   * will be ignored.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleAnalyticsAdminV1alphaAudienceFilterExpression eventParameterFilterExpression;

  /**
   * Required. Immutable. The name of the event to match against.
   * @return value or {@code null} for none
   */
  public java.lang.String getEventName() {
    return eventName;
  }

  /**
   * Required. Immutable. The name of the event to match against.
   * @param eventName eventName or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceEventFilter setEventName(java.lang.String eventName) {
    this.eventName = eventName;
    return this;
  }

  /**
   * Optional. If specified, this filter matches events that match both the single event name and
   * the parameter filter expressions. AudienceEventFilter inside the parameter filter expression
   * cannot be set (i.e., nested event filters are not supported). This should be a single and_group
   * of dimension_or_metric_filter or not_expression; ANDs of ORs are not supported. Also, if it
   * includes a filter for "eventCount", only that one will be considered; all the other filters
   * will be ignored.
   * @return value or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceFilterExpression getEventParameterFilterExpression() {
    return eventParameterFilterExpression;
  }

  /**
   * Optional. If specified, this filter matches events that match both the single event name and
   * the parameter filter expressions. AudienceEventFilter inside the parameter filter expression
   * cannot be set (i.e., nested event filters are not supported). This should be a single and_group
   * of dimension_or_metric_filter or not_expression; ANDs of ORs are not supported. Also, if it
   * includes a filter for "eventCount", only that one will be considered; all the other filters
   * will be ignored.
   * @param eventParameterFilterExpression eventParameterFilterExpression or {@code null} for none
   */
  public GoogleAnalyticsAdminV1alphaAudienceEventFilter setEventParameterFilterExpression(GoogleAnalyticsAdminV1alphaAudienceFilterExpression eventParameterFilterExpression) {
    this.eventParameterFilterExpression = eventParameterFilterExpression;
    return this;
  }

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

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

}
