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