ClientSideAccessBoundary.java

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: cloud/identity/unifiedauth/proto/client_side_access_boundary.proto
// Protobuf Java Version: 4.33.2

package com.google.auth.credentialaccessboundary.protobuf;

/**
 *
 *
 * <pre>
 * An access boundary defines the upper bound of what a principal may access. It
 * includes a list of client-side access boundary rules that each defines the
 * resource that may be allowed as well as permissions that may be used on those
 * resources.
 * </pre>
 *
 * Protobuf type {@code cloud.identity.unifiedauth.proto.ClientSideAccessBoundary}
 */
@com.google.protobuf.Generated
public final class ClientSideAccessBoundary extends com.google.protobuf.GeneratedMessage
    implements
    // @@protoc_insertion_point(message_implements:cloud.identity.unifiedauth.proto.ClientSideAccessBoundary)
    ClientSideAccessBoundaryOrBuilder {
  private static final long serialVersionUID = 0L;

  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
        /* major= */ 4,
        /* minor= */ 33,
        /* patch= */ 2,
        /* suffix= */ "",
        "ClientSideAccessBoundary");
  }

  // Use ClientSideAccessBoundary.newBuilder() to construct.
  private ClientSideAccessBoundary(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    super(builder);
  }

  private ClientSideAccessBoundary() {
    accessBoundaryRules_ = java.util.Collections.emptyList();
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryProto
        .internal_static_cloud_identity_unifiedauth_proto_ClientSideAccessBoundary_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryProto
        .internal_static_cloud_identity_unifiedauth_proto_ClientSideAccessBoundary_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary.class,
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary.Builder
                .class);
  }

  public static final int ACCESS_BOUNDARY_RULES_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private java.util.List<
          com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule>
      accessBoundaryRules_;

  /**
   *
   *
   * <pre>
   * A list of client-side access boundary rules which defines the upper bound
   * of the permission a principal may carry. If multiple rules are specified,
   * the effective access boundary is the union of all the access boundary rules
   * attached.
   * </pre>
   *
   * <code>
   * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
   * </code>
   */
  @java.lang.Override
  public java.util.List<
          com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule>
      getAccessBoundaryRulesList() {
    return accessBoundaryRules_;
  }

  /**
   *
   *
   * <pre>
   * A list of client-side access boundary rules which defines the upper bound
   * of the permission a principal may carry. If multiple rules are specified,
   * the effective access boundary is the union of all the access boundary rules
   * attached.
   * </pre>
   *
   * <code>
   * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
   * </code>
   */
  @java.lang.Override
  public java.util.List<
          ? extends
              com.google.auth.credentialaccessboundary.protobuf
                  .ClientSideAccessBoundaryRuleOrBuilder>
      getAccessBoundaryRulesOrBuilderList() {
    return accessBoundaryRules_;
  }

  /**
   *
   *
   * <pre>
   * A list of client-side access boundary rules which defines the upper bound
   * of the permission a principal may carry. If multiple rules are specified,
   * the effective access boundary is the union of all the access boundary rules
   * attached.
   * </pre>
   *
   * <code>
   * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
   * </code>
   */
  @java.lang.Override
  public int getAccessBoundaryRulesCount() {
    return accessBoundaryRules_.size();
  }

  /**
   *
   *
   * <pre>
   * A list of client-side access boundary rules which defines the upper bound
   * of the permission a principal may carry. If multiple rules are specified,
   * the effective access boundary is the union of all the access boundary rules
   * attached.
   * </pre>
   *
   * <code>
   * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
   * </code>
   */
  @java.lang.Override
  public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule
      getAccessBoundaryRules(int index) {
    return accessBoundaryRules_.get(index);
  }

  /**
   *
   *
   * <pre>
   * A list of client-side access boundary rules which defines the upper bound
   * of the permission a principal may carry. If multiple rules are specified,
   * the effective access boundary is the union of all the access boundary rules
   * attached.
   * </pre>
   *
   * <code>
   * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
   * </code>
   */
  @java.lang.Override
  public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRuleOrBuilder
      getAccessBoundaryRulesOrBuilder(int index) {
    return accessBoundaryRules_.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 < accessBoundaryRules_.size(); i++) {
      output.writeMessage(1, accessBoundaryRules_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    for (int i = 0; i < accessBoundaryRules_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(1, accessBoundaryRules_.get(i));
    }
    size += getUnknownFields().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.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary)) {
      return super.equals(obj);
    }
    com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary other =
        (com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary) obj;

    if (!getAccessBoundaryRulesList().equals(other.getAccessBoundaryRulesList())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getAccessBoundaryRulesCount() > 0) {
      hash = (37 * hash) + ACCESS_BOUNDARY_RULES_FIELD_NUMBER;
      hash = (53 * hash) + getAccessBoundaryRulesList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseFrom(java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseFrom(
          java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseFrom(com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseFrom(java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseFrom(
          java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseDelimitedFrom(
          java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.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.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary 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.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }

  /**
   *
   *
   * <pre>
   * An access boundary defines the upper bound of what a principal may access. It
   * includes a list of client-side access boundary rules that each defines the
   * resource that may be allowed as well as permissions that may be used on those
   * resources.
   * </pre>
   *
   * Protobuf type {@code cloud.identity.unifiedauth.proto.ClientSideAccessBoundary}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:cloud.identity.unifiedauth.proto.ClientSideAccessBoundary)
      com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryProto
          .internal_static_cloud_identity_unifiedauth_proto_ClientSideAccessBoundary_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryProto
          .internal_static_cloud_identity_unifiedauth_proto_ClientSideAccessBoundary_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary.class,
              com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary.Builder
                  .class);
    }

    // Construct using
    // com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (accessBoundaryRulesBuilder_ == null) {
        accessBoundaryRules_ = java.util.Collections.emptyList();
      } else {
        accessBoundaryRules_ = null;
        accessBoundaryRulesBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryProto
          .internal_static_cloud_identity_unifiedauth_proto_ClientSideAccessBoundary_descriptor;
    }

    @java.lang.Override
    public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
        getDefaultInstanceForType() {
      return com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
          .getDefaultInstance();
    }

    @java.lang.Override
    public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary build() {
      com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary result =
          buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
        buildPartial() {
      com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary result =
          new com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(
        com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary result) {
      if (accessBoundaryRulesBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          accessBoundaryRules_ = java.util.Collections.unmodifiableList(accessBoundaryRules_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.accessBoundaryRules_ = accessBoundaryRules_;
      } else {
        result.accessBoundaryRules_ = accessBoundaryRulesBuilder_.build();
      }
    }

    private void buildPartial0(
        com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary result) {
      int from_bitField0_ = bitField0_;
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other
          instanceof com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary) {
        return mergeFrom(
            (com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(
        com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary other) {
      if (other
          == com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
              .getDefaultInstance()) return this;
      if (accessBoundaryRulesBuilder_ == null) {
        if (!other.accessBoundaryRules_.isEmpty()) {
          if (accessBoundaryRules_.isEmpty()) {
            accessBoundaryRules_ = other.accessBoundaryRules_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureAccessBoundaryRulesIsMutable();
            accessBoundaryRules_.addAll(other.accessBoundaryRules_);
          }
          onChanged();
        }
      } else {
        if (!other.accessBoundaryRules_.isEmpty()) {
          if (accessBoundaryRulesBuilder_.isEmpty()) {
            accessBoundaryRulesBuilder_.dispose();
            accessBoundaryRulesBuilder_ = null;
            accessBoundaryRules_ = other.accessBoundaryRules_;
            bitField0_ = (bitField0_ & ~0x00000001);
            accessBoundaryRulesBuilder_ =
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders
                    ? internalGetAccessBoundaryRulesFieldBuilder()
                    : null;
          } else {
            accessBoundaryRulesBuilder_.addAllMessages(other.accessBoundaryRules_);
          }
        }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      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 {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule m =
                    input.readMessage(
                        com.google.auth.credentialaccessboundary.protobuf
                            .ClientSideAccessBoundaryRule.parser(),
                        extensionRegistry);
                if (accessBoundaryRulesBuilder_ == null) {
                  ensureAccessBoundaryRulesIsMutable();
                  accessBoundaryRules_.add(m);
                } else {
                  accessBoundaryRulesBuilder_.addMessage(m);
                }
                break;
              } // case 10
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.util.List<
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule>
        accessBoundaryRules_ = java.util.Collections.emptyList();

    private void ensureAccessBoundaryRulesIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        accessBoundaryRules_ =
            new java.util.ArrayList<
                com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule>(
                accessBoundaryRules_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilder<
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule,
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule.Builder,
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRuleOrBuilder>
        accessBoundaryRulesBuilder_;

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public java.util.List<
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule>
        getAccessBoundaryRulesList() {
      if (accessBoundaryRulesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(accessBoundaryRules_);
      } else {
        return accessBoundaryRulesBuilder_.getMessageList();
      }
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public int getAccessBoundaryRulesCount() {
      if (accessBoundaryRulesBuilder_ == null) {
        return accessBoundaryRules_.size();
      } else {
        return accessBoundaryRulesBuilder_.getCount();
      }
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule
        getAccessBoundaryRules(int index) {
      if (accessBoundaryRulesBuilder_ == null) {
        return accessBoundaryRules_.get(index);
      } else {
        return accessBoundaryRulesBuilder_.getMessage(index);
      }
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public Builder setAccessBoundaryRules(
        int index,
        com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule value) {
      if (accessBoundaryRulesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAccessBoundaryRulesIsMutable();
        accessBoundaryRules_.set(index, value);
        onChanged();
      } else {
        accessBoundaryRulesBuilder_.setMessage(index, value);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public Builder setAccessBoundaryRules(
        int index,
        com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule.Builder
            builderForValue) {
      if (accessBoundaryRulesBuilder_ == null) {
        ensureAccessBoundaryRulesIsMutable();
        accessBoundaryRules_.set(index, builderForValue.build());
        onChanged();
      } else {
        accessBoundaryRulesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public Builder addAccessBoundaryRules(
        com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule value) {
      if (accessBoundaryRulesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAccessBoundaryRulesIsMutable();
        accessBoundaryRules_.add(value);
        onChanged();
      } else {
        accessBoundaryRulesBuilder_.addMessage(value);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public Builder addAccessBoundaryRules(
        int index,
        com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule value) {
      if (accessBoundaryRulesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAccessBoundaryRulesIsMutable();
        accessBoundaryRules_.add(index, value);
        onChanged();
      } else {
        accessBoundaryRulesBuilder_.addMessage(index, value);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public Builder addAccessBoundaryRules(
        com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule.Builder
            builderForValue) {
      if (accessBoundaryRulesBuilder_ == null) {
        ensureAccessBoundaryRulesIsMutable();
        accessBoundaryRules_.add(builderForValue.build());
        onChanged();
      } else {
        accessBoundaryRulesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public Builder addAccessBoundaryRules(
        int index,
        com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule.Builder
            builderForValue) {
      if (accessBoundaryRulesBuilder_ == null) {
        ensureAccessBoundaryRulesIsMutable();
        accessBoundaryRules_.add(index, builderForValue.build());
        onChanged();
      } else {
        accessBoundaryRulesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public Builder addAllAccessBoundaryRules(
        java.lang.Iterable<
                ? extends
                    com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule>
            values) {
      if (accessBoundaryRulesBuilder_ == null) {
        ensureAccessBoundaryRulesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accessBoundaryRules_);
        onChanged();
      } else {
        accessBoundaryRulesBuilder_.addAllMessages(values);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public Builder clearAccessBoundaryRules() {
      if (accessBoundaryRulesBuilder_ == null) {
        accessBoundaryRules_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        accessBoundaryRulesBuilder_.clear();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public Builder removeAccessBoundaryRules(int index) {
      if (accessBoundaryRulesBuilder_ == null) {
        ensureAccessBoundaryRulesIsMutable();
        accessBoundaryRules_.remove(index);
        onChanged();
      } else {
        accessBoundaryRulesBuilder_.remove(index);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule.Builder
        getAccessBoundaryRulesBuilder(int index) {
      return internalGetAccessBoundaryRulesFieldBuilder().getBuilder(index);
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRuleOrBuilder
        getAccessBoundaryRulesOrBuilder(int index) {
      if (accessBoundaryRulesBuilder_ == null) {
        return accessBoundaryRules_.get(index);
      } else {
        return accessBoundaryRulesBuilder_.getMessageOrBuilder(index);
      }
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public java.util.List<
            ? extends
                com.google.auth.credentialaccessboundary.protobuf
                    .ClientSideAccessBoundaryRuleOrBuilder>
        getAccessBoundaryRulesOrBuilderList() {
      if (accessBoundaryRulesBuilder_ != null) {
        return accessBoundaryRulesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(accessBoundaryRules_);
      }
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule.Builder
        addAccessBoundaryRulesBuilder() {
      return internalGetAccessBoundaryRulesFieldBuilder()
          .addBuilder(
              com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule
                  .getDefaultInstance());
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule.Builder
        addAccessBoundaryRulesBuilder(int index) {
      return internalGetAccessBoundaryRulesFieldBuilder()
          .addBuilder(
              index,
              com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule
                  .getDefaultInstance());
    }

    /**
     *
     *
     * <pre>
     * A list of client-side access boundary rules which defines the upper bound
     * of the permission a principal may carry. If multiple rules are specified,
     * the effective access boundary is the union of all the access boundary rules
     * attached.
     * </pre>
     *
     * <code>
     * repeated .cloud.identity.unifiedauth.proto.ClientSideAccessBoundaryRule access_boundary_rules = 1;
     * </code>
     */
    public java.util.List<
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule.Builder>
        getAccessBoundaryRulesBuilderList() {
      return internalGetAccessBoundaryRulesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilder<
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule,
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule.Builder,
            com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRuleOrBuilder>
        internalGetAccessBoundaryRulesFieldBuilder() {
      if (accessBoundaryRulesBuilder_ == null) {
        accessBoundaryRulesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilder<
                com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule,
                com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundaryRule
                    .Builder,
                com.google.auth.credentialaccessboundary.protobuf
                    .ClientSideAccessBoundaryRuleOrBuilder>(
                accessBoundaryRules_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        accessBoundaryRules_ = null;
      }
      return accessBoundaryRulesBuilder_;
    }

    // @@protoc_insertion_point(builder_scope:cloud.identity.unifiedauth.proto.ClientSideAccessBoundary)
  }

  // @@protoc_insertion_point(class_scope:cloud.identity.unifiedauth.proto.ClientSideAccessBoundary)
  private static final com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE =
        new com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary();
  }

  public static com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ClientSideAccessBoundary> PARSER =
      new com.google.protobuf.AbstractParser<ClientSideAccessBoundary>() {
        @java.lang.Override
        public ClientSideAccessBoundary parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

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

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

  @java.lang.Override
  public com.google.auth.credentialaccessboundary.protobuf.ClientSideAccessBoundary
      getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}