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/recaptchaenterprise/v1/recaptchaenterprise.proto 18 19 package com.google.recaptchaenterprise.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * A key used to identify and configure applications (web and/or mobile) that 26 * use reCAPTCHA Enterprise. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.recaptchaenterprise.v1.Key} 30 */ 31 public final class Key extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1.Key) 34 KeyOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use Key.newBuilder() to construct. Key(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private Key(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 Key()41 private Key() { 42 name_ = ""; 43 displayName_ = ""; 44 } 45 46 @java.lang.Override 47 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)48 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 49 return new Key(); 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.recaptchaenterprise.v1.RecaptchaEnterpriseProto 59 .internal_static_google_cloud_recaptchaenterprise_v1_Key_descriptor; 60 } 61 62 @SuppressWarnings({"rawtypes"}) 63 @java.lang.Override internalGetMapField(int number)64 protected com.google.protobuf.MapField internalGetMapField(int number) { 65 switch (number) { 66 case 6: 67 return internalGetLabels(); 68 default: 69 throw new RuntimeException("Invalid map field number: " + number); 70 } 71 } 72 73 @java.lang.Override 74 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()75 internalGetFieldAccessorTable() { 76 return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto 77 .internal_static_google_cloud_recaptchaenterprise_v1_Key_fieldAccessorTable 78 .ensureFieldAccessorsInitialized( 79 com.google.recaptchaenterprise.v1.Key.class, 80 com.google.recaptchaenterprise.v1.Key.Builder.class); 81 } 82 83 private int platformSettingsCase_ = 0; 84 private java.lang.Object platformSettings_; 85 86 public enum PlatformSettingsCase 87 implements 88 com.google.protobuf.Internal.EnumLite, 89 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 90 WEB_SETTINGS(3), 91 ANDROID_SETTINGS(4), 92 IOS_SETTINGS(5), 93 PLATFORMSETTINGS_NOT_SET(0); 94 private final int value; 95 PlatformSettingsCase(int value)96 private PlatformSettingsCase(int value) { 97 this.value = value; 98 } 99 /** 100 * @param value The number of the enum to look for. 101 * @return The enum associated with the given number. 102 * @deprecated Use {@link #forNumber(int)} instead. 103 */ 104 @java.lang.Deprecated valueOf(int value)105 public static PlatformSettingsCase valueOf(int value) { 106 return forNumber(value); 107 } 108 forNumber(int value)109 public static PlatformSettingsCase forNumber(int value) { 110 switch (value) { 111 case 3: 112 return WEB_SETTINGS; 113 case 4: 114 return ANDROID_SETTINGS; 115 case 5: 116 return IOS_SETTINGS; 117 case 0: 118 return PLATFORMSETTINGS_NOT_SET; 119 default: 120 return null; 121 } 122 } 123 getNumber()124 public int getNumber() { 125 return this.value; 126 } 127 }; 128 getPlatformSettingsCase()129 public PlatformSettingsCase getPlatformSettingsCase() { 130 return PlatformSettingsCase.forNumber(platformSettingsCase_); 131 } 132 133 public static final int NAME_FIELD_NUMBER = 1; 134 135 @SuppressWarnings("serial") 136 private volatile java.lang.Object name_ = ""; 137 /** 138 * 139 * 140 * <pre> 141 * The resource name for the Key in the format 142 * "projects/{project}/keys/{key}". 143 * </pre> 144 * 145 * <code>string name = 1;</code> 146 * 147 * @return The name. 148 */ 149 @java.lang.Override getName()150 public java.lang.String getName() { 151 java.lang.Object ref = name_; 152 if (ref instanceof java.lang.String) { 153 return (java.lang.String) ref; 154 } else { 155 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 156 java.lang.String s = bs.toStringUtf8(); 157 name_ = s; 158 return s; 159 } 160 } 161 /** 162 * 163 * 164 * <pre> 165 * The resource name for the Key in the format 166 * "projects/{project}/keys/{key}". 167 * </pre> 168 * 169 * <code>string name = 1;</code> 170 * 171 * @return The bytes for name. 172 */ 173 @java.lang.Override getNameBytes()174 public com.google.protobuf.ByteString getNameBytes() { 175 java.lang.Object ref = name_; 176 if (ref instanceof java.lang.String) { 177 com.google.protobuf.ByteString b = 178 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 179 name_ = b; 180 return b; 181 } else { 182 return (com.google.protobuf.ByteString) ref; 183 } 184 } 185 186 public static final int DISPLAY_NAME_FIELD_NUMBER = 2; 187 188 @SuppressWarnings("serial") 189 private volatile java.lang.Object displayName_ = ""; 190 /** 191 * 192 * 193 * <pre> 194 * Human-readable display name of this key. Modifiable by user. 195 * </pre> 196 * 197 * <code>string display_name = 2;</code> 198 * 199 * @return The displayName. 200 */ 201 @java.lang.Override getDisplayName()202 public java.lang.String getDisplayName() { 203 java.lang.Object ref = displayName_; 204 if (ref instanceof java.lang.String) { 205 return (java.lang.String) ref; 206 } else { 207 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 208 java.lang.String s = bs.toStringUtf8(); 209 displayName_ = s; 210 return s; 211 } 212 } 213 /** 214 * 215 * 216 * <pre> 217 * Human-readable display name of this key. Modifiable by user. 218 * </pre> 219 * 220 * <code>string display_name = 2;</code> 221 * 222 * @return The bytes for displayName. 223 */ 224 @java.lang.Override getDisplayNameBytes()225 public com.google.protobuf.ByteString getDisplayNameBytes() { 226 java.lang.Object ref = displayName_; 227 if (ref instanceof java.lang.String) { 228 com.google.protobuf.ByteString b = 229 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 230 displayName_ = b; 231 return b; 232 } else { 233 return (com.google.protobuf.ByteString) ref; 234 } 235 } 236 237 public static final int WEB_SETTINGS_FIELD_NUMBER = 3; 238 /** 239 * 240 * 241 * <pre> 242 * Settings for keys that can be used by websites. 243 * </pre> 244 * 245 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 246 * 247 * @return Whether the webSettings field is set. 248 */ 249 @java.lang.Override hasWebSettings()250 public boolean hasWebSettings() { 251 return platformSettingsCase_ == 3; 252 } 253 /** 254 * 255 * 256 * <pre> 257 * Settings for keys that can be used by websites. 258 * </pre> 259 * 260 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 261 * 262 * @return The webSettings. 263 */ 264 @java.lang.Override getWebSettings()265 public com.google.recaptchaenterprise.v1.WebKeySettings getWebSettings() { 266 if (platformSettingsCase_ == 3) { 267 return (com.google.recaptchaenterprise.v1.WebKeySettings) platformSettings_; 268 } 269 return com.google.recaptchaenterprise.v1.WebKeySettings.getDefaultInstance(); 270 } 271 /** 272 * 273 * 274 * <pre> 275 * Settings for keys that can be used by websites. 276 * </pre> 277 * 278 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 279 */ 280 @java.lang.Override getWebSettingsOrBuilder()281 public com.google.recaptchaenterprise.v1.WebKeySettingsOrBuilder getWebSettingsOrBuilder() { 282 if (platformSettingsCase_ == 3) { 283 return (com.google.recaptchaenterprise.v1.WebKeySettings) platformSettings_; 284 } 285 return com.google.recaptchaenterprise.v1.WebKeySettings.getDefaultInstance(); 286 } 287 288 public static final int ANDROID_SETTINGS_FIELD_NUMBER = 4; 289 /** 290 * 291 * 292 * <pre> 293 * Settings for keys that can be used by Android apps. 294 * </pre> 295 * 296 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 297 * 298 * @return Whether the androidSettings field is set. 299 */ 300 @java.lang.Override hasAndroidSettings()301 public boolean hasAndroidSettings() { 302 return platformSettingsCase_ == 4; 303 } 304 /** 305 * 306 * 307 * <pre> 308 * Settings for keys that can be used by Android apps. 309 * </pre> 310 * 311 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 312 * 313 * @return The androidSettings. 314 */ 315 @java.lang.Override getAndroidSettings()316 public com.google.recaptchaenterprise.v1.AndroidKeySettings getAndroidSettings() { 317 if (platformSettingsCase_ == 4) { 318 return (com.google.recaptchaenterprise.v1.AndroidKeySettings) platformSettings_; 319 } 320 return com.google.recaptchaenterprise.v1.AndroidKeySettings.getDefaultInstance(); 321 } 322 /** 323 * 324 * 325 * <pre> 326 * Settings for keys that can be used by Android apps. 327 * </pre> 328 * 329 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 330 */ 331 @java.lang.Override 332 public com.google.recaptchaenterprise.v1.AndroidKeySettingsOrBuilder getAndroidSettingsOrBuilder()333 getAndroidSettingsOrBuilder() { 334 if (platformSettingsCase_ == 4) { 335 return (com.google.recaptchaenterprise.v1.AndroidKeySettings) platformSettings_; 336 } 337 return com.google.recaptchaenterprise.v1.AndroidKeySettings.getDefaultInstance(); 338 } 339 340 public static final int IOS_SETTINGS_FIELD_NUMBER = 5; 341 /** 342 * 343 * 344 * <pre> 345 * Settings for keys that can be used by iOS apps. 346 * </pre> 347 * 348 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 349 * 350 * @return Whether the iosSettings field is set. 351 */ 352 @java.lang.Override hasIosSettings()353 public boolean hasIosSettings() { 354 return platformSettingsCase_ == 5; 355 } 356 /** 357 * 358 * 359 * <pre> 360 * Settings for keys that can be used by iOS apps. 361 * </pre> 362 * 363 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 364 * 365 * @return The iosSettings. 366 */ 367 @java.lang.Override getIosSettings()368 public com.google.recaptchaenterprise.v1.IOSKeySettings getIosSettings() { 369 if (platformSettingsCase_ == 5) { 370 return (com.google.recaptchaenterprise.v1.IOSKeySettings) platformSettings_; 371 } 372 return com.google.recaptchaenterprise.v1.IOSKeySettings.getDefaultInstance(); 373 } 374 /** 375 * 376 * 377 * <pre> 378 * Settings for keys that can be used by iOS apps. 379 * </pre> 380 * 381 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 382 */ 383 @java.lang.Override getIosSettingsOrBuilder()384 public com.google.recaptchaenterprise.v1.IOSKeySettingsOrBuilder getIosSettingsOrBuilder() { 385 if (platformSettingsCase_ == 5) { 386 return (com.google.recaptchaenterprise.v1.IOSKeySettings) platformSettings_; 387 } 388 return com.google.recaptchaenterprise.v1.IOSKeySettings.getDefaultInstance(); 389 } 390 391 public static final int LABELS_FIELD_NUMBER = 6; 392 393 private static final class LabelsDefaultEntryHolder { 394 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 395 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 396 com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto 397 .internal_static_google_cloud_recaptchaenterprise_v1_Key_LabelsEntry_descriptor, 398 com.google.protobuf.WireFormat.FieldType.STRING, 399 "", 400 com.google.protobuf.WireFormat.FieldType.STRING, 401 ""); 402 } 403 404 @SuppressWarnings("serial") 405 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 406 internalGetLabels()407 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 408 if (labels_ == null) { 409 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 410 } 411 return labels_; 412 } 413 getLabelsCount()414 public int getLabelsCount() { 415 return internalGetLabels().getMap().size(); 416 } 417 /** 418 * 419 * 420 * <pre> 421 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 422 * Creating and managing labels</a>. 423 * </pre> 424 * 425 * <code>map<string, string> labels = 6;</code> 426 */ 427 @java.lang.Override containsLabels(java.lang.String key)428 public boolean containsLabels(java.lang.String key) { 429 if (key == null) { 430 throw new NullPointerException("map key"); 431 } 432 return internalGetLabels().getMap().containsKey(key); 433 } 434 /** Use {@link #getLabelsMap()} instead. */ 435 @java.lang.Override 436 @java.lang.Deprecated getLabels()437 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 438 return getLabelsMap(); 439 } 440 /** 441 * 442 * 443 * <pre> 444 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 445 * Creating and managing labels</a>. 446 * </pre> 447 * 448 * <code>map<string, string> labels = 6;</code> 449 */ 450 @java.lang.Override getLabelsMap()451 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 452 return internalGetLabels().getMap(); 453 } 454 /** 455 * 456 * 457 * <pre> 458 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 459 * Creating and managing labels</a>. 460 * </pre> 461 * 462 * <code>map<string, string> labels = 6;</code> 463 */ 464 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)465 public /* nullable */ java.lang.String getLabelsOrDefault( 466 java.lang.String key, 467 /* nullable */ 468 java.lang.String defaultValue) { 469 if (key == null) { 470 throw new NullPointerException("map key"); 471 } 472 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 473 return map.containsKey(key) ? map.get(key) : defaultValue; 474 } 475 /** 476 * 477 * 478 * <pre> 479 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 480 * Creating and managing labels</a>. 481 * </pre> 482 * 483 * <code>map<string, string> labels = 6;</code> 484 */ 485 @java.lang.Override getLabelsOrThrow(java.lang.String key)486 public java.lang.String getLabelsOrThrow(java.lang.String key) { 487 if (key == null) { 488 throw new NullPointerException("map key"); 489 } 490 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 491 if (!map.containsKey(key)) { 492 throw new java.lang.IllegalArgumentException(); 493 } 494 return map.get(key); 495 } 496 497 public static final int CREATE_TIME_FIELD_NUMBER = 7; 498 private com.google.protobuf.Timestamp createTime_; 499 /** 500 * 501 * 502 * <pre> 503 * Output only. The timestamp corresponding to the creation of this Key. 504 * </pre> 505 * 506 * <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 507 * </code> 508 * 509 * @return Whether the createTime field is set. 510 */ 511 @java.lang.Override hasCreateTime()512 public boolean hasCreateTime() { 513 return createTime_ != null; 514 } 515 /** 516 * 517 * 518 * <pre> 519 * Output only. The timestamp corresponding to the creation of this Key. 520 * </pre> 521 * 522 * <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 523 * </code> 524 * 525 * @return The createTime. 526 */ 527 @java.lang.Override getCreateTime()528 public com.google.protobuf.Timestamp getCreateTime() { 529 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 530 } 531 /** 532 * 533 * 534 * <pre> 535 * Output only. The timestamp corresponding to the creation of this Key. 536 * </pre> 537 * 538 * <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 539 * </code> 540 */ 541 @java.lang.Override getCreateTimeOrBuilder()542 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 543 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 544 } 545 546 public static final int TESTING_OPTIONS_FIELD_NUMBER = 9; 547 private com.google.recaptchaenterprise.v1.TestingOptions testingOptions_; 548 /** 549 * 550 * 551 * <pre> 552 * Options for user acceptance testing. 553 * </pre> 554 * 555 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 556 * 557 * @return Whether the testingOptions field is set. 558 */ 559 @java.lang.Override hasTestingOptions()560 public boolean hasTestingOptions() { 561 return testingOptions_ != null; 562 } 563 /** 564 * 565 * 566 * <pre> 567 * Options for user acceptance testing. 568 * </pre> 569 * 570 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 571 * 572 * @return The testingOptions. 573 */ 574 @java.lang.Override getTestingOptions()575 public com.google.recaptchaenterprise.v1.TestingOptions getTestingOptions() { 576 return testingOptions_ == null 577 ? com.google.recaptchaenterprise.v1.TestingOptions.getDefaultInstance() 578 : testingOptions_; 579 } 580 /** 581 * 582 * 583 * <pre> 584 * Options for user acceptance testing. 585 * </pre> 586 * 587 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 588 */ 589 @java.lang.Override getTestingOptionsOrBuilder()590 public com.google.recaptchaenterprise.v1.TestingOptionsOrBuilder getTestingOptionsOrBuilder() { 591 return testingOptions_ == null 592 ? com.google.recaptchaenterprise.v1.TestingOptions.getDefaultInstance() 593 : testingOptions_; 594 } 595 596 public static final int WAF_SETTINGS_FIELD_NUMBER = 10; 597 private com.google.recaptchaenterprise.v1.WafSettings wafSettings_; 598 /** 599 * 600 * 601 * <pre> 602 * Settings for WAF 603 * </pre> 604 * 605 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 606 * 607 * @return Whether the wafSettings field is set. 608 */ 609 @java.lang.Override hasWafSettings()610 public boolean hasWafSettings() { 611 return wafSettings_ != null; 612 } 613 /** 614 * 615 * 616 * <pre> 617 * Settings for WAF 618 * </pre> 619 * 620 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 621 * 622 * @return The wafSettings. 623 */ 624 @java.lang.Override getWafSettings()625 public com.google.recaptchaenterprise.v1.WafSettings getWafSettings() { 626 return wafSettings_ == null 627 ? com.google.recaptchaenterprise.v1.WafSettings.getDefaultInstance() 628 : wafSettings_; 629 } 630 /** 631 * 632 * 633 * <pre> 634 * Settings for WAF 635 * </pre> 636 * 637 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 638 */ 639 @java.lang.Override getWafSettingsOrBuilder()640 public com.google.recaptchaenterprise.v1.WafSettingsOrBuilder getWafSettingsOrBuilder() { 641 return wafSettings_ == null 642 ? com.google.recaptchaenterprise.v1.WafSettings.getDefaultInstance() 643 : wafSettings_; 644 } 645 646 private byte memoizedIsInitialized = -1; 647 648 @java.lang.Override isInitialized()649 public final boolean isInitialized() { 650 byte isInitialized = memoizedIsInitialized; 651 if (isInitialized == 1) return true; 652 if (isInitialized == 0) return false; 653 654 memoizedIsInitialized = 1; 655 return true; 656 } 657 658 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)659 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 660 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 661 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 662 } 663 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 664 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); 665 } 666 if (platformSettingsCase_ == 3) { 667 output.writeMessage(3, (com.google.recaptchaenterprise.v1.WebKeySettings) platformSettings_); 668 } 669 if (platformSettingsCase_ == 4) { 670 output.writeMessage( 671 4, (com.google.recaptchaenterprise.v1.AndroidKeySettings) platformSettings_); 672 } 673 if (platformSettingsCase_ == 5) { 674 output.writeMessage(5, (com.google.recaptchaenterprise.v1.IOSKeySettings) platformSettings_); 675 } 676 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 677 output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); 678 if (createTime_ != null) { 679 output.writeMessage(7, getCreateTime()); 680 } 681 if (testingOptions_ != null) { 682 output.writeMessage(9, getTestingOptions()); 683 } 684 if (wafSettings_ != null) { 685 output.writeMessage(10, getWafSettings()); 686 } 687 getUnknownFields().writeTo(output); 688 } 689 690 @java.lang.Override getSerializedSize()691 public int getSerializedSize() { 692 int size = memoizedSize; 693 if (size != -1) return size; 694 695 size = 0; 696 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 697 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 698 } 699 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 700 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); 701 } 702 if (platformSettingsCase_ == 3) { 703 size += 704 com.google.protobuf.CodedOutputStream.computeMessageSize( 705 3, (com.google.recaptchaenterprise.v1.WebKeySettings) platformSettings_); 706 } 707 if (platformSettingsCase_ == 4) { 708 size += 709 com.google.protobuf.CodedOutputStream.computeMessageSize( 710 4, (com.google.recaptchaenterprise.v1.AndroidKeySettings) platformSettings_); 711 } 712 if (platformSettingsCase_ == 5) { 713 size += 714 com.google.protobuf.CodedOutputStream.computeMessageSize( 715 5, (com.google.recaptchaenterprise.v1.IOSKeySettings) platformSettings_); 716 } 717 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 718 internalGetLabels().getMap().entrySet()) { 719 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 720 LabelsDefaultEntryHolder.defaultEntry 721 .newBuilderForType() 722 .setKey(entry.getKey()) 723 .setValue(entry.getValue()) 724 .build(); 725 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); 726 } 727 if (createTime_ != null) { 728 size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); 729 } 730 if (testingOptions_ != null) { 731 size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getTestingOptions()); 732 } 733 if (wafSettings_ != null) { 734 size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getWafSettings()); 735 } 736 size += getUnknownFields().getSerializedSize(); 737 memoizedSize = size; 738 return size; 739 } 740 741 @java.lang.Override equals(final java.lang.Object obj)742 public boolean equals(final java.lang.Object obj) { 743 if (obj == this) { 744 return true; 745 } 746 if (!(obj instanceof com.google.recaptchaenterprise.v1.Key)) { 747 return super.equals(obj); 748 } 749 com.google.recaptchaenterprise.v1.Key other = (com.google.recaptchaenterprise.v1.Key) obj; 750 751 if (!getName().equals(other.getName())) return false; 752 if (!getDisplayName().equals(other.getDisplayName())) return false; 753 if (!internalGetLabels().equals(other.internalGetLabels())) return false; 754 if (hasCreateTime() != other.hasCreateTime()) return false; 755 if (hasCreateTime()) { 756 if (!getCreateTime().equals(other.getCreateTime())) return false; 757 } 758 if (hasTestingOptions() != other.hasTestingOptions()) return false; 759 if (hasTestingOptions()) { 760 if (!getTestingOptions().equals(other.getTestingOptions())) return false; 761 } 762 if (hasWafSettings() != other.hasWafSettings()) return false; 763 if (hasWafSettings()) { 764 if (!getWafSettings().equals(other.getWafSettings())) return false; 765 } 766 if (!getPlatformSettingsCase().equals(other.getPlatformSettingsCase())) return false; 767 switch (platformSettingsCase_) { 768 case 3: 769 if (!getWebSettings().equals(other.getWebSettings())) return false; 770 break; 771 case 4: 772 if (!getAndroidSettings().equals(other.getAndroidSettings())) return false; 773 break; 774 case 5: 775 if (!getIosSettings().equals(other.getIosSettings())) return false; 776 break; 777 case 0: 778 default: 779 } 780 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 781 return true; 782 } 783 784 @java.lang.Override hashCode()785 public int hashCode() { 786 if (memoizedHashCode != 0) { 787 return memoizedHashCode; 788 } 789 int hash = 41; 790 hash = (19 * hash) + getDescriptor().hashCode(); 791 hash = (37 * hash) + NAME_FIELD_NUMBER; 792 hash = (53 * hash) + getName().hashCode(); 793 hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; 794 hash = (53 * hash) + getDisplayName().hashCode(); 795 if (!internalGetLabels().getMap().isEmpty()) { 796 hash = (37 * hash) + LABELS_FIELD_NUMBER; 797 hash = (53 * hash) + internalGetLabels().hashCode(); 798 } 799 if (hasCreateTime()) { 800 hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; 801 hash = (53 * hash) + getCreateTime().hashCode(); 802 } 803 if (hasTestingOptions()) { 804 hash = (37 * hash) + TESTING_OPTIONS_FIELD_NUMBER; 805 hash = (53 * hash) + getTestingOptions().hashCode(); 806 } 807 if (hasWafSettings()) { 808 hash = (37 * hash) + WAF_SETTINGS_FIELD_NUMBER; 809 hash = (53 * hash) + getWafSettings().hashCode(); 810 } 811 switch (platformSettingsCase_) { 812 case 3: 813 hash = (37 * hash) + WEB_SETTINGS_FIELD_NUMBER; 814 hash = (53 * hash) + getWebSettings().hashCode(); 815 break; 816 case 4: 817 hash = (37 * hash) + ANDROID_SETTINGS_FIELD_NUMBER; 818 hash = (53 * hash) + getAndroidSettings().hashCode(); 819 break; 820 case 5: 821 hash = (37 * hash) + IOS_SETTINGS_FIELD_NUMBER; 822 hash = (53 * hash) + getIosSettings().hashCode(); 823 break; 824 case 0: 825 default: 826 } 827 hash = (29 * hash) + getUnknownFields().hashCode(); 828 memoizedHashCode = hash; 829 return hash; 830 } 831 parseFrom(java.nio.ByteBuffer data)832 public static com.google.recaptchaenterprise.v1.Key parseFrom(java.nio.ByteBuffer data) 833 throws com.google.protobuf.InvalidProtocolBufferException { 834 return PARSER.parseFrom(data); 835 } 836 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)837 public static com.google.recaptchaenterprise.v1.Key parseFrom( 838 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 839 throws com.google.protobuf.InvalidProtocolBufferException { 840 return PARSER.parseFrom(data, extensionRegistry); 841 } 842 parseFrom(com.google.protobuf.ByteString data)843 public static com.google.recaptchaenterprise.v1.Key parseFrom(com.google.protobuf.ByteString data) 844 throws com.google.protobuf.InvalidProtocolBufferException { 845 return PARSER.parseFrom(data); 846 } 847 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)848 public static com.google.recaptchaenterprise.v1.Key parseFrom( 849 com.google.protobuf.ByteString data, 850 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 851 throws com.google.protobuf.InvalidProtocolBufferException { 852 return PARSER.parseFrom(data, extensionRegistry); 853 } 854 parseFrom(byte[] data)855 public static com.google.recaptchaenterprise.v1.Key parseFrom(byte[] data) 856 throws com.google.protobuf.InvalidProtocolBufferException { 857 return PARSER.parseFrom(data); 858 } 859 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)860 public static com.google.recaptchaenterprise.v1.Key parseFrom( 861 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 862 throws com.google.protobuf.InvalidProtocolBufferException { 863 return PARSER.parseFrom(data, extensionRegistry); 864 } 865 parseFrom(java.io.InputStream input)866 public static com.google.recaptchaenterprise.v1.Key parseFrom(java.io.InputStream input) 867 throws java.io.IOException { 868 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 869 } 870 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)871 public static com.google.recaptchaenterprise.v1.Key parseFrom( 872 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 873 throws java.io.IOException { 874 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 875 PARSER, input, extensionRegistry); 876 } 877 parseDelimitedFrom(java.io.InputStream input)878 public static com.google.recaptchaenterprise.v1.Key parseDelimitedFrom(java.io.InputStream input) 879 throws java.io.IOException { 880 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 881 } 882 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)883 public static com.google.recaptchaenterprise.v1.Key parseDelimitedFrom( 884 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 885 throws java.io.IOException { 886 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 887 PARSER, input, extensionRegistry); 888 } 889 parseFrom( com.google.protobuf.CodedInputStream input)890 public static com.google.recaptchaenterprise.v1.Key parseFrom( 891 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 892 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 893 } 894 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)895 public static com.google.recaptchaenterprise.v1.Key parseFrom( 896 com.google.protobuf.CodedInputStream input, 897 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 898 throws java.io.IOException { 899 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 900 PARSER, input, extensionRegistry); 901 } 902 903 @java.lang.Override newBuilderForType()904 public Builder newBuilderForType() { 905 return newBuilder(); 906 } 907 newBuilder()908 public static Builder newBuilder() { 909 return DEFAULT_INSTANCE.toBuilder(); 910 } 911 newBuilder(com.google.recaptchaenterprise.v1.Key prototype)912 public static Builder newBuilder(com.google.recaptchaenterprise.v1.Key prototype) { 913 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 914 } 915 916 @java.lang.Override toBuilder()917 public Builder toBuilder() { 918 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 919 } 920 921 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)922 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 923 Builder builder = new Builder(parent); 924 return builder; 925 } 926 /** 927 * 928 * 929 * <pre> 930 * A key used to identify and configure applications (web and/or mobile) that 931 * use reCAPTCHA Enterprise. 932 * </pre> 933 * 934 * Protobuf type {@code google.cloud.recaptchaenterprise.v1.Key} 935 */ 936 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 937 implements 938 // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1.Key) 939 com.google.recaptchaenterprise.v1.KeyOrBuilder { getDescriptor()940 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 941 return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto 942 .internal_static_google_cloud_recaptchaenterprise_v1_Key_descriptor; 943 } 944 945 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)946 protected com.google.protobuf.MapField internalGetMapField(int number) { 947 switch (number) { 948 case 6: 949 return internalGetLabels(); 950 default: 951 throw new RuntimeException("Invalid map field number: " + number); 952 } 953 } 954 955 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)956 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 957 switch (number) { 958 case 6: 959 return internalGetMutableLabels(); 960 default: 961 throw new RuntimeException("Invalid map field number: " + number); 962 } 963 } 964 965 @java.lang.Override 966 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()967 internalGetFieldAccessorTable() { 968 return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto 969 .internal_static_google_cloud_recaptchaenterprise_v1_Key_fieldAccessorTable 970 .ensureFieldAccessorsInitialized( 971 com.google.recaptchaenterprise.v1.Key.class, 972 com.google.recaptchaenterprise.v1.Key.Builder.class); 973 } 974 975 // Construct using com.google.recaptchaenterprise.v1.Key.newBuilder() Builder()976 private Builder() {} 977 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)978 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 979 super(parent); 980 } 981 982 @java.lang.Override clear()983 public Builder clear() { 984 super.clear(); 985 bitField0_ = 0; 986 name_ = ""; 987 displayName_ = ""; 988 if (webSettingsBuilder_ != null) { 989 webSettingsBuilder_.clear(); 990 } 991 if (androidSettingsBuilder_ != null) { 992 androidSettingsBuilder_.clear(); 993 } 994 if (iosSettingsBuilder_ != null) { 995 iosSettingsBuilder_.clear(); 996 } 997 internalGetMutableLabels().clear(); 998 createTime_ = null; 999 if (createTimeBuilder_ != null) { 1000 createTimeBuilder_.dispose(); 1001 createTimeBuilder_ = null; 1002 } 1003 testingOptions_ = null; 1004 if (testingOptionsBuilder_ != null) { 1005 testingOptionsBuilder_.dispose(); 1006 testingOptionsBuilder_ = null; 1007 } 1008 wafSettings_ = null; 1009 if (wafSettingsBuilder_ != null) { 1010 wafSettingsBuilder_.dispose(); 1011 wafSettingsBuilder_ = null; 1012 } 1013 platformSettingsCase_ = 0; 1014 platformSettings_ = null; 1015 return this; 1016 } 1017 1018 @java.lang.Override getDescriptorForType()1019 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1020 return com.google.recaptchaenterprise.v1.RecaptchaEnterpriseProto 1021 .internal_static_google_cloud_recaptchaenterprise_v1_Key_descriptor; 1022 } 1023 1024 @java.lang.Override getDefaultInstanceForType()1025 public com.google.recaptchaenterprise.v1.Key getDefaultInstanceForType() { 1026 return com.google.recaptchaenterprise.v1.Key.getDefaultInstance(); 1027 } 1028 1029 @java.lang.Override build()1030 public com.google.recaptchaenterprise.v1.Key build() { 1031 com.google.recaptchaenterprise.v1.Key result = buildPartial(); 1032 if (!result.isInitialized()) { 1033 throw newUninitializedMessageException(result); 1034 } 1035 return result; 1036 } 1037 1038 @java.lang.Override buildPartial()1039 public com.google.recaptchaenterprise.v1.Key buildPartial() { 1040 com.google.recaptchaenterprise.v1.Key result = 1041 new com.google.recaptchaenterprise.v1.Key(this); 1042 if (bitField0_ != 0) { 1043 buildPartial0(result); 1044 } 1045 buildPartialOneofs(result); 1046 onBuilt(); 1047 return result; 1048 } 1049 buildPartial0(com.google.recaptchaenterprise.v1.Key result)1050 private void buildPartial0(com.google.recaptchaenterprise.v1.Key result) { 1051 int from_bitField0_ = bitField0_; 1052 if (((from_bitField0_ & 0x00000001) != 0)) { 1053 result.name_ = name_; 1054 } 1055 if (((from_bitField0_ & 0x00000002) != 0)) { 1056 result.displayName_ = displayName_; 1057 } 1058 if (((from_bitField0_ & 0x00000020) != 0)) { 1059 result.labels_ = internalGetLabels(); 1060 result.labels_.makeImmutable(); 1061 } 1062 if (((from_bitField0_ & 0x00000040) != 0)) { 1063 result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); 1064 } 1065 if (((from_bitField0_ & 0x00000080) != 0)) { 1066 result.testingOptions_ = 1067 testingOptionsBuilder_ == null ? testingOptions_ : testingOptionsBuilder_.build(); 1068 } 1069 if (((from_bitField0_ & 0x00000100) != 0)) { 1070 result.wafSettings_ = 1071 wafSettingsBuilder_ == null ? wafSettings_ : wafSettingsBuilder_.build(); 1072 } 1073 } 1074 buildPartialOneofs(com.google.recaptchaenterprise.v1.Key result)1075 private void buildPartialOneofs(com.google.recaptchaenterprise.v1.Key result) { 1076 result.platformSettingsCase_ = platformSettingsCase_; 1077 result.platformSettings_ = this.platformSettings_; 1078 if (platformSettingsCase_ == 3 && webSettingsBuilder_ != null) { 1079 result.platformSettings_ = webSettingsBuilder_.build(); 1080 } 1081 if (platformSettingsCase_ == 4 && androidSettingsBuilder_ != null) { 1082 result.platformSettings_ = androidSettingsBuilder_.build(); 1083 } 1084 if (platformSettingsCase_ == 5 && iosSettingsBuilder_ != null) { 1085 result.platformSettings_ = iosSettingsBuilder_.build(); 1086 } 1087 } 1088 1089 @java.lang.Override clone()1090 public Builder clone() { 1091 return super.clone(); 1092 } 1093 1094 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1095 public Builder setField( 1096 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1097 return super.setField(field, value); 1098 } 1099 1100 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1101 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1102 return super.clearField(field); 1103 } 1104 1105 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1106 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1107 return super.clearOneof(oneof); 1108 } 1109 1110 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1111 public Builder setRepeatedField( 1112 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1113 return super.setRepeatedField(field, index, value); 1114 } 1115 1116 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1117 public Builder addRepeatedField( 1118 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1119 return super.addRepeatedField(field, value); 1120 } 1121 1122 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1123 public Builder mergeFrom(com.google.protobuf.Message other) { 1124 if (other instanceof com.google.recaptchaenterprise.v1.Key) { 1125 return mergeFrom((com.google.recaptchaenterprise.v1.Key) other); 1126 } else { 1127 super.mergeFrom(other); 1128 return this; 1129 } 1130 } 1131 mergeFrom(com.google.recaptchaenterprise.v1.Key other)1132 public Builder mergeFrom(com.google.recaptchaenterprise.v1.Key other) { 1133 if (other == com.google.recaptchaenterprise.v1.Key.getDefaultInstance()) return this; 1134 if (!other.getName().isEmpty()) { 1135 name_ = other.name_; 1136 bitField0_ |= 0x00000001; 1137 onChanged(); 1138 } 1139 if (!other.getDisplayName().isEmpty()) { 1140 displayName_ = other.displayName_; 1141 bitField0_ |= 0x00000002; 1142 onChanged(); 1143 } 1144 internalGetMutableLabels().mergeFrom(other.internalGetLabels()); 1145 bitField0_ |= 0x00000020; 1146 if (other.hasCreateTime()) { 1147 mergeCreateTime(other.getCreateTime()); 1148 } 1149 if (other.hasTestingOptions()) { 1150 mergeTestingOptions(other.getTestingOptions()); 1151 } 1152 if (other.hasWafSettings()) { 1153 mergeWafSettings(other.getWafSettings()); 1154 } 1155 switch (other.getPlatformSettingsCase()) { 1156 case WEB_SETTINGS: 1157 { 1158 mergeWebSettings(other.getWebSettings()); 1159 break; 1160 } 1161 case ANDROID_SETTINGS: 1162 { 1163 mergeAndroidSettings(other.getAndroidSettings()); 1164 break; 1165 } 1166 case IOS_SETTINGS: 1167 { 1168 mergeIosSettings(other.getIosSettings()); 1169 break; 1170 } 1171 case PLATFORMSETTINGS_NOT_SET: 1172 { 1173 break; 1174 } 1175 } 1176 this.mergeUnknownFields(other.getUnknownFields()); 1177 onChanged(); 1178 return this; 1179 } 1180 1181 @java.lang.Override isInitialized()1182 public final boolean isInitialized() { 1183 return true; 1184 } 1185 1186 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1187 public Builder mergeFrom( 1188 com.google.protobuf.CodedInputStream input, 1189 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1190 throws java.io.IOException { 1191 if (extensionRegistry == null) { 1192 throw new java.lang.NullPointerException(); 1193 } 1194 try { 1195 boolean done = false; 1196 while (!done) { 1197 int tag = input.readTag(); 1198 switch (tag) { 1199 case 0: 1200 done = true; 1201 break; 1202 case 10: 1203 { 1204 name_ = input.readStringRequireUtf8(); 1205 bitField0_ |= 0x00000001; 1206 break; 1207 } // case 10 1208 case 18: 1209 { 1210 displayName_ = input.readStringRequireUtf8(); 1211 bitField0_ |= 0x00000002; 1212 break; 1213 } // case 18 1214 case 26: 1215 { 1216 input.readMessage(getWebSettingsFieldBuilder().getBuilder(), extensionRegistry); 1217 platformSettingsCase_ = 3; 1218 break; 1219 } // case 26 1220 case 34: 1221 { 1222 input.readMessage(getAndroidSettingsFieldBuilder().getBuilder(), extensionRegistry); 1223 platformSettingsCase_ = 4; 1224 break; 1225 } // case 34 1226 case 42: 1227 { 1228 input.readMessage(getIosSettingsFieldBuilder().getBuilder(), extensionRegistry); 1229 platformSettingsCase_ = 5; 1230 break; 1231 } // case 42 1232 case 50: 1233 { 1234 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 1235 input.readMessage( 1236 LabelsDefaultEntryHolder.defaultEntry.getParserForType(), 1237 extensionRegistry); 1238 internalGetMutableLabels() 1239 .getMutableMap() 1240 .put(labels__.getKey(), labels__.getValue()); 1241 bitField0_ |= 0x00000020; 1242 break; 1243 } // case 50 1244 case 58: 1245 { 1246 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); 1247 bitField0_ |= 0x00000040; 1248 break; 1249 } // case 58 1250 case 74: 1251 { 1252 input.readMessage(getTestingOptionsFieldBuilder().getBuilder(), extensionRegistry); 1253 bitField0_ |= 0x00000080; 1254 break; 1255 } // case 74 1256 case 82: 1257 { 1258 input.readMessage(getWafSettingsFieldBuilder().getBuilder(), extensionRegistry); 1259 bitField0_ |= 0x00000100; 1260 break; 1261 } // case 82 1262 default: 1263 { 1264 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1265 done = true; // was an endgroup tag 1266 } 1267 break; 1268 } // default: 1269 } // switch (tag) 1270 } // while (!done) 1271 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1272 throw e.unwrapIOException(); 1273 } finally { 1274 onChanged(); 1275 } // finally 1276 return this; 1277 } 1278 1279 private int platformSettingsCase_ = 0; 1280 private java.lang.Object platformSettings_; 1281 getPlatformSettingsCase()1282 public PlatformSettingsCase getPlatformSettingsCase() { 1283 return PlatformSettingsCase.forNumber(platformSettingsCase_); 1284 } 1285 clearPlatformSettings()1286 public Builder clearPlatformSettings() { 1287 platformSettingsCase_ = 0; 1288 platformSettings_ = null; 1289 onChanged(); 1290 return this; 1291 } 1292 1293 private int bitField0_; 1294 1295 private java.lang.Object name_ = ""; 1296 /** 1297 * 1298 * 1299 * <pre> 1300 * The resource name for the Key in the format 1301 * "projects/{project}/keys/{key}". 1302 * </pre> 1303 * 1304 * <code>string name = 1;</code> 1305 * 1306 * @return The name. 1307 */ getName()1308 public java.lang.String getName() { 1309 java.lang.Object ref = name_; 1310 if (!(ref instanceof java.lang.String)) { 1311 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1312 java.lang.String s = bs.toStringUtf8(); 1313 name_ = s; 1314 return s; 1315 } else { 1316 return (java.lang.String) ref; 1317 } 1318 } 1319 /** 1320 * 1321 * 1322 * <pre> 1323 * The resource name for the Key in the format 1324 * "projects/{project}/keys/{key}". 1325 * </pre> 1326 * 1327 * <code>string name = 1;</code> 1328 * 1329 * @return The bytes for name. 1330 */ getNameBytes()1331 public com.google.protobuf.ByteString getNameBytes() { 1332 java.lang.Object ref = name_; 1333 if (ref instanceof String) { 1334 com.google.protobuf.ByteString b = 1335 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1336 name_ = b; 1337 return b; 1338 } else { 1339 return (com.google.protobuf.ByteString) ref; 1340 } 1341 } 1342 /** 1343 * 1344 * 1345 * <pre> 1346 * The resource name for the Key in the format 1347 * "projects/{project}/keys/{key}". 1348 * </pre> 1349 * 1350 * <code>string name = 1;</code> 1351 * 1352 * @param value The name to set. 1353 * @return This builder for chaining. 1354 */ setName(java.lang.String value)1355 public Builder setName(java.lang.String value) { 1356 if (value == null) { 1357 throw new NullPointerException(); 1358 } 1359 name_ = value; 1360 bitField0_ |= 0x00000001; 1361 onChanged(); 1362 return this; 1363 } 1364 /** 1365 * 1366 * 1367 * <pre> 1368 * The resource name for the Key in the format 1369 * "projects/{project}/keys/{key}". 1370 * </pre> 1371 * 1372 * <code>string name = 1;</code> 1373 * 1374 * @return This builder for chaining. 1375 */ clearName()1376 public Builder clearName() { 1377 name_ = getDefaultInstance().getName(); 1378 bitField0_ = (bitField0_ & ~0x00000001); 1379 onChanged(); 1380 return this; 1381 } 1382 /** 1383 * 1384 * 1385 * <pre> 1386 * The resource name for the Key in the format 1387 * "projects/{project}/keys/{key}". 1388 * </pre> 1389 * 1390 * <code>string name = 1;</code> 1391 * 1392 * @param value The bytes for name to set. 1393 * @return This builder for chaining. 1394 */ setNameBytes(com.google.protobuf.ByteString value)1395 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1396 if (value == null) { 1397 throw new NullPointerException(); 1398 } 1399 checkByteStringIsUtf8(value); 1400 name_ = value; 1401 bitField0_ |= 0x00000001; 1402 onChanged(); 1403 return this; 1404 } 1405 1406 private java.lang.Object displayName_ = ""; 1407 /** 1408 * 1409 * 1410 * <pre> 1411 * Human-readable display name of this key. Modifiable by user. 1412 * </pre> 1413 * 1414 * <code>string display_name = 2;</code> 1415 * 1416 * @return The displayName. 1417 */ getDisplayName()1418 public java.lang.String getDisplayName() { 1419 java.lang.Object ref = displayName_; 1420 if (!(ref instanceof java.lang.String)) { 1421 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1422 java.lang.String s = bs.toStringUtf8(); 1423 displayName_ = s; 1424 return s; 1425 } else { 1426 return (java.lang.String) ref; 1427 } 1428 } 1429 /** 1430 * 1431 * 1432 * <pre> 1433 * Human-readable display name of this key. Modifiable by user. 1434 * </pre> 1435 * 1436 * <code>string display_name = 2;</code> 1437 * 1438 * @return The bytes for displayName. 1439 */ getDisplayNameBytes()1440 public com.google.protobuf.ByteString getDisplayNameBytes() { 1441 java.lang.Object ref = displayName_; 1442 if (ref instanceof String) { 1443 com.google.protobuf.ByteString b = 1444 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1445 displayName_ = b; 1446 return b; 1447 } else { 1448 return (com.google.protobuf.ByteString) ref; 1449 } 1450 } 1451 /** 1452 * 1453 * 1454 * <pre> 1455 * Human-readable display name of this key. Modifiable by user. 1456 * </pre> 1457 * 1458 * <code>string display_name = 2;</code> 1459 * 1460 * @param value The displayName to set. 1461 * @return This builder for chaining. 1462 */ setDisplayName(java.lang.String value)1463 public Builder setDisplayName(java.lang.String value) { 1464 if (value == null) { 1465 throw new NullPointerException(); 1466 } 1467 displayName_ = value; 1468 bitField0_ |= 0x00000002; 1469 onChanged(); 1470 return this; 1471 } 1472 /** 1473 * 1474 * 1475 * <pre> 1476 * Human-readable display name of this key. Modifiable by user. 1477 * </pre> 1478 * 1479 * <code>string display_name = 2;</code> 1480 * 1481 * @return This builder for chaining. 1482 */ clearDisplayName()1483 public Builder clearDisplayName() { 1484 displayName_ = getDefaultInstance().getDisplayName(); 1485 bitField0_ = (bitField0_ & ~0x00000002); 1486 onChanged(); 1487 return this; 1488 } 1489 /** 1490 * 1491 * 1492 * <pre> 1493 * Human-readable display name of this key. Modifiable by user. 1494 * </pre> 1495 * 1496 * <code>string display_name = 2;</code> 1497 * 1498 * @param value The bytes for displayName to set. 1499 * @return This builder for chaining. 1500 */ setDisplayNameBytes(com.google.protobuf.ByteString value)1501 public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { 1502 if (value == null) { 1503 throw new NullPointerException(); 1504 } 1505 checkByteStringIsUtf8(value); 1506 displayName_ = value; 1507 bitField0_ |= 0x00000002; 1508 onChanged(); 1509 return this; 1510 } 1511 1512 private com.google.protobuf.SingleFieldBuilderV3< 1513 com.google.recaptchaenterprise.v1.WebKeySettings, 1514 com.google.recaptchaenterprise.v1.WebKeySettings.Builder, 1515 com.google.recaptchaenterprise.v1.WebKeySettingsOrBuilder> 1516 webSettingsBuilder_; 1517 /** 1518 * 1519 * 1520 * <pre> 1521 * Settings for keys that can be used by websites. 1522 * </pre> 1523 * 1524 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 1525 * 1526 * @return Whether the webSettings field is set. 1527 */ 1528 @java.lang.Override hasWebSettings()1529 public boolean hasWebSettings() { 1530 return platformSettingsCase_ == 3; 1531 } 1532 /** 1533 * 1534 * 1535 * <pre> 1536 * Settings for keys that can be used by websites. 1537 * </pre> 1538 * 1539 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 1540 * 1541 * @return The webSettings. 1542 */ 1543 @java.lang.Override getWebSettings()1544 public com.google.recaptchaenterprise.v1.WebKeySettings getWebSettings() { 1545 if (webSettingsBuilder_ == null) { 1546 if (platformSettingsCase_ == 3) { 1547 return (com.google.recaptchaenterprise.v1.WebKeySettings) platformSettings_; 1548 } 1549 return com.google.recaptchaenterprise.v1.WebKeySettings.getDefaultInstance(); 1550 } else { 1551 if (platformSettingsCase_ == 3) { 1552 return webSettingsBuilder_.getMessage(); 1553 } 1554 return com.google.recaptchaenterprise.v1.WebKeySettings.getDefaultInstance(); 1555 } 1556 } 1557 /** 1558 * 1559 * 1560 * <pre> 1561 * Settings for keys that can be used by websites. 1562 * </pre> 1563 * 1564 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 1565 */ setWebSettings(com.google.recaptchaenterprise.v1.WebKeySettings value)1566 public Builder setWebSettings(com.google.recaptchaenterprise.v1.WebKeySettings value) { 1567 if (webSettingsBuilder_ == null) { 1568 if (value == null) { 1569 throw new NullPointerException(); 1570 } 1571 platformSettings_ = value; 1572 onChanged(); 1573 } else { 1574 webSettingsBuilder_.setMessage(value); 1575 } 1576 platformSettingsCase_ = 3; 1577 return this; 1578 } 1579 /** 1580 * 1581 * 1582 * <pre> 1583 * Settings for keys that can be used by websites. 1584 * </pre> 1585 * 1586 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 1587 */ setWebSettings( com.google.recaptchaenterprise.v1.WebKeySettings.Builder builderForValue)1588 public Builder setWebSettings( 1589 com.google.recaptchaenterprise.v1.WebKeySettings.Builder builderForValue) { 1590 if (webSettingsBuilder_ == null) { 1591 platformSettings_ = builderForValue.build(); 1592 onChanged(); 1593 } else { 1594 webSettingsBuilder_.setMessage(builderForValue.build()); 1595 } 1596 platformSettingsCase_ = 3; 1597 return this; 1598 } 1599 /** 1600 * 1601 * 1602 * <pre> 1603 * Settings for keys that can be used by websites. 1604 * </pre> 1605 * 1606 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 1607 */ mergeWebSettings(com.google.recaptchaenterprise.v1.WebKeySettings value)1608 public Builder mergeWebSettings(com.google.recaptchaenterprise.v1.WebKeySettings value) { 1609 if (webSettingsBuilder_ == null) { 1610 if (platformSettingsCase_ == 3 1611 && platformSettings_ 1612 != com.google.recaptchaenterprise.v1.WebKeySettings.getDefaultInstance()) { 1613 platformSettings_ = 1614 com.google.recaptchaenterprise.v1.WebKeySettings.newBuilder( 1615 (com.google.recaptchaenterprise.v1.WebKeySettings) platformSettings_) 1616 .mergeFrom(value) 1617 .buildPartial(); 1618 } else { 1619 platformSettings_ = value; 1620 } 1621 onChanged(); 1622 } else { 1623 if (platformSettingsCase_ == 3) { 1624 webSettingsBuilder_.mergeFrom(value); 1625 } else { 1626 webSettingsBuilder_.setMessage(value); 1627 } 1628 } 1629 platformSettingsCase_ = 3; 1630 return this; 1631 } 1632 /** 1633 * 1634 * 1635 * <pre> 1636 * Settings for keys that can be used by websites. 1637 * </pre> 1638 * 1639 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 1640 */ clearWebSettings()1641 public Builder clearWebSettings() { 1642 if (webSettingsBuilder_ == null) { 1643 if (platformSettingsCase_ == 3) { 1644 platformSettingsCase_ = 0; 1645 platformSettings_ = null; 1646 onChanged(); 1647 } 1648 } else { 1649 if (platformSettingsCase_ == 3) { 1650 platformSettingsCase_ = 0; 1651 platformSettings_ = null; 1652 } 1653 webSettingsBuilder_.clear(); 1654 } 1655 return this; 1656 } 1657 /** 1658 * 1659 * 1660 * <pre> 1661 * Settings for keys that can be used by websites. 1662 * </pre> 1663 * 1664 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 1665 */ getWebSettingsBuilder()1666 public com.google.recaptchaenterprise.v1.WebKeySettings.Builder getWebSettingsBuilder() { 1667 return getWebSettingsFieldBuilder().getBuilder(); 1668 } 1669 /** 1670 * 1671 * 1672 * <pre> 1673 * Settings for keys that can be used by websites. 1674 * </pre> 1675 * 1676 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 1677 */ 1678 @java.lang.Override getWebSettingsOrBuilder()1679 public com.google.recaptchaenterprise.v1.WebKeySettingsOrBuilder getWebSettingsOrBuilder() { 1680 if ((platformSettingsCase_ == 3) && (webSettingsBuilder_ != null)) { 1681 return webSettingsBuilder_.getMessageOrBuilder(); 1682 } else { 1683 if (platformSettingsCase_ == 3) { 1684 return (com.google.recaptchaenterprise.v1.WebKeySettings) platformSettings_; 1685 } 1686 return com.google.recaptchaenterprise.v1.WebKeySettings.getDefaultInstance(); 1687 } 1688 } 1689 /** 1690 * 1691 * 1692 * <pre> 1693 * Settings for keys that can be used by websites. 1694 * </pre> 1695 * 1696 * <code>.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;</code> 1697 */ 1698 private com.google.protobuf.SingleFieldBuilderV3< 1699 com.google.recaptchaenterprise.v1.WebKeySettings, 1700 com.google.recaptchaenterprise.v1.WebKeySettings.Builder, 1701 com.google.recaptchaenterprise.v1.WebKeySettingsOrBuilder> getWebSettingsFieldBuilder()1702 getWebSettingsFieldBuilder() { 1703 if (webSettingsBuilder_ == null) { 1704 if (!(platformSettingsCase_ == 3)) { 1705 platformSettings_ = com.google.recaptchaenterprise.v1.WebKeySettings.getDefaultInstance(); 1706 } 1707 webSettingsBuilder_ = 1708 new com.google.protobuf.SingleFieldBuilderV3< 1709 com.google.recaptchaenterprise.v1.WebKeySettings, 1710 com.google.recaptchaenterprise.v1.WebKeySettings.Builder, 1711 com.google.recaptchaenterprise.v1.WebKeySettingsOrBuilder>( 1712 (com.google.recaptchaenterprise.v1.WebKeySettings) platformSettings_, 1713 getParentForChildren(), 1714 isClean()); 1715 platformSettings_ = null; 1716 } 1717 platformSettingsCase_ = 3; 1718 onChanged(); 1719 return webSettingsBuilder_; 1720 } 1721 1722 private com.google.protobuf.SingleFieldBuilderV3< 1723 com.google.recaptchaenterprise.v1.AndroidKeySettings, 1724 com.google.recaptchaenterprise.v1.AndroidKeySettings.Builder, 1725 com.google.recaptchaenterprise.v1.AndroidKeySettingsOrBuilder> 1726 androidSettingsBuilder_; 1727 /** 1728 * 1729 * 1730 * <pre> 1731 * Settings for keys that can be used by Android apps. 1732 * </pre> 1733 * 1734 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 1735 * 1736 * @return Whether the androidSettings field is set. 1737 */ 1738 @java.lang.Override hasAndroidSettings()1739 public boolean hasAndroidSettings() { 1740 return platformSettingsCase_ == 4; 1741 } 1742 /** 1743 * 1744 * 1745 * <pre> 1746 * Settings for keys that can be used by Android apps. 1747 * </pre> 1748 * 1749 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 1750 * 1751 * @return The androidSettings. 1752 */ 1753 @java.lang.Override getAndroidSettings()1754 public com.google.recaptchaenterprise.v1.AndroidKeySettings getAndroidSettings() { 1755 if (androidSettingsBuilder_ == null) { 1756 if (platformSettingsCase_ == 4) { 1757 return (com.google.recaptchaenterprise.v1.AndroidKeySettings) platformSettings_; 1758 } 1759 return com.google.recaptchaenterprise.v1.AndroidKeySettings.getDefaultInstance(); 1760 } else { 1761 if (platformSettingsCase_ == 4) { 1762 return androidSettingsBuilder_.getMessage(); 1763 } 1764 return com.google.recaptchaenterprise.v1.AndroidKeySettings.getDefaultInstance(); 1765 } 1766 } 1767 /** 1768 * 1769 * 1770 * <pre> 1771 * Settings for keys that can be used by Android apps. 1772 * </pre> 1773 * 1774 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 1775 */ setAndroidSettings(com.google.recaptchaenterprise.v1.AndroidKeySettings value)1776 public Builder setAndroidSettings(com.google.recaptchaenterprise.v1.AndroidKeySettings value) { 1777 if (androidSettingsBuilder_ == null) { 1778 if (value == null) { 1779 throw new NullPointerException(); 1780 } 1781 platformSettings_ = value; 1782 onChanged(); 1783 } else { 1784 androidSettingsBuilder_.setMessage(value); 1785 } 1786 platformSettingsCase_ = 4; 1787 return this; 1788 } 1789 /** 1790 * 1791 * 1792 * <pre> 1793 * Settings for keys that can be used by Android apps. 1794 * </pre> 1795 * 1796 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 1797 */ setAndroidSettings( com.google.recaptchaenterprise.v1.AndroidKeySettings.Builder builderForValue)1798 public Builder setAndroidSettings( 1799 com.google.recaptchaenterprise.v1.AndroidKeySettings.Builder builderForValue) { 1800 if (androidSettingsBuilder_ == null) { 1801 platformSettings_ = builderForValue.build(); 1802 onChanged(); 1803 } else { 1804 androidSettingsBuilder_.setMessage(builderForValue.build()); 1805 } 1806 platformSettingsCase_ = 4; 1807 return this; 1808 } 1809 /** 1810 * 1811 * 1812 * <pre> 1813 * Settings for keys that can be used by Android apps. 1814 * </pre> 1815 * 1816 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 1817 */ mergeAndroidSettings( com.google.recaptchaenterprise.v1.AndroidKeySettings value)1818 public Builder mergeAndroidSettings( 1819 com.google.recaptchaenterprise.v1.AndroidKeySettings value) { 1820 if (androidSettingsBuilder_ == null) { 1821 if (platformSettingsCase_ == 4 1822 && platformSettings_ 1823 != com.google.recaptchaenterprise.v1.AndroidKeySettings.getDefaultInstance()) { 1824 platformSettings_ = 1825 com.google.recaptchaenterprise.v1.AndroidKeySettings.newBuilder( 1826 (com.google.recaptchaenterprise.v1.AndroidKeySettings) platformSettings_) 1827 .mergeFrom(value) 1828 .buildPartial(); 1829 } else { 1830 platformSettings_ = value; 1831 } 1832 onChanged(); 1833 } else { 1834 if (platformSettingsCase_ == 4) { 1835 androidSettingsBuilder_.mergeFrom(value); 1836 } else { 1837 androidSettingsBuilder_.setMessage(value); 1838 } 1839 } 1840 platformSettingsCase_ = 4; 1841 return this; 1842 } 1843 /** 1844 * 1845 * 1846 * <pre> 1847 * Settings for keys that can be used by Android apps. 1848 * </pre> 1849 * 1850 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 1851 */ clearAndroidSettings()1852 public Builder clearAndroidSettings() { 1853 if (androidSettingsBuilder_ == null) { 1854 if (platformSettingsCase_ == 4) { 1855 platformSettingsCase_ = 0; 1856 platformSettings_ = null; 1857 onChanged(); 1858 } 1859 } else { 1860 if (platformSettingsCase_ == 4) { 1861 platformSettingsCase_ = 0; 1862 platformSettings_ = null; 1863 } 1864 androidSettingsBuilder_.clear(); 1865 } 1866 return this; 1867 } 1868 /** 1869 * 1870 * 1871 * <pre> 1872 * Settings for keys that can be used by Android apps. 1873 * </pre> 1874 * 1875 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 1876 */ 1877 public com.google.recaptchaenterprise.v1.AndroidKeySettings.Builder getAndroidSettingsBuilder()1878 getAndroidSettingsBuilder() { 1879 return getAndroidSettingsFieldBuilder().getBuilder(); 1880 } 1881 /** 1882 * 1883 * 1884 * <pre> 1885 * Settings for keys that can be used by Android apps. 1886 * </pre> 1887 * 1888 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 1889 */ 1890 @java.lang.Override 1891 public com.google.recaptchaenterprise.v1.AndroidKeySettingsOrBuilder getAndroidSettingsOrBuilder()1892 getAndroidSettingsOrBuilder() { 1893 if ((platformSettingsCase_ == 4) && (androidSettingsBuilder_ != null)) { 1894 return androidSettingsBuilder_.getMessageOrBuilder(); 1895 } else { 1896 if (platformSettingsCase_ == 4) { 1897 return (com.google.recaptchaenterprise.v1.AndroidKeySettings) platformSettings_; 1898 } 1899 return com.google.recaptchaenterprise.v1.AndroidKeySettings.getDefaultInstance(); 1900 } 1901 } 1902 /** 1903 * 1904 * 1905 * <pre> 1906 * Settings for keys that can be used by Android apps. 1907 * </pre> 1908 * 1909 * <code>.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;</code> 1910 */ 1911 private com.google.protobuf.SingleFieldBuilderV3< 1912 com.google.recaptchaenterprise.v1.AndroidKeySettings, 1913 com.google.recaptchaenterprise.v1.AndroidKeySettings.Builder, 1914 com.google.recaptchaenterprise.v1.AndroidKeySettingsOrBuilder> getAndroidSettingsFieldBuilder()1915 getAndroidSettingsFieldBuilder() { 1916 if (androidSettingsBuilder_ == null) { 1917 if (!(platformSettingsCase_ == 4)) { 1918 platformSettings_ = 1919 com.google.recaptchaenterprise.v1.AndroidKeySettings.getDefaultInstance(); 1920 } 1921 androidSettingsBuilder_ = 1922 new com.google.protobuf.SingleFieldBuilderV3< 1923 com.google.recaptchaenterprise.v1.AndroidKeySettings, 1924 com.google.recaptchaenterprise.v1.AndroidKeySettings.Builder, 1925 com.google.recaptchaenterprise.v1.AndroidKeySettingsOrBuilder>( 1926 (com.google.recaptchaenterprise.v1.AndroidKeySettings) platformSettings_, 1927 getParentForChildren(), 1928 isClean()); 1929 platformSettings_ = null; 1930 } 1931 platformSettingsCase_ = 4; 1932 onChanged(); 1933 return androidSettingsBuilder_; 1934 } 1935 1936 private com.google.protobuf.SingleFieldBuilderV3< 1937 com.google.recaptchaenterprise.v1.IOSKeySettings, 1938 com.google.recaptchaenterprise.v1.IOSKeySettings.Builder, 1939 com.google.recaptchaenterprise.v1.IOSKeySettingsOrBuilder> 1940 iosSettingsBuilder_; 1941 /** 1942 * 1943 * 1944 * <pre> 1945 * Settings for keys that can be used by iOS apps. 1946 * </pre> 1947 * 1948 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 1949 * 1950 * @return Whether the iosSettings field is set. 1951 */ 1952 @java.lang.Override hasIosSettings()1953 public boolean hasIosSettings() { 1954 return platformSettingsCase_ == 5; 1955 } 1956 /** 1957 * 1958 * 1959 * <pre> 1960 * Settings for keys that can be used by iOS apps. 1961 * </pre> 1962 * 1963 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 1964 * 1965 * @return The iosSettings. 1966 */ 1967 @java.lang.Override getIosSettings()1968 public com.google.recaptchaenterprise.v1.IOSKeySettings getIosSettings() { 1969 if (iosSettingsBuilder_ == null) { 1970 if (platformSettingsCase_ == 5) { 1971 return (com.google.recaptchaenterprise.v1.IOSKeySettings) platformSettings_; 1972 } 1973 return com.google.recaptchaenterprise.v1.IOSKeySettings.getDefaultInstance(); 1974 } else { 1975 if (platformSettingsCase_ == 5) { 1976 return iosSettingsBuilder_.getMessage(); 1977 } 1978 return com.google.recaptchaenterprise.v1.IOSKeySettings.getDefaultInstance(); 1979 } 1980 } 1981 /** 1982 * 1983 * 1984 * <pre> 1985 * Settings for keys that can be used by iOS apps. 1986 * </pre> 1987 * 1988 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 1989 */ setIosSettings(com.google.recaptchaenterprise.v1.IOSKeySettings value)1990 public Builder setIosSettings(com.google.recaptchaenterprise.v1.IOSKeySettings value) { 1991 if (iosSettingsBuilder_ == null) { 1992 if (value == null) { 1993 throw new NullPointerException(); 1994 } 1995 platformSettings_ = value; 1996 onChanged(); 1997 } else { 1998 iosSettingsBuilder_.setMessage(value); 1999 } 2000 platformSettingsCase_ = 5; 2001 return this; 2002 } 2003 /** 2004 * 2005 * 2006 * <pre> 2007 * Settings for keys that can be used by iOS apps. 2008 * </pre> 2009 * 2010 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 2011 */ setIosSettings( com.google.recaptchaenterprise.v1.IOSKeySettings.Builder builderForValue)2012 public Builder setIosSettings( 2013 com.google.recaptchaenterprise.v1.IOSKeySettings.Builder builderForValue) { 2014 if (iosSettingsBuilder_ == null) { 2015 platformSettings_ = builderForValue.build(); 2016 onChanged(); 2017 } else { 2018 iosSettingsBuilder_.setMessage(builderForValue.build()); 2019 } 2020 platformSettingsCase_ = 5; 2021 return this; 2022 } 2023 /** 2024 * 2025 * 2026 * <pre> 2027 * Settings for keys that can be used by iOS apps. 2028 * </pre> 2029 * 2030 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 2031 */ mergeIosSettings(com.google.recaptchaenterprise.v1.IOSKeySettings value)2032 public Builder mergeIosSettings(com.google.recaptchaenterprise.v1.IOSKeySettings value) { 2033 if (iosSettingsBuilder_ == null) { 2034 if (platformSettingsCase_ == 5 2035 && platformSettings_ 2036 != com.google.recaptchaenterprise.v1.IOSKeySettings.getDefaultInstance()) { 2037 platformSettings_ = 2038 com.google.recaptchaenterprise.v1.IOSKeySettings.newBuilder( 2039 (com.google.recaptchaenterprise.v1.IOSKeySettings) platformSettings_) 2040 .mergeFrom(value) 2041 .buildPartial(); 2042 } else { 2043 platformSettings_ = value; 2044 } 2045 onChanged(); 2046 } else { 2047 if (platformSettingsCase_ == 5) { 2048 iosSettingsBuilder_.mergeFrom(value); 2049 } else { 2050 iosSettingsBuilder_.setMessage(value); 2051 } 2052 } 2053 platformSettingsCase_ = 5; 2054 return this; 2055 } 2056 /** 2057 * 2058 * 2059 * <pre> 2060 * Settings for keys that can be used by iOS apps. 2061 * </pre> 2062 * 2063 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 2064 */ clearIosSettings()2065 public Builder clearIosSettings() { 2066 if (iosSettingsBuilder_ == null) { 2067 if (platformSettingsCase_ == 5) { 2068 platformSettingsCase_ = 0; 2069 platformSettings_ = null; 2070 onChanged(); 2071 } 2072 } else { 2073 if (platformSettingsCase_ == 5) { 2074 platformSettingsCase_ = 0; 2075 platformSettings_ = null; 2076 } 2077 iosSettingsBuilder_.clear(); 2078 } 2079 return this; 2080 } 2081 /** 2082 * 2083 * 2084 * <pre> 2085 * Settings for keys that can be used by iOS apps. 2086 * </pre> 2087 * 2088 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 2089 */ getIosSettingsBuilder()2090 public com.google.recaptchaenterprise.v1.IOSKeySettings.Builder getIosSettingsBuilder() { 2091 return getIosSettingsFieldBuilder().getBuilder(); 2092 } 2093 /** 2094 * 2095 * 2096 * <pre> 2097 * Settings for keys that can be used by iOS apps. 2098 * </pre> 2099 * 2100 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 2101 */ 2102 @java.lang.Override getIosSettingsOrBuilder()2103 public com.google.recaptchaenterprise.v1.IOSKeySettingsOrBuilder getIosSettingsOrBuilder() { 2104 if ((platformSettingsCase_ == 5) && (iosSettingsBuilder_ != null)) { 2105 return iosSettingsBuilder_.getMessageOrBuilder(); 2106 } else { 2107 if (platformSettingsCase_ == 5) { 2108 return (com.google.recaptchaenterprise.v1.IOSKeySettings) platformSettings_; 2109 } 2110 return com.google.recaptchaenterprise.v1.IOSKeySettings.getDefaultInstance(); 2111 } 2112 } 2113 /** 2114 * 2115 * 2116 * <pre> 2117 * Settings for keys that can be used by iOS apps. 2118 * </pre> 2119 * 2120 * <code>.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;</code> 2121 */ 2122 private com.google.protobuf.SingleFieldBuilderV3< 2123 com.google.recaptchaenterprise.v1.IOSKeySettings, 2124 com.google.recaptchaenterprise.v1.IOSKeySettings.Builder, 2125 com.google.recaptchaenterprise.v1.IOSKeySettingsOrBuilder> getIosSettingsFieldBuilder()2126 getIosSettingsFieldBuilder() { 2127 if (iosSettingsBuilder_ == null) { 2128 if (!(platformSettingsCase_ == 5)) { 2129 platformSettings_ = com.google.recaptchaenterprise.v1.IOSKeySettings.getDefaultInstance(); 2130 } 2131 iosSettingsBuilder_ = 2132 new com.google.protobuf.SingleFieldBuilderV3< 2133 com.google.recaptchaenterprise.v1.IOSKeySettings, 2134 com.google.recaptchaenterprise.v1.IOSKeySettings.Builder, 2135 com.google.recaptchaenterprise.v1.IOSKeySettingsOrBuilder>( 2136 (com.google.recaptchaenterprise.v1.IOSKeySettings) platformSettings_, 2137 getParentForChildren(), 2138 isClean()); 2139 platformSettings_ = null; 2140 } 2141 platformSettingsCase_ = 5; 2142 onChanged(); 2143 return iosSettingsBuilder_; 2144 } 2145 2146 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 2147 internalGetLabels()2148 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 2149 if (labels_ == null) { 2150 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 2151 } 2152 return labels_; 2153 } 2154 2155 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableLabels()2156 internalGetMutableLabels() { 2157 if (labels_ == null) { 2158 labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); 2159 } 2160 if (!labels_.isMutable()) { 2161 labels_ = labels_.copy(); 2162 } 2163 bitField0_ |= 0x00000020; 2164 onChanged(); 2165 return labels_; 2166 } 2167 getLabelsCount()2168 public int getLabelsCount() { 2169 return internalGetLabels().getMap().size(); 2170 } 2171 /** 2172 * 2173 * 2174 * <pre> 2175 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 2176 * Creating and managing labels</a>. 2177 * </pre> 2178 * 2179 * <code>map<string, string> labels = 6;</code> 2180 */ 2181 @java.lang.Override containsLabels(java.lang.String key)2182 public boolean containsLabels(java.lang.String key) { 2183 if (key == null) { 2184 throw new NullPointerException("map key"); 2185 } 2186 return internalGetLabels().getMap().containsKey(key); 2187 } 2188 /** Use {@link #getLabelsMap()} instead. */ 2189 @java.lang.Override 2190 @java.lang.Deprecated getLabels()2191 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 2192 return getLabelsMap(); 2193 } 2194 /** 2195 * 2196 * 2197 * <pre> 2198 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 2199 * Creating and managing labels</a>. 2200 * </pre> 2201 * 2202 * <code>map<string, string> labels = 6;</code> 2203 */ 2204 @java.lang.Override getLabelsMap()2205 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 2206 return internalGetLabels().getMap(); 2207 } 2208 /** 2209 * 2210 * 2211 * <pre> 2212 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 2213 * Creating and managing labels</a>. 2214 * </pre> 2215 * 2216 * <code>map<string, string> labels = 6;</code> 2217 */ 2218 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)2219 public /* nullable */ java.lang.String getLabelsOrDefault( 2220 java.lang.String key, 2221 /* nullable */ 2222 java.lang.String defaultValue) { 2223 if (key == null) { 2224 throw new NullPointerException("map key"); 2225 } 2226 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 2227 return map.containsKey(key) ? map.get(key) : defaultValue; 2228 } 2229 /** 2230 * 2231 * 2232 * <pre> 2233 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 2234 * Creating and managing labels</a>. 2235 * </pre> 2236 * 2237 * <code>map<string, string> labels = 6;</code> 2238 */ 2239 @java.lang.Override getLabelsOrThrow(java.lang.String key)2240 public java.lang.String getLabelsOrThrow(java.lang.String key) { 2241 if (key == null) { 2242 throw new NullPointerException("map key"); 2243 } 2244 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 2245 if (!map.containsKey(key)) { 2246 throw new java.lang.IllegalArgumentException(); 2247 } 2248 return map.get(key); 2249 } 2250 clearLabels()2251 public Builder clearLabels() { 2252 bitField0_ = (bitField0_ & ~0x00000020); 2253 internalGetMutableLabels().getMutableMap().clear(); 2254 return this; 2255 } 2256 /** 2257 * 2258 * 2259 * <pre> 2260 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 2261 * Creating and managing labels</a>. 2262 * </pre> 2263 * 2264 * <code>map<string, string> labels = 6;</code> 2265 */ removeLabels(java.lang.String key)2266 public Builder removeLabels(java.lang.String key) { 2267 if (key == null) { 2268 throw new NullPointerException("map key"); 2269 } 2270 internalGetMutableLabels().getMutableMap().remove(key); 2271 return this; 2272 } 2273 /** Use alternate mutation accessors instead. */ 2274 @java.lang.Deprecated getMutableLabels()2275 public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() { 2276 bitField0_ |= 0x00000020; 2277 return internalGetMutableLabels().getMutableMap(); 2278 } 2279 /** 2280 * 2281 * 2282 * <pre> 2283 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 2284 * Creating and managing labels</a>. 2285 * </pre> 2286 * 2287 * <code>map<string, string> labels = 6;</code> 2288 */ putLabels(java.lang.String key, java.lang.String value)2289 public Builder putLabels(java.lang.String key, java.lang.String value) { 2290 if (key == null) { 2291 throw new NullPointerException("map key"); 2292 } 2293 if (value == null) { 2294 throw new NullPointerException("map value"); 2295 } 2296 internalGetMutableLabels().getMutableMap().put(key, value); 2297 bitField0_ |= 0x00000020; 2298 return this; 2299 } 2300 /** 2301 * 2302 * 2303 * <pre> 2304 * See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels"> 2305 * Creating and managing labels</a>. 2306 * </pre> 2307 * 2308 * <code>map<string, string> labels = 6;</code> 2309 */ putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)2310 public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) { 2311 internalGetMutableLabels().getMutableMap().putAll(values); 2312 bitField0_ |= 0x00000020; 2313 return this; 2314 } 2315 2316 private com.google.protobuf.Timestamp createTime_; 2317 private com.google.protobuf.SingleFieldBuilderV3< 2318 com.google.protobuf.Timestamp, 2319 com.google.protobuf.Timestamp.Builder, 2320 com.google.protobuf.TimestampOrBuilder> 2321 createTimeBuilder_; 2322 /** 2323 * 2324 * 2325 * <pre> 2326 * Output only. The timestamp corresponding to the creation of this Key. 2327 * </pre> 2328 * 2329 * <code> 2330 * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2331 * </code> 2332 * 2333 * @return Whether the createTime field is set. 2334 */ hasCreateTime()2335 public boolean hasCreateTime() { 2336 return ((bitField0_ & 0x00000040) != 0); 2337 } 2338 /** 2339 * 2340 * 2341 * <pre> 2342 * Output only. The timestamp corresponding to the creation of this Key. 2343 * </pre> 2344 * 2345 * <code> 2346 * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2347 * </code> 2348 * 2349 * @return The createTime. 2350 */ getCreateTime()2351 public com.google.protobuf.Timestamp getCreateTime() { 2352 if (createTimeBuilder_ == null) { 2353 return createTime_ == null 2354 ? com.google.protobuf.Timestamp.getDefaultInstance() 2355 : createTime_; 2356 } else { 2357 return createTimeBuilder_.getMessage(); 2358 } 2359 } 2360 /** 2361 * 2362 * 2363 * <pre> 2364 * Output only. The timestamp corresponding to the creation of this Key. 2365 * </pre> 2366 * 2367 * <code> 2368 * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2369 * </code> 2370 */ setCreateTime(com.google.protobuf.Timestamp value)2371 public Builder setCreateTime(com.google.protobuf.Timestamp value) { 2372 if (createTimeBuilder_ == null) { 2373 if (value == null) { 2374 throw new NullPointerException(); 2375 } 2376 createTime_ = value; 2377 } else { 2378 createTimeBuilder_.setMessage(value); 2379 } 2380 bitField0_ |= 0x00000040; 2381 onChanged(); 2382 return this; 2383 } 2384 /** 2385 * 2386 * 2387 * <pre> 2388 * Output only. The timestamp corresponding to the creation of this Key. 2389 * </pre> 2390 * 2391 * <code> 2392 * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2393 * </code> 2394 */ setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)2395 public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 2396 if (createTimeBuilder_ == null) { 2397 createTime_ = builderForValue.build(); 2398 } else { 2399 createTimeBuilder_.setMessage(builderForValue.build()); 2400 } 2401 bitField0_ |= 0x00000040; 2402 onChanged(); 2403 return this; 2404 } 2405 /** 2406 * 2407 * 2408 * <pre> 2409 * Output only. The timestamp corresponding to the creation of this Key. 2410 * </pre> 2411 * 2412 * <code> 2413 * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2414 * </code> 2415 */ mergeCreateTime(com.google.protobuf.Timestamp value)2416 public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { 2417 if (createTimeBuilder_ == null) { 2418 if (((bitField0_ & 0x00000040) != 0) 2419 && createTime_ != null 2420 && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 2421 getCreateTimeBuilder().mergeFrom(value); 2422 } else { 2423 createTime_ = value; 2424 } 2425 } else { 2426 createTimeBuilder_.mergeFrom(value); 2427 } 2428 bitField0_ |= 0x00000040; 2429 onChanged(); 2430 return this; 2431 } 2432 /** 2433 * 2434 * 2435 * <pre> 2436 * Output only. The timestamp corresponding to the creation of this Key. 2437 * </pre> 2438 * 2439 * <code> 2440 * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2441 * </code> 2442 */ clearCreateTime()2443 public Builder clearCreateTime() { 2444 bitField0_ = (bitField0_ & ~0x00000040); 2445 createTime_ = null; 2446 if (createTimeBuilder_ != null) { 2447 createTimeBuilder_.dispose(); 2448 createTimeBuilder_ = null; 2449 } 2450 onChanged(); 2451 return this; 2452 } 2453 /** 2454 * 2455 * 2456 * <pre> 2457 * Output only. The timestamp corresponding to the creation of this Key. 2458 * </pre> 2459 * 2460 * <code> 2461 * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2462 * </code> 2463 */ getCreateTimeBuilder()2464 public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { 2465 bitField0_ |= 0x00000040; 2466 onChanged(); 2467 return getCreateTimeFieldBuilder().getBuilder(); 2468 } 2469 /** 2470 * 2471 * 2472 * <pre> 2473 * Output only. The timestamp corresponding to the creation of this Key. 2474 * </pre> 2475 * 2476 * <code> 2477 * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2478 * </code> 2479 */ getCreateTimeOrBuilder()2480 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 2481 if (createTimeBuilder_ != null) { 2482 return createTimeBuilder_.getMessageOrBuilder(); 2483 } else { 2484 return createTime_ == null 2485 ? com.google.protobuf.Timestamp.getDefaultInstance() 2486 : createTime_; 2487 } 2488 } 2489 /** 2490 * 2491 * 2492 * <pre> 2493 * Output only. The timestamp corresponding to the creation of this Key. 2494 * </pre> 2495 * 2496 * <code> 2497 * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2498 * </code> 2499 */ 2500 private com.google.protobuf.SingleFieldBuilderV3< 2501 com.google.protobuf.Timestamp, 2502 com.google.protobuf.Timestamp.Builder, 2503 com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder()2504 getCreateTimeFieldBuilder() { 2505 if (createTimeBuilder_ == null) { 2506 createTimeBuilder_ = 2507 new com.google.protobuf.SingleFieldBuilderV3< 2508 com.google.protobuf.Timestamp, 2509 com.google.protobuf.Timestamp.Builder, 2510 com.google.protobuf.TimestampOrBuilder>( 2511 getCreateTime(), getParentForChildren(), isClean()); 2512 createTime_ = null; 2513 } 2514 return createTimeBuilder_; 2515 } 2516 2517 private com.google.recaptchaenterprise.v1.TestingOptions testingOptions_; 2518 private com.google.protobuf.SingleFieldBuilderV3< 2519 com.google.recaptchaenterprise.v1.TestingOptions, 2520 com.google.recaptchaenterprise.v1.TestingOptions.Builder, 2521 com.google.recaptchaenterprise.v1.TestingOptionsOrBuilder> 2522 testingOptionsBuilder_; 2523 /** 2524 * 2525 * 2526 * <pre> 2527 * Options for user acceptance testing. 2528 * </pre> 2529 * 2530 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 2531 * 2532 * @return Whether the testingOptions field is set. 2533 */ hasTestingOptions()2534 public boolean hasTestingOptions() { 2535 return ((bitField0_ & 0x00000080) != 0); 2536 } 2537 /** 2538 * 2539 * 2540 * <pre> 2541 * Options for user acceptance testing. 2542 * </pre> 2543 * 2544 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 2545 * 2546 * @return The testingOptions. 2547 */ getTestingOptions()2548 public com.google.recaptchaenterprise.v1.TestingOptions getTestingOptions() { 2549 if (testingOptionsBuilder_ == null) { 2550 return testingOptions_ == null 2551 ? com.google.recaptchaenterprise.v1.TestingOptions.getDefaultInstance() 2552 : testingOptions_; 2553 } else { 2554 return testingOptionsBuilder_.getMessage(); 2555 } 2556 } 2557 /** 2558 * 2559 * 2560 * <pre> 2561 * Options for user acceptance testing. 2562 * </pre> 2563 * 2564 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 2565 */ setTestingOptions(com.google.recaptchaenterprise.v1.TestingOptions value)2566 public Builder setTestingOptions(com.google.recaptchaenterprise.v1.TestingOptions value) { 2567 if (testingOptionsBuilder_ == null) { 2568 if (value == null) { 2569 throw new NullPointerException(); 2570 } 2571 testingOptions_ = value; 2572 } else { 2573 testingOptionsBuilder_.setMessage(value); 2574 } 2575 bitField0_ |= 0x00000080; 2576 onChanged(); 2577 return this; 2578 } 2579 /** 2580 * 2581 * 2582 * <pre> 2583 * Options for user acceptance testing. 2584 * </pre> 2585 * 2586 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 2587 */ setTestingOptions( com.google.recaptchaenterprise.v1.TestingOptions.Builder builderForValue)2588 public Builder setTestingOptions( 2589 com.google.recaptchaenterprise.v1.TestingOptions.Builder builderForValue) { 2590 if (testingOptionsBuilder_ == null) { 2591 testingOptions_ = builderForValue.build(); 2592 } else { 2593 testingOptionsBuilder_.setMessage(builderForValue.build()); 2594 } 2595 bitField0_ |= 0x00000080; 2596 onChanged(); 2597 return this; 2598 } 2599 /** 2600 * 2601 * 2602 * <pre> 2603 * Options for user acceptance testing. 2604 * </pre> 2605 * 2606 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 2607 */ mergeTestingOptions(com.google.recaptchaenterprise.v1.TestingOptions value)2608 public Builder mergeTestingOptions(com.google.recaptchaenterprise.v1.TestingOptions value) { 2609 if (testingOptionsBuilder_ == null) { 2610 if (((bitField0_ & 0x00000080) != 0) 2611 && testingOptions_ != null 2612 && testingOptions_ 2613 != com.google.recaptchaenterprise.v1.TestingOptions.getDefaultInstance()) { 2614 getTestingOptionsBuilder().mergeFrom(value); 2615 } else { 2616 testingOptions_ = value; 2617 } 2618 } else { 2619 testingOptionsBuilder_.mergeFrom(value); 2620 } 2621 bitField0_ |= 0x00000080; 2622 onChanged(); 2623 return this; 2624 } 2625 /** 2626 * 2627 * 2628 * <pre> 2629 * Options for user acceptance testing. 2630 * </pre> 2631 * 2632 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 2633 */ clearTestingOptions()2634 public Builder clearTestingOptions() { 2635 bitField0_ = (bitField0_ & ~0x00000080); 2636 testingOptions_ = null; 2637 if (testingOptionsBuilder_ != null) { 2638 testingOptionsBuilder_.dispose(); 2639 testingOptionsBuilder_ = null; 2640 } 2641 onChanged(); 2642 return this; 2643 } 2644 /** 2645 * 2646 * 2647 * <pre> 2648 * Options for user acceptance testing. 2649 * </pre> 2650 * 2651 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 2652 */ getTestingOptionsBuilder()2653 public com.google.recaptchaenterprise.v1.TestingOptions.Builder getTestingOptionsBuilder() { 2654 bitField0_ |= 0x00000080; 2655 onChanged(); 2656 return getTestingOptionsFieldBuilder().getBuilder(); 2657 } 2658 /** 2659 * 2660 * 2661 * <pre> 2662 * Options for user acceptance testing. 2663 * </pre> 2664 * 2665 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 2666 */ getTestingOptionsOrBuilder()2667 public com.google.recaptchaenterprise.v1.TestingOptionsOrBuilder getTestingOptionsOrBuilder() { 2668 if (testingOptionsBuilder_ != null) { 2669 return testingOptionsBuilder_.getMessageOrBuilder(); 2670 } else { 2671 return testingOptions_ == null 2672 ? com.google.recaptchaenterprise.v1.TestingOptions.getDefaultInstance() 2673 : testingOptions_; 2674 } 2675 } 2676 /** 2677 * 2678 * 2679 * <pre> 2680 * Options for user acceptance testing. 2681 * </pre> 2682 * 2683 * <code>.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;</code> 2684 */ 2685 private com.google.protobuf.SingleFieldBuilderV3< 2686 com.google.recaptchaenterprise.v1.TestingOptions, 2687 com.google.recaptchaenterprise.v1.TestingOptions.Builder, 2688 com.google.recaptchaenterprise.v1.TestingOptionsOrBuilder> getTestingOptionsFieldBuilder()2689 getTestingOptionsFieldBuilder() { 2690 if (testingOptionsBuilder_ == null) { 2691 testingOptionsBuilder_ = 2692 new com.google.protobuf.SingleFieldBuilderV3< 2693 com.google.recaptchaenterprise.v1.TestingOptions, 2694 com.google.recaptchaenterprise.v1.TestingOptions.Builder, 2695 com.google.recaptchaenterprise.v1.TestingOptionsOrBuilder>( 2696 getTestingOptions(), getParentForChildren(), isClean()); 2697 testingOptions_ = null; 2698 } 2699 return testingOptionsBuilder_; 2700 } 2701 2702 private com.google.recaptchaenterprise.v1.WafSettings wafSettings_; 2703 private com.google.protobuf.SingleFieldBuilderV3< 2704 com.google.recaptchaenterprise.v1.WafSettings, 2705 com.google.recaptchaenterprise.v1.WafSettings.Builder, 2706 com.google.recaptchaenterprise.v1.WafSettingsOrBuilder> 2707 wafSettingsBuilder_; 2708 /** 2709 * 2710 * 2711 * <pre> 2712 * Settings for WAF 2713 * </pre> 2714 * 2715 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 2716 * 2717 * @return Whether the wafSettings field is set. 2718 */ hasWafSettings()2719 public boolean hasWafSettings() { 2720 return ((bitField0_ & 0x00000100) != 0); 2721 } 2722 /** 2723 * 2724 * 2725 * <pre> 2726 * Settings for WAF 2727 * </pre> 2728 * 2729 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 2730 * 2731 * @return The wafSettings. 2732 */ getWafSettings()2733 public com.google.recaptchaenterprise.v1.WafSettings getWafSettings() { 2734 if (wafSettingsBuilder_ == null) { 2735 return wafSettings_ == null 2736 ? com.google.recaptchaenterprise.v1.WafSettings.getDefaultInstance() 2737 : wafSettings_; 2738 } else { 2739 return wafSettingsBuilder_.getMessage(); 2740 } 2741 } 2742 /** 2743 * 2744 * 2745 * <pre> 2746 * Settings for WAF 2747 * </pre> 2748 * 2749 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 2750 */ setWafSettings(com.google.recaptchaenterprise.v1.WafSettings value)2751 public Builder setWafSettings(com.google.recaptchaenterprise.v1.WafSettings value) { 2752 if (wafSettingsBuilder_ == null) { 2753 if (value == null) { 2754 throw new NullPointerException(); 2755 } 2756 wafSettings_ = value; 2757 } else { 2758 wafSettingsBuilder_.setMessage(value); 2759 } 2760 bitField0_ |= 0x00000100; 2761 onChanged(); 2762 return this; 2763 } 2764 /** 2765 * 2766 * 2767 * <pre> 2768 * Settings for WAF 2769 * </pre> 2770 * 2771 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 2772 */ setWafSettings( com.google.recaptchaenterprise.v1.WafSettings.Builder builderForValue)2773 public Builder setWafSettings( 2774 com.google.recaptchaenterprise.v1.WafSettings.Builder builderForValue) { 2775 if (wafSettingsBuilder_ == null) { 2776 wafSettings_ = builderForValue.build(); 2777 } else { 2778 wafSettingsBuilder_.setMessage(builderForValue.build()); 2779 } 2780 bitField0_ |= 0x00000100; 2781 onChanged(); 2782 return this; 2783 } 2784 /** 2785 * 2786 * 2787 * <pre> 2788 * Settings for WAF 2789 * </pre> 2790 * 2791 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 2792 */ mergeWafSettings(com.google.recaptchaenterprise.v1.WafSettings value)2793 public Builder mergeWafSettings(com.google.recaptchaenterprise.v1.WafSettings value) { 2794 if (wafSettingsBuilder_ == null) { 2795 if (((bitField0_ & 0x00000100) != 0) 2796 && wafSettings_ != null 2797 && wafSettings_ != com.google.recaptchaenterprise.v1.WafSettings.getDefaultInstance()) { 2798 getWafSettingsBuilder().mergeFrom(value); 2799 } else { 2800 wafSettings_ = value; 2801 } 2802 } else { 2803 wafSettingsBuilder_.mergeFrom(value); 2804 } 2805 bitField0_ |= 0x00000100; 2806 onChanged(); 2807 return this; 2808 } 2809 /** 2810 * 2811 * 2812 * <pre> 2813 * Settings for WAF 2814 * </pre> 2815 * 2816 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 2817 */ clearWafSettings()2818 public Builder clearWafSettings() { 2819 bitField0_ = (bitField0_ & ~0x00000100); 2820 wafSettings_ = null; 2821 if (wafSettingsBuilder_ != null) { 2822 wafSettingsBuilder_.dispose(); 2823 wafSettingsBuilder_ = null; 2824 } 2825 onChanged(); 2826 return this; 2827 } 2828 /** 2829 * 2830 * 2831 * <pre> 2832 * Settings for WAF 2833 * </pre> 2834 * 2835 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 2836 */ getWafSettingsBuilder()2837 public com.google.recaptchaenterprise.v1.WafSettings.Builder getWafSettingsBuilder() { 2838 bitField0_ |= 0x00000100; 2839 onChanged(); 2840 return getWafSettingsFieldBuilder().getBuilder(); 2841 } 2842 /** 2843 * 2844 * 2845 * <pre> 2846 * Settings for WAF 2847 * </pre> 2848 * 2849 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 2850 */ getWafSettingsOrBuilder()2851 public com.google.recaptchaenterprise.v1.WafSettingsOrBuilder getWafSettingsOrBuilder() { 2852 if (wafSettingsBuilder_ != null) { 2853 return wafSettingsBuilder_.getMessageOrBuilder(); 2854 } else { 2855 return wafSettings_ == null 2856 ? com.google.recaptchaenterprise.v1.WafSettings.getDefaultInstance() 2857 : wafSettings_; 2858 } 2859 } 2860 /** 2861 * 2862 * 2863 * <pre> 2864 * Settings for WAF 2865 * </pre> 2866 * 2867 * <code>.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;</code> 2868 */ 2869 private com.google.protobuf.SingleFieldBuilderV3< 2870 com.google.recaptchaenterprise.v1.WafSettings, 2871 com.google.recaptchaenterprise.v1.WafSettings.Builder, 2872 com.google.recaptchaenterprise.v1.WafSettingsOrBuilder> getWafSettingsFieldBuilder()2873 getWafSettingsFieldBuilder() { 2874 if (wafSettingsBuilder_ == null) { 2875 wafSettingsBuilder_ = 2876 new com.google.protobuf.SingleFieldBuilderV3< 2877 com.google.recaptchaenterprise.v1.WafSettings, 2878 com.google.recaptchaenterprise.v1.WafSettings.Builder, 2879 com.google.recaptchaenterprise.v1.WafSettingsOrBuilder>( 2880 getWafSettings(), getParentForChildren(), isClean()); 2881 wafSettings_ = null; 2882 } 2883 return wafSettingsBuilder_; 2884 } 2885 2886 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2887 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2888 return super.setUnknownFields(unknownFields); 2889 } 2890 2891 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2892 public final Builder mergeUnknownFields( 2893 final com.google.protobuf.UnknownFieldSet unknownFields) { 2894 return super.mergeUnknownFields(unknownFields); 2895 } 2896 2897 // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1.Key) 2898 } 2899 2900 // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1.Key) 2901 private static final com.google.recaptchaenterprise.v1.Key DEFAULT_INSTANCE; 2902 2903 static { 2904 DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1.Key(); 2905 } 2906 getDefaultInstance()2907 public static com.google.recaptchaenterprise.v1.Key getDefaultInstance() { 2908 return DEFAULT_INSTANCE; 2909 } 2910 2911 private static final com.google.protobuf.Parser<Key> PARSER = 2912 new com.google.protobuf.AbstractParser<Key>() { 2913 @java.lang.Override 2914 public Key parsePartialFrom( 2915 com.google.protobuf.CodedInputStream input, 2916 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2917 throws com.google.protobuf.InvalidProtocolBufferException { 2918 Builder builder = newBuilder(); 2919 try { 2920 builder.mergeFrom(input, extensionRegistry); 2921 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2922 throw e.setUnfinishedMessage(builder.buildPartial()); 2923 } catch (com.google.protobuf.UninitializedMessageException e) { 2924 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2925 } catch (java.io.IOException e) { 2926 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2927 .setUnfinishedMessage(builder.buildPartial()); 2928 } 2929 return builder.buildPartial(); 2930 } 2931 }; 2932 parser()2933 public static com.google.protobuf.Parser<Key> parser() { 2934 return PARSER; 2935 } 2936 2937 @java.lang.Override getParserForType()2938 public com.google.protobuf.Parser<Key> getParserForType() { 2939 return PARSER; 2940 } 2941 2942 @java.lang.Override getDefaultInstanceForType()2943 public com.google.recaptchaenterprise.v1.Key getDefaultInstanceForType() { 2944 return DEFAULT_INSTANCE; 2945 } 2946 } 2947