1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/gkehub/v1alpha/cloudauditlogging/cloudauditlogging.proto 18 19 package com.google.cloud.gkehub.cloudauditlogging.v1alpha; 20 21 /** 22 * 23 * 24 * <pre> 25 * **Cloud Audit Logging**: Spec for Audit Logging Allowlisting. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec} 29 */ 30 public final class FeatureSpec extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec) 33 FeatureSpecOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use FeatureSpec.newBuilder() to construct. FeatureSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private FeatureSpec(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 FeatureSpec()40 private FeatureSpec() { 41 allowlistedServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new FeatureSpec(); 48 } 49 50 @java.lang.Override getUnknownFields()51 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 52 return this.unknownFields; 53 } 54 getDescriptor()55 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 56 return com.google.cloud.gkehub.cloudauditlogging.v1alpha.CloudAuditLoggingProto 57 .internal_static_google_cloud_gkehub_cloudauditlogging_v1alpha_FeatureSpec_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.gkehub.cloudauditlogging.v1alpha.CloudAuditLoggingProto 64 .internal_static_google_cloud_gkehub_cloudauditlogging_v1alpha_FeatureSpec_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec.class, 67 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec.Builder.class); 68 } 69 70 public static final int ALLOWLISTED_SERVICE_ACCOUNTS_FIELD_NUMBER = 1; 71 72 @SuppressWarnings("serial") 73 private com.google.protobuf.LazyStringList allowlistedServiceAccounts_; 74 /** 75 * 76 * 77 * <pre> 78 * Service account that should be allowlisted to send the audit logs; eg 79 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 80 * already exist, but do not need to have any permissions granted to them. 81 * The customer's entitlements will be checked prior to allowlisting (i.e. 82 * the customer must be an Anthos customer.) 83 * </pre> 84 * 85 * <code>repeated string allowlisted_service_accounts = 1;</code> 86 * 87 * @return A list containing the allowlistedServiceAccounts. 88 */ getAllowlistedServiceAccountsList()89 public com.google.protobuf.ProtocolStringList getAllowlistedServiceAccountsList() { 90 return allowlistedServiceAccounts_; 91 } 92 /** 93 * 94 * 95 * <pre> 96 * Service account that should be allowlisted to send the audit logs; eg 97 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 98 * already exist, but do not need to have any permissions granted to them. 99 * The customer's entitlements will be checked prior to allowlisting (i.e. 100 * the customer must be an Anthos customer.) 101 * </pre> 102 * 103 * <code>repeated string allowlisted_service_accounts = 1;</code> 104 * 105 * @return The count of allowlistedServiceAccounts. 106 */ getAllowlistedServiceAccountsCount()107 public int getAllowlistedServiceAccountsCount() { 108 return allowlistedServiceAccounts_.size(); 109 } 110 /** 111 * 112 * 113 * <pre> 114 * Service account that should be allowlisted to send the audit logs; eg 115 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 116 * already exist, but do not need to have any permissions granted to them. 117 * The customer's entitlements will be checked prior to allowlisting (i.e. 118 * the customer must be an Anthos customer.) 119 * </pre> 120 * 121 * <code>repeated string allowlisted_service_accounts = 1;</code> 122 * 123 * @param index The index of the element to return. 124 * @return The allowlistedServiceAccounts at the given index. 125 */ getAllowlistedServiceAccounts(int index)126 public java.lang.String getAllowlistedServiceAccounts(int index) { 127 return allowlistedServiceAccounts_.get(index); 128 } 129 /** 130 * 131 * 132 * <pre> 133 * Service account that should be allowlisted to send the audit logs; eg 134 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 135 * already exist, but do not need to have any permissions granted to them. 136 * The customer's entitlements will be checked prior to allowlisting (i.e. 137 * the customer must be an Anthos customer.) 138 * </pre> 139 * 140 * <code>repeated string allowlisted_service_accounts = 1;</code> 141 * 142 * @param index The index of the value to return. 143 * @return The bytes of the allowlistedServiceAccounts at the given index. 144 */ getAllowlistedServiceAccountsBytes(int index)145 public com.google.protobuf.ByteString getAllowlistedServiceAccountsBytes(int index) { 146 return allowlistedServiceAccounts_.getByteString(index); 147 } 148 149 private byte memoizedIsInitialized = -1; 150 151 @java.lang.Override isInitialized()152 public final boolean isInitialized() { 153 byte isInitialized = memoizedIsInitialized; 154 if (isInitialized == 1) return true; 155 if (isInitialized == 0) return false; 156 157 memoizedIsInitialized = 1; 158 return true; 159 } 160 161 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)162 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 163 for (int i = 0; i < allowlistedServiceAccounts_.size(); i++) { 164 com.google.protobuf.GeneratedMessageV3.writeString( 165 output, 1, allowlistedServiceAccounts_.getRaw(i)); 166 } 167 getUnknownFields().writeTo(output); 168 } 169 170 @java.lang.Override getSerializedSize()171 public int getSerializedSize() { 172 int size = memoizedSize; 173 if (size != -1) return size; 174 175 size = 0; 176 { 177 int dataSize = 0; 178 for (int i = 0; i < allowlistedServiceAccounts_.size(); i++) { 179 dataSize += computeStringSizeNoTag(allowlistedServiceAccounts_.getRaw(i)); 180 } 181 size += dataSize; 182 size += 1 * getAllowlistedServiceAccountsList().size(); 183 } 184 size += getUnknownFields().getSerializedSize(); 185 memoizedSize = size; 186 return size; 187 } 188 189 @java.lang.Override equals(final java.lang.Object obj)190 public boolean equals(final java.lang.Object obj) { 191 if (obj == this) { 192 return true; 193 } 194 if (!(obj instanceof com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec)) { 195 return super.equals(obj); 196 } 197 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec other = 198 (com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec) obj; 199 200 if (!getAllowlistedServiceAccountsList().equals(other.getAllowlistedServiceAccountsList())) 201 return false; 202 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 203 return true; 204 } 205 206 @java.lang.Override hashCode()207 public int hashCode() { 208 if (memoizedHashCode != 0) { 209 return memoizedHashCode; 210 } 211 int hash = 41; 212 hash = (19 * hash) + getDescriptor().hashCode(); 213 if (getAllowlistedServiceAccountsCount() > 0) { 214 hash = (37 * hash) + ALLOWLISTED_SERVICE_ACCOUNTS_FIELD_NUMBER; 215 hash = (53 * hash) + getAllowlistedServiceAccountsList().hashCode(); 216 } 217 hash = (29 * hash) + getUnknownFields().hashCode(); 218 memoizedHashCode = hash; 219 return hash; 220 } 221 parseFrom( java.nio.ByteBuffer data)222 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom( 223 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 224 return PARSER.parseFrom(data); 225 } 226 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)227 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom( 228 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 229 throws com.google.protobuf.InvalidProtocolBufferException { 230 return PARSER.parseFrom(data, extensionRegistry); 231 } 232 parseFrom( com.google.protobuf.ByteString data)233 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom( 234 com.google.protobuf.ByteString data) 235 throws com.google.protobuf.InvalidProtocolBufferException { 236 return PARSER.parseFrom(data); 237 } 238 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)239 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom( 240 com.google.protobuf.ByteString data, 241 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 242 throws com.google.protobuf.InvalidProtocolBufferException { 243 return PARSER.parseFrom(data, extensionRegistry); 244 } 245 parseFrom(byte[] data)246 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom(byte[] data) 247 throws com.google.protobuf.InvalidProtocolBufferException { 248 return PARSER.parseFrom(data); 249 } 250 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)251 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom( 252 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 253 throws com.google.protobuf.InvalidProtocolBufferException { 254 return PARSER.parseFrom(data, extensionRegistry); 255 } 256 parseFrom( java.io.InputStream input)257 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom( 258 java.io.InputStream input) throws java.io.IOException { 259 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 260 } 261 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)262 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom( 263 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 264 throws java.io.IOException { 265 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 266 PARSER, input, extensionRegistry); 267 } 268 parseDelimitedFrom( java.io.InputStream input)269 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseDelimitedFrom( 270 java.io.InputStream input) throws java.io.IOException { 271 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 272 } 273 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)274 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseDelimitedFrom( 275 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 276 throws java.io.IOException { 277 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 278 PARSER, input, extensionRegistry); 279 } 280 parseFrom( com.google.protobuf.CodedInputStream input)281 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom( 282 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 283 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 284 } 285 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)286 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec parseFrom( 287 com.google.protobuf.CodedInputStream input, 288 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 289 throws java.io.IOException { 290 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 291 PARSER, input, extensionRegistry); 292 } 293 294 @java.lang.Override newBuilderForType()295 public Builder newBuilderForType() { 296 return newBuilder(); 297 } 298 newBuilder()299 public static Builder newBuilder() { 300 return DEFAULT_INSTANCE.toBuilder(); 301 } 302 newBuilder( com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec prototype)303 public static Builder newBuilder( 304 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec prototype) { 305 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 306 } 307 308 @java.lang.Override toBuilder()309 public Builder toBuilder() { 310 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 311 } 312 313 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)314 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 315 Builder builder = new Builder(parent); 316 return builder; 317 } 318 /** 319 * 320 * 321 * <pre> 322 * **Cloud Audit Logging**: Spec for Audit Logging Allowlisting. 323 * </pre> 324 * 325 * Protobuf type {@code google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec} 326 */ 327 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 328 implements 329 // @@protoc_insertion_point(builder_implements:google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec) 330 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpecOrBuilder { getDescriptor()331 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 332 return com.google.cloud.gkehub.cloudauditlogging.v1alpha.CloudAuditLoggingProto 333 .internal_static_google_cloud_gkehub_cloudauditlogging_v1alpha_FeatureSpec_descriptor; 334 } 335 336 @java.lang.Override 337 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()338 internalGetFieldAccessorTable() { 339 return com.google.cloud.gkehub.cloudauditlogging.v1alpha.CloudAuditLoggingProto 340 .internal_static_google_cloud_gkehub_cloudauditlogging_v1alpha_FeatureSpec_fieldAccessorTable 341 .ensureFieldAccessorsInitialized( 342 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec.class, 343 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec.Builder.class); 344 } 345 346 // Construct using com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec.newBuilder() Builder()347 private Builder() {} 348 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)349 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 350 super(parent); 351 } 352 353 @java.lang.Override clear()354 public Builder clear() { 355 super.clear(); 356 bitField0_ = 0; 357 allowlistedServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 358 bitField0_ = (bitField0_ & ~0x00000001); 359 return this; 360 } 361 362 @java.lang.Override getDescriptorForType()363 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 364 return com.google.cloud.gkehub.cloudauditlogging.v1alpha.CloudAuditLoggingProto 365 .internal_static_google_cloud_gkehub_cloudauditlogging_v1alpha_FeatureSpec_descriptor; 366 } 367 368 @java.lang.Override 369 public com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec getDefaultInstanceForType()370 getDefaultInstanceForType() { 371 return com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec.getDefaultInstance(); 372 } 373 374 @java.lang.Override build()375 public com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec build() { 376 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec result = buildPartial(); 377 if (!result.isInitialized()) { 378 throw newUninitializedMessageException(result); 379 } 380 return result; 381 } 382 383 @java.lang.Override buildPartial()384 public com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec buildPartial() { 385 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec result = 386 new com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec(this); 387 buildPartialRepeatedFields(result); 388 if (bitField0_ != 0) { 389 buildPartial0(result); 390 } 391 onBuilt(); 392 return result; 393 } 394 buildPartialRepeatedFields( com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec result)395 private void buildPartialRepeatedFields( 396 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec result) { 397 if (((bitField0_ & 0x00000001) != 0)) { 398 allowlistedServiceAccounts_ = allowlistedServiceAccounts_.getUnmodifiableView(); 399 bitField0_ = (bitField0_ & ~0x00000001); 400 } 401 result.allowlistedServiceAccounts_ = allowlistedServiceAccounts_; 402 } 403 buildPartial0( com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec result)404 private void buildPartial0( 405 com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec result) { 406 int from_bitField0_ = bitField0_; 407 } 408 409 @java.lang.Override clone()410 public Builder clone() { 411 return super.clone(); 412 } 413 414 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)415 public Builder setField( 416 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 417 return super.setField(field, value); 418 } 419 420 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)421 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 422 return super.clearField(field); 423 } 424 425 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)426 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 427 return super.clearOneof(oneof); 428 } 429 430 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)431 public Builder setRepeatedField( 432 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 433 return super.setRepeatedField(field, index, value); 434 } 435 436 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)437 public Builder addRepeatedField( 438 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 439 return super.addRepeatedField(field, value); 440 } 441 442 @java.lang.Override mergeFrom(com.google.protobuf.Message other)443 public Builder mergeFrom(com.google.protobuf.Message other) { 444 if (other instanceof com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec) { 445 return mergeFrom((com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec) other); 446 } else { 447 super.mergeFrom(other); 448 return this; 449 } 450 } 451 mergeFrom(com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec other)452 public Builder mergeFrom(com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec other) { 453 if (other 454 == com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec.getDefaultInstance()) 455 return this; 456 if (!other.allowlistedServiceAccounts_.isEmpty()) { 457 if (allowlistedServiceAccounts_.isEmpty()) { 458 allowlistedServiceAccounts_ = other.allowlistedServiceAccounts_; 459 bitField0_ = (bitField0_ & ~0x00000001); 460 } else { 461 ensureAllowlistedServiceAccountsIsMutable(); 462 allowlistedServiceAccounts_.addAll(other.allowlistedServiceAccounts_); 463 } 464 onChanged(); 465 } 466 this.mergeUnknownFields(other.getUnknownFields()); 467 onChanged(); 468 return this; 469 } 470 471 @java.lang.Override isInitialized()472 public final boolean isInitialized() { 473 return true; 474 } 475 476 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)477 public Builder mergeFrom( 478 com.google.protobuf.CodedInputStream input, 479 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 480 throws java.io.IOException { 481 if (extensionRegistry == null) { 482 throw new java.lang.NullPointerException(); 483 } 484 try { 485 boolean done = false; 486 while (!done) { 487 int tag = input.readTag(); 488 switch (tag) { 489 case 0: 490 done = true; 491 break; 492 case 10: 493 { 494 java.lang.String s = input.readStringRequireUtf8(); 495 ensureAllowlistedServiceAccountsIsMutable(); 496 allowlistedServiceAccounts_.add(s); 497 break; 498 } // case 10 499 default: 500 { 501 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 502 done = true; // was an endgroup tag 503 } 504 break; 505 } // default: 506 } // switch (tag) 507 } // while (!done) 508 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 509 throw e.unwrapIOException(); 510 } finally { 511 onChanged(); 512 } // finally 513 return this; 514 } 515 516 private int bitField0_; 517 518 private com.google.protobuf.LazyStringList allowlistedServiceAccounts_ = 519 com.google.protobuf.LazyStringArrayList.EMPTY; 520 ensureAllowlistedServiceAccountsIsMutable()521 private void ensureAllowlistedServiceAccountsIsMutable() { 522 if (!((bitField0_ & 0x00000001) != 0)) { 523 allowlistedServiceAccounts_ = 524 new com.google.protobuf.LazyStringArrayList(allowlistedServiceAccounts_); 525 bitField0_ |= 0x00000001; 526 } 527 } 528 /** 529 * 530 * 531 * <pre> 532 * Service account that should be allowlisted to send the audit logs; eg 533 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 534 * already exist, but do not need to have any permissions granted to them. 535 * The customer's entitlements will be checked prior to allowlisting (i.e. 536 * the customer must be an Anthos customer.) 537 * </pre> 538 * 539 * <code>repeated string allowlisted_service_accounts = 1;</code> 540 * 541 * @return A list containing the allowlistedServiceAccounts. 542 */ getAllowlistedServiceAccountsList()543 public com.google.protobuf.ProtocolStringList getAllowlistedServiceAccountsList() { 544 return allowlistedServiceAccounts_.getUnmodifiableView(); 545 } 546 /** 547 * 548 * 549 * <pre> 550 * Service account that should be allowlisted to send the audit logs; eg 551 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 552 * already exist, but do not need to have any permissions granted to them. 553 * The customer's entitlements will be checked prior to allowlisting (i.e. 554 * the customer must be an Anthos customer.) 555 * </pre> 556 * 557 * <code>repeated string allowlisted_service_accounts = 1;</code> 558 * 559 * @return The count of allowlistedServiceAccounts. 560 */ getAllowlistedServiceAccountsCount()561 public int getAllowlistedServiceAccountsCount() { 562 return allowlistedServiceAccounts_.size(); 563 } 564 /** 565 * 566 * 567 * <pre> 568 * Service account that should be allowlisted to send the audit logs; eg 569 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 570 * already exist, but do not need to have any permissions granted to them. 571 * The customer's entitlements will be checked prior to allowlisting (i.e. 572 * the customer must be an Anthos customer.) 573 * </pre> 574 * 575 * <code>repeated string allowlisted_service_accounts = 1;</code> 576 * 577 * @param index The index of the element to return. 578 * @return The allowlistedServiceAccounts at the given index. 579 */ getAllowlistedServiceAccounts(int index)580 public java.lang.String getAllowlistedServiceAccounts(int index) { 581 return allowlistedServiceAccounts_.get(index); 582 } 583 /** 584 * 585 * 586 * <pre> 587 * Service account that should be allowlisted to send the audit logs; eg 588 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 589 * already exist, but do not need to have any permissions granted to them. 590 * The customer's entitlements will be checked prior to allowlisting (i.e. 591 * the customer must be an Anthos customer.) 592 * </pre> 593 * 594 * <code>repeated string allowlisted_service_accounts = 1;</code> 595 * 596 * @param index The index of the value to return. 597 * @return The bytes of the allowlistedServiceAccounts at the given index. 598 */ getAllowlistedServiceAccountsBytes(int index)599 public com.google.protobuf.ByteString getAllowlistedServiceAccountsBytes(int index) { 600 return allowlistedServiceAccounts_.getByteString(index); 601 } 602 /** 603 * 604 * 605 * <pre> 606 * Service account that should be allowlisted to send the audit logs; eg 607 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 608 * already exist, but do not need to have any permissions granted to them. 609 * The customer's entitlements will be checked prior to allowlisting (i.e. 610 * the customer must be an Anthos customer.) 611 * </pre> 612 * 613 * <code>repeated string allowlisted_service_accounts = 1;</code> 614 * 615 * @param index The index to set the value at. 616 * @param value The allowlistedServiceAccounts to set. 617 * @return This builder for chaining. 618 */ setAllowlistedServiceAccounts(int index, java.lang.String value)619 public Builder setAllowlistedServiceAccounts(int index, java.lang.String value) { 620 if (value == null) { 621 throw new NullPointerException(); 622 } 623 ensureAllowlistedServiceAccountsIsMutable(); 624 allowlistedServiceAccounts_.set(index, value); 625 onChanged(); 626 return this; 627 } 628 /** 629 * 630 * 631 * <pre> 632 * Service account that should be allowlisted to send the audit logs; eg 633 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 634 * already exist, but do not need to have any permissions granted to them. 635 * The customer's entitlements will be checked prior to allowlisting (i.e. 636 * the customer must be an Anthos customer.) 637 * </pre> 638 * 639 * <code>repeated string allowlisted_service_accounts = 1;</code> 640 * 641 * @param value The allowlistedServiceAccounts to add. 642 * @return This builder for chaining. 643 */ addAllowlistedServiceAccounts(java.lang.String value)644 public Builder addAllowlistedServiceAccounts(java.lang.String value) { 645 if (value == null) { 646 throw new NullPointerException(); 647 } 648 ensureAllowlistedServiceAccountsIsMutable(); 649 allowlistedServiceAccounts_.add(value); 650 onChanged(); 651 return this; 652 } 653 /** 654 * 655 * 656 * <pre> 657 * Service account that should be allowlisted to send the audit logs; eg 658 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 659 * already exist, but do not need to have any permissions granted to them. 660 * The customer's entitlements will be checked prior to allowlisting (i.e. 661 * the customer must be an Anthos customer.) 662 * </pre> 663 * 664 * <code>repeated string allowlisted_service_accounts = 1;</code> 665 * 666 * @param values The allowlistedServiceAccounts to add. 667 * @return This builder for chaining. 668 */ addAllAllowlistedServiceAccounts(java.lang.Iterable<java.lang.String> values)669 public Builder addAllAllowlistedServiceAccounts(java.lang.Iterable<java.lang.String> values) { 670 ensureAllowlistedServiceAccountsIsMutable(); 671 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowlistedServiceAccounts_); 672 onChanged(); 673 return this; 674 } 675 /** 676 * 677 * 678 * <pre> 679 * Service account that should be allowlisted to send the audit logs; eg 680 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 681 * already exist, but do not need to have any permissions granted to them. 682 * The customer's entitlements will be checked prior to allowlisting (i.e. 683 * the customer must be an Anthos customer.) 684 * </pre> 685 * 686 * <code>repeated string allowlisted_service_accounts = 1;</code> 687 * 688 * @return This builder for chaining. 689 */ clearAllowlistedServiceAccounts()690 public Builder clearAllowlistedServiceAccounts() { 691 allowlistedServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; 692 bitField0_ = (bitField0_ & ~0x00000001); 693 onChanged(); 694 return this; 695 } 696 /** 697 * 698 * 699 * <pre> 700 * Service account that should be allowlisted to send the audit logs; eg 701 * cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must 702 * already exist, but do not need to have any permissions granted to them. 703 * The customer's entitlements will be checked prior to allowlisting (i.e. 704 * the customer must be an Anthos customer.) 705 * </pre> 706 * 707 * <code>repeated string allowlisted_service_accounts = 1;</code> 708 * 709 * @param value The bytes of the allowlistedServiceAccounts to add. 710 * @return This builder for chaining. 711 */ addAllowlistedServiceAccountsBytes(com.google.protobuf.ByteString value)712 public Builder addAllowlistedServiceAccountsBytes(com.google.protobuf.ByteString value) { 713 if (value == null) { 714 throw new NullPointerException(); 715 } 716 checkByteStringIsUtf8(value); 717 ensureAllowlistedServiceAccountsIsMutable(); 718 allowlistedServiceAccounts_.add(value); 719 onChanged(); 720 return this; 721 } 722 723 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)724 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 725 return super.setUnknownFields(unknownFields); 726 } 727 728 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)729 public final Builder mergeUnknownFields( 730 final com.google.protobuf.UnknownFieldSet unknownFields) { 731 return super.mergeUnknownFields(unknownFields); 732 } 733 734 // @@protoc_insertion_point(builder_scope:google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec) 735 } 736 737 // @@protoc_insertion_point(class_scope:google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec) 738 private static final com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec 739 DEFAULT_INSTANCE; 740 741 static { 742 DEFAULT_INSTANCE = new com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec(); 743 } 744 getDefaultInstance()745 public static com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec getDefaultInstance() { 746 return DEFAULT_INSTANCE; 747 } 748 749 private static final com.google.protobuf.Parser<FeatureSpec> PARSER = 750 new com.google.protobuf.AbstractParser<FeatureSpec>() { 751 @java.lang.Override 752 public FeatureSpec parsePartialFrom( 753 com.google.protobuf.CodedInputStream input, 754 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 755 throws com.google.protobuf.InvalidProtocolBufferException { 756 Builder builder = newBuilder(); 757 try { 758 builder.mergeFrom(input, extensionRegistry); 759 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 760 throw e.setUnfinishedMessage(builder.buildPartial()); 761 } catch (com.google.protobuf.UninitializedMessageException e) { 762 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 763 } catch (java.io.IOException e) { 764 throw new com.google.protobuf.InvalidProtocolBufferException(e) 765 .setUnfinishedMessage(builder.buildPartial()); 766 } 767 return builder.buildPartial(); 768 } 769 }; 770 parser()771 public static com.google.protobuf.Parser<FeatureSpec> parser() { 772 return PARSER; 773 } 774 775 @java.lang.Override getParserForType()776 public com.google.protobuf.Parser<FeatureSpec> getParserForType() { 777 return PARSER; 778 } 779 780 @java.lang.Override getDefaultInstanceForType()781 public com.google.cloud.gkehub.cloudauditlogging.v1alpha.FeatureSpec getDefaultInstanceForType() { 782 return DEFAULT_INSTANCE; 783 } 784 } 785