/*
 * Copyright 2020 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/analytics/data/v1alpha/data.proto

package com.google.analytics.data.v1alpha;

/**
 *
 *
 * <pre>
 * Expresses combinations of funnel filters.
 * </pre>
 *
 * Protobuf type {@code google.analytics.data.v1alpha.FunnelFilterExpression}
 */
public final class FunnelFilterExpression extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.FunnelFilterExpression)
    FunnelFilterExpressionOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use FunnelFilterExpression.newBuilder() to construct.
  private FunnelFilterExpression(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private FunnelFilterExpression() {}

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new FunnelFilterExpression();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  private FunnelFilterExpression(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10:
            {
              com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder subBuilder =
                  null;
              if (exprCase_ == 1) {
                subBuilder =
                    ((com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_)
                        .toBuilder();
              }
              expr_ =
                  input.readMessage(
                      com.google.analytics.data.v1alpha.FunnelFilterExpressionList.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_);
                expr_ = subBuilder.buildPartial();
              }
              exprCase_ = 1;
              break;
            }
          case 18:
            {
              com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder subBuilder =
                  null;
              if (exprCase_ == 2) {
                subBuilder =
                    ((com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_)
                        .toBuilder();
              }
              expr_ =
                  input.readMessage(
                      com.google.analytics.data.v1alpha.FunnelFilterExpressionList.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_);
                expr_ = subBuilder.buildPartial();
              }
              exprCase_ = 2;
              break;
            }
          case 26:
            {
              com.google.analytics.data.v1alpha.FunnelFilterExpression.Builder subBuilder = null;
              if (exprCase_ == 3) {
                subBuilder =
                    ((com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_).toBuilder();
              }
              expr_ =
                  input.readMessage(
                      com.google.analytics.data.v1alpha.FunnelFilterExpression.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_);
                expr_ = subBuilder.buildPartial();
              }
              exprCase_ = 3;
              break;
            }
          case 34:
            {
              com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder subBuilder = null;
              if (exprCase_ == 4) {
                subBuilder =
                    ((com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_).toBuilder();
              }
              expr_ =
                  input.readMessage(
                      com.google.analytics.data.v1alpha.FunnelFieldFilter.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_);
                expr_ = subBuilder.buildPartial();
              }
              exprCase_ = 4;
              break;
            }
          case 42:
            {
              com.google.analytics.data.v1alpha.FunnelEventFilter.Builder subBuilder = null;
              if (exprCase_ == 5) {
                subBuilder =
                    ((com.google.analytics.data.v1alpha.FunnelEventFilter) expr_).toBuilder();
              }
              expr_ =
                  input.readMessage(
                      com.google.analytics.data.v1alpha.FunnelEventFilter.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.google.analytics.data.v1alpha.FunnelEventFilter) expr_);
                expr_ = subBuilder.buildPartial();
              }
              exprCase_ = 5;
              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.analytics.data.v1alpha.ReportingApiProto
        .internal_static_google_analytics_data_v1alpha_FunnelFilterExpression_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.analytics.data.v1alpha.ReportingApiProto
        .internal_static_google_analytics_data_v1alpha_FunnelFilterExpression_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.analytics.data.v1alpha.FunnelFilterExpression.class,
            com.google.analytics.data.v1alpha.FunnelFilterExpression.Builder.class);
  }

  private int exprCase_ = 0;
  private java.lang.Object expr_;

  public enum ExprCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    AND_GROUP(1),
    OR_GROUP(2),
    NOT_EXPRESSION(3),
    FUNNEL_FIELD_FILTER(4),
    FUNNEL_EVENT_FILTER(5),
    EXPR_NOT_SET(0);
    private final int value;

    private ExprCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static ExprCase valueOf(int value) {
      return forNumber(value);
    }

    public static ExprCase forNumber(int value) {
      switch (value) {
        case 1:
          return AND_GROUP;
        case 2:
          return OR_GROUP;
        case 3:
          return NOT_EXPRESSION;
        case 4:
          return FUNNEL_FIELD_FILTER;
        case 5:
          return FUNNEL_EVENT_FILTER;
        case 0:
          return EXPR_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public ExprCase getExprCase() {
    return ExprCase.forNumber(exprCase_);
  }

  public static final int AND_GROUP_FIELD_NUMBER = 1;
  /**
   *
   *
   * <pre>
   * The FunnelFilterExpression in `andGroup` have an AND relationship.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
   *
   * @return Whether the andGroup field is set.
   */
  @java.lang.Override
  public boolean hasAndGroup() {
    return exprCase_ == 1;
  }
  /**
   *
   *
   * <pre>
   * The FunnelFilterExpression in `andGroup` have an AND relationship.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
   *
   * @return The andGroup.
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelFilterExpressionList getAndGroup() {
    if (exprCase_ == 1) {
      return (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * The FunnelFilterExpression in `andGroup` have an AND relationship.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder
      getAndGroupOrBuilder() {
    if (exprCase_ == 1) {
      return (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
  }

  public static final int OR_GROUP_FIELD_NUMBER = 2;
  /**
   *
   *
   * <pre>
   * The FunnelFilterExpression in `orGroup` have an OR relationship.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
   *
   * @return Whether the orGroup field is set.
   */
  @java.lang.Override
  public boolean hasOrGroup() {
    return exprCase_ == 2;
  }
  /**
   *
   *
   * <pre>
   * The FunnelFilterExpression in `orGroup` have an OR relationship.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
   *
   * @return The orGroup.
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelFilterExpressionList getOrGroup() {
    if (exprCase_ == 2) {
      return (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * The FunnelFilterExpression in `orGroup` have an OR relationship.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder
      getOrGroupOrBuilder() {
    if (exprCase_ == 2) {
      return (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
  }

  public static final int NOT_EXPRESSION_FIELD_NUMBER = 3;
  /**
   *
   *
   * <pre>
   * The FunnelFilterExpression is NOT of `notExpression`.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
   *
   * @return Whether the notExpression field is set.
   */
  @java.lang.Override
  public boolean hasNotExpression() {
    return exprCase_ == 3;
  }
  /**
   *
   *
   * <pre>
   * The FunnelFilterExpression is NOT of `notExpression`.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
   *
   * @return The notExpression.
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelFilterExpression getNotExpression() {
    if (exprCase_ == 3) {
      return (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * The FunnelFilterExpression is NOT of `notExpression`.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelFilterExpressionOrBuilder
      getNotExpressionOrBuilder() {
    if (exprCase_ == 3) {
      return (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance();
  }

  public static final int FUNNEL_FIELD_FILTER_FIELD_NUMBER = 4;
  /**
   *
   *
   * <pre>
   * A funnel filter for a dimension or metric.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
   *
   * @return Whether the funnelFieldFilter field is set.
   */
  @java.lang.Override
  public boolean hasFunnelFieldFilter() {
    return exprCase_ == 4;
  }
  /**
   *
   *
   * <pre>
   * A funnel filter for a dimension or metric.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
   *
   * @return The funnelFieldFilter.
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelFieldFilter getFunnelFieldFilter() {
    if (exprCase_ == 4) {
      return (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * A funnel filter for a dimension or metric.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder
      getFunnelFieldFilterOrBuilder() {
    if (exprCase_ == 4) {
      return (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance();
  }

  public static final int FUNNEL_EVENT_FILTER_FIELD_NUMBER = 5;
  /**
   *
   *
   * <pre>
   * Creates a filter that matches events of a single event name. If a
   * parameter filter expression is specified, only the subset of events that
   * match both the single event name and the parameter filter expressions
   * match this event filter.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
   *
   * @return Whether the funnelEventFilter field is set.
   */
  @java.lang.Override
  public boolean hasFunnelEventFilter() {
    return exprCase_ == 5;
  }
  /**
   *
   *
   * <pre>
   * Creates a filter that matches events of a single event name. If a
   * parameter filter expression is specified, only the subset of events that
   * match both the single event name and the parameter filter expressions
   * match this event filter.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
   *
   * @return The funnelEventFilter.
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelEventFilter getFunnelEventFilter() {
    if (exprCase_ == 5) {
      return (com.google.analytics.data.v1alpha.FunnelEventFilter) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelEventFilter.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Creates a filter that matches events of a single event name. If a
   * parameter filter expression is specified, only the subset of events that
   * match both the single event name and the parameter filter expressions
   * match this event filter.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelEventFilterOrBuilder
      getFunnelEventFilterOrBuilder() {
    if (exprCase_ == 5) {
      return (com.google.analytics.data.v1alpha.FunnelEventFilter) expr_;
    }
    return com.google.analytics.data.v1alpha.FunnelEventFilter.getDefaultInstance();
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (exprCase_ == 1) {
      output.writeMessage(1, (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_);
    }
    if (exprCase_ == 2) {
      output.writeMessage(2, (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_);
    }
    if (exprCase_ == 3) {
      output.writeMessage(3, (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_);
    }
    if (exprCase_ == 4) {
      output.writeMessage(4, (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_);
    }
    if (exprCase_ == 5) {
      output.writeMessage(5, (com.google.analytics.data.v1alpha.FunnelEventFilter) expr_);
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (exprCase_ == 1) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              1, (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_);
    }
    if (exprCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_);
    }
    if (exprCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_);
    }
    if (exprCase_ == 4) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              4, (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_);
    }
    if (exprCase_ == 5) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              5, (com.google.analytics.data.v1alpha.FunnelEventFilter) expr_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.analytics.data.v1alpha.FunnelFilterExpression)) {
      return super.equals(obj);
    }
    com.google.analytics.data.v1alpha.FunnelFilterExpression other =
        (com.google.analytics.data.v1alpha.FunnelFilterExpression) obj;

    if (!getExprCase().equals(other.getExprCase())) return false;
    switch (exprCase_) {
      case 1:
        if (!getAndGroup().equals(other.getAndGroup())) return false;
        break;
      case 2:
        if (!getOrGroup().equals(other.getOrGroup())) return false;
        break;
      case 3:
        if (!getNotExpression().equals(other.getNotExpression())) return false;
        break;
      case 4:
        if (!getFunnelFieldFilter().equals(other.getFunnelFieldFilter())) return false;
        break;
      case 5:
        if (!getFunnelEventFilter().equals(other.getFunnelEventFilter())) return false;
        break;
      case 0:
      default:
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    switch (exprCase_) {
      case 1:
        hash = (37 * hash) + AND_GROUP_FIELD_NUMBER;
        hash = (53 * hash) + getAndGroup().hashCode();
        break;
      case 2:
        hash = (37 * hash) + OR_GROUP_FIELD_NUMBER;
        hash = (53 * hash) + getOrGroup().hashCode();
        break;
      case 3:
        hash = (37 * hash) + NOT_EXPRESSION_FIELD_NUMBER;
        hash = (53 * hash) + getNotExpression().hashCode();
        break;
      case 4:
        hash = (37 * hash) + FUNNEL_FIELD_FILTER_FIELD_NUMBER;
        hash = (53 * hash) + getFunnelFieldFilter().hashCode();
        break;
      case 5:
        hash = (37 * hash) + FUNNEL_EVENT_FILTER_FIELD_NUMBER;
        hash = (53 * hash) + getFunnelEventFilter().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(
      com.google.analytics.data.v1alpha.FunnelFilterExpression prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * Expresses combinations of funnel filters.
   * </pre>
   *
   * Protobuf type {@code google.analytics.data.v1alpha.FunnelFilterExpression}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.FunnelFilterExpression)
      com.google.analytics.data.v1alpha.FunnelFilterExpressionOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.analytics.data.v1alpha.ReportingApiProto
          .internal_static_google_analytics_data_v1alpha_FunnelFilterExpression_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.analytics.data.v1alpha.ReportingApiProto
          .internal_static_google_analytics_data_v1alpha_FunnelFilterExpression_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.analytics.data.v1alpha.FunnelFilterExpression.class,
              com.google.analytics.data.v1alpha.FunnelFilterExpression.Builder.class);
    }

    // Construct using com.google.analytics.data.v1alpha.FunnelFilterExpression.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      exprCase_ = 0;
      expr_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.analytics.data.v1alpha.ReportingApiProto
          .internal_static_google_analytics_data_v1alpha_FunnelFilterExpression_descriptor;
    }

    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFilterExpression getDefaultInstanceForType() {
      return com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFilterExpression build() {
      com.google.analytics.data.v1alpha.FunnelFilterExpression result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFilterExpression buildPartial() {
      com.google.analytics.data.v1alpha.FunnelFilterExpression result =
          new com.google.analytics.data.v1alpha.FunnelFilterExpression(this);
      if (exprCase_ == 1) {
        if (andGroupBuilder_ == null) {
          result.expr_ = expr_;
        } else {
          result.expr_ = andGroupBuilder_.build();
        }
      }
      if (exprCase_ == 2) {
        if (orGroupBuilder_ == null) {
          result.expr_ = expr_;
        } else {
          result.expr_ = orGroupBuilder_.build();
        }
      }
      if (exprCase_ == 3) {
        if (notExpressionBuilder_ == null) {
          result.expr_ = expr_;
        } else {
          result.expr_ = notExpressionBuilder_.build();
        }
      }
      if (exprCase_ == 4) {
        if (funnelFieldFilterBuilder_ == null) {
          result.expr_ = expr_;
        } else {
          result.expr_ = funnelFieldFilterBuilder_.build();
        }
      }
      if (exprCase_ == 5) {
        if (funnelEventFilterBuilder_ == null) {
          result.expr_ = expr_;
        } else {
          result.expr_ = funnelEventFilterBuilder_.build();
        }
      }
      result.exprCase_ = exprCase_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.analytics.data.v1alpha.FunnelFilterExpression) {
        return mergeFrom((com.google.analytics.data.v1alpha.FunnelFilterExpression) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.analytics.data.v1alpha.FunnelFilterExpression other) {
      if (other == com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance())
        return this;
      switch (other.getExprCase()) {
        case AND_GROUP:
          {
            mergeAndGroup(other.getAndGroup());
            break;
          }
        case OR_GROUP:
          {
            mergeOrGroup(other.getOrGroup());
            break;
          }
        case NOT_EXPRESSION:
          {
            mergeNotExpression(other.getNotExpression());
            break;
          }
        case FUNNEL_FIELD_FILTER:
          {
            mergeFunnelFieldFilter(other.getFunnelFieldFilter());
            break;
          }
        case FUNNEL_EVENT_FILTER:
          {
            mergeFunnelEventFilter(other.getFunnelEventFilter());
            break;
          }
        case EXPR_NOT_SET:
          {
            break;
          }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.analytics.data.v1alpha.FunnelFilterExpression parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage =
            (com.google.analytics.data.v1alpha.FunnelFilterExpression) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int exprCase_ = 0;
    private java.lang.Object expr_;

    public ExprCase getExprCase() {
      return ExprCase.forNumber(exprCase_);
    }

    public Builder clearExpr() {
      exprCase_ = 0;
      expr_ = null;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelFilterExpressionList,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder>
        andGroupBuilder_;
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     *
     * @return Whether the andGroup field is set.
     */
    @java.lang.Override
    public boolean hasAndGroup() {
      return exprCase_ == 1;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     *
     * @return The andGroup.
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFilterExpressionList getAndGroup() {
      if (andGroupBuilder_ == null) {
        if (exprCase_ == 1) {
          return (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
      } else {
        if (exprCase_ == 1) {
          return andGroupBuilder_.getMessage();
        }
        return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     */
    public Builder setAndGroup(com.google.analytics.data.v1alpha.FunnelFilterExpressionList value) {
      if (andGroupBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        expr_ = value;
        onChanged();
      } else {
        andGroupBuilder_.setMessage(value);
      }
      exprCase_ = 1;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     */
    public Builder setAndGroup(
        com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder builderForValue) {
      if (andGroupBuilder_ == null) {
        expr_ = builderForValue.build();
        onChanged();
      } else {
        andGroupBuilder_.setMessage(builderForValue.build());
      }
      exprCase_ = 1;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     */
    public Builder mergeAndGroup(
        com.google.analytics.data.v1alpha.FunnelFilterExpressionList value) {
      if (andGroupBuilder_ == null) {
        if (exprCase_ == 1
            && expr_
                != com.google.analytics.data.v1alpha.FunnelFilterExpressionList
                    .getDefaultInstance()) {
          expr_ =
              com.google.analytics.data.v1alpha.FunnelFilterExpressionList.newBuilder(
                      (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          expr_ = value;
        }
        onChanged();
      } else {
        if (exprCase_ == 1) {
          andGroupBuilder_.mergeFrom(value);
        } else {
          andGroupBuilder_.setMessage(value);
        }
      }
      exprCase_ = 1;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     */
    public Builder clearAndGroup() {
      if (andGroupBuilder_ == null) {
        if (exprCase_ == 1) {
          exprCase_ = 0;
          expr_ = null;
          onChanged();
        }
      } else {
        if (exprCase_ == 1) {
          exprCase_ = 0;
          expr_ = null;
        }
        andGroupBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     */
    public com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder
        getAndGroupBuilder() {
      return getAndGroupFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder
        getAndGroupOrBuilder() {
      if ((exprCase_ == 1) && (andGroupBuilder_ != null)) {
        return andGroupBuilder_.getMessageOrBuilder();
      } else {
        if (exprCase_ == 1) {
          return (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `andGroup` have an AND relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList and_group = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelFilterExpressionList,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder>
        getAndGroupFieldBuilder() {
      if (andGroupBuilder_ == null) {
        if (!(exprCase_ == 1)) {
          expr_ = com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
        }
        andGroupBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.analytics.data.v1alpha.FunnelFilterExpressionList,
                com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder,
                com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder>(
                (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_,
                getParentForChildren(),
                isClean());
        expr_ = null;
      }
      exprCase_ = 1;
      onChanged();
      ;
      return andGroupBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelFilterExpressionList,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder>
        orGroupBuilder_;
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     *
     * @return Whether the orGroup field is set.
     */
    @java.lang.Override
    public boolean hasOrGroup() {
      return exprCase_ == 2;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     *
     * @return The orGroup.
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFilterExpressionList getOrGroup() {
      if (orGroupBuilder_ == null) {
        if (exprCase_ == 2) {
          return (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
      } else {
        if (exprCase_ == 2) {
          return orGroupBuilder_.getMessage();
        }
        return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     */
    public Builder setOrGroup(com.google.analytics.data.v1alpha.FunnelFilterExpressionList value) {
      if (orGroupBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        expr_ = value;
        onChanged();
      } else {
        orGroupBuilder_.setMessage(value);
      }
      exprCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     */
    public Builder setOrGroup(
        com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder builderForValue) {
      if (orGroupBuilder_ == null) {
        expr_ = builderForValue.build();
        onChanged();
      } else {
        orGroupBuilder_.setMessage(builderForValue.build());
      }
      exprCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     */
    public Builder mergeOrGroup(
        com.google.analytics.data.v1alpha.FunnelFilterExpressionList value) {
      if (orGroupBuilder_ == null) {
        if (exprCase_ == 2
            && expr_
                != com.google.analytics.data.v1alpha.FunnelFilterExpressionList
                    .getDefaultInstance()) {
          expr_ =
              com.google.analytics.data.v1alpha.FunnelFilterExpressionList.newBuilder(
                      (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          expr_ = value;
        }
        onChanged();
      } else {
        if (exprCase_ == 2) {
          orGroupBuilder_.mergeFrom(value);
        } else {
          orGroupBuilder_.setMessage(value);
        }
      }
      exprCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     */
    public Builder clearOrGroup() {
      if (orGroupBuilder_ == null) {
        if (exprCase_ == 2) {
          exprCase_ = 0;
          expr_ = null;
          onChanged();
        }
      } else {
        if (exprCase_ == 2) {
          exprCase_ = 0;
          expr_ = null;
        }
        orGroupBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     */
    public com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder
        getOrGroupBuilder() {
      return getOrGroupFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder
        getOrGroupOrBuilder() {
      if ((exprCase_ == 2) && (orGroupBuilder_ != null)) {
        return orGroupBuilder_.getMessageOrBuilder();
      } else {
        if (exprCase_ == 2) {
          return (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression in `orGroup` have an OR relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpressionList or_group = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelFilterExpressionList,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder>
        getOrGroupFieldBuilder() {
      if (orGroupBuilder_ == null) {
        if (!(exprCase_ == 2)) {
          expr_ = com.google.analytics.data.v1alpha.FunnelFilterExpressionList.getDefaultInstance();
        }
        orGroupBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.analytics.data.v1alpha.FunnelFilterExpressionList,
                com.google.analytics.data.v1alpha.FunnelFilterExpressionList.Builder,
                com.google.analytics.data.v1alpha.FunnelFilterExpressionListOrBuilder>(
                (com.google.analytics.data.v1alpha.FunnelFilterExpressionList) expr_,
                getParentForChildren(),
                isClean());
        expr_ = null;
      }
      exprCase_ = 2;
      onChanged();
      ;
      return orGroupBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelFilterExpression,
            com.google.analytics.data.v1alpha.FunnelFilterExpression.Builder,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionOrBuilder>
        notExpressionBuilder_;
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression is NOT of `notExpression`.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     *
     * @return Whether the notExpression field is set.
     */
    @java.lang.Override
    public boolean hasNotExpression() {
      return exprCase_ == 3;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression is NOT of `notExpression`.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     *
     * @return The notExpression.
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFilterExpression getNotExpression() {
      if (notExpressionBuilder_ == null) {
        if (exprCase_ == 3) {
          return (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance();
      } else {
        if (exprCase_ == 3) {
          return notExpressionBuilder_.getMessage();
        }
        return com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression is NOT of `notExpression`.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     */
    public Builder setNotExpression(
        com.google.analytics.data.v1alpha.FunnelFilterExpression value) {
      if (notExpressionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        expr_ = value;
        onChanged();
      } else {
        notExpressionBuilder_.setMessage(value);
      }
      exprCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression is NOT of `notExpression`.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     */
    public Builder setNotExpression(
        com.google.analytics.data.v1alpha.FunnelFilterExpression.Builder builderForValue) {
      if (notExpressionBuilder_ == null) {
        expr_ = builderForValue.build();
        onChanged();
      } else {
        notExpressionBuilder_.setMessage(builderForValue.build());
      }
      exprCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression is NOT of `notExpression`.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     */
    public Builder mergeNotExpression(
        com.google.analytics.data.v1alpha.FunnelFilterExpression value) {
      if (notExpressionBuilder_ == null) {
        if (exprCase_ == 3
            && expr_
                != com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance()) {
          expr_ =
              com.google.analytics.data.v1alpha.FunnelFilterExpression.newBuilder(
                      (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          expr_ = value;
        }
        onChanged();
      } else {
        if (exprCase_ == 3) {
          notExpressionBuilder_.mergeFrom(value);
        } else {
          notExpressionBuilder_.setMessage(value);
        }
      }
      exprCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression is NOT of `notExpression`.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     */
    public Builder clearNotExpression() {
      if (notExpressionBuilder_ == null) {
        if (exprCase_ == 3) {
          exprCase_ = 0;
          expr_ = null;
          onChanged();
        }
      } else {
        if (exprCase_ == 3) {
          exprCase_ = 0;
          expr_ = null;
        }
        notExpressionBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression is NOT of `notExpression`.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     */
    public com.google.analytics.data.v1alpha.FunnelFilterExpression.Builder
        getNotExpressionBuilder() {
      return getNotExpressionFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression is NOT of `notExpression`.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFilterExpressionOrBuilder
        getNotExpressionOrBuilder() {
      if ((exprCase_ == 3) && (notExpressionBuilder_ != null)) {
        return notExpressionBuilder_.getMessageOrBuilder();
      } else {
        if (exprCase_ == 3) {
          return (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * The FunnelFilterExpression is NOT of `notExpression`.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFilterExpression not_expression = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelFilterExpression,
            com.google.analytics.data.v1alpha.FunnelFilterExpression.Builder,
            com.google.analytics.data.v1alpha.FunnelFilterExpressionOrBuilder>
        getNotExpressionFieldBuilder() {
      if (notExpressionBuilder_ == null) {
        if (!(exprCase_ == 3)) {
          expr_ = com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance();
        }
        notExpressionBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.analytics.data.v1alpha.FunnelFilterExpression,
                com.google.analytics.data.v1alpha.FunnelFilterExpression.Builder,
                com.google.analytics.data.v1alpha.FunnelFilterExpressionOrBuilder>(
                (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_,
                getParentForChildren(),
                isClean());
        expr_ = null;
      }
      exprCase_ = 3;
      onChanged();
      ;
      return notExpressionBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelFieldFilter,
            com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder,
            com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder>
        funnelFieldFilterBuilder_;
    /**
     *
     *
     * <pre>
     * A funnel filter for a dimension or metric.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     *
     * @return Whether the funnelFieldFilter field is set.
     */
    @java.lang.Override
    public boolean hasFunnelFieldFilter() {
      return exprCase_ == 4;
    }
    /**
     *
     *
     * <pre>
     * A funnel filter for a dimension or metric.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     *
     * @return The funnelFieldFilter.
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFieldFilter getFunnelFieldFilter() {
      if (funnelFieldFilterBuilder_ == null) {
        if (exprCase_ == 4) {
          return (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance();
      } else {
        if (exprCase_ == 4) {
          return funnelFieldFilterBuilder_.getMessage();
        }
        return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * A funnel filter for a dimension or metric.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     */
    public Builder setFunnelFieldFilter(com.google.analytics.data.v1alpha.FunnelFieldFilter value) {
      if (funnelFieldFilterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        expr_ = value;
        onChanged();
      } else {
        funnelFieldFilterBuilder_.setMessage(value);
      }
      exprCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A funnel filter for a dimension or metric.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     */
    public Builder setFunnelFieldFilter(
        com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder builderForValue) {
      if (funnelFieldFilterBuilder_ == null) {
        expr_ = builderForValue.build();
        onChanged();
      } else {
        funnelFieldFilterBuilder_.setMessage(builderForValue.build());
      }
      exprCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A funnel filter for a dimension or metric.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     */
    public Builder mergeFunnelFieldFilter(
        com.google.analytics.data.v1alpha.FunnelFieldFilter value) {
      if (funnelFieldFilterBuilder_ == null) {
        if (exprCase_ == 4
            && expr_ != com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance()) {
          expr_ =
              com.google.analytics.data.v1alpha.FunnelFieldFilter.newBuilder(
                      (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          expr_ = value;
        }
        onChanged();
      } else {
        if (exprCase_ == 4) {
          funnelFieldFilterBuilder_.mergeFrom(value);
        } else {
          funnelFieldFilterBuilder_.setMessage(value);
        }
      }
      exprCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A funnel filter for a dimension or metric.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     */
    public Builder clearFunnelFieldFilter() {
      if (funnelFieldFilterBuilder_ == null) {
        if (exprCase_ == 4) {
          exprCase_ = 0;
          expr_ = null;
          onChanged();
        }
      } else {
        if (exprCase_ == 4) {
          exprCase_ = 0;
          expr_ = null;
        }
        funnelFieldFilterBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A funnel filter for a dimension or metric.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     */
    public com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder
        getFunnelFieldFilterBuilder() {
      return getFunnelFieldFilterFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * A funnel filter for a dimension or metric.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder
        getFunnelFieldFilterOrBuilder() {
      if ((exprCase_ == 4) && (funnelFieldFilterBuilder_ != null)) {
        return funnelFieldFilterBuilder_.getMessageOrBuilder();
      } else {
        if (exprCase_ == 4) {
          return (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * A funnel filter for a dimension or metric.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelFieldFilter,
            com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder,
            com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder>
        getFunnelFieldFilterFieldBuilder() {
      if (funnelFieldFilterBuilder_ == null) {
        if (!(exprCase_ == 4)) {
          expr_ = com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance();
        }
        funnelFieldFilterBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.analytics.data.v1alpha.FunnelFieldFilter,
                com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder,
                com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder>(
                (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_,
                getParentForChildren(),
                isClean());
        expr_ = null;
      }
      exprCase_ = 4;
      onChanged();
      ;
      return funnelFieldFilterBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelEventFilter,
            com.google.analytics.data.v1alpha.FunnelEventFilter.Builder,
            com.google.analytics.data.v1alpha.FunnelEventFilterOrBuilder>
        funnelEventFilterBuilder_;
    /**
     *
     *
     * <pre>
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     *
     * @return Whether the funnelEventFilter field is set.
     */
    @java.lang.Override
    public boolean hasFunnelEventFilter() {
      return exprCase_ == 5;
    }
    /**
     *
     *
     * <pre>
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     *
     * @return The funnelEventFilter.
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelEventFilter getFunnelEventFilter() {
      if (funnelEventFilterBuilder_ == null) {
        if (exprCase_ == 5) {
          return (com.google.analytics.data.v1alpha.FunnelEventFilter) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelEventFilter.getDefaultInstance();
      } else {
        if (exprCase_ == 5) {
          return funnelEventFilterBuilder_.getMessage();
        }
        return com.google.analytics.data.v1alpha.FunnelEventFilter.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     */
    public Builder setFunnelEventFilter(com.google.analytics.data.v1alpha.FunnelEventFilter value) {
      if (funnelEventFilterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        expr_ = value;
        onChanged();
      } else {
        funnelEventFilterBuilder_.setMessage(value);
      }
      exprCase_ = 5;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     */
    public Builder setFunnelEventFilter(
        com.google.analytics.data.v1alpha.FunnelEventFilter.Builder builderForValue) {
      if (funnelEventFilterBuilder_ == null) {
        expr_ = builderForValue.build();
        onChanged();
      } else {
        funnelEventFilterBuilder_.setMessage(builderForValue.build());
      }
      exprCase_ = 5;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     */
    public Builder mergeFunnelEventFilter(
        com.google.analytics.data.v1alpha.FunnelEventFilter value) {
      if (funnelEventFilterBuilder_ == null) {
        if (exprCase_ == 5
            && expr_ != com.google.analytics.data.v1alpha.FunnelEventFilter.getDefaultInstance()) {
          expr_ =
              com.google.analytics.data.v1alpha.FunnelEventFilter.newBuilder(
                      (com.google.analytics.data.v1alpha.FunnelEventFilter) expr_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          expr_ = value;
        }
        onChanged();
      } else {
        if (exprCase_ == 5) {
          funnelEventFilterBuilder_.mergeFrom(value);
        } else {
          funnelEventFilterBuilder_.setMessage(value);
        }
      }
      exprCase_ = 5;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     */
    public Builder clearFunnelEventFilter() {
      if (funnelEventFilterBuilder_ == null) {
        if (exprCase_ == 5) {
          exprCase_ = 0;
          expr_ = null;
          onChanged();
        }
      } else {
        if (exprCase_ == 5) {
          exprCase_ = 0;
          expr_ = null;
        }
        funnelEventFilterBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     */
    public com.google.analytics.data.v1alpha.FunnelEventFilter.Builder
        getFunnelEventFilterBuilder() {
      return getFunnelEventFilterFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.FunnelEventFilterOrBuilder
        getFunnelEventFilterOrBuilder() {
      if ((exprCase_ == 5) && (funnelEventFilterBuilder_ != null)) {
        return funnelEventFilterBuilder_.getMessageOrBuilder();
      } else {
        if (exprCase_ == 5) {
          return (com.google.analytics.data.v1alpha.FunnelEventFilter) expr_;
        }
        return com.google.analytics.data.v1alpha.FunnelEventFilter.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Creates a filter that matches events of a single event name. If a
     * parameter filter expression is specified, only the subset of events that
     * match both the single event name and the parameter filter expressions
     * match this event filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.FunnelEventFilter funnel_event_filter = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.FunnelEventFilter,
            com.google.analytics.data.v1alpha.FunnelEventFilter.Builder,
            com.google.analytics.data.v1alpha.FunnelEventFilterOrBuilder>
        getFunnelEventFilterFieldBuilder() {
      if (funnelEventFilterBuilder_ == null) {
        if (!(exprCase_ == 5)) {
          expr_ = com.google.analytics.data.v1alpha.FunnelEventFilter.getDefaultInstance();
        }
        funnelEventFilterBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.analytics.data.v1alpha.FunnelEventFilter,
                com.google.analytics.data.v1alpha.FunnelEventFilter.Builder,
                com.google.analytics.data.v1alpha.FunnelEventFilterOrBuilder>(
                (com.google.analytics.data.v1alpha.FunnelEventFilter) expr_,
                getParentForChildren(),
                isClean());
        expr_ = null;
      }
      exprCase_ = 5;
      onChanged();
      ;
      return funnelEventFilterBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.FunnelFilterExpression)
  }

  // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.FunnelFilterExpression)
  private static final com.google.analytics.data.v1alpha.FunnelFilterExpression DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.FunnelFilterExpression();
  }

  public static com.google.analytics.data.v1alpha.FunnelFilterExpression getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<FunnelFilterExpression> PARSER =
      new com.google.protobuf.AbstractParser<FunnelFilterExpression>() {
        @java.lang.Override
        public FunnelFilterExpression parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new FunnelFilterExpression(input, extensionRegistry);
        }
      };

  public static com.google.protobuf.Parser<FunnelFilterExpression> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<FunnelFilterExpression> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.analytics.data.v1alpha.FunnelFilterExpression getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
