1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * matchRule criteria for request header matches. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.HttpHeaderMatch} 29 */ 30 public final class HttpHeaderMatch extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.HttpHeaderMatch) 33 HttpHeaderMatchOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use HttpHeaderMatch.newBuilder() to construct. HttpHeaderMatch(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private HttpHeaderMatch(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 HttpHeaderMatch()40 private HttpHeaderMatch() { 41 exactMatch_ = ""; 42 headerName_ = ""; 43 prefixMatch_ = ""; 44 regexMatch_ = ""; 45 suffixMatch_ = ""; 46 } 47 48 @java.lang.Override 49 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)50 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 51 return new HttpHeaderMatch(); 52 } 53 54 @java.lang.Override getUnknownFields()55 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 56 return this.unknownFields; 57 } 58 getDescriptor()59 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 60 return com.google.cloud.compute.v1.Compute 61 .internal_static_google_cloud_compute_v1_HttpHeaderMatch_descriptor; 62 } 63 64 @java.lang.Override 65 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()66 internalGetFieldAccessorTable() { 67 return com.google.cloud.compute.v1.Compute 68 .internal_static_google_cloud_compute_v1_HttpHeaderMatch_fieldAccessorTable 69 .ensureFieldAccessorsInitialized( 70 com.google.cloud.compute.v1.HttpHeaderMatch.class, 71 com.google.cloud.compute.v1.HttpHeaderMatch.Builder.class); 72 } 73 74 private int bitField0_; 75 public static final int EXACT_MATCH_FIELD_NUMBER = 457641093; 76 77 @SuppressWarnings("serial") 78 private volatile java.lang.Object exactMatch_ = ""; 79 /** 80 * 81 * 82 * <pre> 83 * The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 84 * </pre> 85 * 86 * <code>optional string exact_match = 457641093;</code> 87 * 88 * @return Whether the exactMatch field is set. 89 */ 90 @java.lang.Override hasExactMatch()91 public boolean hasExactMatch() { 92 return ((bitField0_ & 0x00000001) != 0); 93 } 94 /** 95 * 96 * 97 * <pre> 98 * The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 99 * </pre> 100 * 101 * <code>optional string exact_match = 457641093;</code> 102 * 103 * @return The exactMatch. 104 */ 105 @java.lang.Override getExactMatch()106 public java.lang.String getExactMatch() { 107 java.lang.Object ref = exactMatch_; 108 if (ref instanceof java.lang.String) { 109 return (java.lang.String) ref; 110 } else { 111 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 112 java.lang.String s = bs.toStringUtf8(); 113 exactMatch_ = s; 114 return s; 115 } 116 } 117 /** 118 * 119 * 120 * <pre> 121 * The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 122 * </pre> 123 * 124 * <code>optional string exact_match = 457641093;</code> 125 * 126 * @return The bytes for exactMatch. 127 */ 128 @java.lang.Override getExactMatchBytes()129 public com.google.protobuf.ByteString getExactMatchBytes() { 130 java.lang.Object ref = exactMatch_; 131 if (ref instanceof java.lang.String) { 132 com.google.protobuf.ByteString b = 133 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 134 exactMatch_ = b; 135 return b; 136 } else { 137 return (com.google.protobuf.ByteString) ref; 138 } 139 } 140 141 public static final int HEADER_NAME_FIELD_NUMBER = 110223613; 142 143 @SuppressWarnings("serial") 144 private volatile java.lang.Object headerName_ = ""; 145 /** 146 * 147 * 148 * <pre> 149 * The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. 150 * </pre> 151 * 152 * <code>optional string header_name = 110223613;</code> 153 * 154 * @return Whether the headerName field is set. 155 */ 156 @java.lang.Override hasHeaderName()157 public boolean hasHeaderName() { 158 return ((bitField0_ & 0x00000002) != 0); 159 } 160 /** 161 * 162 * 163 * <pre> 164 * The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. 165 * </pre> 166 * 167 * <code>optional string header_name = 110223613;</code> 168 * 169 * @return The headerName. 170 */ 171 @java.lang.Override getHeaderName()172 public java.lang.String getHeaderName() { 173 java.lang.Object ref = headerName_; 174 if (ref instanceof java.lang.String) { 175 return (java.lang.String) ref; 176 } else { 177 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 178 java.lang.String s = bs.toStringUtf8(); 179 headerName_ = s; 180 return s; 181 } 182 } 183 /** 184 * 185 * 186 * <pre> 187 * The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. 188 * </pre> 189 * 190 * <code>optional string header_name = 110223613;</code> 191 * 192 * @return The bytes for headerName. 193 */ 194 @java.lang.Override getHeaderNameBytes()195 public com.google.protobuf.ByteString getHeaderNameBytes() { 196 java.lang.Object ref = headerName_; 197 if (ref instanceof java.lang.String) { 198 com.google.protobuf.ByteString b = 199 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 200 headerName_ = b; 201 return b; 202 } else { 203 return (com.google.protobuf.ByteString) ref; 204 } 205 } 206 207 public static final int INVERT_MATCH_FIELD_NUMBER = 501130268; 208 private boolean invertMatch_ = false; 209 /** 210 * 211 * 212 * <pre> 213 * If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false. 214 * </pre> 215 * 216 * <code>optional bool invert_match = 501130268;</code> 217 * 218 * @return Whether the invertMatch field is set. 219 */ 220 @java.lang.Override hasInvertMatch()221 public boolean hasInvertMatch() { 222 return ((bitField0_ & 0x00000004) != 0); 223 } 224 /** 225 * 226 * 227 * <pre> 228 * If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false. 229 * </pre> 230 * 231 * <code>optional bool invert_match = 501130268;</code> 232 * 233 * @return The invertMatch. 234 */ 235 @java.lang.Override getInvertMatch()236 public boolean getInvertMatch() { 237 return invertMatch_; 238 } 239 240 public static final int PREFIX_MATCH_FIELD_NUMBER = 257898968; 241 242 @SuppressWarnings("serial") 243 private volatile java.lang.Object prefixMatch_ = ""; 244 /** 245 * 246 * 247 * <pre> 248 * The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 249 * </pre> 250 * 251 * <code>optional string prefix_match = 257898968;</code> 252 * 253 * @return Whether the prefixMatch field is set. 254 */ 255 @java.lang.Override hasPrefixMatch()256 public boolean hasPrefixMatch() { 257 return ((bitField0_ & 0x00000008) != 0); 258 } 259 /** 260 * 261 * 262 * <pre> 263 * The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 264 * </pre> 265 * 266 * <code>optional string prefix_match = 257898968;</code> 267 * 268 * @return The prefixMatch. 269 */ 270 @java.lang.Override getPrefixMatch()271 public java.lang.String getPrefixMatch() { 272 java.lang.Object ref = prefixMatch_; 273 if (ref instanceof java.lang.String) { 274 return (java.lang.String) ref; 275 } else { 276 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 277 java.lang.String s = bs.toStringUtf8(); 278 prefixMatch_ = s; 279 return s; 280 } 281 } 282 /** 283 * 284 * 285 * <pre> 286 * The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 287 * </pre> 288 * 289 * <code>optional string prefix_match = 257898968;</code> 290 * 291 * @return The bytes for prefixMatch. 292 */ 293 @java.lang.Override getPrefixMatchBytes()294 public com.google.protobuf.ByteString getPrefixMatchBytes() { 295 java.lang.Object ref = prefixMatch_; 296 if (ref instanceof java.lang.String) { 297 com.google.protobuf.ByteString b = 298 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 299 prefixMatch_ = b; 300 return b; 301 } else { 302 return (com.google.protobuf.ByteString) ref; 303 } 304 } 305 306 public static final int PRESENT_MATCH_FIELD_NUMBER = 67435841; 307 private boolean presentMatch_ = false; 308 /** 309 * 310 * 311 * <pre> 312 * A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 313 * </pre> 314 * 315 * <code>optional bool present_match = 67435841;</code> 316 * 317 * @return Whether the presentMatch field is set. 318 */ 319 @java.lang.Override hasPresentMatch()320 public boolean hasPresentMatch() { 321 return ((bitField0_ & 0x00000010) != 0); 322 } 323 /** 324 * 325 * 326 * <pre> 327 * A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 328 * </pre> 329 * 330 * <code>optional bool present_match = 67435841;</code> 331 * 332 * @return The presentMatch. 333 */ 334 @java.lang.Override getPresentMatch()335 public boolean getPresentMatch() { 336 return presentMatch_; 337 } 338 339 public static final int RANGE_MATCH_FIELD_NUMBER = 97244227; 340 private com.google.cloud.compute.v1.Int64RangeMatch rangeMatch_; 341 /** 342 * 343 * 344 * <pre> 345 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 346 * </pre> 347 * 348 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 349 * 350 * @return Whether the rangeMatch field is set. 351 */ 352 @java.lang.Override hasRangeMatch()353 public boolean hasRangeMatch() { 354 return ((bitField0_ & 0x00000020) != 0); 355 } 356 /** 357 * 358 * 359 * <pre> 360 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 361 * </pre> 362 * 363 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 364 * 365 * @return The rangeMatch. 366 */ 367 @java.lang.Override getRangeMatch()368 public com.google.cloud.compute.v1.Int64RangeMatch getRangeMatch() { 369 return rangeMatch_ == null 370 ? com.google.cloud.compute.v1.Int64RangeMatch.getDefaultInstance() 371 : rangeMatch_; 372 } 373 /** 374 * 375 * 376 * <pre> 377 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 378 * </pre> 379 * 380 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 381 */ 382 @java.lang.Override getRangeMatchOrBuilder()383 public com.google.cloud.compute.v1.Int64RangeMatchOrBuilder getRangeMatchOrBuilder() { 384 return rangeMatch_ == null 385 ? com.google.cloud.compute.v1.Int64RangeMatch.getDefaultInstance() 386 : rangeMatch_; 387 } 388 389 public static final int REGEX_MATCH_FIELD_NUMBER = 107387853; 390 391 @SuppressWarnings("serial") 392 private volatile java.lang.Object regexMatch_ = ""; 393 /** 394 * 395 * 396 * <pre> 397 * The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 398 * </pre> 399 * 400 * <code>optional string regex_match = 107387853;</code> 401 * 402 * @return Whether the regexMatch field is set. 403 */ 404 @java.lang.Override hasRegexMatch()405 public boolean hasRegexMatch() { 406 return ((bitField0_ & 0x00000040) != 0); 407 } 408 /** 409 * 410 * 411 * <pre> 412 * The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 413 * </pre> 414 * 415 * <code>optional string regex_match = 107387853;</code> 416 * 417 * @return The regexMatch. 418 */ 419 @java.lang.Override getRegexMatch()420 public java.lang.String getRegexMatch() { 421 java.lang.Object ref = regexMatch_; 422 if (ref instanceof java.lang.String) { 423 return (java.lang.String) ref; 424 } else { 425 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 426 java.lang.String s = bs.toStringUtf8(); 427 regexMatch_ = s; 428 return s; 429 } 430 } 431 /** 432 * 433 * 434 * <pre> 435 * The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 436 * </pre> 437 * 438 * <code>optional string regex_match = 107387853;</code> 439 * 440 * @return The bytes for regexMatch. 441 */ 442 @java.lang.Override getRegexMatchBytes()443 public com.google.protobuf.ByteString getRegexMatchBytes() { 444 java.lang.Object ref = regexMatch_; 445 if (ref instanceof java.lang.String) { 446 com.google.protobuf.ByteString b = 447 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 448 regexMatch_ = b; 449 return b; 450 } else { 451 return (com.google.protobuf.ByteString) ref; 452 } 453 } 454 455 public static final int SUFFIX_MATCH_FIELD_NUMBER = 426488663; 456 457 @SuppressWarnings("serial") 458 private volatile java.lang.Object suffixMatch_ = ""; 459 /** 460 * 461 * 462 * <pre> 463 * The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 464 * </pre> 465 * 466 * <code>optional string suffix_match = 426488663;</code> 467 * 468 * @return Whether the suffixMatch field is set. 469 */ 470 @java.lang.Override hasSuffixMatch()471 public boolean hasSuffixMatch() { 472 return ((bitField0_ & 0x00000080) != 0); 473 } 474 /** 475 * 476 * 477 * <pre> 478 * The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 479 * </pre> 480 * 481 * <code>optional string suffix_match = 426488663;</code> 482 * 483 * @return The suffixMatch. 484 */ 485 @java.lang.Override getSuffixMatch()486 public java.lang.String getSuffixMatch() { 487 java.lang.Object ref = suffixMatch_; 488 if (ref instanceof java.lang.String) { 489 return (java.lang.String) ref; 490 } else { 491 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 492 java.lang.String s = bs.toStringUtf8(); 493 suffixMatch_ = s; 494 return s; 495 } 496 } 497 /** 498 * 499 * 500 * <pre> 501 * The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 502 * </pre> 503 * 504 * <code>optional string suffix_match = 426488663;</code> 505 * 506 * @return The bytes for suffixMatch. 507 */ 508 @java.lang.Override getSuffixMatchBytes()509 public com.google.protobuf.ByteString getSuffixMatchBytes() { 510 java.lang.Object ref = suffixMatch_; 511 if (ref instanceof java.lang.String) { 512 com.google.protobuf.ByteString b = 513 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 514 suffixMatch_ = b; 515 return b; 516 } else { 517 return (com.google.protobuf.ByteString) ref; 518 } 519 } 520 521 private byte memoizedIsInitialized = -1; 522 523 @java.lang.Override isInitialized()524 public final boolean isInitialized() { 525 byte isInitialized = memoizedIsInitialized; 526 if (isInitialized == 1) return true; 527 if (isInitialized == 0) return false; 528 529 memoizedIsInitialized = 1; 530 return true; 531 } 532 533 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)534 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 535 if (((bitField0_ & 0x00000010) != 0)) { 536 output.writeBool(67435841, presentMatch_); 537 } 538 if (((bitField0_ & 0x00000020) != 0)) { 539 output.writeMessage(97244227, getRangeMatch()); 540 } 541 if (((bitField0_ & 0x00000040) != 0)) { 542 com.google.protobuf.GeneratedMessageV3.writeString(output, 107387853, regexMatch_); 543 } 544 if (((bitField0_ & 0x00000002) != 0)) { 545 com.google.protobuf.GeneratedMessageV3.writeString(output, 110223613, headerName_); 546 } 547 if (((bitField0_ & 0x00000008) != 0)) { 548 com.google.protobuf.GeneratedMessageV3.writeString(output, 257898968, prefixMatch_); 549 } 550 if (((bitField0_ & 0x00000080) != 0)) { 551 com.google.protobuf.GeneratedMessageV3.writeString(output, 426488663, suffixMatch_); 552 } 553 if (((bitField0_ & 0x00000001) != 0)) { 554 com.google.protobuf.GeneratedMessageV3.writeString(output, 457641093, exactMatch_); 555 } 556 if (((bitField0_ & 0x00000004) != 0)) { 557 output.writeBool(501130268, invertMatch_); 558 } 559 getUnknownFields().writeTo(output); 560 } 561 562 @java.lang.Override getSerializedSize()563 public int getSerializedSize() { 564 int size = memoizedSize; 565 if (size != -1) return size; 566 567 size = 0; 568 if (((bitField0_ & 0x00000010) != 0)) { 569 size += com.google.protobuf.CodedOutputStream.computeBoolSize(67435841, presentMatch_); 570 } 571 if (((bitField0_ & 0x00000020) != 0)) { 572 size += com.google.protobuf.CodedOutputStream.computeMessageSize(97244227, getRangeMatch()); 573 } 574 if (((bitField0_ & 0x00000040) != 0)) { 575 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(107387853, regexMatch_); 576 } 577 if (((bitField0_ & 0x00000002) != 0)) { 578 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(110223613, headerName_); 579 } 580 if (((bitField0_ & 0x00000008) != 0)) { 581 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(257898968, prefixMatch_); 582 } 583 if (((bitField0_ & 0x00000080) != 0)) { 584 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(426488663, suffixMatch_); 585 } 586 if (((bitField0_ & 0x00000001) != 0)) { 587 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(457641093, exactMatch_); 588 } 589 if (((bitField0_ & 0x00000004) != 0)) { 590 size += com.google.protobuf.CodedOutputStream.computeBoolSize(501130268, invertMatch_); 591 } 592 size += getUnknownFields().getSerializedSize(); 593 memoizedSize = size; 594 return size; 595 } 596 597 @java.lang.Override equals(final java.lang.Object obj)598 public boolean equals(final java.lang.Object obj) { 599 if (obj == this) { 600 return true; 601 } 602 if (!(obj instanceof com.google.cloud.compute.v1.HttpHeaderMatch)) { 603 return super.equals(obj); 604 } 605 com.google.cloud.compute.v1.HttpHeaderMatch other = 606 (com.google.cloud.compute.v1.HttpHeaderMatch) obj; 607 608 if (hasExactMatch() != other.hasExactMatch()) return false; 609 if (hasExactMatch()) { 610 if (!getExactMatch().equals(other.getExactMatch())) return false; 611 } 612 if (hasHeaderName() != other.hasHeaderName()) return false; 613 if (hasHeaderName()) { 614 if (!getHeaderName().equals(other.getHeaderName())) return false; 615 } 616 if (hasInvertMatch() != other.hasInvertMatch()) return false; 617 if (hasInvertMatch()) { 618 if (getInvertMatch() != other.getInvertMatch()) return false; 619 } 620 if (hasPrefixMatch() != other.hasPrefixMatch()) return false; 621 if (hasPrefixMatch()) { 622 if (!getPrefixMatch().equals(other.getPrefixMatch())) return false; 623 } 624 if (hasPresentMatch() != other.hasPresentMatch()) return false; 625 if (hasPresentMatch()) { 626 if (getPresentMatch() != other.getPresentMatch()) return false; 627 } 628 if (hasRangeMatch() != other.hasRangeMatch()) return false; 629 if (hasRangeMatch()) { 630 if (!getRangeMatch().equals(other.getRangeMatch())) return false; 631 } 632 if (hasRegexMatch() != other.hasRegexMatch()) return false; 633 if (hasRegexMatch()) { 634 if (!getRegexMatch().equals(other.getRegexMatch())) return false; 635 } 636 if (hasSuffixMatch() != other.hasSuffixMatch()) return false; 637 if (hasSuffixMatch()) { 638 if (!getSuffixMatch().equals(other.getSuffixMatch())) return false; 639 } 640 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 641 return true; 642 } 643 644 @java.lang.Override hashCode()645 public int hashCode() { 646 if (memoizedHashCode != 0) { 647 return memoizedHashCode; 648 } 649 int hash = 41; 650 hash = (19 * hash) + getDescriptor().hashCode(); 651 if (hasExactMatch()) { 652 hash = (37 * hash) + EXACT_MATCH_FIELD_NUMBER; 653 hash = (53 * hash) + getExactMatch().hashCode(); 654 } 655 if (hasHeaderName()) { 656 hash = (37 * hash) + HEADER_NAME_FIELD_NUMBER; 657 hash = (53 * hash) + getHeaderName().hashCode(); 658 } 659 if (hasInvertMatch()) { 660 hash = (37 * hash) + INVERT_MATCH_FIELD_NUMBER; 661 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvertMatch()); 662 } 663 if (hasPrefixMatch()) { 664 hash = (37 * hash) + PREFIX_MATCH_FIELD_NUMBER; 665 hash = (53 * hash) + getPrefixMatch().hashCode(); 666 } 667 if (hasPresentMatch()) { 668 hash = (37 * hash) + PRESENT_MATCH_FIELD_NUMBER; 669 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPresentMatch()); 670 } 671 if (hasRangeMatch()) { 672 hash = (37 * hash) + RANGE_MATCH_FIELD_NUMBER; 673 hash = (53 * hash) + getRangeMatch().hashCode(); 674 } 675 if (hasRegexMatch()) { 676 hash = (37 * hash) + REGEX_MATCH_FIELD_NUMBER; 677 hash = (53 * hash) + getRegexMatch().hashCode(); 678 } 679 if (hasSuffixMatch()) { 680 hash = (37 * hash) + SUFFIX_MATCH_FIELD_NUMBER; 681 hash = (53 * hash) + getSuffixMatch().hashCode(); 682 } 683 hash = (29 * hash) + getUnknownFields().hashCode(); 684 memoizedHashCode = hash; 685 return hash; 686 } 687 parseFrom(java.nio.ByteBuffer data)688 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom(java.nio.ByteBuffer data) 689 throws com.google.protobuf.InvalidProtocolBufferException { 690 return PARSER.parseFrom(data); 691 } 692 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)693 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom( 694 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 695 throws com.google.protobuf.InvalidProtocolBufferException { 696 return PARSER.parseFrom(data, extensionRegistry); 697 } 698 parseFrom( com.google.protobuf.ByteString data)699 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom( 700 com.google.protobuf.ByteString data) 701 throws com.google.protobuf.InvalidProtocolBufferException { 702 return PARSER.parseFrom(data); 703 } 704 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)705 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom( 706 com.google.protobuf.ByteString data, 707 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 708 throws com.google.protobuf.InvalidProtocolBufferException { 709 return PARSER.parseFrom(data, extensionRegistry); 710 } 711 parseFrom(byte[] data)712 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom(byte[] data) 713 throws com.google.protobuf.InvalidProtocolBufferException { 714 return PARSER.parseFrom(data); 715 } 716 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)717 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom( 718 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 719 throws com.google.protobuf.InvalidProtocolBufferException { 720 return PARSER.parseFrom(data, extensionRegistry); 721 } 722 parseFrom(java.io.InputStream input)723 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom(java.io.InputStream input) 724 throws java.io.IOException { 725 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 726 } 727 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)728 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom( 729 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 730 throws java.io.IOException { 731 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 732 PARSER, input, extensionRegistry); 733 } 734 parseDelimitedFrom( java.io.InputStream input)735 public static com.google.cloud.compute.v1.HttpHeaderMatch parseDelimitedFrom( 736 java.io.InputStream input) throws java.io.IOException { 737 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 738 } 739 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)740 public static com.google.cloud.compute.v1.HttpHeaderMatch parseDelimitedFrom( 741 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 742 throws java.io.IOException { 743 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 744 PARSER, input, extensionRegistry); 745 } 746 parseFrom( com.google.protobuf.CodedInputStream input)747 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom( 748 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 749 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 750 } 751 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)752 public static com.google.cloud.compute.v1.HttpHeaderMatch parseFrom( 753 com.google.protobuf.CodedInputStream input, 754 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 755 throws java.io.IOException { 756 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 757 PARSER, input, extensionRegistry); 758 } 759 760 @java.lang.Override newBuilderForType()761 public Builder newBuilderForType() { 762 return newBuilder(); 763 } 764 newBuilder()765 public static Builder newBuilder() { 766 return DEFAULT_INSTANCE.toBuilder(); 767 } 768 newBuilder(com.google.cloud.compute.v1.HttpHeaderMatch prototype)769 public static Builder newBuilder(com.google.cloud.compute.v1.HttpHeaderMatch prototype) { 770 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 771 } 772 773 @java.lang.Override toBuilder()774 public Builder toBuilder() { 775 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 776 } 777 778 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)779 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 780 Builder builder = new Builder(parent); 781 return builder; 782 } 783 /** 784 * 785 * 786 * <pre> 787 * matchRule criteria for request header matches. 788 * </pre> 789 * 790 * Protobuf type {@code google.cloud.compute.v1.HttpHeaderMatch} 791 */ 792 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 793 implements 794 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.HttpHeaderMatch) 795 com.google.cloud.compute.v1.HttpHeaderMatchOrBuilder { getDescriptor()796 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 797 return com.google.cloud.compute.v1.Compute 798 .internal_static_google_cloud_compute_v1_HttpHeaderMatch_descriptor; 799 } 800 801 @java.lang.Override 802 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()803 internalGetFieldAccessorTable() { 804 return com.google.cloud.compute.v1.Compute 805 .internal_static_google_cloud_compute_v1_HttpHeaderMatch_fieldAccessorTable 806 .ensureFieldAccessorsInitialized( 807 com.google.cloud.compute.v1.HttpHeaderMatch.class, 808 com.google.cloud.compute.v1.HttpHeaderMatch.Builder.class); 809 } 810 811 // Construct using com.google.cloud.compute.v1.HttpHeaderMatch.newBuilder() Builder()812 private Builder() { 813 maybeForceBuilderInitialization(); 814 } 815 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)816 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 817 super(parent); 818 maybeForceBuilderInitialization(); 819 } 820 maybeForceBuilderInitialization()821 private void maybeForceBuilderInitialization() { 822 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 823 getRangeMatchFieldBuilder(); 824 } 825 } 826 827 @java.lang.Override clear()828 public Builder clear() { 829 super.clear(); 830 bitField0_ = 0; 831 exactMatch_ = ""; 832 headerName_ = ""; 833 invertMatch_ = false; 834 prefixMatch_ = ""; 835 presentMatch_ = false; 836 rangeMatch_ = null; 837 if (rangeMatchBuilder_ != null) { 838 rangeMatchBuilder_.dispose(); 839 rangeMatchBuilder_ = null; 840 } 841 regexMatch_ = ""; 842 suffixMatch_ = ""; 843 return this; 844 } 845 846 @java.lang.Override getDescriptorForType()847 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 848 return com.google.cloud.compute.v1.Compute 849 .internal_static_google_cloud_compute_v1_HttpHeaderMatch_descriptor; 850 } 851 852 @java.lang.Override getDefaultInstanceForType()853 public com.google.cloud.compute.v1.HttpHeaderMatch getDefaultInstanceForType() { 854 return com.google.cloud.compute.v1.HttpHeaderMatch.getDefaultInstance(); 855 } 856 857 @java.lang.Override build()858 public com.google.cloud.compute.v1.HttpHeaderMatch build() { 859 com.google.cloud.compute.v1.HttpHeaderMatch result = buildPartial(); 860 if (!result.isInitialized()) { 861 throw newUninitializedMessageException(result); 862 } 863 return result; 864 } 865 866 @java.lang.Override buildPartial()867 public com.google.cloud.compute.v1.HttpHeaderMatch buildPartial() { 868 com.google.cloud.compute.v1.HttpHeaderMatch result = 869 new com.google.cloud.compute.v1.HttpHeaderMatch(this); 870 if (bitField0_ != 0) { 871 buildPartial0(result); 872 } 873 onBuilt(); 874 return result; 875 } 876 buildPartial0(com.google.cloud.compute.v1.HttpHeaderMatch result)877 private void buildPartial0(com.google.cloud.compute.v1.HttpHeaderMatch result) { 878 int from_bitField0_ = bitField0_; 879 int to_bitField0_ = 0; 880 if (((from_bitField0_ & 0x00000001) != 0)) { 881 result.exactMatch_ = exactMatch_; 882 to_bitField0_ |= 0x00000001; 883 } 884 if (((from_bitField0_ & 0x00000002) != 0)) { 885 result.headerName_ = headerName_; 886 to_bitField0_ |= 0x00000002; 887 } 888 if (((from_bitField0_ & 0x00000004) != 0)) { 889 result.invertMatch_ = invertMatch_; 890 to_bitField0_ |= 0x00000004; 891 } 892 if (((from_bitField0_ & 0x00000008) != 0)) { 893 result.prefixMatch_ = prefixMatch_; 894 to_bitField0_ |= 0x00000008; 895 } 896 if (((from_bitField0_ & 0x00000010) != 0)) { 897 result.presentMatch_ = presentMatch_; 898 to_bitField0_ |= 0x00000010; 899 } 900 if (((from_bitField0_ & 0x00000020) != 0)) { 901 result.rangeMatch_ = rangeMatchBuilder_ == null ? rangeMatch_ : rangeMatchBuilder_.build(); 902 to_bitField0_ |= 0x00000020; 903 } 904 if (((from_bitField0_ & 0x00000040) != 0)) { 905 result.regexMatch_ = regexMatch_; 906 to_bitField0_ |= 0x00000040; 907 } 908 if (((from_bitField0_ & 0x00000080) != 0)) { 909 result.suffixMatch_ = suffixMatch_; 910 to_bitField0_ |= 0x00000080; 911 } 912 result.bitField0_ |= to_bitField0_; 913 } 914 915 @java.lang.Override clone()916 public Builder clone() { 917 return super.clone(); 918 } 919 920 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)921 public Builder setField( 922 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 923 return super.setField(field, value); 924 } 925 926 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)927 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 928 return super.clearField(field); 929 } 930 931 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)932 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 933 return super.clearOneof(oneof); 934 } 935 936 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)937 public Builder setRepeatedField( 938 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 939 return super.setRepeatedField(field, index, value); 940 } 941 942 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)943 public Builder addRepeatedField( 944 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 945 return super.addRepeatedField(field, value); 946 } 947 948 @java.lang.Override mergeFrom(com.google.protobuf.Message other)949 public Builder mergeFrom(com.google.protobuf.Message other) { 950 if (other instanceof com.google.cloud.compute.v1.HttpHeaderMatch) { 951 return mergeFrom((com.google.cloud.compute.v1.HttpHeaderMatch) other); 952 } else { 953 super.mergeFrom(other); 954 return this; 955 } 956 } 957 mergeFrom(com.google.cloud.compute.v1.HttpHeaderMatch other)958 public Builder mergeFrom(com.google.cloud.compute.v1.HttpHeaderMatch other) { 959 if (other == com.google.cloud.compute.v1.HttpHeaderMatch.getDefaultInstance()) return this; 960 if (other.hasExactMatch()) { 961 exactMatch_ = other.exactMatch_; 962 bitField0_ |= 0x00000001; 963 onChanged(); 964 } 965 if (other.hasHeaderName()) { 966 headerName_ = other.headerName_; 967 bitField0_ |= 0x00000002; 968 onChanged(); 969 } 970 if (other.hasInvertMatch()) { 971 setInvertMatch(other.getInvertMatch()); 972 } 973 if (other.hasPrefixMatch()) { 974 prefixMatch_ = other.prefixMatch_; 975 bitField0_ |= 0x00000008; 976 onChanged(); 977 } 978 if (other.hasPresentMatch()) { 979 setPresentMatch(other.getPresentMatch()); 980 } 981 if (other.hasRangeMatch()) { 982 mergeRangeMatch(other.getRangeMatch()); 983 } 984 if (other.hasRegexMatch()) { 985 regexMatch_ = other.regexMatch_; 986 bitField0_ |= 0x00000040; 987 onChanged(); 988 } 989 if (other.hasSuffixMatch()) { 990 suffixMatch_ = other.suffixMatch_; 991 bitField0_ |= 0x00000080; 992 onChanged(); 993 } 994 this.mergeUnknownFields(other.getUnknownFields()); 995 onChanged(); 996 return this; 997 } 998 999 @java.lang.Override isInitialized()1000 public final boolean isInitialized() { 1001 return true; 1002 } 1003 1004 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1005 public Builder mergeFrom( 1006 com.google.protobuf.CodedInputStream input, 1007 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1008 throws java.io.IOException { 1009 if (extensionRegistry == null) { 1010 throw new java.lang.NullPointerException(); 1011 } 1012 try { 1013 boolean done = false; 1014 while (!done) { 1015 int tag = input.readTag(); 1016 switch (tag) { 1017 case 0: 1018 done = true; 1019 break; 1020 case 539486728: 1021 { 1022 presentMatch_ = input.readBool(); 1023 bitField0_ |= 0x00000010; 1024 break; 1025 } // case 539486728 1026 case 777953818: 1027 { 1028 input.readMessage(getRangeMatchFieldBuilder().getBuilder(), extensionRegistry); 1029 bitField0_ |= 0x00000020; 1030 break; 1031 } // case 777953818 1032 case 859102826: 1033 { 1034 regexMatch_ = input.readStringRequireUtf8(); 1035 bitField0_ |= 0x00000040; 1036 break; 1037 } // case 859102826 1038 case 881788906: 1039 { 1040 headerName_ = input.readStringRequireUtf8(); 1041 bitField0_ |= 0x00000002; 1042 break; 1043 } // case 881788906 1044 case 2063191746: 1045 { 1046 prefixMatch_ = input.readStringRequireUtf8(); 1047 bitField0_ |= 0x00000008; 1048 break; 1049 } // case 2063191746 1050 case -883057990: 1051 { 1052 suffixMatch_ = input.readStringRequireUtf8(); 1053 bitField0_ |= 0x00000080; 1054 break; 1055 } // case -883057990 1056 case -633838550: 1057 { 1058 exactMatch_ = input.readStringRequireUtf8(); 1059 bitField0_ |= 0x00000001; 1060 break; 1061 } // case -633838550 1062 case -285925152: 1063 { 1064 invertMatch_ = input.readBool(); 1065 bitField0_ |= 0x00000004; 1066 break; 1067 } // case -285925152 1068 default: 1069 { 1070 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1071 done = true; // was an endgroup tag 1072 } 1073 break; 1074 } // default: 1075 } // switch (tag) 1076 } // while (!done) 1077 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1078 throw e.unwrapIOException(); 1079 } finally { 1080 onChanged(); 1081 } // finally 1082 return this; 1083 } 1084 1085 private int bitField0_; 1086 1087 private java.lang.Object exactMatch_ = ""; 1088 /** 1089 * 1090 * 1091 * <pre> 1092 * The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1093 * </pre> 1094 * 1095 * <code>optional string exact_match = 457641093;</code> 1096 * 1097 * @return Whether the exactMatch field is set. 1098 */ hasExactMatch()1099 public boolean hasExactMatch() { 1100 return ((bitField0_ & 0x00000001) != 0); 1101 } 1102 /** 1103 * 1104 * 1105 * <pre> 1106 * The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1107 * </pre> 1108 * 1109 * <code>optional string exact_match = 457641093;</code> 1110 * 1111 * @return The exactMatch. 1112 */ getExactMatch()1113 public java.lang.String getExactMatch() { 1114 java.lang.Object ref = exactMatch_; 1115 if (!(ref instanceof java.lang.String)) { 1116 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1117 java.lang.String s = bs.toStringUtf8(); 1118 exactMatch_ = s; 1119 return s; 1120 } else { 1121 return (java.lang.String) ref; 1122 } 1123 } 1124 /** 1125 * 1126 * 1127 * <pre> 1128 * The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1129 * </pre> 1130 * 1131 * <code>optional string exact_match = 457641093;</code> 1132 * 1133 * @return The bytes for exactMatch. 1134 */ getExactMatchBytes()1135 public com.google.protobuf.ByteString getExactMatchBytes() { 1136 java.lang.Object ref = exactMatch_; 1137 if (ref instanceof String) { 1138 com.google.protobuf.ByteString b = 1139 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1140 exactMatch_ = b; 1141 return b; 1142 } else { 1143 return (com.google.protobuf.ByteString) ref; 1144 } 1145 } 1146 /** 1147 * 1148 * 1149 * <pre> 1150 * The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1151 * </pre> 1152 * 1153 * <code>optional string exact_match = 457641093;</code> 1154 * 1155 * @param value The exactMatch to set. 1156 * @return This builder for chaining. 1157 */ setExactMatch(java.lang.String value)1158 public Builder setExactMatch(java.lang.String value) { 1159 if (value == null) { 1160 throw new NullPointerException(); 1161 } 1162 exactMatch_ = value; 1163 bitField0_ |= 0x00000001; 1164 onChanged(); 1165 return this; 1166 } 1167 /** 1168 * 1169 * 1170 * <pre> 1171 * The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1172 * </pre> 1173 * 1174 * <code>optional string exact_match = 457641093;</code> 1175 * 1176 * @return This builder for chaining. 1177 */ clearExactMatch()1178 public Builder clearExactMatch() { 1179 exactMatch_ = getDefaultInstance().getExactMatch(); 1180 bitField0_ = (bitField0_ & ~0x00000001); 1181 onChanged(); 1182 return this; 1183 } 1184 /** 1185 * 1186 * 1187 * <pre> 1188 * The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1189 * </pre> 1190 * 1191 * <code>optional string exact_match = 457641093;</code> 1192 * 1193 * @param value The bytes for exactMatch to set. 1194 * @return This builder for chaining. 1195 */ setExactMatchBytes(com.google.protobuf.ByteString value)1196 public Builder setExactMatchBytes(com.google.protobuf.ByteString value) { 1197 if (value == null) { 1198 throw new NullPointerException(); 1199 } 1200 checkByteStringIsUtf8(value); 1201 exactMatch_ = value; 1202 bitField0_ |= 0x00000001; 1203 onChanged(); 1204 return this; 1205 } 1206 1207 private java.lang.Object headerName_ = ""; 1208 /** 1209 * 1210 * 1211 * <pre> 1212 * The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. 1213 * </pre> 1214 * 1215 * <code>optional string header_name = 110223613;</code> 1216 * 1217 * @return Whether the headerName field is set. 1218 */ hasHeaderName()1219 public boolean hasHeaderName() { 1220 return ((bitField0_ & 0x00000002) != 0); 1221 } 1222 /** 1223 * 1224 * 1225 * <pre> 1226 * The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. 1227 * </pre> 1228 * 1229 * <code>optional string header_name = 110223613;</code> 1230 * 1231 * @return The headerName. 1232 */ getHeaderName()1233 public java.lang.String getHeaderName() { 1234 java.lang.Object ref = headerName_; 1235 if (!(ref instanceof java.lang.String)) { 1236 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1237 java.lang.String s = bs.toStringUtf8(); 1238 headerName_ = s; 1239 return s; 1240 } else { 1241 return (java.lang.String) ref; 1242 } 1243 } 1244 /** 1245 * 1246 * 1247 * <pre> 1248 * The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. 1249 * </pre> 1250 * 1251 * <code>optional string header_name = 110223613;</code> 1252 * 1253 * @return The bytes for headerName. 1254 */ getHeaderNameBytes()1255 public com.google.protobuf.ByteString getHeaderNameBytes() { 1256 java.lang.Object ref = headerName_; 1257 if (ref instanceof String) { 1258 com.google.protobuf.ByteString b = 1259 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1260 headerName_ = b; 1261 return b; 1262 } else { 1263 return (com.google.protobuf.ByteString) ref; 1264 } 1265 } 1266 /** 1267 * 1268 * 1269 * <pre> 1270 * The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. 1271 * </pre> 1272 * 1273 * <code>optional string header_name = 110223613;</code> 1274 * 1275 * @param value The headerName to set. 1276 * @return This builder for chaining. 1277 */ setHeaderName(java.lang.String value)1278 public Builder setHeaderName(java.lang.String value) { 1279 if (value == null) { 1280 throw new NullPointerException(); 1281 } 1282 headerName_ = value; 1283 bitField0_ |= 0x00000002; 1284 onChanged(); 1285 return this; 1286 } 1287 /** 1288 * 1289 * 1290 * <pre> 1291 * The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. 1292 * </pre> 1293 * 1294 * <code>optional string header_name = 110223613;</code> 1295 * 1296 * @return This builder for chaining. 1297 */ clearHeaderName()1298 public Builder clearHeaderName() { 1299 headerName_ = getDefaultInstance().getHeaderName(); 1300 bitField0_ = (bitField0_ & ~0x00000002); 1301 onChanged(); 1302 return this; 1303 } 1304 /** 1305 * 1306 * 1307 * <pre> 1308 * The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`. 1309 * </pre> 1310 * 1311 * <code>optional string header_name = 110223613;</code> 1312 * 1313 * @param value The bytes for headerName to set. 1314 * @return This builder for chaining. 1315 */ setHeaderNameBytes(com.google.protobuf.ByteString value)1316 public Builder setHeaderNameBytes(com.google.protobuf.ByteString value) { 1317 if (value == null) { 1318 throw new NullPointerException(); 1319 } 1320 checkByteStringIsUtf8(value); 1321 headerName_ = value; 1322 bitField0_ |= 0x00000002; 1323 onChanged(); 1324 return this; 1325 } 1326 1327 private boolean invertMatch_; 1328 /** 1329 * 1330 * 1331 * <pre> 1332 * If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false. 1333 * </pre> 1334 * 1335 * <code>optional bool invert_match = 501130268;</code> 1336 * 1337 * @return Whether the invertMatch field is set. 1338 */ 1339 @java.lang.Override hasInvertMatch()1340 public boolean hasInvertMatch() { 1341 return ((bitField0_ & 0x00000004) != 0); 1342 } 1343 /** 1344 * 1345 * 1346 * <pre> 1347 * If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false. 1348 * </pre> 1349 * 1350 * <code>optional bool invert_match = 501130268;</code> 1351 * 1352 * @return The invertMatch. 1353 */ 1354 @java.lang.Override getInvertMatch()1355 public boolean getInvertMatch() { 1356 return invertMatch_; 1357 } 1358 /** 1359 * 1360 * 1361 * <pre> 1362 * If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false. 1363 * </pre> 1364 * 1365 * <code>optional bool invert_match = 501130268;</code> 1366 * 1367 * @param value The invertMatch to set. 1368 * @return This builder for chaining. 1369 */ setInvertMatch(boolean value)1370 public Builder setInvertMatch(boolean value) { 1371 1372 invertMatch_ = value; 1373 bitField0_ |= 0x00000004; 1374 onChanged(); 1375 return this; 1376 } 1377 /** 1378 * 1379 * 1380 * <pre> 1381 * If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false. 1382 * </pre> 1383 * 1384 * <code>optional bool invert_match = 501130268;</code> 1385 * 1386 * @return This builder for chaining. 1387 */ clearInvertMatch()1388 public Builder clearInvertMatch() { 1389 bitField0_ = (bitField0_ & ~0x00000004); 1390 invertMatch_ = false; 1391 onChanged(); 1392 return this; 1393 } 1394 1395 private java.lang.Object prefixMatch_ = ""; 1396 /** 1397 * 1398 * 1399 * <pre> 1400 * The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1401 * </pre> 1402 * 1403 * <code>optional string prefix_match = 257898968;</code> 1404 * 1405 * @return Whether the prefixMatch field is set. 1406 */ hasPrefixMatch()1407 public boolean hasPrefixMatch() { 1408 return ((bitField0_ & 0x00000008) != 0); 1409 } 1410 /** 1411 * 1412 * 1413 * <pre> 1414 * The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1415 * </pre> 1416 * 1417 * <code>optional string prefix_match = 257898968;</code> 1418 * 1419 * @return The prefixMatch. 1420 */ getPrefixMatch()1421 public java.lang.String getPrefixMatch() { 1422 java.lang.Object ref = prefixMatch_; 1423 if (!(ref instanceof java.lang.String)) { 1424 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1425 java.lang.String s = bs.toStringUtf8(); 1426 prefixMatch_ = s; 1427 return s; 1428 } else { 1429 return (java.lang.String) ref; 1430 } 1431 } 1432 /** 1433 * 1434 * 1435 * <pre> 1436 * The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1437 * </pre> 1438 * 1439 * <code>optional string prefix_match = 257898968;</code> 1440 * 1441 * @return The bytes for prefixMatch. 1442 */ getPrefixMatchBytes()1443 public com.google.protobuf.ByteString getPrefixMatchBytes() { 1444 java.lang.Object ref = prefixMatch_; 1445 if (ref instanceof String) { 1446 com.google.protobuf.ByteString b = 1447 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1448 prefixMatch_ = b; 1449 return b; 1450 } else { 1451 return (com.google.protobuf.ByteString) ref; 1452 } 1453 } 1454 /** 1455 * 1456 * 1457 * <pre> 1458 * The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1459 * </pre> 1460 * 1461 * <code>optional string prefix_match = 257898968;</code> 1462 * 1463 * @param value The prefixMatch to set. 1464 * @return This builder for chaining. 1465 */ setPrefixMatch(java.lang.String value)1466 public Builder setPrefixMatch(java.lang.String value) { 1467 if (value == null) { 1468 throw new NullPointerException(); 1469 } 1470 prefixMatch_ = value; 1471 bitField0_ |= 0x00000008; 1472 onChanged(); 1473 return this; 1474 } 1475 /** 1476 * 1477 * 1478 * <pre> 1479 * The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1480 * </pre> 1481 * 1482 * <code>optional string prefix_match = 257898968;</code> 1483 * 1484 * @return This builder for chaining. 1485 */ clearPrefixMatch()1486 public Builder clearPrefixMatch() { 1487 prefixMatch_ = getDefaultInstance().getPrefixMatch(); 1488 bitField0_ = (bitField0_ & ~0x00000008); 1489 onChanged(); 1490 return this; 1491 } 1492 /** 1493 * 1494 * 1495 * <pre> 1496 * The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1497 * </pre> 1498 * 1499 * <code>optional string prefix_match = 257898968;</code> 1500 * 1501 * @param value The bytes for prefixMatch to set. 1502 * @return This builder for chaining. 1503 */ setPrefixMatchBytes(com.google.protobuf.ByteString value)1504 public Builder setPrefixMatchBytes(com.google.protobuf.ByteString value) { 1505 if (value == null) { 1506 throw new NullPointerException(); 1507 } 1508 checkByteStringIsUtf8(value); 1509 prefixMatch_ = value; 1510 bitField0_ |= 0x00000008; 1511 onChanged(); 1512 return this; 1513 } 1514 1515 private boolean presentMatch_; 1516 /** 1517 * 1518 * 1519 * <pre> 1520 * A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1521 * </pre> 1522 * 1523 * <code>optional bool present_match = 67435841;</code> 1524 * 1525 * @return Whether the presentMatch field is set. 1526 */ 1527 @java.lang.Override hasPresentMatch()1528 public boolean hasPresentMatch() { 1529 return ((bitField0_ & 0x00000010) != 0); 1530 } 1531 /** 1532 * 1533 * 1534 * <pre> 1535 * A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1536 * </pre> 1537 * 1538 * <code>optional bool present_match = 67435841;</code> 1539 * 1540 * @return The presentMatch. 1541 */ 1542 @java.lang.Override getPresentMatch()1543 public boolean getPresentMatch() { 1544 return presentMatch_; 1545 } 1546 /** 1547 * 1548 * 1549 * <pre> 1550 * A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1551 * </pre> 1552 * 1553 * <code>optional bool present_match = 67435841;</code> 1554 * 1555 * @param value The presentMatch to set. 1556 * @return This builder for chaining. 1557 */ setPresentMatch(boolean value)1558 public Builder setPresentMatch(boolean value) { 1559 1560 presentMatch_ = value; 1561 bitField0_ |= 0x00000010; 1562 onChanged(); 1563 return this; 1564 } 1565 /** 1566 * 1567 * 1568 * <pre> 1569 * A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1570 * </pre> 1571 * 1572 * <code>optional bool present_match = 67435841;</code> 1573 * 1574 * @return This builder for chaining. 1575 */ clearPresentMatch()1576 public Builder clearPresentMatch() { 1577 bitField0_ = (bitField0_ & ~0x00000010); 1578 presentMatch_ = false; 1579 onChanged(); 1580 return this; 1581 } 1582 1583 private com.google.cloud.compute.v1.Int64RangeMatch rangeMatch_; 1584 private com.google.protobuf.SingleFieldBuilderV3< 1585 com.google.cloud.compute.v1.Int64RangeMatch, 1586 com.google.cloud.compute.v1.Int64RangeMatch.Builder, 1587 com.google.cloud.compute.v1.Int64RangeMatchOrBuilder> 1588 rangeMatchBuilder_; 1589 /** 1590 * 1591 * 1592 * <pre> 1593 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 1594 * </pre> 1595 * 1596 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 1597 * 1598 * @return Whether the rangeMatch field is set. 1599 */ hasRangeMatch()1600 public boolean hasRangeMatch() { 1601 return ((bitField0_ & 0x00000020) != 0); 1602 } 1603 /** 1604 * 1605 * 1606 * <pre> 1607 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 1608 * </pre> 1609 * 1610 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 1611 * 1612 * @return The rangeMatch. 1613 */ getRangeMatch()1614 public com.google.cloud.compute.v1.Int64RangeMatch getRangeMatch() { 1615 if (rangeMatchBuilder_ == null) { 1616 return rangeMatch_ == null 1617 ? com.google.cloud.compute.v1.Int64RangeMatch.getDefaultInstance() 1618 : rangeMatch_; 1619 } else { 1620 return rangeMatchBuilder_.getMessage(); 1621 } 1622 } 1623 /** 1624 * 1625 * 1626 * <pre> 1627 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 1628 * </pre> 1629 * 1630 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 1631 */ setRangeMatch(com.google.cloud.compute.v1.Int64RangeMatch value)1632 public Builder setRangeMatch(com.google.cloud.compute.v1.Int64RangeMatch value) { 1633 if (rangeMatchBuilder_ == null) { 1634 if (value == null) { 1635 throw new NullPointerException(); 1636 } 1637 rangeMatch_ = value; 1638 } else { 1639 rangeMatchBuilder_.setMessage(value); 1640 } 1641 bitField0_ |= 0x00000020; 1642 onChanged(); 1643 return this; 1644 } 1645 /** 1646 * 1647 * 1648 * <pre> 1649 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 1650 * </pre> 1651 * 1652 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 1653 */ setRangeMatch( com.google.cloud.compute.v1.Int64RangeMatch.Builder builderForValue)1654 public Builder setRangeMatch( 1655 com.google.cloud.compute.v1.Int64RangeMatch.Builder builderForValue) { 1656 if (rangeMatchBuilder_ == null) { 1657 rangeMatch_ = builderForValue.build(); 1658 } else { 1659 rangeMatchBuilder_.setMessage(builderForValue.build()); 1660 } 1661 bitField0_ |= 0x00000020; 1662 onChanged(); 1663 return this; 1664 } 1665 /** 1666 * 1667 * 1668 * <pre> 1669 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 1670 * </pre> 1671 * 1672 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 1673 */ mergeRangeMatch(com.google.cloud.compute.v1.Int64RangeMatch value)1674 public Builder mergeRangeMatch(com.google.cloud.compute.v1.Int64RangeMatch value) { 1675 if (rangeMatchBuilder_ == null) { 1676 if (((bitField0_ & 0x00000020) != 0) 1677 && rangeMatch_ != null 1678 && rangeMatch_ != com.google.cloud.compute.v1.Int64RangeMatch.getDefaultInstance()) { 1679 getRangeMatchBuilder().mergeFrom(value); 1680 } else { 1681 rangeMatch_ = value; 1682 } 1683 } else { 1684 rangeMatchBuilder_.mergeFrom(value); 1685 } 1686 bitField0_ |= 0x00000020; 1687 onChanged(); 1688 return this; 1689 } 1690 /** 1691 * 1692 * 1693 * <pre> 1694 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 1695 * </pre> 1696 * 1697 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 1698 */ clearRangeMatch()1699 public Builder clearRangeMatch() { 1700 bitField0_ = (bitField0_ & ~0x00000020); 1701 rangeMatch_ = null; 1702 if (rangeMatchBuilder_ != null) { 1703 rangeMatchBuilder_.dispose(); 1704 rangeMatchBuilder_ = null; 1705 } 1706 onChanged(); 1707 return this; 1708 } 1709 /** 1710 * 1711 * 1712 * <pre> 1713 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 1714 * </pre> 1715 * 1716 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 1717 */ getRangeMatchBuilder()1718 public com.google.cloud.compute.v1.Int64RangeMatch.Builder getRangeMatchBuilder() { 1719 bitField0_ |= 0x00000020; 1720 onChanged(); 1721 return getRangeMatchFieldBuilder().getBuilder(); 1722 } 1723 /** 1724 * 1725 * 1726 * <pre> 1727 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 1728 * </pre> 1729 * 1730 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 1731 */ getRangeMatchOrBuilder()1732 public com.google.cloud.compute.v1.Int64RangeMatchOrBuilder getRangeMatchOrBuilder() { 1733 if (rangeMatchBuilder_ != null) { 1734 return rangeMatchBuilder_.getMessageOrBuilder(); 1735 } else { 1736 return rangeMatch_ == null 1737 ? com.google.cloud.compute.v1.Int64RangeMatch.getDefaultInstance() 1738 : rangeMatch_; 1739 } 1740 } 1741 /** 1742 * 1743 * 1744 * <pre> 1745 * The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL. 1746 * </pre> 1747 * 1748 * <code>optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;</code> 1749 */ 1750 private com.google.protobuf.SingleFieldBuilderV3< 1751 com.google.cloud.compute.v1.Int64RangeMatch, 1752 com.google.cloud.compute.v1.Int64RangeMatch.Builder, 1753 com.google.cloud.compute.v1.Int64RangeMatchOrBuilder> getRangeMatchFieldBuilder()1754 getRangeMatchFieldBuilder() { 1755 if (rangeMatchBuilder_ == null) { 1756 rangeMatchBuilder_ = 1757 new com.google.protobuf.SingleFieldBuilderV3< 1758 com.google.cloud.compute.v1.Int64RangeMatch, 1759 com.google.cloud.compute.v1.Int64RangeMatch.Builder, 1760 com.google.cloud.compute.v1.Int64RangeMatchOrBuilder>( 1761 getRangeMatch(), getParentForChildren(), isClean()); 1762 rangeMatch_ = null; 1763 } 1764 return rangeMatchBuilder_; 1765 } 1766 1767 private java.lang.Object regexMatch_ = ""; 1768 /** 1769 * 1770 * 1771 * <pre> 1772 * The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 1773 * </pre> 1774 * 1775 * <code>optional string regex_match = 107387853;</code> 1776 * 1777 * @return Whether the regexMatch field is set. 1778 */ hasRegexMatch()1779 public boolean hasRegexMatch() { 1780 return ((bitField0_ & 0x00000040) != 0); 1781 } 1782 /** 1783 * 1784 * 1785 * <pre> 1786 * The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 1787 * </pre> 1788 * 1789 * <code>optional string regex_match = 107387853;</code> 1790 * 1791 * @return The regexMatch. 1792 */ getRegexMatch()1793 public java.lang.String getRegexMatch() { 1794 java.lang.Object ref = regexMatch_; 1795 if (!(ref instanceof java.lang.String)) { 1796 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1797 java.lang.String s = bs.toStringUtf8(); 1798 regexMatch_ = s; 1799 return s; 1800 } else { 1801 return (java.lang.String) ref; 1802 } 1803 } 1804 /** 1805 * 1806 * 1807 * <pre> 1808 * The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 1809 * </pre> 1810 * 1811 * <code>optional string regex_match = 107387853;</code> 1812 * 1813 * @return The bytes for regexMatch. 1814 */ getRegexMatchBytes()1815 public com.google.protobuf.ByteString getRegexMatchBytes() { 1816 java.lang.Object ref = regexMatch_; 1817 if (ref instanceof String) { 1818 com.google.protobuf.ByteString b = 1819 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1820 regexMatch_ = b; 1821 return b; 1822 } else { 1823 return (com.google.protobuf.ByteString) ref; 1824 } 1825 } 1826 /** 1827 * 1828 * 1829 * <pre> 1830 * The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 1831 * </pre> 1832 * 1833 * <code>optional string regex_match = 107387853;</code> 1834 * 1835 * @param value The regexMatch to set. 1836 * @return This builder for chaining. 1837 */ setRegexMatch(java.lang.String value)1838 public Builder setRegexMatch(java.lang.String value) { 1839 if (value == null) { 1840 throw new NullPointerException(); 1841 } 1842 regexMatch_ = value; 1843 bitField0_ |= 0x00000040; 1844 onChanged(); 1845 return this; 1846 } 1847 /** 1848 * 1849 * 1850 * <pre> 1851 * The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 1852 * </pre> 1853 * 1854 * <code>optional string regex_match = 107387853;</code> 1855 * 1856 * @return This builder for chaining. 1857 */ clearRegexMatch()1858 public Builder clearRegexMatch() { 1859 regexMatch_ = getDefaultInstance().getRegexMatch(); 1860 bitField0_ = (bitField0_ & ~0x00000040); 1861 onChanged(); 1862 return this; 1863 } 1864 /** 1865 * 1866 * 1867 * <pre> 1868 * The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. 1869 * </pre> 1870 * 1871 * <code>optional string regex_match = 107387853;</code> 1872 * 1873 * @param value The bytes for regexMatch to set. 1874 * @return This builder for chaining. 1875 */ setRegexMatchBytes(com.google.protobuf.ByteString value)1876 public Builder setRegexMatchBytes(com.google.protobuf.ByteString value) { 1877 if (value == null) { 1878 throw new NullPointerException(); 1879 } 1880 checkByteStringIsUtf8(value); 1881 regexMatch_ = value; 1882 bitField0_ |= 0x00000040; 1883 onChanged(); 1884 return this; 1885 } 1886 1887 private java.lang.Object suffixMatch_ = ""; 1888 /** 1889 * 1890 * 1891 * <pre> 1892 * The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1893 * </pre> 1894 * 1895 * <code>optional string suffix_match = 426488663;</code> 1896 * 1897 * @return Whether the suffixMatch field is set. 1898 */ hasSuffixMatch()1899 public boolean hasSuffixMatch() { 1900 return ((bitField0_ & 0x00000080) != 0); 1901 } 1902 /** 1903 * 1904 * 1905 * <pre> 1906 * The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1907 * </pre> 1908 * 1909 * <code>optional string suffix_match = 426488663;</code> 1910 * 1911 * @return The suffixMatch. 1912 */ getSuffixMatch()1913 public java.lang.String getSuffixMatch() { 1914 java.lang.Object ref = suffixMatch_; 1915 if (!(ref instanceof java.lang.String)) { 1916 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1917 java.lang.String s = bs.toStringUtf8(); 1918 suffixMatch_ = s; 1919 return s; 1920 } else { 1921 return (java.lang.String) ref; 1922 } 1923 } 1924 /** 1925 * 1926 * 1927 * <pre> 1928 * The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1929 * </pre> 1930 * 1931 * <code>optional string suffix_match = 426488663;</code> 1932 * 1933 * @return The bytes for suffixMatch. 1934 */ getSuffixMatchBytes()1935 public com.google.protobuf.ByteString getSuffixMatchBytes() { 1936 java.lang.Object ref = suffixMatch_; 1937 if (ref instanceof String) { 1938 com.google.protobuf.ByteString b = 1939 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1940 suffixMatch_ = b; 1941 return b; 1942 } else { 1943 return (com.google.protobuf.ByteString) ref; 1944 } 1945 } 1946 /** 1947 * 1948 * 1949 * <pre> 1950 * The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1951 * </pre> 1952 * 1953 * <code>optional string suffix_match = 426488663;</code> 1954 * 1955 * @param value The suffixMatch to set. 1956 * @return This builder for chaining. 1957 */ setSuffixMatch(java.lang.String value)1958 public Builder setSuffixMatch(java.lang.String value) { 1959 if (value == null) { 1960 throw new NullPointerException(); 1961 } 1962 suffixMatch_ = value; 1963 bitField0_ |= 0x00000080; 1964 onChanged(); 1965 return this; 1966 } 1967 /** 1968 * 1969 * 1970 * <pre> 1971 * The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1972 * </pre> 1973 * 1974 * <code>optional string suffix_match = 426488663;</code> 1975 * 1976 * @return This builder for chaining. 1977 */ clearSuffixMatch()1978 public Builder clearSuffixMatch() { 1979 suffixMatch_ = getDefaultInstance().getSuffixMatch(); 1980 bitField0_ = (bitField0_ & ~0x00000080); 1981 onChanged(); 1982 return this; 1983 } 1984 /** 1985 * 1986 * 1987 * <pre> 1988 * The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. 1989 * </pre> 1990 * 1991 * <code>optional string suffix_match = 426488663;</code> 1992 * 1993 * @param value The bytes for suffixMatch to set. 1994 * @return This builder for chaining. 1995 */ setSuffixMatchBytes(com.google.protobuf.ByteString value)1996 public Builder setSuffixMatchBytes(com.google.protobuf.ByteString value) { 1997 if (value == null) { 1998 throw new NullPointerException(); 1999 } 2000 checkByteStringIsUtf8(value); 2001 suffixMatch_ = value; 2002 bitField0_ |= 0x00000080; 2003 onChanged(); 2004 return this; 2005 } 2006 2007 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2008 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2009 return super.setUnknownFields(unknownFields); 2010 } 2011 2012 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2013 public final Builder mergeUnknownFields( 2014 final com.google.protobuf.UnknownFieldSet unknownFields) { 2015 return super.mergeUnknownFields(unknownFields); 2016 } 2017 2018 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.HttpHeaderMatch) 2019 } 2020 2021 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.HttpHeaderMatch) 2022 private static final com.google.cloud.compute.v1.HttpHeaderMatch DEFAULT_INSTANCE; 2023 2024 static { 2025 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.HttpHeaderMatch(); 2026 } 2027 getDefaultInstance()2028 public static com.google.cloud.compute.v1.HttpHeaderMatch getDefaultInstance() { 2029 return DEFAULT_INSTANCE; 2030 } 2031 2032 private static final com.google.protobuf.Parser<HttpHeaderMatch> PARSER = 2033 new com.google.protobuf.AbstractParser<HttpHeaderMatch>() { 2034 @java.lang.Override 2035 public HttpHeaderMatch parsePartialFrom( 2036 com.google.protobuf.CodedInputStream input, 2037 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2038 throws com.google.protobuf.InvalidProtocolBufferException { 2039 Builder builder = newBuilder(); 2040 try { 2041 builder.mergeFrom(input, extensionRegistry); 2042 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2043 throw e.setUnfinishedMessage(builder.buildPartial()); 2044 } catch (com.google.protobuf.UninitializedMessageException e) { 2045 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2046 } catch (java.io.IOException e) { 2047 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2048 .setUnfinishedMessage(builder.buildPartial()); 2049 } 2050 return builder.buildPartial(); 2051 } 2052 }; 2053 parser()2054 public static com.google.protobuf.Parser<HttpHeaderMatch> parser() { 2055 return PARSER; 2056 } 2057 2058 @java.lang.Override getParserForType()2059 public com.google.protobuf.Parser<HttpHeaderMatch> getParserForType() { 2060 return PARSER; 2061 } 2062 2063 @java.lang.Override getDefaultInstanceForType()2064 public com.google.cloud.compute.v1.HttpHeaderMatch getDefaultInstanceForType() { 2065 return DEFAULT_INSTANCE; 2066 } 2067 } 2068