// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/bigtable/admin/v2/table.proto

package com.google.bigtable.admin.v2;

/**
 * <pre>
 * Rule for determining which cells to delete during garbage collection.
 * </pre>
 *
 * Protobuf type {@code google.bigtable.admin.v2.GcRule}
 */
public  final class GcRule extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GcRule)
    GcRuleOrBuilder {
private static final long serialVersionUID = 0L;
  // Use GcRule.newBuilder() to construct.
  private GcRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private GcRule() {
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private GcRule(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    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 8: {
            ruleCase_ = 1;
            rule_ = input.readInt32();
            break;
          }
          case 18: {
            com.google.protobuf.Duration.Builder subBuilder = null;
            if (ruleCase_ == 2) {
              subBuilder = ((com.google.protobuf.Duration) rule_).toBuilder();
            }
            rule_ =
                input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.protobuf.Duration) rule_);
              rule_ = subBuilder.buildPartial();
            }
            ruleCase_ = 2;
            break;
          }
          case 26: {
            com.google.bigtable.admin.v2.GcRule.Intersection.Builder subBuilder = null;
            if (ruleCase_ == 3) {
              subBuilder = ((com.google.bigtable.admin.v2.GcRule.Intersection) rule_).toBuilder();
            }
            rule_ =
                input.readMessage(com.google.bigtable.admin.v2.GcRule.Intersection.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.bigtable.admin.v2.GcRule.Intersection) rule_);
              rule_ = subBuilder.buildPartial();
            }
            ruleCase_ = 3;
            break;
          }
          case 34: {
            com.google.bigtable.admin.v2.GcRule.Union.Builder subBuilder = null;
            if (ruleCase_ == 4) {
              subBuilder = ((com.google.bigtable.admin.v2.GcRule.Union) rule_).toBuilder();
            }
            rule_ =
                input.readMessage(com.google.bigtable.admin.v2.GcRule.Union.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.bigtable.admin.v2.GcRule.Union) rule_);
              rule_ = subBuilder.buildPartial();
            }
            ruleCase_ = 4;
            break;
          }
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.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.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.bigtable.admin.v2.GcRule.class, com.google.bigtable.admin.v2.GcRule.Builder.class);
  }

  public interface IntersectionOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GcRule.Intersection)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    java.util.List<com.google.bigtable.admin.v2.GcRule> 
        getRulesList();
    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    com.google.bigtable.admin.v2.GcRule getRules(int index);
    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    int getRulesCount();
    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    java.util.List<? extends com.google.bigtable.admin.v2.GcRuleOrBuilder> 
        getRulesOrBuilderList();
    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(
        int index);
  }
  /**
   * <pre>
   * A GcRule which deletes cells matching all of the given rules.
   * </pre>
   *
   * Protobuf type {@code google.bigtable.admin.v2.GcRule.Intersection}
   */
  public  static final class Intersection extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GcRule.Intersection)
      IntersectionOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Intersection.newBuilder() to construct.
    private Intersection(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Intersection() {
      rules_ = java.util.Collections.emptyList();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Intersection(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      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: {
              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                rules_ = new java.util.ArrayList<com.google.bigtable.admin.v2.GcRule>();
                mutable_bitField0_ |= 0x00000001;
              }
              rules_.add(
                  input.readMessage(com.google.bigtable.admin.v2.GcRule.parser(), extensionRegistry));
              break;
            }
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
          rules_ = java.util.Collections.unmodifiableList(rules_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Intersection_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Intersection_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.bigtable.admin.v2.GcRule.Intersection.class, com.google.bigtable.admin.v2.GcRule.Intersection.Builder.class);
    }

    public static final int RULES_FIELD_NUMBER = 1;
    private java.util.List<com.google.bigtable.admin.v2.GcRule> rules_;
    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public java.util.List<com.google.bigtable.admin.v2.GcRule> getRulesList() {
      return rules_;
    }
    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public java.util.List<? extends com.google.bigtable.admin.v2.GcRuleOrBuilder> 
        getRulesOrBuilderList() {
      return rules_;
    }
    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public int getRulesCount() {
      return rules_.size();
    }
    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public com.google.bigtable.admin.v2.GcRule getRules(int index) {
      return rules_.get(index);
    }
    /**
     * <pre>
     * Only delete cells which would be deleted by every element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(
        int index) {
      return rules_.get(index);
    }

    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 {
      for (int i = 0; i < rules_.size(); i++) {
        output.writeMessage(1, rules_.get(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < rules_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, rules_.get(i));
      }
      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.bigtable.admin.v2.GcRule.Intersection)) {
        return super.equals(obj);
      }
      com.google.bigtable.admin.v2.GcRule.Intersection other = (com.google.bigtable.admin.v2.GcRule.Intersection) obj;

      boolean result = true;
      result = result && getRulesList()
          .equals(other.getRulesList());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (getRulesCount() > 0) {
        hash = (37 * hash) + RULES_FIELD_NUMBER;
        hash = (53 * hash) + getRulesList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.bigtable.admin.v2.GcRule.Intersection parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.GcRule.Intersection parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.bigtable.admin.v2.GcRule.Intersection parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.GcRule.Intersection 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.bigtable.admin.v2.GcRule.Intersection parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.GcRule.Intersection parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.bigtable.admin.v2.GcRule.Intersection parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.GcRule.Intersection 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.bigtable.admin.v2.GcRule.Intersection parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.GcRule.Intersection 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.bigtable.admin.v2.GcRule.Intersection parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.GcRule.Intersection 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.bigtable.admin.v2.GcRule.Intersection 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>
     * A GcRule which deletes cells matching all of the given rules.
     * </pre>
     *
     * Protobuf type {@code google.bigtable.admin.v2.GcRule.Intersection}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.GcRule.Intersection)
        com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Intersection_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Intersection_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.bigtable.admin.v2.GcRule.Intersection.class, com.google.bigtable.admin.v2.GcRule.Intersection.Builder.class);
      }

      // Construct using com.google.bigtable.admin.v2.GcRule.Intersection.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getRulesFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (rulesBuilder_ == null) {
          rules_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          rulesBuilder_.clear();
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Intersection_descriptor;
      }

      @java.lang.Override
      public com.google.bigtable.admin.v2.GcRule.Intersection getDefaultInstanceForType() {
        return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.bigtable.admin.v2.GcRule.Intersection build() {
        com.google.bigtable.admin.v2.GcRule.Intersection result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.bigtable.admin.v2.GcRule.Intersection buildPartial() {
        com.google.bigtable.admin.v2.GcRule.Intersection result = new com.google.bigtable.admin.v2.GcRule.Intersection(this);
        int from_bitField0_ = bitField0_;
        if (rulesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001)) {
            rules_ = java.util.Collections.unmodifiableList(rules_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.rules_ = rules_;
        } else {
          result.rules_ = rulesBuilder_.build();
        }
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return (Builder) super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.bigtable.admin.v2.GcRule.Intersection) {
          return mergeFrom((com.google.bigtable.admin.v2.GcRule.Intersection)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.bigtable.admin.v2.GcRule.Intersection other) {
        if (other == com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance()) return this;
        if (rulesBuilder_ == null) {
          if (!other.rules_.isEmpty()) {
            if (rules_.isEmpty()) {
              rules_ = other.rules_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureRulesIsMutable();
              rules_.addAll(other.rules_);
            }
            onChanged();
          }
        } else {
          if (!other.rules_.isEmpty()) {
            if (rulesBuilder_.isEmpty()) {
              rulesBuilder_.dispose();
              rulesBuilder_ = null;
              rules_ = other.rules_;
              bitField0_ = (bitField0_ & ~0x00000001);
              rulesBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getRulesFieldBuilder() : null;
            } else {
              rulesBuilder_.addAllMessages(other.rules_);
            }
          }
        }
        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.bigtable.admin.v2.GcRule.Intersection parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.bigtable.admin.v2.GcRule.Intersection) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<com.google.bigtable.admin.v2.GcRule> rules_ =
        java.util.Collections.emptyList();
      private void ensureRulesIsMutable() {
        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
          rules_ = new java.util.ArrayList<com.google.bigtable.admin.v2.GcRule>(rules_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> rulesBuilder_;

      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public java.util.List<com.google.bigtable.admin.v2.GcRule> getRulesList() {
        if (rulesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(rules_);
        } else {
          return rulesBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public int getRulesCount() {
        if (rulesBuilder_ == null) {
          return rules_.size();
        } else {
          return rulesBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRule getRules(int index) {
        if (rulesBuilder_ == null) {
          return rules_.get(index);
        } else {
          return rulesBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder setRules(
          int index, com.google.bigtable.admin.v2.GcRule value) {
        if (rulesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRulesIsMutable();
          rules_.set(index, value);
          onChanged();
        } else {
          rulesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder setRules(
          int index, com.google.bigtable.admin.v2.GcRule.Builder builderForValue) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          rules_.set(index, builderForValue.build());
          onChanged();
        } else {
          rulesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addRules(com.google.bigtable.admin.v2.GcRule value) {
        if (rulesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRulesIsMutable();
          rules_.add(value);
          onChanged();
        } else {
          rulesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addRules(
          int index, com.google.bigtable.admin.v2.GcRule value) {
        if (rulesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRulesIsMutable();
          rules_.add(index, value);
          onChanged();
        } else {
          rulesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addRules(
          com.google.bigtable.admin.v2.GcRule.Builder builderForValue) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          rules_.add(builderForValue.build());
          onChanged();
        } else {
          rulesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addRules(
          int index, com.google.bigtable.admin.v2.GcRule.Builder builderForValue) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          rules_.add(index, builderForValue.build());
          onChanged();
        } else {
          rulesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addAllRules(
          java.lang.Iterable<? extends com.google.bigtable.admin.v2.GcRule> values) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, rules_);
          onChanged();
        } else {
          rulesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder clearRules() {
        if (rulesBuilder_ == null) {
          rules_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          rulesBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder removeRules(int index) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          rules_.remove(index);
          onChanged();
        } else {
          rulesBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRule.Builder getRulesBuilder(
          int index) {
        return getRulesFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(
          int index) {
        if (rulesBuilder_ == null) {
          return rules_.get(index);  } else {
          return rulesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public java.util.List<? extends com.google.bigtable.admin.v2.GcRuleOrBuilder> 
           getRulesOrBuilderList() {
        if (rulesBuilder_ != null) {
          return rulesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(rules_);
        }
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder() {
        return getRulesFieldBuilder().addBuilder(
            com.google.bigtable.admin.v2.GcRule.getDefaultInstance());
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder(
          int index) {
        return getRulesFieldBuilder().addBuilder(
            index, com.google.bigtable.admin.v2.GcRule.getDefaultInstance());
      }
      /**
       * <pre>
       * Only delete cells which would be deleted by every element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public java.util.List<com.google.bigtable.admin.v2.GcRule.Builder> 
           getRulesBuilderList() {
        return getRulesFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> 
          getRulesFieldBuilder() {
        if (rulesBuilder_ == null) {
          rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder>(
                  rules_,
                  ((bitField0_ & 0x00000001) == 0x00000001),
                  getParentForChildren(),
                  isClean());
          rules_ = null;
        }
        return rulesBuilder_;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.GcRule.Intersection)
    }

    // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GcRule.Intersection)
    private static final com.google.bigtable.admin.v2.GcRule.Intersection DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.GcRule.Intersection();
    }

    public static com.google.bigtable.admin.v2.GcRule.Intersection getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public com.google.bigtable.admin.v2.GcRule.Intersection getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface UnionOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GcRule.Union)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    java.util.List<com.google.bigtable.admin.v2.GcRule> 
        getRulesList();
    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    com.google.bigtable.admin.v2.GcRule getRules(int index);
    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    int getRulesCount();
    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    java.util.List<? extends com.google.bigtable.admin.v2.GcRuleOrBuilder> 
        getRulesOrBuilderList();
    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(
        int index);
  }
  /**
   * <pre>
   * A GcRule which deletes cells matching any of the given rules.
   * </pre>
   *
   * Protobuf type {@code google.bigtable.admin.v2.GcRule.Union}
   */
  public  static final class Union extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GcRule.Union)
      UnionOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Union.newBuilder() to construct.
    private Union(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Union() {
      rules_ = java.util.Collections.emptyList();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Union(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      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: {
              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                rules_ = new java.util.ArrayList<com.google.bigtable.admin.v2.GcRule>();
                mutable_bitField0_ |= 0x00000001;
              }
              rules_.add(
                  input.readMessage(com.google.bigtable.admin.v2.GcRule.parser(), extensionRegistry));
              break;
            }
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
          rules_ = java.util.Collections.unmodifiableList(rules_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Union_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Union_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.bigtable.admin.v2.GcRule.Union.class, com.google.bigtable.admin.v2.GcRule.Union.Builder.class);
    }

    public static final int RULES_FIELD_NUMBER = 1;
    private java.util.List<com.google.bigtable.admin.v2.GcRule> rules_;
    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public java.util.List<com.google.bigtable.admin.v2.GcRule> getRulesList() {
      return rules_;
    }
    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public java.util.List<? extends com.google.bigtable.admin.v2.GcRuleOrBuilder> 
        getRulesOrBuilderList() {
      return rules_;
    }
    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public int getRulesCount() {
      return rules_.size();
    }
    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public com.google.bigtable.admin.v2.GcRule getRules(int index) {
      return rules_.get(index);
    }
    /**
     * <pre>
     * Delete cells which would be deleted by any element of `rules`.
     * </pre>
     *
     * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
     */
    public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(
        int index) {
      return rules_.get(index);
    }

    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 {
      for (int i = 0; i < rules_.size(); i++) {
        output.writeMessage(1, rules_.get(i));
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < rules_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, rules_.get(i));
      }
      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.bigtable.admin.v2.GcRule.Union)) {
        return super.equals(obj);
      }
      com.google.bigtable.admin.v2.GcRule.Union other = (com.google.bigtable.admin.v2.GcRule.Union) obj;

      boolean result = true;
      result = result && getRulesList()
          .equals(other.getRulesList());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (getRulesCount() > 0) {
        hash = (37 * hash) + RULES_FIELD_NUMBER;
        hash = (53 * hash) + getRulesList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.bigtable.admin.v2.GcRule.Union parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.GcRule.Union parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.bigtable.admin.v2.GcRule.Union parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.GcRule.Union parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.bigtable.admin.v2.GcRule.Union parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union 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>
     * A GcRule which deletes cells matching any of the given rules.
     * </pre>
     *
     * Protobuf type {@code google.bigtable.admin.v2.GcRule.Union}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.GcRule.Union)
        com.google.bigtable.admin.v2.GcRule.UnionOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Union_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Union_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.bigtable.admin.v2.GcRule.Union.class, com.google.bigtable.admin.v2.GcRule.Union.Builder.class);
      }

      // Construct using com.google.bigtable.admin.v2.GcRule.Union.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getRulesFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (rulesBuilder_ == null) {
          rules_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          rulesBuilder_.clear();
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_Union_descriptor;
      }

      @java.lang.Override
      public com.google.bigtable.admin.v2.GcRule.Union getDefaultInstanceForType() {
        return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.bigtable.admin.v2.GcRule.Union build() {
        com.google.bigtable.admin.v2.GcRule.Union result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.bigtable.admin.v2.GcRule.Union buildPartial() {
        com.google.bigtable.admin.v2.GcRule.Union result = new com.google.bigtable.admin.v2.GcRule.Union(this);
        int from_bitField0_ = bitField0_;
        if (rulesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001)) {
            rules_ = java.util.Collections.unmodifiableList(rules_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.rules_ = rules_;
        } else {
          result.rules_ = rulesBuilder_.build();
        }
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return (Builder) super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.bigtable.admin.v2.GcRule.Union) {
          return mergeFrom((com.google.bigtable.admin.v2.GcRule.Union)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.bigtable.admin.v2.GcRule.Union other) {
        if (other == com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance()) return this;
        if (rulesBuilder_ == null) {
          if (!other.rules_.isEmpty()) {
            if (rules_.isEmpty()) {
              rules_ = other.rules_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureRulesIsMutable();
              rules_.addAll(other.rules_);
            }
            onChanged();
          }
        } else {
          if (!other.rules_.isEmpty()) {
            if (rulesBuilder_.isEmpty()) {
              rulesBuilder_.dispose();
              rulesBuilder_ = null;
              rules_ = other.rules_;
              bitField0_ = (bitField0_ & ~0x00000001);
              rulesBuilder_ = 
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getRulesFieldBuilder() : null;
            } else {
              rulesBuilder_.addAllMessages(other.rules_);
            }
          }
        }
        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.bigtable.admin.v2.GcRule.Union parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.bigtable.admin.v2.GcRule.Union) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private java.util.List<com.google.bigtable.admin.v2.GcRule> rules_ =
        java.util.Collections.emptyList();
      private void ensureRulesIsMutable() {
        if (!((bitField0_ & 0x00000001) == 0x00000001)) {
          rules_ = new java.util.ArrayList<com.google.bigtable.admin.v2.GcRule>(rules_);
          bitField0_ |= 0x00000001;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> rulesBuilder_;

      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public java.util.List<com.google.bigtable.admin.v2.GcRule> getRulesList() {
        if (rulesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(rules_);
        } else {
          return rulesBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public int getRulesCount() {
        if (rulesBuilder_ == null) {
          return rules_.size();
        } else {
          return rulesBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRule getRules(int index) {
        if (rulesBuilder_ == null) {
          return rules_.get(index);
        } else {
          return rulesBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder setRules(
          int index, com.google.bigtable.admin.v2.GcRule value) {
        if (rulesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRulesIsMutable();
          rules_.set(index, value);
          onChanged();
        } else {
          rulesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder setRules(
          int index, com.google.bigtable.admin.v2.GcRule.Builder builderForValue) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          rules_.set(index, builderForValue.build());
          onChanged();
        } else {
          rulesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addRules(com.google.bigtable.admin.v2.GcRule value) {
        if (rulesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRulesIsMutable();
          rules_.add(value);
          onChanged();
        } else {
          rulesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addRules(
          int index, com.google.bigtable.admin.v2.GcRule value) {
        if (rulesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureRulesIsMutable();
          rules_.add(index, value);
          onChanged();
        } else {
          rulesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addRules(
          com.google.bigtable.admin.v2.GcRule.Builder builderForValue) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          rules_.add(builderForValue.build());
          onChanged();
        } else {
          rulesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addRules(
          int index, com.google.bigtable.admin.v2.GcRule.Builder builderForValue) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          rules_.add(index, builderForValue.build());
          onChanged();
        } else {
          rulesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder addAllRules(
          java.lang.Iterable<? extends com.google.bigtable.admin.v2.GcRule> values) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, rules_);
          onChanged();
        } else {
          rulesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder clearRules() {
        if (rulesBuilder_ == null) {
          rules_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          rulesBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public Builder removeRules(int index) {
        if (rulesBuilder_ == null) {
          ensureRulesIsMutable();
          rules_.remove(index);
          onChanged();
        } else {
          rulesBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRule.Builder getRulesBuilder(
          int index) {
        return getRulesFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(
          int index) {
        if (rulesBuilder_ == null) {
          return rules_.get(index);  } else {
          return rulesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public java.util.List<? extends com.google.bigtable.admin.v2.GcRuleOrBuilder> 
           getRulesOrBuilderList() {
        if (rulesBuilder_ != null) {
          return rulesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(rules_);
        }
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder() {
        return getRulesFieldBuilder().addBuilder(
            com.google.bigtable.admin.v2.GcRule.getDefaultInstance());
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder(
          int index) {
        return getRulesFieldBuilder().addBuilder(
            index, com.google.bigtable.admin.v2.GcRule.getDefaultInstance());
      }
      /**
       * <pre>
       * Delete cells which would be deleted by any element of `rules`.
       * </pre>
       *
       * <code>repeated .google.bigtable.admin.v2.GcRule rules = 1;</code>
       */
      public java.util.List<com.google.bigtable.admin.v2.GcRule.Builder> 
           getRulesBuilderList() {
        return getRulesFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> 
          getRulesFieldBuilder() {
        if (rulesBuilder_ == null) {
          rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder>(
                  rules_,
                  ((bitField0_ & 0x00000001) == 0x00000001),
                  getParentForChildren(),
                  isClean());
          rules_ = null;
        }
        return rulesBuilder_;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.GcRule.Union)
    }

    // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GcRule.Union)
    private static final com.google.bigtable.admin.v2.GcRule.Union DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.GcRule.Union();
    }

    public static com.google.bigtable.admin.v2.GcRule.Union getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public com.google.bigtable.admin.v2.GcRule.Union getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int ruleCase_ = 0;
  private java.lang.Object rule_;
  public enum RuleCase
      implements com.google.protobuf.Internal.EnumLite {
    MAX_NUM_VERSIONS(1),
    MAX_AGE(2),
    INTERSECTION(3),
    UNION(4),
    RULE_NOT_SET(0);
    private final int value;
    private RuleCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static RuleCase valueOf(int value) {
      return forNumber(value);
    }

    public static RuleCase forNumber(int value) {
      switch (value) {
        case 1: return MAX_NUM_VERSIONS;
        case 2: return MAX_AGE;
        case 3: return INTERSECTION;
        case 4: return UNION;
        case 0: return RULE_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public RuleCase
  getRuleCase() {
    return RuleCase.forNumber(
        ruleCase_);
  }

  public static final int MAX_NUM_VERSIONS_FIELD_NUMBER = 1;
  /**
   * <pre>
   * Delete all cells in a column except the most recent N.
   * </pre>
   *
   * <code>int32 max_num_versions = 1;</code>
   */
  public int getMaxNumVersions() {
    if (ruleCase_ == 1) {
      return (java.lang.Integer) rule_;
    }
    return 0;
  }

  public static final int MAX_AGE_FIELD_NUMBER = 2;
  /**
   * <pre>
   * Delete cells in a column older than the given age.
   * Values must be at least one millisecond, and will be truncated to
   * microsecond granularity.
   * </pre>
   *
   * <code>.google.protobuf.Duration max_age = 2;</code>
   */
  public boolean hasMaxAge() {
    return ruleCase_ == 2;
  }
  /**
   * <pre>
   * Delete cells in a column older than the given age.
   * Values must be at least one millisecond, and will be truncated to
   * microsecond granularity.
   * </pre>
   *
   * <code>.google.protobuf.Duration max_age = 2;</code>
   */
  public com.google.protobuf.Duration getMaxAge() {
    if (ruleCase_ == 2) {
       return (com.google.protobuf.Duration) rule_;
    }
    return com.google.protobuf.Duration.getDefaultInstance();
  }
  /**
   * <pre>
   * Delete cells in a column older than the given age.
   * Values must be at least one millisecond, and will be truncated to
   * microsecond granularity.
   * </pre>
   *
   * <code>.google.protobuf.Duration max_age = 2;</code>
   */
  public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() {
    if (ruleCase_ == 2) {
       return (com.google.protobuf.Duration) rule_;
    }
    return com.google.protobuf.Duration.getDefaultInstance();
  }

  public static final int INTERSECTION_FIELD_NUMBER = 3;
  /**
   * <pre>
   * Delete cells that would be deleted by every nested rule.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
   */
  public boolean hasIntersection() {
    return ruleCase_ == 3;
  }
  /**
   * <pre>
   * Delete cells that would be deleted by every nested rule.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
   */
  public com.google.bigtable.admin.v2.GcRule.Intersection getIntersection() {
    if (ruleCase_ == 3) {
       return (com.google.bigtable.admin.v2.GcRule.Intersection) rule_;
    }
    return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance();
  }
  /**
   * <pre>
   * Delete cells that would be deleted by every nested rule.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
   */
  public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersectionOrBuilder() {
    if (ruleCase_ == 3) {
       return (com.google.bigtable.admin.v2.GcRule.Intersection) rule_;
    }
    return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance();
  }

  public static final int UNION_FIELD_NUMBER = 4;
  /**
   * <pre>
   * Delete cells that would be deleted by any nested rule.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
   */
  public boolean hasUnion() {
    return ruleCase_ == 4;
  }
  /**
   * <pre>
   * Delete cells that would be deleted by any nested rule.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
   */
  public com.google.bigtable.admin.v2.GcRule.Union getUnion() {
    if (ruleCase_ == 4) {
       return (com.google.bigtable.admin.v2.GcRule.Union) rule_;
    }
    return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance();
  }
  /**
   * <pre>
   * Delete cells that would be deleted by any nested rule.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
   */
  public com.google.bigtable.admin.v2.GcRule.UnionOrBuilder getUnionOrBuilder() {
    if (ruleCase_ == 4) {
       return (com.google.bigtable.admin.v2.GcRule.Union) rule_;
    }
    return com.google.bigtable.admin.v2.GcRule.Union.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 (ruleCase_ == 1) {
      output.writeInt32(
          1, (int)((java.lang.Integer) rule_));
    }
    if (ruleCase_ == 2) {
      output.writeMessage(2, (com.google.protobuf.Duration) rule_);
    }
    if (ruleCase_ == 3) {
      output.writeMessage(3, (com.google.bigtable.admin.v2.GcRule.Intersection) rule_);
    }
    if (ruleCase_ == 4) {
      output.writeMessage(4, (com.google.bigtable.admin.v2.GcRule.Union) rule_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (ruleCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(
            1, (int)((java.lang.Integer) rule_));
    }
    if (ruleCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (com.google.protobuf.Duration) rule_);
    }
    if (ruleCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (com.google.bigtable.admin.v2.GcRule.Intersection) rule_);
    }
    if (ruleCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, (com.google.bigtable.admin.v2.GcRule.Union) rule_);
    }
    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.bigtable.admin.v2.GcRule)) {
      return super.equals(obj);
    }
    com.google.bigtable.admin.v2.GcRule other = (com.google.bigtable.admin.v2.GcRule) obj;

    boolean result = true;
    result = result && getRuleCase().equals(
        other.getRuleCase());
    if (!result) return false;
    switch (ruleCase_) {
      case 1:
        result = result && (getMaxNumVersions()
            == other.getMaxNumVersions());
        break;
      case 2:
        result = result && getMaxAge()
            .equals(other.getMaxAge());
        break;
      case 3:
        result = result && getIntersection()
            .equals(other.getIntersection());
        break;
      case 4:
        result = result && getUnion()
            .equals(other.getUnion());
        break;
      case 0:
      default:
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    switch (ruleCase_) {
      case 1:
        hash = (37 * hash) + MAX_NUM_VERSIONS_FIELD_NUMBER;
        hash = (53 * hash) + getMaxNumVersions();
        break;
      case 2:
        hash = (37 * hash) + MAX_AGE_FIELD_NUMBER;
        hash = (53 * hash) + getMaxAge().hashCode();
        break;
      case 3:
        hash = (37 * hash) + INTERSECTION_FIELD_NUMBER;
        hash = (53 * hash) + getIntersection().hashCode();
        break;
      case 4:
        hash = (37 * hash) + UNION_FIELD_NUMBER;
        hash = (53 * hash) + getUnion().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.bigtable.admin.v2.GcRule parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.bigtable.admin.v2.GcRule parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.bigtable.admin.v2.GcRule parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.bigtable.admin.v2.GcRule parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.bigtable.admin.v2.GcRule parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule 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>
   * Rule for determining which cells to delete during garbage collection.
   * </pre>
   *
   * Protobuf type {@code google.bigtable.admin.v2.GcRule}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.GcRule)
      com.google.bigtable.admin.v2.GcRuleOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.bigtable.admin.v2.GcRule.class, com.google.bigtable.admin.v2.GcRule.Builder.class);
    }

    // Construct using com.google.bigtable.admin.v2.GcRule.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();
      ruleCase_ = 0;
      rule_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_GcRule_descriptor;
    }

    @java.lang.Override
    public com.google.bigtable.admin.v2.GcRule getDefaultInstanceForType() {
      return com.google.bigtable.admin.v2.GcRule.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.bigtable.admin.v2.GcRule build() {
      com.google.bigtable.admin.v2.GcRule result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.bigtable.admin.v2.GcRule buildPartial() {
      com.google.bigtable.admin.v2.GcRule result = new com.google.bigtable.admin.v2.GcRule(this);
      if (ruleCase_ == 1) {
        result.rule_ = rule_;
      }
      if (ruleCase_ == 2) {
        if (maxAgeBuilder_ == null) {
          result.rule_ = rule_;
        } else {
          result.rule_ = maxAgeBuilder_.build();
        }
      }
      if (ruleCase_ == 3) {
        if (intersectionBuilder_ == null) {
          result.rule_ = rule_;
        } else {
          result.rule_ = intersectionBuilder_.build();
        }
      }
      if (ruleCase_ == 4) {
        if (unionBuilder_ == null) {
          result.rule_ = rule_;
        } else {
          result.rule_ = unionBuilder_.build();
        }
      }
      result.ruleCase_ = ruleCase_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return (Builder) super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.bigtable.admin.v2.GcRule) {
        return mergeFrom((com.google.bigtable.admin.v2.GcRule)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.bigtable.admin.v2.GcRule other) {
      if (other == com.google.bigtable.admin.v2.GcRule.getDefaultInstance()) return this;
      switch (other.getRuleCase()) {
        case MAX_NUM_VERSIONS: {
          setMaxNumVersions(other.getMaxNumVersions());
          break;
        }
        case MAX_AGE: {
          mergeMaxAge(other.getMaxAge());
          break;
        }
        case INTERSECTION: {
          mergeIntersection(other.getIntersection());
          break;
        }
        case UNION: {
          mergeUnion(other.getUnion());
          break;
        }
        case RULE_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.bigtable.admin.v2.GcRule parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.bigtable.admin.v2.GcRule) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int ruleCase_ = 0;
    private java.lang.Object rule_;
    public RuleCase
        getRuleCase() {
      return RuleCase.forNumber(
          ruleCase_);
    }

    public Builder clearRule() {
      ruleCase_ = 0;
      rule_ = null;
      onChanged();
      return this;
    }


    /**
     * <pre>
     * Delete all cells in a column except the most recent N.
     * </pre>
     *
     * <code>int32 max_num_versions = 1;</code>
     */
    public int getMaxNumVersions() {
      if (ruleCase_ == 1) {
        return (java.lang.Integer) rule_;
      }
      return 0;
    }
    /**
     * <pre>
     * Delete all cells in a column except the most recent N.
     * </pre>
     *
     * <code>int32 max_num_versions = 1;</code>
     */
    public Builder setMaxNumVersions(int value) {
      ruleCase_ = 1;
      rule_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Delete all cells in a column except the most recent N.
     * </pre>
     *
     * <code>int32 max_num_versions = 1;</code>
     */
    public Builder clearMaxNumVersions() {
      if (ruleCase_ == 1) {
        ruleCase_ = 0;
        rule_ = null;
        onChanged();
      }
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxAgeBuilder_;
    /**
     * <pre>
     * Delete cells in a column older than the given age.
     * Values must be at least one millisecond, and will be truncated to
     * microsecond granularity.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_age = 2;</code>
     */
    public boolean hasMaxAge() {
      return ruleCase_ == 2;
    }
    /**
     * <pre>
     * Delete cells in a column older than the given age.
     * Values must be at least one millisecond, and will be truncated to
     * microsecond granularity.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_age = 2;</code>
     */
    public com.google.protobuf.Duration getMaxAge() {
      if (maxAgeBuilder_ == null) {
        if (ruleCase_ == 2) {
          return (com.google.protobuf.Duration) rule_;
        }
        return com.google.protobuf.Duration.getDefaultInstance();
      } else {
        if (ruleCase_ == 2) {
          return maxAgeBuilder_.getMessage();
        }
        return com.google.protobuf.Duration.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Delete cells in a column older than the given age.
     * Values must be at least one millisecond, and will be truncated to
     * microsecond granularity.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_age = 2;</code>
     */
    public Builder setMaxAge(com.google.protobuf.Duration value) {
      if (maxAgeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        rule_ = value;
        onChanged();
      } else {
        maxAgeBuilder_.setMessage(value);
      }
      ruleCase_ = 2;
      return this;
    }
    /**
     * <pre>
     * Delete cells in a column older than the given age.
     * Values must be at least one millisecond, and will be truncated to
     * microsecond granularity.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_age = 2;</code>
     */
    public Builder setMaxAge(
        com.google.protobuf.Duration.Builder builderForValue) {
      if (maxAgeBuilder_ == null) {
        rule_ = builderForValue.build();
        onChanged();
      } else {
        maxAgeBuilder_.setMessage(builderForValue.build());
      }
      ruleCase_ = 2;
      return this;
    }
    /**
     * <pre>
     * Delete cells in a column older than the given age.
     * Values must be at least one millisecond, and will be truncated to
     * microsecond granularity.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_age = 2;</code>
     */
    public Builder mergeMaxAge(com.google.protobuf.Duration value) {
      if (maxAgeBuilder_ == null) {
        if (ruleCase_ == 2 &&
            rule_ != com.google.protobuf.Duration.getDefaultInstance()) {
          rule_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) rule_)
              .mergeFrom(value).buildPartial();
        } else {
          rule_ = value;
        }
        onChanged();
      } else {
        if (ruleCase_ == 2) {
          maxAgeBuilder_.mergeFrom(value);
        }
        maxAgeBuilder_.setMessage(value);
      }
      ruleCase_ = 2;
      return this;
    }
    /**
     * <pre>
     * Delete cells in a column older than the given age.
     * Values must be at least one millisecond, and will be truncated to
     * microsecond granularity.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_age = 2;</code>
     */
    public Builder clearMaxAge() {
      if (maxAgeBuilder_ == null) {
        if (ruleCase_ == 2) {
          ruleCase_ = 0;
          rule_ = null;
          onChanged();
        }
      } else {
        if (ruleCase_ == 2) {
          ruleCase_ = 0;
          rule_ = null;
        }
        maxAgeBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Delete cells in a column older than the given age.
     * Values must be at least one millisecond, and will be truncated to
     * microsecond granularity.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_age = 2;</code>
     */
    public com.google.protobuf.Duration.Builder getMaxAgeBuilder() {
      return getMaxAgeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Delete cells in a column older than the given age.
     * Values must be at least one millisecond, and will be truncated to
     * microsecond granularity.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_age = 2;</code>
     */
    public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() {
      if ((ruleCase_ == 2) && (maxAgeBuilder_ != null)) {
        return maxAgeBuilder_.getMessageOrBuilder();
      } else {
        if (ruleCase_ == 2) {
          return (com.google.protobuf.Duration) rule_;
        }
        return com.google.protobuf.Duration.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Delete cells in a column older than the given age.
     * Values must be at least one millisecond, and will be truncated to
     * microsecond granularity.
     * </pre>
     *
     * <code>.google.protobuf.Duration max_age = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> 
        getMaxAgeFieldBuilder() {
      if (maxAgeBuilder_ == null) {
        if (!(ruleCase_ == 2)) {
          rule_ = com.google.protobuf.Duration.getDefaultInstance();
        }
        maxAgeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
                (com.google.protobuf.Duration) rule_,
                getParentForChildren(),
                isClean());
        rule_ = null;
      }
      ruleCase_ = 2;
      onChanged();;
      return maxAgeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.GcRule.Intersection, com.google.bigtable.admin.v2.GcRule.Intersection.Builder, com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder> intersectionBuilder_;
    /**
     * <pre>
     * Delete cells that would be deleted by every nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
     */
    public boolean hasIntersection() {
      return ruleCase_ == 3;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by every nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
     */
    public com.google.bigtable.admin.v2.GcRule.Intersection getIntersection() {
      if (intersectionBuilder_ == null) {
        if (ruleCase_ == 3) {
          return (com.google.bigtable.admin.v2.GcRule.Intersection) rule_;
        }
        return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance();
      } else {
        if (ruleCase_ == 3) {
          return intersectionBuilder_.getMessage();
        }
        return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Delete cells that would be deleted by every nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
     */
    public Builder setIntersection(com.google.bigtable.admin.v2.GcRule.Intersection value) {
      if (intersectionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        rule_ = value;
        onChanged();
      } else {
        intersectionBuilder_.setMessage(value);
      }
      ruleCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by every nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
     */
    public Builder setIntersection(
        com.google.bigtable.admin.v2.GcRule.Intersection.Builder builderForValue) {
      if (intersectionBuilder_ == null) {
        rule_ = builderForValue.build();
        onChanged();
      } else {
        intersectionBuilder_.setMessage(builderForValue.build());
      }
      ruleCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by every nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
     */
    public Builder mergeIntersection(com.google.bigtable.admin.v2.GcRule.Intersection value) {
      if (intersectionBuilder_ == null) {
        if (ruleCase_ == 3 &&
            rule_ != com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance()) {
          rule_ = com.google.bigtable.admin.v2.GcRule.Intersection.newBuilder((com.google.bigtable.admin.v2.GcRule.Intersection) rule_)
              .mergeFrom(value).buildPartial();
        } else {
          rule_ = value;
        }
        onChanged();
      } else {
        if (ruleCase_ == 3) {
          intersectionBuilder_.mergeFrom(value);
        }
        intersectionBuilder_.setMessage(value);
      }
      ruleCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by every nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
     */
    public Builder clearIntersection() {
      if (intersectionBuilder_ == null) {
        if (ruleCase_ == 3) {
          ruleCase_ = 0;
          rule_ = null;
          onChanged();
        }
      } else {
        if (ruleCase_ == 3) {
          ruleCase_ = 0;
          rule_ = null;
        }
        intersectionBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by every nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
     */
    public com.google.bigtable.admin.v2.GcRule.Intersection.Builder getIntersectionBuilder() {
      return getIntersectionFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Delete cells that would be deleted by every nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
     */
    public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersectionOrBuilder() {
      if ((ruleCase_ == 3) && (intersectionBuilder_ != null)) {
        return intersectionBuilder_.getMessageOrBuilder();
      } else {
        if (ruleCase_ == 3) {
          return (com.google.bigtable.admin.v2.GcRule.Intersection) rule_;
        }
        return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Delete cells that would be deleted by every nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Intersection intersection = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.GcRule.Intersection, com.google.bigtable.admin.v2.GcRule.Intersection.Builder, com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder> 
        getIntersectionFieldBuilder() {
      if (intersectionBuilder_ == null) {
        if (!(ruleCase_ == 3)) {
          rule_ = com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance();
        }
        intersectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.bigtable.admin.v2.GcRule.Intersection, com.google.bigtable.admin.v2.GcRule.Intersection.Builder, com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder>(
                (com.google.bigtable.admin.v2.GcRule.Intersection) rule_,
                getParentForChildren(),
                isClean());
        rule_ = null;
      }
      ruleCase_ = 3;
      onChanged();;
      return intersectionBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.GcRule.Union, com.google.bigtable.admin.v2.GcRule.Union.Builder, com.google.bigtable.admin.v2.GcRule.UnionOrBuilder> unionBuilder_;
    /**
     * <pre>
     * Delete cells that would be deleted by any nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
     */
    public boolean hasUnion() {
      return ruleCase_ == 4;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by any nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
     */
    public com.google.bigtable.admin.v2.GcRule.Union getUnion() {
      if (unionBuilder_ == null) {
        if (ruleCase_ == 4) {
          return (com.google.bigtable.admin.v2.GcRule.Union) rule_;
        }
        return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance();
      } else {
        if (ruleCase_ == 4) {
          return unionBuilder_.getMessage();
        }
        return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Delete cells that would be deleted by any nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
     */
    public Builder setUnion(com.google.bigtable.admin.v2.GcRule.Union value) {
      if (unionBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        rule_ = value;
        onChanged();
      } else {
        unionBuilder_.setMessage(value);
      }
      ruleCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by any nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
     */
    public Builder setUnion(
        com.google.bigtable.admin.v2.GcRule.Union.Builder builderForValue) {
      if (unionBuilder_ == null) {
        rule_ = builderForValue.build();
        onChanged();
      } else {
        unionBuilder_.setMessage(builderForValue.build());
      }
      ruleCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by any nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
     */
    public Builder mergeUnion(com.google.bigtable.admin.v2.GcRule.Union value) {
      if (unionBuilder_ == null) {
        if (ruleCase_ == 4 &&
            rule_ != com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance()) {
          rule_ = com.google.bigtable.admin.v2.GcRule.Union.newBuilder((com.google.bigtable.admin.v2.GcRule.Union) rule_)
              .mergeFrom(value).buildPartial();
        } else {
          rule_ = value;
        }
        onChanged();
      } else {
        if (ruleCase_ == 4) {
          unionBuilder_.mergeFrom(value);
        }
        unionBuilder_.setMessage(value);
      }
      ruleCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by any nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
     */
    public Builder clearUnion() {
      if (unionBuilder_ == null) {
        if (ruleCase_ == 4) {
          ruleCase_ = 0;
          rule_ = null;
          onChanged();
        }
      } else {
        if (ruleCase_ == 4) {
          ruleCase_ = 0;
          rule_ = null;
        }
        unionBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Delete cells that would be deleted by any nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
     */
    public com.google.bigtable.admin.v2.GcRule.Union.Builder getUnionBuilder() {
      return getUnionFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Delete cells that would be deleted by any nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
     */
    public com.google.bigtable.admin.v2.GcRule.UnionOrBuilder getUnionOrBuilder() {
      if ((ruleCase_ == 4) && (unionBuilder_ != null)) {
        return unionBuilder_.getMessageOrBuilder();
      } else {
        if (ruleCase_ == 4) {
          return (com.google.bigtable.admin.v2.GcRule.Union) rule_;
        }
        return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Delete cells that would be deleted by any nested rule.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.GcRule.Union union = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.GcRule.Union, com.google.bigtable.admin.v2.GcRule.Union.Builder, com.google.bigtable.admin.v2.GcRule.UnionOrBuilder> 
        getUnionFieldBuilder() {
      if (unionBuilder_ == null) {
        if (!(ruleCase_ == 4)) {
          rule_ = com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance();
        }
        unionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.bigtable.admin.v2.GcRule.Union, com.google.bigtable.admin.v2.GcRule.Union.Builder, com.google.bigtable.admin.v2.GcRule.UnionOrBuilder>(
                (com.google.bigtable.admin.v2.GcRule.Union) rule_,
                getParentForChildren(),
                isClean());
        rule_ = null;
      }
      ruleCase_ = 4;
      onChanged();;
      return unionBuilder_;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.GcRule)
  }

  // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GcRule)
  private static final com.google.bigtable.admin.v2.GcRule DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.GcRule();
  }

  public static com.google.bigtable.admin.v2.GcRule getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.google.bigtable.admin.v2.GcRule getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

