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