/*
 * 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 segment filter on parameters.
 * </pre>
 *
 * Protobuf type {@code google.analytics.data.v1alpha.SegmentParameterFilterExpression}
 */
public final class SegmentParameterFilterExpression extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.SegmentParameterFilterExpression)
    SegmentParameterFilterExpressionOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use SegmentParameterFilterExpression.newBuilder() to construct.
  private SegmentParameterFilterExpression(
      com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private SegmentParameterFilterExpression() {}

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

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

  private SegmentParameterFilterExpression(
      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.SegmentParameterFilterExpressionList.Builder
                  subBuilder = null;
              if (exprCase_ == 1) {
                subBuilder =
                    ((com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_)
                        .toBuilder();
              }
              expr_ =
                  input.readMessage(
                      com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList
                          .parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_);
                expr_ = subBuilder.buildPartial();
              }
              exprCase_ = 1;
              break;
            }
          case 18:
            {
              com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.Builder
                  subBuilder = null;
              if (exprCase_ == 2) {
                subBuilder =
                    ((com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_)
                        .toBuilder();
              }
              expr_ =
                  input.readMessage(
                      com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList
                          .parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_);
                expr_ = subBuilder.buildPartial();
              }
              exprCase_ = 2;
              break;
            }
          case 26:
            {
              com.google.analytics.data.v1alpha.SegmentParameterFilterExpression.Builder
                  subBuilder = null;
              if (exprCase_ == 3) {
                subBuilder =
                    ((com.google.analytics.data.v1alpha.SegmentParameterFilterExpression) expr_)
                        .toBuilder();
              }
              expr_ =
                  input.readMessage(
                      com.google.analytics.data.v1alpha.SegmentParameterFilterExpression.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.analytics.data.v1alpha.SegmentParameterFilterExpression) expr_);
                expr_ = subBuilder.buildPartial();
              }
              exprCase_ = 3;
              break;
            }
          case 34:
            {
              com.google.analytics.data.v1alpha.SegmentParameterFilter.Builder subBuilder = null;
              if (exprCase_ == 4) {
                subBuilder =
                    ((com.google.analytics.data.v1alpha.SegmentParameterFilter) expr_).toBuilder();
              }
              expr_ =
                  input.readMessage(
                      com.google.analytics.data.v1alpha.SegmentParameterFilter.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.analytics.data.v1alpha.SegmentParameterFilter) expr_);
                expr_ = subBuilder.buildPartial();
              }
              exprCase_ = 4;
              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_SegmentParameterFilterExpression_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.analytics.data.v1alpha.ReportingApiProto
        .internal_static_google_analytics_data_v1alpha_SegmentParameterFilterExpression_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.analytics.data.v1alpha.SegmentParameterFilterExpression.class,
            com.google.analytics.data.v1alpha.SegmentParameterFilterExpression.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),
    SEGMENT_PARAMETER_FILTER(4),
    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 SEGMENT_PARAMETER_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 SegmentParameterFilterExpression in `andGroup` have an AND
   * relationship.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;</code>
   *
   * @return Whether the andGroup field is set.
   */
  @java.lang.Override
  public boolean hasAndGroup() {
    return exprCase_ == 1;
  }
  /**
   *
   *
   * <pre>
   * The SegmentParameterFilterExpression in `andGroup` have an AND
   * relationship.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;</code>
   *
   * @return The andGroup.
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList getAndGroup() {
    if (exprCase_ == 1) {
      return (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_;
    }
    return com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList
        .getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * The SegmentParameterFilterExpression in `andGroup` have an AND
   * relationship.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;</code>
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionListOrBuilder
      getAndGroupOrBuilder() {
    if (exprCase_ == 1) {
      return (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_;
    }
    return com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList
        .getDefaultInstance();
  }

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

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

  public static final int SEGMENT_PARAMETER_FILTER_FIELD_NUMBER = 4;
  /**
   *
   *
   * <pre>
   * A primitive segment parameter filter.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
   * </code>
   *
   * @return Whether the segmentParameterFilter field is set.
   */
  @java.lang.Override
  public boolean hasSegmentParameterFilter() {
    return exprCase_ == 4;
  }
  /**
   *
   *
   * <pre>
   * A primitive segment parameter filter.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
   * </code>
   *
   * @return The segmentParameterFilter.
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.SegmentParameterFilter getSegmentParameterFilter() {
    if (exprCase_ == 4) {
      return (com.google.analytics.data.v1alpha.SegmentParameterFilter) expr_;
    }
    return com.google.analytics.data.v1alpha.SegmentParameterFilter.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * A primitive segment parameter filter.
   * </pre>
   *
   * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
   * </code>
   */
  @java.lang.Override
  public com.google.analytics.data.v1alpha.SegmentParameterFilterOrBuilder
      getSegmentParameterFilterOrBuilder() {
    if (exprCase_ == 4) {
      return (com.google.analytics.data.v1alpha.SegmentParameterFilter) expr_;
    }
    return com.google.analytics.data.v1alpha.SegmentParameterFilter.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.SegmentParameterFilterExpressionList) expr_);
    }
    if (exprCase_ == 2) {
      output.writeMessage(
          2, (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_);
    }
    if (exprCase_ == 3) {
      output.writeMessage(
          3, (com.google.analytics.data.v1alpha.SegmentParameterFilterExpression) expr_);
    }
    if (exprCase_ == 4) {
      output.writeMessage(4, (com.google.analytics.data.v1alpha.SegmentParameterFilter) 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.SegmentParameterFilterExpressionList) expr_);
    }
    if (exprCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_);
    }
    if (exprCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, (com.google.analytics.data.v1alpha.SegmentParameterFilterExpression) expr_);
    }
    if (exprCase_ == 4) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              4, (com.google.analytics.data.v1alpha.SegmentParameterFilter) 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.SegmentParameterFilterExpression)) {
      return super.equals(obj);
    }
    com.google.analytics.data.v1alpha.SegmentParameterFilterExpression other =
        (com.google.analytics.data.v1alpha.SegmentParameterFilterExpression) 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 (!getSegmentParameterFilter().equals(other.getSegmentParameterFilter())) 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) + SEGMENT_PARAMETER_FILTER_FIELD_NUMBER;
        hash = (53 * hash) + getSegmentParameterFilter().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.analytics.data.v1alpha.SegmentParameterFilterExpression 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.SegmentParameterFilterExpression parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.analytics.data.v1alpha.SegmentParameterFilterExpression 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.SegmentParameterFilterExpression parseFrom(
      byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.analytics.data.v1alpha.SegmentParameterFilterExpression 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.SegmentParameterFilterExpression parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.analytics.data.v1alpha.SegmentParameterFilterExpression 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.SegmentParameterFilterExpression
      parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.analytics.data.v1alpha.SegmentParameterFilterExpression
      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.SegmentParameterFilterExpression 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.SegmentParameterFilterExpression 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.SegmentParameterFilterExpression 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 segment filter on parameters.
   * </pre>
   *
   * Protobuf type {@code google.analytics.data.v1alpha.SegmentParameterFilterExpression}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.SegmentParameterFilterExpression)
      com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.analytics.data.v1alpha.ReportingApiProto
          .internal_static_google_analytics_data_v1alpha_SegmentParameterFilterExpression_descriptor;
    }

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

    // Construct using
    // com.google.analytics.data.v1alpha.SegmentParameterFilterExpression.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_SegmentParameterFilterExpression_descriptor;
    }

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

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

    @java.lang.Override
    public com.google.analytics.data.v1alpha.SegmentParameterFilterExpression buildPartial() {
      com.google.analytics.data.v1alpha.SegmentParameterFilterExpression result =
          new com.google.analytics.data.v1alpha.SegmentParameterFilterExpression(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 (segmentParameterFilterBuilder_ == null) {
          result.expr_ = expr_;
        } else {
          result.expr_ = segmentParameterFilterBuilder_.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.SegmentParameterFilterExpression) {
        return mergeFrom(
            (com.google.analytics.data.v1alpha.SegmentParameterFilterExpression) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(
        com.google.analytics.data.v1alpha.SegmentParameterFilterExpression other) {
      if (other
          == com.google.analytics.data.v1alpha.SegmentParameterFilterExpression
              .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 SEGMENT_PARAMETER_FILTER:
          {
            mergeSegmentParameterFilter(other.getSegmentParameterFilter());
            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.SegmentParameterFilterExpression parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage =
            (com.google.analytics.data.v1alpha.SegmentParameterFilterExpression)
                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.SegmentParameterFilterExpressionList,
            com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.Builder,
            com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionListOrBuilder>
        andGroupBuilder_;
    /**
     *
     *
     * <pre>
     * The SegmentParameterFilterExpression in `andGroup` have an AND
     * relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;
     * </code>
     *
     * @return Whether the andGroup field is set.
     */
    @java.lang.Override
    public boolean hasAndGroup() {
      return exprCase_ == 1;
    }
    /**
     *
     *
     * <pre>
     * The SegmentParameterFilterExpression in `andGroup` have an AND
     * relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;
     * </code>
     *
     * @return The andGroup.
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList getAndGroup() {
      if (andGroupBuilder_ == null) {
        if (exprCase_ == 1) {
          return (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_;
        }
        return com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList
            .getDefaultInstance();
      } else {
        if (exprCase_ == 1) {
          return andGroupBuilder_.getMessage();
        }
        return com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList
            .getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * The SegmentParameterFilterExpression in `andGroup` have an AND
     * relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;
     * </code>
     */
    public Builder setAndGroup(
        com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList value) {
      if (andGroupBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        expr_ = value;
        onChanged();
      } else {
        andGroupBuilder_.setMessage(value);
      }
      exprCase_ = 1;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The SegmentParameterFilterExpression in `andGroup` have an AND
     * relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;
     * </code>
     */
    public Builder setAndGroup(
        com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.Builder
            builderForValue) {
      if (andGroupBuilder_ == null) {
        expr_ = builderForValue.build();
        onChanged();
      } else {
        andGroupBuilder_.setMessage(builderForValue.build());
      }
      exprCase_ = 1;
      return this;
    }
    /**
     *
     *
     * <pre>
     * The SegmentParameterFilterExpression in `andGroup` have an AND
     * relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;
     * </code>
     */
    public Builder mergeAndGroup(
        com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList value) {
      if (andGroupBuilder_ == null) {
        if (exprCase_ == 1
            && expr_
                != com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList
                    .getDefaultInstance()) {
          expr_ =
              com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.newBuilder(
                      (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList)
                          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 SegmentParameterFilterExpression in `andGroup` have an AND
     * relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList 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 SegmentParameterFilterExpression in `andGroup` have an AND
     * relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;
     * </code>
     */
    public com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.Builder
        getAndGroupBuilder() {
      return getAndGroupFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The SegmentParameterFilterExpression in `andGroup` have an AND
     * relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;
     * </code>
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionListOrBuilder
        getAndGroupOrBuilder() {
      if ((exprCase_ == 1) && (andGroupBuilder_ != null)) {
        return andGroupBuilder_.getMessageOrBuilder();
      } else {
        if (exprCase_ == 1) {
          return (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_;
        }
        return com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList
            .getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * The SegmentParameterFilterExpression in `andGroup` have an AND
     * relationship.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList and_group = 1;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList,
            com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.Builder,
            com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionListOrBuilder>
        getAndGroupFieldBuilder() {
      if (andGroupBuilder_ == null) {
        if (!(exprCase_ == 1)) {
          expr_ =
              com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList
                  .getDefaultInstance();
        }
        andGroupBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList,
                com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList.Builder,
                com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionListOrBuilder>(
                (com.google.analytics.data.v1alpha.SegmentParameterFilterExpressionList) expr_,
                getParentForChildren(),
                isClean());
        expr_ = null;
      }
      exprCase_ = 1;
      onChanged();
      ;
      return andGroupBuilder_;
    }

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

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

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.SegmentParameterFilter,
            com.google.analytics.data.v1alpha.SegmentParameterFilter.Builder,
            com.google.analytics.data.v1alpha.SegmentParameterFilterOrBuilder>
        segmentParameterFilterBuilder_;
    /**
     *
     *
     * <pre>
     * A primitive segment parameter filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
     * </code>
     *
     * @return Whether the segmentParameterFilter field is set.
     */
    @java.lang.Override
    public boolean hasSegmentParameterFilter() {
      return exprCase_ == 4;
    }
    /**
     *
     *
     * <pre>
     * A primitive segment parameter filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
     * </code>
     *
     * @return The segmentParameterFilter.
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.SegmentParameterFilter getSegmentParameterFilter() {
      if (segmentParameterFilterBuilder_ == null) {
        if (exprCase_ == 4) {
          return (com.google.analytics.data.v1alpha.SegmentParameterFilter) expr_;
        }
        return com.google.analytics.data.v1alpha.SegmentParameterFilter.getDefaultInstance();
      } else {
        if (exprCase_ == 4) {
          return segmentParameterFilterBuilder_.getMessage();
        }
        return com.google.analytics.data.v1alpha.SegmentParameterFilter.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * A primitive segment parameter filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
     * </code>
     */
    public Builder setSegmentParameterFilter(
        com.google.analytics.data.v1alpha.SegmentParameterFilter value) {
      if (segmentParameterFilterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        expr_ = value;
        onChanged();
      } else {
        segmentParameterFilterBuilder_.setMessage(value);
      }
      exprCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A primitive segment parameter filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
     * </code>
     */
    public Builder setSegmentParameterFilter(
        com.google.analytics.data.v1alpha.SegmentParameterFilter.Builder builderForValue) {
      if (segmentParameterFilterBuilder_ == null) {
        expr_ = builderForValue.build();
        onChanged();
      } else {
        segmentParameterFilterBuilder_.setMessage(builderForValue.build());
      }
      exprCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A primitive segment parameter filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
     * </code>
     */
    public Builder mergeSegmentParameterFilter(
        com.google.analytics.data.v1alpha.SegmentParameterFilter value) {
      if (segmentParameterFilterBuilder_ == null) {
        if (exprCase_ == 4
            && expr_
                != com.google.analytics.data.v1alpha.SegmentParameterFilter.getDefaultInstance()) {
          expr_ =
              com.google.analytics.data.v1alpha.SegmentParameterFilter.newBuilder(
                      (com.google.analytics.data.v1alpha.SegmentParameterFilter) expr_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          expr_ = value;
        }
        onChanged();
      } else {
        if (exprCase_ == 4) {
          segmentParameterFilterBuilder_.mergeFrom(value);
        } else {
          segmentParameterFilterBuilder_.setMessage(value);
        }
      }
      exprCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * A primitive segment parameter filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
     * </code>
     */
    public Builder clearSegmentParameterFilter() {
      if (segmentParameterFilterBuilder_ == null) {
        if (exprCase_ == 4) {
          exprCase_ = 0;
          expr_ = null;
          onChanged();
        }
      } else {
        if (exprCase_ == 4) {
          exprCase_ = 0;
          expr_ = null;
        }
        segmentParameterFilterBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * A primitive segment parameter filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
     * </code>
     */
    public com.google.analytics.data.v1alpha.SegmentParameterFilter.Builder
        getSegmentParameterFilterBuilder() {
      return getSegmentParameterFilterFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * A primitive segment parameter filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
     * </code>
     */
    @java.lang.Override
    public com.google.analytics.data.v1alpha.SegmentParameterFilterOrBuilder
        getSegmentParameterFilterOrBuilder() {
      if ((exprCase_ == 4) && (segmentParameterFilterBuilder_ != null)) {
        return segmentParameterFilterBuilder_.getMessageOrBuilder();
      } else {
        if (exprCase_ == 4) {
          return (com.google.analytics.data.v1alpha.SegmentParameterFilter) expr_;
        }
        return com.google.analytics.data.v1alpha.SegmentParameterFilter.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * A primitive segment parameter filter.
     * </pre>
     *
     * <code>.google.analytics.data.v1alpha.SegmentParameterFilter segment_parameter_filter = 4;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.analytics.data.v1alpha.SegmentParameterFilter,
            com.google.analytics.data.v1alpha.SegmentParameterFilter.Builder,
            com.google.analytics.data.v1alpha.SegmentParameterFilterOrBuilder>
        getSegmentParameterFilterFieldBuilder() {
      if (segmentParameterFilterBuilder_ == null) {
        if (!(exprCase_ == 4)) {
          expr_ = com.google.analytics.data.v1alpha.SegmentParameterFilter.getDefaultInstance();
        }
        segmentParameterFilterBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.analytics.data.v1alpha.SegmentParameterFilter,
                com.google.analytics.data.v1alpha.SegmentParameterFilter.Builder,
                com.google.analytics.data.v1alpha.SegmentParameterFilterOrBuilder>(
                (com.google.analytics.data.v1alpha.SegmentParameterFilter) expr_,
                getParentForChildren(),
                isClean());
        expr_ = null;
      }
      exprCase_ = 4;
      onChanged();
      ;
      return segmentParameterFilterBuilder_;
    }

    @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.SegmentParameterFilterExpression)
  }

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

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

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

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

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

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

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