All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.dataplex.v1.ResourceAccessSpec Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dataplex/v1/security.proto

// Protobuf Java Version: 3.25.4
package com.google.cloud.dataplex.v1;

/**
 *
 *
 * 
 * ResourceAccessSpec holds the access control configuration to be enforced
 * on the resources, for example, Cloud Storage bucket, BigQuery dataset,
 * BigQuery table.
 * 
* * Protobuf type {@code google.cloud.dataplex.v1.ResourceAccessSpec} */ public final class ResourceAccessSpec extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.ResourceAccessSpec) ResourceAccessSpecOrBuilder { private static final long serialVersionUID = 0L; // Use ResourceAccessSpec.newBuilder() to construct. private ResourceAccessSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ResourceAccessSpec() { readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); writers_ = com.google.protobuf.LazyStringArrayList.emptyList(); owners_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ResourceAccessSpec(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.SecurityProto .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataplex.v1.SecurityProto .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataplex.v1.ResourceAccessSpec.class, com.google.cloud.dataplex.v1.ResourceAccessSpec.Builder.class); } public static final int READERS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Optional. The format of strings follows the pattern followed by IAM in the
   * bindings. user:{email}, serviceAccount:{email} group:{email}.
   * The set of principals to be granted reader role on the resource.
   * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the readers. */ public com.google.protobuf.ProtocolStringList getReadersList() { return readers_; } /** * * *
   * Optional. The format of strings follows the pattern followed by IAM in the
   * bindings. user:{email}, serviceAccount:{email} group:{email}.
   * The set of principals to be granted reader role on the resource.
   * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of readers. */ public int getReadersCount() { return readers_.size(); } /** * * *
   * Optional. The format of strings follows the pattern followed by IAM in the
   * bindings. user:{email}, serviceAccount:{email} group:{email}.
   * The set of principals to be granted reader role on the resource.
   * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The readers at the given index. */ public java.lang.String getReaders(int index) { return readers_.get(index); } /** * * *
   * Optional. The format of strings follows the pattern followed by IAM in the
   * bindings. user:{email}, serviceAccount:{email} group:{email}.
   * The set of principals to be granted reader role on the resource.
   * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the readers at the given index. */ public com.google.protobuf.ByteString getReadersBytes(int index) { return readers_.getByteString(index); } public static final int WRITERS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList writers_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Optional. The set of principals to be granted writer role on the resource.
   * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the writers. */ public com.google.protobuf.ProtocolStringList getWritersList() { return writers_; } /** * * *
   * Optional. The set of principals to be granted writer role on the resource.
   * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of writers. */ public int getWritersCount() { return writers_.size(); } /** * * *
   * Optional. The set of principals to be granted writer role on the resource.
   * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The writers at the given index. */ public java.lang.String getWriters(int index) { return writers_.get(index); } /** * * *
   * Optional. The set of principals to be granted writer role on the resource.
   * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the writers at the given index. */ public com.google.protobuf.ByteString getWritersBytes(int index) { return writers_.getByteString(index); } public static final int OWNERS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList owners_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Optional. The set of principals to be granted owner role on the resource.
   * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the owners. */ public com.google.protobuf.ProtocolStringList getOwnersList() { return owners_; } /** * * *
   * Optional. The set of principals to be granted owner role on the resource.
   * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of owners. */ public int getOwnersCount() { return owners_.size(); } /** * * *
   * Optional. The set of principals to be granted owner role on the resource.
   * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The owners at the given index. */ public java.lang.String getOwners(int index) { return owners_.get(index); } /** * * *
   * Optional. The set of principals to be granted owner role on the resource.
   * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the owners at the given index. */ public com.google.protobuf.ByteString getOwnersBytes(int index) { return owners_.getByteString(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 < readers_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, readers_.getRaw(i)); } for (int i = 0; i < writers_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, writers_.getRaw(i)); } for (int i = 0; i < owners_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, owners_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < readers_.size(); i++) { dataSize += computeStringSizeNoTag(readers_.getRaw(i)); } size += dataSize; size += 1 * getReadersList().size(); } { int dataSize = 0; for (int i = 0; i < writers_.size(); i++) { dataSize += computeStringSizeNoTag(writers_.getRaw(i)); } size += dataSize; size += 1 * getWritersList().size(); } { int dataSize = 0; for (int i = 0; i < owners_.size(); i++) { dataSize += computeStringSizeNoTag(owners_.getRaw(i)); } size += dataSize; size += 1 * getOwnersList().size(); } 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.cloud.dataplex.v1.ResourceAccessSpec)) { return super.equals(obj); } com.google.cloud.dataplex.v1.ResourceAccessSpec other = (com.google.cloud.dataplex.v1.ResourceAccessSpec) obj; if (!getReadersList().equals(other.getReadersList())) return false; if (!getWritersList().equals(other.getWritersList())) return false; if (!getOwnersList().equals(other.getOwnersList())) 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 (getReadersCount() > 0) { hash = (37 * hash) + READERS_FIELD_NUMBER; hash = (53 * hash) + getReadersList().hashCode(); } if (getWritersCount() > 0) { hash = (37 * hash) + WRITERS_FIELD_NUMBER; hash = (53 * hash) + getWritersList().hashCode(); } if (getOwnersCount() > 0) { hash = (37 * hash) + OWNERS_FIELD_NUMBER; hash = (53 * hash) + getOwnersList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dataplex.v1.ResourceAccessSpec parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.ResourceAccessSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.ResourceAccessSpec parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.ResourceAccessSpec 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.cloud.dataplex.v1.ResourceAccessSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.ResourceAccessSpec parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.ResourceAccessSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.ResourceAccessSpec 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.cloud.dataplex.v1.ResourceAccessSpec parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.ResourceAccessSpec 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.cloud.dataplex.v1.ResourceAccessSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.ResourceAccessSpec 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.cloud.dataplex.v1.ResourceAccessSpec 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; } /** * * *
   * ResourceAccessSpec holds the access control configuration to be enforced
   * on the resources, for example, Cloud Storage bucket, BigQuery dataset,
   * BigQuery table.
   * 
* * Protobuf type {@code google.cloud.dataplex.v1.ResourceAccessSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.ResourceAccessSpec) com.google.cloud.dataplex.v1.ResourceAccessSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.SecurityProto .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataplex.v1.SecurityProto .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataplex.v1.ResourceAccessSpec.class, com.google.cloud.dataplex.v1.ResourceAccessSpec.Builder.class); } // Construct using com.google.cloud.dataplex.v1.ResourceAccessSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); writers_ = com.google.protobuf.LazyStringArrayList.emptyList(); owners_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dataplex.v1.SecurityProto .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_descriptor; } @java.lang.Override public com.google.cloud.dataplex.v1.ResourceAccessSpec getDefaultInstanceForType() { return com.google.cloud.dataplex.v1.ResourceAccessSpec.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dataplex.v1.ResourceAccessSpec build() { com.google.cloud.dataplex.v1.ResourceAccessSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dataplex.v1.ResourceAccessSpec buildPartial() { com.google.cloud.dataplex.v1.ResourceAccessSpec result = new com.google.cloud.dataplex.v1.ResourceAccessSpec(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.dataplex.v1.ResourceAccessSpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { readers_.makeImmutable(); result.readers_ = readers_; } if (((from_bitField0_ & 0x00000002) != 0)) { writers_.makeImmutable(); result.writers_ = writers_; } if (((from_bitField0_ & 0x00000004) != 0)) { owners_.makeImmutable(); result.owners_ = owners_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dataplex.v1.ResourceAccessSpec) { return mergeFrom((com.google.cloud.dataplex.v1.ResourceAccessSpec) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dataplex.v1.ResourceAccessSpec other) { if (other == com.google.cloud.dataplex.v1.ResourceAccessSpec.getDefaultInstance()) return this; if (!other.readers_.isEmpty()) { if (readers_.isEmpty()) { readers_ = other.readers_; bitField0_ |= 0x00000001; } else { ensureReadersIsMutable(); readers_.addAll(other.readers_); } onChanged(); } if (!other.writers_.isEmpty()) { if (writers_.isEmpty()) { writers_ = other.writers_; bitField0_ |= 0x00000002; } else { ensureWritersIsMutable(); writers_.addAll(other.writers_); } onChanged(); } if (!other.owners_.isEmpty()) { if (owners_.isEmpty()) { owners_ = other.owners_; bitField0_ |= 0x00000004; } else { ensureOwnersIsMutable(); owners_.addAll(other.owners_); } onChanged(); } 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: { java.lang.String s = input.readStringRequireUtf8(); ensureReadersIsMutable(); readers_.add(s); break; } // case 10 case 18: { java.lang.String s = input.readStringRequireUtf8(); ensureWritersIsMutable(); writers_.add(s); break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); ensureOwnersIsMutable(); owners_.add(s); break; } // case 26 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 com.google.protobuf.LazyStringArrayList readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureReadersIsMutable() { if (!readers_.isModifiable()) { readers_ = new com.google.protobuf.LazyStringArrayList(readers_); } bitField0_ |= 0x00000001; } /** * * *
     * Optional. The format of strings follows the pattern followed by IAM in the
     * bindings. user:{email}, serviceAccount:{email} group:{email}.
     * The set of principals to be granted reader role on the resource.
     * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the readers. */ public com.google.protobuf.ProtocolStringList getReadersList() { readers_.makeImmutable(); return readers_; } /** * * *
     * Optional. The format of strings follows the pattern followed by IAM in the
     * bindings. user:{email}, serviceAccount:{email} group:{email}.
     * The set of principals to be granted reader role on the resource.
     * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of readers. */ public int getReadersCount() { return readers_.size(); } /** * * *
     * Optional. The format of strings follows the pattern followed by IAM in the
     * bindings. user:{email}, serviceAccount:{email} group:{email}.
     * The set of principals to be granted reader role on the resource.
     * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The readers at the given index. */ public java.lang.String getReaders(int index) { return readers_.get(index); } /** * * *
     * Optional. The format of strings follows the pattern followed by IAM in the
     * bindings. user:{email}, serviceAccount:{email} group:{email}.
     * The set of principals to be granted reader role on the resource.
     * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the readers at the given index. */ public com.google.protobuf.ByteString getReadersBytes(int index) { return readers_.getByteString(index); } /** * * *
     * Optional. The format of strings follows the pattern followed by IAM in the
     * bindings. user:{email}, serviceAccount:{email} group:{email}.
     * The set of principals to be granted reader role on the resource.
     * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The readers to set. * @return This builder for chaining. */ public Builder setReaders(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureReadersIsMutable(); readers_.set(index, value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Optional. The format of strings follows the pattern followed by IAM in the
     * bindings. user:{email}, serviceAccount:{email} group:{email}.
     * The set of principals to be granted reader role on the resource.
     * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The readers to add. * @return This builder for chaining. */ public Builder addReaders(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureReadersIsMutable(); readers_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Optional. The format of strings follows the pattern followed by IAM in the
     * bindings. user:{email}, serviceAccount:{email} group:{email}.
     * The set of principals to be granted reader role on the resource.
     * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The readers to add. * @return This builder for chaining. */ public Builder addAllReaders(java.lang.Iterable values) { ensureReadersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, readers_); bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Optional. The format of strings follows the pattern followed by IAM in the
     * bindings. user:{email}, serviceAccount:{email} group:{email}.
     * The set of principals to be granted reader role on the resource.
     * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearReaders() { readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); ; onChanged(); return this; } /** * * *
     * Optional. The format of strings follows the pattern followed by IAM in the
     * bindings. user:{email}, serviceAccount:{email} group:{email}.
     * The set of principals to be granted reader role on the resource.
     * 
* * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes of the readers to add. * @return This builder for chaining. */ public Builder addReadersBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureReadersIsMutable(); readers_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList writers_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureWritersIsMutable() { if (!writers_.isModifiable()) { writers_ = new com.google.protobuf.LazyStringArrayList(writers_); } bitField0_ |= 0x00000002; } /** * * *
     * Optional. The set of principals to be granted writer role on the resource.
     * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the writers. */ public com.google.protobuf.ProtocolStringList getWritersList() { writers_.makeImmutable(); return writers_; } /** * * *
     * Optional. The set of principals to be granted writer role on the resource.
     * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of writers. */ public int getWritersCount() { return writers_.size(); } /** * * *
     * Optional. The set of principals to be granted writer role on the resource.
     * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The writers at the given index. */ public java.lang.String getWriters(int index) { return writers_.get(index); } /** * * *
     * Optional. The set of principals to be granted writer role on the resource.
     * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the writers at the given index. */ public com.google.protobuf.ByteString getWritersBytes(int index) { return writers_.getByteString(index); } /** * * *
     * Optional. The set of principals to be granted writer role on the resource.
     * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The writers to set. * @return This builder for chaining. */ public Builder setWriters(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWritersIsMutable(); writers_.set(index, value); bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Optional. The set of principals to be granted writer role on the resource.
     * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The writers to add. * @return This builder for chaining. */ public Builder addWriters(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureWritersIsMutable(); writers_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Optional. The set of principals to be granted writer role on the resource.
     * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The writers to add. * @return This builder for chaining. */ public Builder addAllWriters(java.lang.Iterable values) { ensureWritersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, writers_); bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Optional. The set of principals to be granted writer role on the resource.
     * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearWriters() { writers_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); ; onChanged(); return this; } /** * * *
     * Optional. The set of principals to be granted writer role on the resource.
     * 
* * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes of the writers to add. * @return This builder for chaining. */ public Builder addWritersBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureWritersIsMutable(); writers_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList owners_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureOwnersIsMutable() { if (!owners_.isModifiable()) { owners_ = new com.google.protobuf.LazyStringArrayList(owners_); } bitField0_ |= 0x00000004; } /** * * *
     * Optional. The set of principals to be granted owner role on the resource.
     * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the owners. */ public com.google.protobuf.ProtocolStringList getOwnersList() { owners_.makeImmutable(); return owners_; } /** * * *
     * Optional. The set of principals to be granted owner role on the resource.
     * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of owners. */ public int getOwnersCount() { return owners_.size(); } /** * * *
     * Optional. The set of principals to be granted owner role on the resource.
     * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The owners at the given index. */ public java.lang.String getOwners(int index) { return owners_.get(index); } /** * * *
     * Optional. The set of principals to be granted owner role on the resource.
     * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the owners at the given index. */ public com.google.protobuf.ByteString getOwnersBytes(int index) { return owners_.getByteString(index); } /** * * *
     * Optional. The set of principals to be granted owner role on the resource.
     * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The owners to set. * @return This builder for chaining. */ public Builder setOwners(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOwnersIsMutable(); owners_.set(index, value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Optional. The set of principals to be granted owner role on the resource.
     * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The owners to add. * @return This builder for chaining. */ public Builder addOwners(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureOwnersIsMutable(); owners_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Optional. The set of principals to be granted owner role on the resource.
     * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The owners to add. * @return This builder for chaining. */ public Builder addAllOwners(java.lang.Iterable values) { ensureOwnersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, owners_); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Optional. The set of principals to be granted owner role on the resource.
     * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearOwners() { owners_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); ; onChanged(); return this; } /** * * *
     * Optional. The set of principals to be granted owner role on the resource.
     * 
* * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes of the owners to add. * @return This builder for chaining. */ public Builder addOwnersBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureOwnersIsMutable(); owners_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dataplex.v1.ResourceAccessSpec) } // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.ResourceAccessSpec) private static final com.google.cloud.dataplex.v1.ResourceAccessSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.ResourceAccessSpec(); } public static com.google.cloud.dataplex.v1.ResourceAccessSpec getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ResourceAccessSpec 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 parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dataplex.v1.ResourceAccessSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy