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