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/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Identity-Aware Proxy 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.BackendServiceIAP} 29 */ 30 public final class BackendServiceIAP extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.BackendServiceIAP) 33 BackendServiceIAPOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use BackendServiceIAP.newBuilder() to construct. BackendServiceIAP(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private BackendServiceIAP(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 BackendServiceIAP()40 private BackendServiceIAP() { 41 oauth2ClientId_ = ""; 42 oauth2ClientSecret_ = ""; 43 oauth2ClientSecretSha256_ = ""; 44 } 45 46 @java.lang.Override 47 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)48 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 49 return new BackendServiceIAP(); 50 } 51 52 @java.lang.Override getUnknownFields()53 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 54 return this.unknownFields; 55 } 56 getDescriptor()57 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 58 return com.google.cloud.compute.v1.Compute 59 .internal_static_google_cloud_compute_v1_BackendServiceIAP_descriptor; 60 } 61 62 @java.lang.Override 63 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()64 internalGetFieldAccessorTable() { 65 return com.google.cloud.compute.v1.Compute 66 .internal_static_google_cloud_compute_v1_BackendServiceIAP_fieldAccessorTable 67 .ensureFieldAccessorsInitialized( 68 com.google.cloud.compute.v1.BackendServiceIAP.class, 69 com.google.cloud.compute.v1.BackendServiceIAP.Builder.class); 70 } 71 72 private int bitField0_; 73 public static final int ENABLED_FIELD_NUMBER = 1018689; 74 private boolean enabled_ = false; 75 /** 76 * 77 * 78 * <pre> 79 * Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty. 80 * </pre> 81 * 82 * <code>optional bool enabled = 1018689;</code> 83 * 84 * @return Whether the enabled field is set. 85 */ 86 @java.lang.Override hasEnabled()87 public boolean hasEnabled() { 88 return ((bitField0_ & 0x00000001) != 0); 89 } 90 /** 91 * 92 * 93 * <pre> 94 * Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty. 95 * </pre> 96 * 97 * <code>optional bool enabled = 1018689;</code> 98 * 99 * @return The enabled. 100 */ 101 @java.lang.Override getEnabled()102 public boolean getEnabled() { 103 return enabled_; 104 } 105 106 public static final int OAUTH2_CLIENT_ID_FIELD_NUMBER = 314017611; 107 108 @SuppressWarnings("serial") 109 private volatile java.lang.Object oauth2ClientId_ = ""; 110 /** 111 * 112 * 113 * <pre> 114 * OAuth2 client ID to use for the authentication flow. 115 * </pre> 116 * 117 * <code>optional string oauth2_client_id = 314017611;</code> 118 * 119 * @return Whether the oauth2ClientId field is set. 120 */ 121 @java.lang.Override hasOauth2ClientId()122 public boolean hasOauth2ClientId() { 123 return ((bitField0_ & 0x00000002) != 0); 124 } 125 /** 126 * 127 * 128 * <pre> 129 * OAuth2 client ID to use for the authentication flow. 130 * </pre> 131 * 132 * <code>optional string oauth2_client_id = 314017611;</code> 133 * 134 * @return The oauth2ClientId. 135 */ 136 @java.lang.Override getOauth2ClientId()137 public java.lang.String getOauth2ClientId() { 138 java.lang.Object ref = oauth2ClientId_; 139 if (ref instanceof java.lang.String) { 140 return (java.lang.String) ref; 141 } else { 142 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 143 java.lang.String s = bs.toStringUtf8(); 144 oauth2ClientId_ = s; 145 return s; 146 } 147 } 148 /** 149 * 150 * 151 * <pre> 152 * OAuth2 client ID to use for the authentication flow. 153 * </pre> 154 * 155 * <code>optional string oauth2_client_id = 314017611;</code> 156 * 157 * @return The bytes for oauth2ClientId. 158 */ 159 @java.lang.Override getOauth2ClientIdBytes()160 public com.google.protobuf.ByteString getOauth2ClientIdBytes() { 161 java.lang.Object ref = oauth2ClientId_; 162 if (ref instanceof java.lang.String) { 163 com.google.protobuf.ByteString b = 164 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 165 oauth2ClientId_ = b; 166 return b; 167 } else { 168 return (com.google.protobuf.ByteString) ref; 169 } 170 } 171 172 public static final int OAUTH2_CLIENT_SECRET_FIELD_NUMBER = 50999520; 173 174 @SuppressWarnings("serial") 175 private volatile java.lang.Object oauth2ClientSecret_ = ""; 176 /** 177 * 178 * 179 * <pre> 180 * OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly 181 * </pre> 182 * 183 * <code>optional string oauth2_client_secret = 50999520;</code> 184 * 185 * @return Whether the oauth2ClientSecret field is set. 186 */ 187 @java.lang.Override hasOauth2ClientSecret()188 public boolean hasOauth2ClientSecret() { 189 return ((bitField0_ & 0x00000004) != 0); 190 } 191 /** 192 * 193 * 194 * <pre> 195 * OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly 196 * </pre> 197 * 198 * <code>optional string oauth2_client_secret = 50999520;</code> 199 * 200 * @return The oauth2ClientSecret. 201 */ 202 @java.lang.Override getOauth2ClientSecret()203 public java.lang.String getOauth2ClientSecret() { 204 java.lang.Object ref = oauth2ClientSecret_; 205 if (ref instanceof java.lang.String) { 206 return (java.lang.String) ref; 207 } else { 208 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 209 java.lang.String s = bs.toStringUtf8(); 210 oauth2ClientSecret_ = s; 211 return s; 212 } 213 } 214 /** 215 * 216 * 217 * <pre> 218 * OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly 219 * </pre> 220 * 221 * <code>optional string oauth2_client_secret = 50999520;</code> 222 * 223 * @return The bytes for oauth2ClientSecret. 224 */ 225 @java.lang.Override getOauth2ClientSecretBytes()226 public com.google.protobuf.ByteString getOauth2ClientSecretBytes() { 227 java.lang.Object ref = oauth2ClientSecret_; 228 if (ref instanceof java.lang.String) { 229 com.google.protobuf.ByteString b = 230 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 231 oauth2ClientSecret_ = b; 232 return b; 233 } else { 234 return (com.google.protobuf.ByteString) ref; 235 } 236 } 237 238 public static final int OAUTH2_CLIENT_SECRET_SHA256_FIELD_NUMBER = 112903782; 239 240 @SuppressWarnings("serial") 241 private volatile java.lang.Object oauth2ClientSecretSha256_ = ""; 242 /** 243 * 244 * 245 * <pre> 246 * [Output Only] SHA256 hash value for the field oauth2_client_secret above. 247 * </pre> 248 * 249 * <code>optional string oauth2_client_secret_sha256 = 112903782;</code> 250 * 251 * @return Whether the oauth2ClientSecretSha256 field is set. 252 */ 253 @java.lang.Override hasOauth2ClientSecretSha256()254 public boolean hasOauth2ClientSecretSha256() { 255 return ((bitField0_ & 0x00000008) != 0); 256 } 257 /** 258 * 259 * 260 * <pre> 261 * [Output Only] SHA256 hash value for the field oauth2_client_secret above. 262 * </pre> 263 * 264 * <code>optional string oauth2_client_secret_sha256 = 112903782;</code> 265 * 266 * @return The oauth2ClientSecretSha256. 267 */ 268 @java.lang.Override getOauth2ClientSecretSha256()269 public java.lang.String getOauth2ClientSecretSha256() { 270 java.lang.Object ref = oauth2ClientSecretSha256_; 271 if (ref instanceof java.lang.String) { 272 return (java.lang.String) ref; 273 } else { 274 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 275 java.lang.String s = bs.toStringUtf8(); 276 oauth2ClientSecretSha256_ = s; 277 return s; 278 } 279 } 280 /** 281 * 282 * 283 * <pre> 284 * [Output Only] SHA256 hash value for the field oauth2_client_secret above. 285 * </pre> 286 * 287 * <code>optional string oauth2_client_secret_sha256 = 112903782;</code> 288 * 289 * @return The bytes for oauth2ClientSecretSha256. 290 */ 291 @java.lang.Override getOauth2ClientSecretSha256Bytes()292 public com.google.protobuf.ByteString getOauth2ClientSecretSha256Bytes() { 293 java.lang.Object ref = oauth2ClientSecretSha256_; 294 if (ref instanceof java.lang.String) { 295 com.google.protobuf.ByteString b = 296 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 297 oauth2ClientSecretSha256_ = b; 298 return b; 299 } else { 300 return (com.google.protobuf.ByteString) ref; 301 } 302 } 303 304 private byte memoizedIsInitialized = -1; 305 306 @java.lang.Override isInitialized()307 public final boolean isInitialized() { 308 byte isInitialized = memoizedIsInitialized; 309 if (isInitialized == 1) return true; 310 if (isInitialized == 0) return false; 311 312 memoizedIsInitialized = 1; 313 return true; 314 } 315 316 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)317 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 318 if (((bitField0_ & 0x00000001) != 0)) { 319 output.writeBool(1018689, enabled_); 320 } 321 if (((bitField0_ & 0x00000004) != 0)) { 322 com.google.protobuf.GeneratedMessageV3.writeString(output, 50999520, oauth2ClientSecret_); 323 } 324 if (((bitField0_ & 0x00000008) != 0)) { 325 com.google.protobuf.GeneratedMessageV3.writeString( 326 output, 112903782, oauth2ClientSecretSha256_); 327 } 328 if (((bitField0_ & 0x00000002) != 0)) { 329 com.google.protobuf.GeneratedMessageV3.writeString(output, 314017611, oauth2ClientId_); 330 } 331 getUnknownFields().writeTo(output); 332 } 333 334 @java.lang.Override getSerializedSize()335 public int getSerializedSize() { 336 int size = memoizedSize; 337 if (size != -1) return size; 338 339 size = 0; 340 if (((bitField0_ & 0x00000001) != 0)) { 341 size += com.google.protobuf.CodedOutputStream.computeBoolSize(1018689, enabled_); 342 } 343 if (((bitField0_ & 0x00000004) != 0)) { 344 size += 345 com.google.protobuf.GeneratedMessageV3.computeStringSize(50999520, oauth2ClientSecret_); 346 } 347 if (((bitField0_ & 0x00000008) != 0)) { 348 size += 349 com.google.protobuf.GeneratedMessageV3.computeStringSize( 350 112903782, oauth2ClientSecretSha256_); 351 } 352 if (((bitField0_ & 0x00000002) != 0)) { 353 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(314017611, oauth2ClientId_); 354 } 355 size += getUnknownFields().getSerializedSize(); 356 memoizedSize = size; 357 return size; 358 } 359 360 @java.lang.Override equals(final java.lang.Object obj)361 public boolean equals(final java.lang.Object obj) { 362 if (obj == this) { 363 return true; 364 } 365 if (!(obj instanceof com.google.cloud.compute.v1.BackendServiceIAP)) { 366 return super.equals(obj); 367 } 368 com.google.cloud.compute.v1.BackendServiceIAP other = 369 (com.google.cloud.compute.v1.BackendServiceIAP) obj; 370 371 if (hasEnabled() != other.hasEnabled()) return false; 372 if (hasEnabled()) { 373 if (getEnabled() != other.getEnabled()) return false; 374 } 375 if (hasOauth2ClientId() != other.hasOauth2ClientId()) return false; 376 if (hasOauth2ClientId()) { 377 if (!getOauth2ClientId().equals(other.getOauth2ClientId())) return false; 378 } 379 if (hasOauth2ClientSecret() != other.hasOauth2ClientSecret()) return false; 380 if (hasOauth2ClientSecret()) { 381 if (!getOauth2ClientSecret().equals(other.getOauth2ClientSecret())) return false; 382 } 383 if (hasOauth2ClientSecretSha256() != other.hasOauth2ClientSecretSha256()) return false; 384 if (hasOauth2ClientSecretSha256()) { 385 if (!getOauth2ClientSecretSha256().equals(other.getOauth2ClientSecretSha256())) return false; 386 } 387 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 388 return true; 389 } 390 391 @java.lang.Override hashCode()392 public int hashCode() { 393 if (memoizedHashCode != 0) { 394 return memoizedHashCode; 395 } 396 int hash = 41; 397 hash = (19 * hash) + getDescriptor().hashCode(); 398 if (hasEnabled()) { 399 hash = (37 * hash) + ENABLED_FIELD_NUMBER; 400 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); 401 } 402 if (hasOauth2ClientId()) { 403 hash = (37 * hash) + OAUTH2_CLIENT_ID_FIELD_NUMBER; 404 hash = (53 * hash) + getOauth2ClientId().hashCode(); 405 } 406 if (hasOauth2ClientSecret()) { 407 hash = (37 * hash) + OAUTH2_CLIENT_SECRET_FIELD_NUMBER; 408 hash = (53 * hash) + getOauth2ClientSecret().hashCode(); 409 } 410 if (hasOauth2ClientSecretSha256()) { 411 hash = (37 * hash) + OAUTH2_CLIENT_SECRET_SHA256_FIELD_NUMBER; 412 hash = (53 * hash) + getOauth2ClientSecretSha256().hashCode(); 413 } 414 hash = (29 * hash) + getUnknownFields().hashCode(); 415 memoizedHashCode = hash; 416 return hash; 417 } 418 parseFrom(java.nio.ByteBuffer data)419 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom(java.nio.ByteBuffer data) 420 throws com.google.protobuf.InvalidProtocolBufferException { 421 return PARSER.parseFrom(data); 422 } 423 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)424 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom( 425 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 426 throws com.google.protobuf.InvalidProtocolBufferException { 427 return PARSER.parseFrom(data, extensionRegistry); 428 } 429 parseFrom( com.google.protobuf.ByteString data)430 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom( 431 com.google.protobuf.ByteString data) 432 throws com.google.protobuf.InvalidProtocolBufferException { 433 return PARSER.parseFrom(data); 434 } 435 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)436 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom( 437 com.google.protobuf.ByteString data, 438 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 439 throws com.google.protobuf.InvalidProtocolBufferException { 440 return PARSER.parseFrom(data, extensionRegistry); 441 } 442 parseFrom(byte[] data)443 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom(byte[] data) 444 throws com.google.protobuf.InvalidProtocolBufferException { 445 return PARSER.parseFrom(data); 446 } 447 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)448 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom( 449 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 450 throws com.google.protobuf.InvalidProtocolBufferException { 451 return PARSER.parseFrom(data, extensionRegistry); 452 } 453 parseFrom(java.io.InputStream input)454 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom(java.io.InputStream input) 455 throws java.io.IOException { 456 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 457 } 458 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)459 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom( 460 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 461 throws java.io.IOException { 462 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 463 PARSER, input, extensionRegistry); 464 } 465 parseDelimitedFrom( java.io.InputStream input)466 public static com.google.cloud.compute.v1.BackendServiceIAP parseDelimitedFrom( 467 java.io.InputStream input) throws java.io.IOException { 468 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 469 } 470 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)471 public static com.google.cloud.compute.v1.BackendServiceIAP parseDelimitedFrom( 472 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 473 throws java.io.IOException { 474 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 475 PARSER, input, extensionRegistry); 476 } 477 parseFrom( com.google.protobuf.CodedInputStream input)478 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom( 479 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 480 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 481 } 482 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)483 public static com.google.cloud.compute.v1.BackendServiceIAP parseFrom( 484 com.google.protobuf.CodedInputStream input, 485 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 486 throws java.io.IOException { 487 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 488 PARSER, input, extensionRegistry); 489 } 490 491 @java.lang.Override newBuilderForType()492 public Builder newBuilderForType() { 493 return newBuilder(); 494 } 495 newBuilder()496 public static Builder newBuilder() { 497 return DEFAULT_INSTANCE.toBuilder(); 498 } 499 newBuilder(com.google.cloud.compute.v1.BackendServiceIAP prototype)500 public static Builder newBuilder(com.google.cloud.compute.v1.BackendServiceIAP prototype) { 501 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 502 } 503 504 @java.lang.Override toBuilder()505 public Builder toBuilder() { 506 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 507 } 508 509 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)510 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 511 Builder builder = new Builder(parent); 512 return builder; 513 } 514 /** 515 * 516 * 517 * <pre> 518 * Identity-Aware Proxy 519 * </pre> 520 * 521 * Protobuf type {@code google.cloud.compute.v1.BackendServiceIAP} 522 */ 523 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 524 implements 525 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.BackendServiceIAP) 526 com.google.cloud.compute.v1.BackendServiceIAPOrBuilder { getDescriptor()527 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 528 return com.google.cloud.compute.v1.Compute 529 .internal_static_google_cloud_compute_v1_BackendServiceIAP_descriptor; 530 } 531 532 @java.lang.Override 533 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()534 internalGetFieldAccessorTable() { 535 return com.google.cloud.compute.v1.Compute 536 .internal_static_google_cloud_compute_v1_BackendServiceIAP_fieldAccessorTable 537 .ensureFieldAccessorsInitialized( 538 com.google.cloud.compute.v1.BackendServiceIAP.class, 539 com.google.cloud.compute.v1.BackendServiceIAP.Builder.class); 540 } 541 542 // Construct using com.google.cloud.compute.v1.BackendServiceIAP.newBuilder() Builder()543 private Builder() {} 544 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)545 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 546 super(parent); 547 } 548 549 @java.lang.Override clear()550 public Builder clear() { 551 super.clear(); 552 bitField0_ = 0; 553 enabled_ = false; 554 oauth2ClientId_ = ""; 555 oauth2ClientSecret_ = ""; 556 oauth2ClientSecretSha256_ = ""; 557 return this; 558 } 559 560 @java.lang.Override getDescriptorForType()561 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 562 return com.google.cloud.compute.v1.Compute 563 .internal_static_google_cloud_compute_v1_BackendServiceIAP_descriptor; 564 } 565 566 @java.lang.Override getDefaultInstanceForType()567 public com.google.cloud.compute.v1.BackendServiceIAP getDefaultInstanceForType() { 568 return com.google.cloud.compute.v1.BackendServiceIAP.getDefaultInstance(); 569 } 570 571 @java.lang.Override build()572 public com.google.cloud.compute.v1.BackendServiceIAP build() { 573 com.google.cloud.compute.v1.BackendServiceIAP result = buildPartial(); 574 if (!result.isInitialized()) { 575 throw newUninitializedMessageException(result); 576 } 577 return result; 578 } 579 580 @java.lang.Override buildPartial()581 public com.google.cloud.compute.v1.BackendServiceIAP buildPartial() { 582 com.google.cloud.compute.v1.BackendServiceIAP result = 583 new com.google.cloud.compute.v1.BackendServiceIAP(this); 584 if (bitField0_ != 0) { 585 buildPartial0(result); 586 } 587 onBuilt(); 588 return result; 589 } 590 buildPartial0(com.google.cloud.compute.v1.BackendServiceIAP result)591 private void buildPartial0(com.google.cloud.compute.v1.BackendServiceIAP result) { 592 int from_bitField0_ = bitField0_; 593 int to_bitField0_ = 0; 594 if (((from_bitField0_ & 0x00000001) != 0)) { 595 result.enabled_ = enabled_; 596 to_bitField0_ |= 0x00000001; 597 } 598 if (((from_bitField0_ & 0x00000002) != 0)) { 599 result.oauth2ClientId_ = oauth2ClientId_; 600 to_bitField0_ |= 0x00000002; 601 } 602 if (((from_bitField0_ & 0x00000004) != 0)) { 603 result.oauth2ClientSecret_ = oauth2ClientSecret_; 604 to_bitField0_ |= 0x00000004; 605 } 606 if (((from_bitField0_ & 0x00000008) != 0)) { 607 result.oauth2ClientSecretSha256_ = oauth2ClientSecretSha256_; 608 to_bitField0_ |= 0x00000008; 609 } 610 result.bitField0_ |= to_bitField0_; 611 } 612 613 @java.lang.Override clone()614 public Builder clone() { 615 return super.clone(); 616 } 617 618 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)619 public Builder setField( 620 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 621 return super.setField(field, value); 622 } 623 624 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)625 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 626 return super.clearField(field); 627 } 628 629 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)630 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 631 return super.clearOneof(oneof); 632 } 633 634 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)635 public Builder setRepeatedField( 636 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 637 return super.setRepeatedField(field, index, value); 638 } 639 640 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)641 public Builder addRepeatedField( 642 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 643 return super.addRepeatedField(field, value); 644 } 645 646 @java.lang.Override mergeFrom(com.google.protobuf.Message other)647 public Builder mergeFrom(com.google.protobuf.Message other) { 648 if (other instanceof com.google.cloud.compute.v1.BackendServiceIAP) { 649 return mergeFrom((com.google.cloud.compute.v1.BackendServiceIAP) other); 650 } else { 651 super.mergeFrom(other); 652 return this; 653 } 654 } 655 mergeFrom(com.google.cloud.compute.v1.BackendServiceIAP other)656 public Builder mergeFrom(com.google.cloud.compute.v1.BackendServiceIAP other) { 657 if (other == com.google.cloud.compute.v1.BackendServiceIAP.getDefaultInstance()) return this; 658 if (other.hasEnabled()) { 659 setEnabled(other.getEnabled()); 660 } 661 if (other.hasOauth2ClientId()) { 662 oauth2ClientId_ = other.oauth2ClientId_; 663 bitField0_ |= 0x00000002; 664 onChanged(); 665 } 666 if (other.hasOauth2ClientSecret()) { 667 oauth2ClientSecret_ = other.oauth2ClientSecret_; 668 bitField0_ |= 0x00000004; 669 onChanged(); 670 } 671 if (other.hasOauth2ClientSecretSha256()) { 672 oauth2ClientSecretSha256_ = other.oauth2ClientSecretSha256_; 673 bitField0_ |= 0x00000008; 674 onChanged(); 675 } 676 this.mergeUnknownFields(other.getUnknownFields()); 677 onChanged(); 678 return this; 679 } 680 681 @java.lang.Override isInitialized()682 public final boolean isInitialized() { 683 return true; 684 } 685 686 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)687 public Builder mergeFrom( 688 com.google.protobuf.CodedInputStream input, 689 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 690 throws java.io.IOException { 691 if (extensionRegistry == null) { 692 throw new java.lang.NullPointerException(); 693 } 694 try { 695 boolean done = false; 696 while (!done) { 697 int tag = input.readTag(); 698 switch (tag) { 699 case 0: 700 done = true; 701 break; 702 case 8149512: 703 { 704 enabled_ = input.readBool(); 705 bitField0_ |= 0x00000001; 706 break; 707 } // case 8149512 708 case 407996162: 709 { 710 oauth2ClientSecret_ = input.readStringRequireUtf8(); 711 bitField0_ |= 0x00000004; 712 break; 713 } // case 407996162 714 case 903230258: 715 { 716 oauth2ClientSecretSha256_ = input.readStringRequireUtf8(); 717 bitField0_ |= 0x00000008; 718 break; 719 } // case 903230258 720 case -1782826406: 721 { 722 oauth2ClientId_ = input.readStringRequireUtf8(); 723 bitField0_ |= 0x00000002; 724 break; 725 } // case -1782826406 726 default: 727 { 728 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 729 done = true; // was an endgroup tag 730 } 731 break; 732 } // default: 733 } // switch (tag) 734 } // while (!done) 735 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 736 throw e.unwrapIOException(); 737 } finally { 738 onChanged(); 739 } // finally 740 return this; 741 } 742 743 private int bitField0_; 744 745 private boolean enabled_; 746 /** 747 * 748 * 749 * <pre> 750 * Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty. 751 * </pre> 752 * 753 * <code>optional bool enabled = 1018689;</code> 754 * 755 * @return Whether the enabled field is set. 756 */ 757 @java.lang.Override hasEnabled()758 public boolean hasEnabled() { 759 return ((bitField0_ & 0x00000001) != 0); 760 } 761 /** 762 * 763 * 764 * <pre> 765 * Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty. 766 * </pre> 767 * 768 * <code>optional bool enabled = 1018689;</code> 769 * 770 * @return The enabled. 771 */ 772 @java.lang.Override getEnabled()773 public boolean getEnabled() { 774 return enabled_; 775 } 776 /** 777 * 778 * 779 * <pre> 780 * Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty. 781 * </pre> 782 * 783 * <code>optional bool enabled = 1018689;</code> 784 * 785 * @param value The enabled to set. 786 * @return This builder for chaining. 787 */ setEnabled(boolean value)788 public Builder setEnabled(boolean value) { 789 790 enabled_ = value; 791 bitField0_ |= 0x00000001; 792 onChanged(); 793 return this; 794 } 795 /** 796 * 797 * 798 * <pre> 799 * Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty. 800 * </pre> 801 * 802 * <code>optional bool enabled = 1018689;</code> 803 * 804 * @return This builder for chaining. 805 */ clearEnabled()806 public Builder clearEnabled() { 807 bitField0_ = (bitField0_ & ~0x00000001); 808 enabled_ = false; 809 onChanged(); 810 return this; 811 } 812 813 private java.lang.Object oauth2ClientId_ = ""; 814 /** 815 * 816 * 817 * <pre> 818 * OAuth2 client ID to use for the authentication flow. 819 * </pre> 820 * 821 * <code>optional string oauth2_client_id = 314017611;</code> 822 * 823 * @return Whether the oauth2ClientId field is set. 824 */ hasOauth2ClientId()825 public boolean hasOauth2ClientId() { 826 return ((bitField0_ & 0x00000002) != 0); 827 } 828 /** 829 * 830 * 831 * <pre> 832 * OAuth2 client ID to use for the authentication flow. 833 * </pre> 834 * 835 * <code>optional string oauth2_client_id = 314017611;</code> 836 * 837 * @return The oauth2ClientId. 838 */ getOauth2ClientId()839 public java.lang.String getOauth2ClientId() { 840 java.lang.Object ref = oauth2ClientId_; 841 if (!(ref instanceof java.lang.String)) { 842 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 843 java.lang.String s = bs.toStringUtf8(); 844 oauth2ClientId_ = s; 845 return s; 846 } else { 847 return (java.lang.String) ref; 848 } 849 } 850 /** 851 * 852 * 853 * <pre> 854 * OAuth2 client ID to use for the authentication flow. 855 * </pre> 856 * 857 * <code>optional string oauth2_client_id = 314017611;</code> 858 * 859 * @return The bytes for oauth2ClientId. 860 */ getOauth2ClientIdBytes()861 public com.google.protobuf.ByteString getOauth2ClientIdBytes() { 862 java.lang.Object ref = oauth2ClientId_; 863 if (ref instanceof String) { 864 com.google.protobuf.ByteString b = 865 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 866 oauth2ClientId_ = b; 867 return b; 868 } else { 869 return (com.google.protobuf.ByteString) ref; 870 } 871 } 872 /** 873 * 874 * 875 * <pre> 876 * OAuth2 client ID to use for the authentication flow. 877 * </pre> 878 * 879 * <code>optional string oauth2_client_id = 314017611;</code> 880 * 881 * @param value The oauth2ClientId to set. 882 * @return This builder for chaining. 883 */ setOauth2ClientId(java.lang.String value)884 public Builder setOauth2ClientId(java.lang.String value) { 885 if (value == null) { 886 throw new NullPointerException(); 887 } 888 oauth2ClientId_ = value; 889 bitField0_ |= 0x00000002; 890 onChanged(); 891 return this; 892 } 893 /** 894 * 895 * 896 * <pre> 897 * OAuth2 client ID to use for the authentication flow. 898 * </pre> 899 * 900 * <code>optional string oauth2_client_id = 314017611;</code> 901 * 902 * @return This builder for chaining. 903 */ clearOauth2ClientId()904 public Builder clearOauth2ClientId() { 905 oauth2ClientId_ = getDefaultInstance().getOauth2ClientId(); 906 bitField0_ = (bitField0_ & ~0x00000002); 907 onChanged(); 908 return this; 909 } 910 /** 911 * 912 * 913 * <pre> 914 * OAuth2 client ID to use for the authentication flow. 915 * </pre> 916 * 917 * <code>optional string oauth2_client_id = 314017611;</code> 918 * 919 * @param value The bytes for oauth2ClientId to set. 920 * @return This builder for chaining. 921 */ setOauth2ClientIdBytes(com.google.protobuf.ByteString value)922 public Builder setOauth2ClientIdBytes(com.google.protobuf.ByteString value) { 923 if (value == null) { 924 throw new NullPointerException(); 925 } 926 checkByteStringIsUtf8(value); 927 oauth2ClientId_ = value; 928 bitField0_ |= 0x00000002; 929 onChanged(); 930 return this; 931 } 932 933 private java.lang.Object oauth2ClientSecret_ = ""; 934 /** 935 * 936 * 937 * <pre> 938 * OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly 939 * </pre> 940 * 941 * <code>optional string oauth2_client_secret = 50999520;</code> 942 * 943 * @return Whether the oauth2ClientSecret field is set. 944 */ hasOauth2ClientSecret()945 public boolean hasOauth2ClientSecret() { 946 return ((bitField0_ & 0x00000004) != 0); 947 } 948 /** 949 * 950 * 951 * <pre> 952 * OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly 953 * </pre> 954 * 955 * <code>optional string oauth2_client_secret = 50999520;</code> 956 * 957 * @return The oauth2ClientSecret. 958 */ getOauth2ClientSecret()959 public java.lang.String getOauth2ClientSecret() { 960 java.lang.Object ref = oauth2ClientSecret_; 961 if (!(ref instanceof java.lang.String)) { 962 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 963 java.lang.String s = bs.toStringUtf8(); 964 oauth2ClientSecret_ = s; 965 return s; 966 } else { 967 return (java.lang.String) ref; 968 } 969 } 970 /** 971 * 972 * 973 * <pre> 974 * OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly 975 * </pre> 976 * 977 * <code>optional string oauth2_client_secret = 50999520;</code> 978 * 979 * @return The bytes for oauth2ClientSecret. 980 */ getOauth2ClientSecretBytes()981 public com.google.protobuf.ByteString getOauth2ClientSecretBytes() { 982 java.lang.Object ref = oauth2ClientSecret_; 983 if (ref instanceof String) { 984 com.google.protobuf.ByteString b = 985 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 986 oauth2ClientSecret_ = b; 987 return b; 988 } else { 989 return (com.google.protobuf.ByteString) ref; 990 } 991 } 992 /** 993 * 994 * 995 * <pre> 996 * OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly 997 * </pre> 998 * 999 * <code>optional string oauth2_client_secret = 50999520;</code> 1000 * 1001 * @param value The oauth2ClientSecret to set. 1002 * @return This builder for chaining. 1003 */ setOauth2ClientSecret(java.lang.String value)1004 public Builder setOauth2ClientSecret(java.lang.String value) { 1005 if (value == null) { 1006 throw new NullPointerException(); 1007 } 1008 oauth2ClientSecret_ = value; 1009 bitField0_ |= 0x00000004; 1010 onChanged(); 1011 return this; 1012 } 1013 /** 1014 * 1015 * 1016 * <pre> 1017 * OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly 1018 * </pre> 1019 * 1020 * <code>optional string oauth2_client_secret = 50999520;</code> 1021 * 1022 * @return This builder for chaining. 1023 */ clearOauth2ClientSecret()1024 public Builder clearOauth2ClientSecret() { 1025 oauth2ClientSecret_ = getDefaultInstance().getOauth2ClientSecret(); 1026 bitField0_ = (bitField0_ & ~0x00000004); 1027 onChanged(); 1028 return this; 1029 } 1030 /** 1031 * 1032 * 1033 * <pre> 1034 * OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field. @InputOnly 1035 * </pre> 1036 * 1037 * <code>optional string oauth2_client_secret = 50999520;</code> 1038 * 1039 * @param value The bytes for oauth2ClientSecret to set. 1040 * @return This builder for chaining. 1041 */ setOauth2ClientSecretBytes(com.google.protobuf.ByteString value)1042 public Builder setOauth2ClientSecretBytes(com.google.protobuf.ByteString value) { 1043 if (value == null) { 1044 throw new NullPointerException(); 1045 } 1046 checkByteStringIsUtf8(value); 1047 oauth2ClientSecret_ = value; 1048 bitField0_ |= 0x00000004; 1049 onChanged(); 1050 return this; 1051 } 1052 1053 private java.lang.Object oauth2ClientSecretSha256_ = ""; 1054 /** 1055 * 1056 * 1057 * <pre> 1058 * [Output Only] SHA256 hash value for the field oauth2_client_secret above. 1059 * </pre> 1060 * 1061 * <code>optional string oauth2_client_secret_sha256 = 112903782;</code> 1062 * 1063 * @return Whether the oauth2ClientSecretSha256 field is set. 1064 */ hasOauth2ClientSecretSha256()1065 public boolean hasOauth2ClientSecretSha256() { 1066 return ((bitField0_ & 0x00000008) != 0); 1067 } 1068 /** 1069 * 1070 * 1071 * <pre> 1072 * [Output Only] SHA256 hash value for the field oauth2_client_secret above. 1073 * </pre> 1074 * 1075 * <code>optional string oauth2_client_secret_sha256 = 112903782;</code> 1076 * 1077 * @return The oauth2ClientSecretSha256. 1078 */ getOauth2ClientSecretSha256()1079 public java.lang.String getOauth2ClientSecretSha256() { 1080 java.lang.Object ref = oauth2ClientSecretSha256_; 1081 if (!(ref instanceof java.lang.String)) { 1082 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1083 java.lang.String s = bs.toStringUtf8(); 1084 oauth2ClientSecretSha256_ = s; 1085 return s; 1086 } else { 1087 return (java.lang.String) ref; 1088 } 1089 } 1090 /** 1091 * 1092 * 1093 * <pre> 1094 * [Output Only] SHA256 hash value for the field oauth2_client_secret above. 1095 * </pre> 1096 * 1097 * <code>optional string oauth2_client_secret_sha256 = 112903782;</code> 1098 * 1099 * @return The bytes for oauth2ClientSecretSha256. 1100 */ getOauth2ClientSecretSha256Bytes()1101 public com.google.protobuf.ByteString getOauth2ClientSecretSha256Bytes() { 1102 java.lang.Object ref = oauth2ClientSecretSha256_; 1103 if (ref instanceof String) { 1104 com.google.protobuf.ByteString b = 1105 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1106 oauth2ClientSecretSha256_ = b; 1107 return b; 1108 } else { 1109 return (com.google.protobuf.ByteString) ref; 1110 } 1111 } 1112 /** 1113 * 1114 * 1115 * <pre> 1116 * [Output Only] SHA256 hash value for the field oauth2_client_secret above. 1117 * </pre> 1118 * 1119 * <code>optional string oauth2_client_secret_sha256 = 112903782;</code> 1120 * 1121 * @param value The oauth2ClientSecretSha256 to set. 1122 * @return This builder for chaining. 1123 */ setOauth2ClientSecretSha256(java.lang.String value)1124 public Builder setOauth2ClientSecretSha256(java.lang.String value) { 1125 if (value == null) { 1126 throw new NullPointerException(); 1127 } 1128 oauth2ClientSecretSha256_ = value; 1129 bitField0_ |= 0x00000008; 1130 onChanged(); 1131 return this; 1132 } 1133 /** 1134 * 1135 * 1136 * <pre> 1137 * [Output Only] SHA256 hash value for the field oauth2_client_secret above. 1138 * </pre> 1139 * 1140 * <code>optional string oauth2_client_secret_sha256 = 112903782;</code> 1141 * 1142 * @return This builder for chaining. 1143 */ clearOauth2ClientSecretSha256()1144 public Builder clearOauth2ClientSecretSha256() { 1145 oauth2ClientSecretSha256_ = getDefaultInstance().getOauth2ClientSecretSha256(); 1146 bitField0_ = (bitField0_ & ~0x00000008); 1147 onChanged(); 1148 return this; 1149 } 1150 /** 1151 * 1152 * 1153 * <pre> 1154 * [Output Only] SHA256 hash value for the field oauth2_client_secret above. 1155 * </pre> 1156 * 1157 * <code>optional string oauth2_client_secret_sha256 = 112903782;</code> 1158 * 1159 * @param value The bytes for oauth2ClientSecretSha256 to set. 1160 * @return This builder for chaining. 1161 */ setOauth2ClientSecretSha256Bytes(com.google.protobuf.ByteString value)1162 public Builder setOauth2ClientSecretSha256Bytes(com.google.protobuf.ByteString value) { 1163 if (value == null) { 1164 throw new NullPointerException(); 1165 } 1166 checkByteStringIsUtf8(value); 1167 oauth2ClientSecretSha256_ = value; 1168 bitField0_ |= 0x00000008; 1169 onChanged(); 1170 return this; 1171 } 1172 1173 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1174 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1175 return super.setUnknownFields(unknownFields); 1176 } 1177 1178 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1179 public final Builder mergeUnknownFields( 1180 final com.google.protobuf.UnknownFieldSet unknownFields) { 1181 return super.mergeUnknownFields(unknownFields); 1182 } 1183 1184 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.BackendServiceIAP) 1185 } 1186 1187 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.BackendServiceIAP) 1188 private static final com.google.cloud.compute.v1.BackendServiceIAP DEFAULT_INSTANCE; 1189 1190 static { 1191 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.BackendServiceIAP(); 1192 } 1193 getDefaultInstance()1194 public static com.google.cloud.compute.v1.BackendServiceIAP getDefaultInstance() { 1195 return DEFAULT_INSTANCE; 1196 } 1197 1198 private static final com.google.protobuf.Parser<BackendServiceIAP> PARSER = 1199 new com.google.protobuf.AbstractParser<BackendServiceIAP>() { 1200 @java.lang.Override 1201 public BackendServiceIAP parsePartialFrom( 1202 com.google.protobuf.CodedInputStream input, 1203 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1204 throws com.google.protobuf.InvalidProtocolBufferException { 1205 Builder builder = newBuilder(); 1206 try { 1207 builder.mergeFrom(input, extensionRegistry); 1208 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1209 throw e.setUnfinishedMessage(builder.buildPartial()); 1210 } catch (com.google.protobuf.UninitializedMessageException e) { 1211 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1212 } catch (java.io.IOException e) { 1213 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1214 .setUnfinishedMessage(builder.buildPartial()); 1215 } 1216 return builder.buildPartial(); 1217 } 1218 }; 1219 parser()1220 public static com.google.protobuf.Parser<BackendServiceIAP> parser() { 1221 return PARSER; 1222 } 1223 1224 @java.lang.Override getParserForType()1225 public com.google.protobuf.Parser<BackendServiceIAP> getParserForType() { 1226 return PARSER; 1227 } 1228 1229 @java.lang.Override getDefaultInstanceForType()1230 public com.google.cloud.compute.v1.BackendServiceIAP getDefaultInstanceForType() { 1231 return DEFAULT_INSTANCE; 1232 } 1233 } 1234