All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.compute.v1.HttpRouteRule Maven / Gradle / Ivy

There is a newer version: 1.66.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/compute/v1/compute.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.compute.v1;

/**
 *
 *
 * 
 * The HttpRouteRule setting specifies how to match an HTTP request and the corresponding routing action that load balancing proxies perform.
 * 
* * Protobuf type {@code google.cloud.compute.v1.HttpRouteRule} */ public final class HttpRouteRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.HttpRouteRule) HttpRouteRuleOrBuilder { private static final long serialVersionUID = 0L; // Use HttpRouteRule.newBuilder() to construct. private HttpRouteRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private HttpRouteRule() { description_ = ""; matchRules_ = java.util.Collections.emptyList(); service_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new HttpRouteRule(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRouteRule_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRouteRule_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.compute.v1.HttpRouteRule.class, com.google.cloud.compute.v1.HttpRouteRule.Builder.class); } private int bitField0_; public static final int CUSTOM_ERROR_RESPONSE_POLICY_FIELD_NUMBER = 202816619; private com.google.cloud.compute.v1.CustomErrorResponsePolicy customErrorResponsePolicy_; /** * * *
   * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
   * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * * * @return Whether the customErrorResponsePolicy field is set. */ @java.lang.Override public boolean hasCustomErrorResponsePolicy() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
   * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * * * @return The customErrorResponsePolicy. */ @java.lang.Override public com.google.cloud.compute.v1.CustomErrorResponsePolicy getCustomErrorResponsePolicy() { return customErrorResponsePolicy_ == null ? com.google.cloud.compute.v1.CustomErrorResponsePolicy.getDefaultInstance() : customErrorResponsePolicy_; } /** * * *
   * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
   * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * */ @java.lang.Override public com.google.cloud.compute.v1.CustomErrorResponsePolicyOrBuilder getCustomErrorResponsePolicyOrBuilder() { return customErrorResponsePolicy_ == null ? com.google.cloud.compute.v1.CustomErrorResponsePolicy.getDefaultInstance() : customErrorResponsePolicy_; } public static final int DESCRIPTION_FIELD_NUMBER = 422937596; @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; /** * * *
   * The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.
   * 
* * optional string description = 422937596; * * @return Whether the description field is set. */ @java.lang.Override public boolean hasDescription() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.
   * 
* * optional string description = 422937596; * * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** * * *
   * The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.
   * 
* * optional string description = 422937596; * * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int HEADER_ACTION_FIELD_NUMBER = 328077352; private com.google.cloud.compute.v1.HttpHeaderAction headerAction_; /** * * *
   * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
   * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; * * @return Whether the headerAction field is set. */ @java.lang.Override public boolean hasHeaderAction() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
   * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; * * @return The headerAction. */ @java.lang.Override public com.google.cloud.compute.v1.HttpHeaderAction getHeaderAction() { return headerAction_ == null ? com.google.cloud.compute.v1.HttpHeaderAction.getDefaultInstance() : headerAction_; } /** * * *
   * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
   * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; */ @java.lang.Override public com.google.cloud.compute.v1.HttpHeaderActionOrBuilder getHeaderActionOrBuilder() { return headerAction_ == null ? com.google.cloud.compute.v1.HttpHeaderAction.getDefaultInstance() : headerAction_; } public static final int MATCH_RULES_FIELD_NUMBER = 376200701; @SuppressWarnings("serial") private java.util.List matchRules_; /** * * *
   * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
   * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ @java.lang.Override public java.util.List getMatchRulesList() { return matchRules_; } /** * * *
   * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
   * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ @java.lang.Override public java.util.List getMatchRulesOrBuilderList() { return matchRules_; } /** * * *
   * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
   * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ @java.lang.Override public int getMatchRulesCount() { return matchRules_.size(); } /** * * *
   * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
   * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ @java.lang.Override public com.google.cloud.compute.v1.HttpRouteRuleMatch getMatchRules(int index) { return matchRules_.get(index); } /** * * *
   * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
   * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ @java.lang.Override public com.google.cloud.compute.v1.HttpRouteRuleMatchOrBuilder getMatchRulesOrBuilder(int index) { return matchRules_.get(index); } public static final int PRIORITY_FIELD_NUMBER = 445151652; private int priority_ = 0; /** * * *
   * For routeRules within a given pathMatcher, priority determines the order in which a load balancer interprets routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number from 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
   * 
* * optional int32 priority = 445151652; * * @return Whether the priority field is set. */ @java.lang.Override public boolean hasPriority() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * For routeRules within a given pathMatcher, priority determines the order in which a load balancer interprets routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number from 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
   * 
* * optional int32 priority = 445151652; * * @return The priority. */ @java.lang.Override public int getPriority() { return priority_; } public static final int ROUTE_ACTION_FIELD_NUMBER = 424563948; private com.google.cloud.compute.v1.HttpRouteAction routeAction_; /** * * *
   * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
   * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; * * @return Whether the routeAction field is set. */ @java.lang.Override public boolean hasRouteAction() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
   * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
   * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; * * @return The routeAction. */ @java.lang.Override public com.google.cloud.compute.v1.HttpRouteAction getRouteAction() { return routeAction_ == null ? com.google.cloud.compute.v1.HttpRouteAction.getDefaultInstance() : routeAction_; } /** * * *
   * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
   * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; */ @java.lang.Override public com.google.cloud.compute.v1.HttpRouteActionOrBuilder getRouteActionOrBuilder() { return routeAction_ == null ? com.google.cloud.compute.v1.HttpRouteAction.getDefaultInstance() : routeAction_; } public static final int SERVICE_FIELD_NUMBER = 373540533; @SuppressWarnings("serial") private volatile java.lang.Object service_ = ""; /** * * *
   * The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.
   * 
* * optional string service = 373540533; * * @return Whether the service field is set. */ @java.lang.Override public boolean hasService() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
   * The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.
   * 
* * optional string service = 373540533; * * @return The service. */ @java.lang.Override public java.lang.String getService() { java.lang.Object ref = service_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); service_ = s; return s; } } /** * * *
   * The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.
   * 
* * optional string service = 373540533; * * @return The bytes for service. */ @java.lang.Override public com.google.protobuf.ByteString getServiceBytes() { java.lang.Object ref = service_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); service_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int URL_REDIRECT_FIELD_NUMBER = 405147820; private com.google.cloud.compute.v1.HttpRedirectAction urlRedirect_; /** * * *
   * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
   * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; * * @return Whether the urlRedirect field is set. */ @java.lang.Override public boolean hasUrlRedirect() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
   * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
   * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; * * @return The urlRedirect. */ @java.lang.Override public com.google.cloud.compute.v1.HttpRedirectAction getUrlRedirect() { return urlRedirect_ == null ? com.google.cloud.compute.v1.HttpRedirectAction.getDefaultInstance() : urlRedirect_; } /** * * *
   * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
   * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; */ @java.lang.Override public com.google.cloud.compute.v1.HttpRedirectActionOrBuilder getUrlRedirectOrBuilder() { return urlRedirect_ == null ? com.google.cloud.compute.v1.HttpRedirectAction.getDefaultInstance() : urlRedirect_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(202816619, getCustomErrorResponsePolicy()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(328077352, getHeaderAction()); } if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 373540533, service_); } for (int i = 0; i < matchRules_.size(); i++) { output.writeMessage(376200701, matchRules_.get(i)); } if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(405147820, getUrlRedirect()); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(424563948, getRouteAction()); } if (((bitField0_ & 0x00000008) != 0)) { output.writeInt32(445151652, priority_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 202816619, getCustomErrorResponsePolicy()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(328077352, getHeaderAction()); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(373540533, service_); } for (int i = 0; i < matchRules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(376200701, matchRules_.get(i)); } if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(405147820, getUrlRedirect()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(424563948, getRouteAction()); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(445151652, priority_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.compute.v1.HttpRouteRule)) { return super.equals(obj); } com.google.cloud.compute.v1.HttpRouteRule other = (com.google.cloud.compute.v1.HttpRouteRule) obj; if (hasCustomErrorResponsePolicy() != other.hasCustomErrorResponsePolicy()) return false; if (hasCustomErrorResponsePolicy()) { if (!getCustomErrorResponsePolicy().equals(other.getCustomErrorResponsePolicy())) return false; } if (hasDescription() != other.hasDescription()) return false; if (hasDescription()) { if (!getDescription().equals(other.getDescription())) return false; } if (hasHeaderAction() != other.hasHeaderAction()) return false; if (hasHeaderAction()) { if (!getHeaderAction().equals(other.getHeaderAction())) return false; } if (!getMatchRulesList().equals(other.getMatchRulesList())) return false; if (hasPriority() != other.hasPriority()) return false; if (hasPriority()) { if (getPriority() != other.getPriority()) return false; } if (hasRouteAction() != other.hasRouteAction()) return false; if (hasRouteAction()) { if (!getRouteAction().equals(other.getRouteAction())) return false; } if (hasService() != other.hasService()) return false; if (hasService()) { if (!getService().equals(other.getService())) return false; } if (hasUrlRedirect() != other.hasUrlRedirect()) return false; if (hasUrlRedirect()) { if (!getUrlRedirect().equals(other.getUrlRedirect())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasCustomErrorResponsePolicy()) { hash = (37 * hash) + CUSTOM_ERROR_RESPONSE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getCustomErrorResponsePolicy().hashCode(); } if (hasDescription()) { hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); } if (hasHeaderAction()) { hash = (37 * hash) + HEADER_ACTION_FIELD_NUMBER; hash = (53 * hash) + getHeaderAction().hashCode(); } if (getMatchRulesCount() > 0) { hash = (37 * hash) + MATCH_RULES_FIELD_NUMBER; hash = (53 * hash) + getMatchRulesList().hashCode(); } if (hasPriority()) { hash = (37 * hash) + PRIORITY_FIELD_NUMBER; hash = (53 * hash) + getPriority(); } if (hasRouteAction()) { hash = (37 * hash) + ROUTE_ACTION_FIELD_NUMBER; hash = (53 * hash) + getRouteAction().hashCode(); } if (hasService()) { hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); } if (hasUrlRedirect()) { hash = (37 * hash) + URL_REDIRECT_FIELD_NUMBER; hash = (53 * hash) + getUrlRedirect().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.compute.v1.HttpRouteRule parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.compute.v1.HttpRouteRule parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.compute.v1.HttpRouteRule parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.compute.v1.HttpRouteRule prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * The HttpRouteRule setting specifies how to match an HTTP request and the corresponding routing action that load balancing proxies perform.
   * 
* * Protobuf type {@code google.cloud.compute.v1.HttpRouteRule} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.HttpRouteRule) com.google.cloud.compute.v1.HttpRouteRuleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRouteRule_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRouteRule_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.compute.v1.HttpRouteRule.class, com.google.cloud.compute.v1.HttpRouteRule.Builder.class); } // Construct using com.google.cloud.compute.v1.HttpRouteRule.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getCustomErrorResponsePolicyFieldBuilder(); getHeaderActionFieldBuilder(); getMatchRulesFieldBuilder(); getRouteActionFieldBuilder(); getUrlRedirectFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; customErrorResponsePolicy_ = null; if (customErrorResponsePolicyBuilder_ != null) { customErrorResponsePolicyBuilder_.dispose(); customErrorResponsePolicyBuilder_ = null; } description_ = ""; headerAction_ = null; if (headerActionBuilder_ != null) { headerActionBuilder_.dispose(); headerActionBuilder_ = null; } if (matchRulesBuilder_ == null) { matchRules_ = java.util.Collections.emptyList(); } else { matchRules_ = null; matchRulesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); priority_ = 0; routeAction_ = null; if (routeActionBuilder_ != null) { routeActionBuilder_.dispose(); routeActionBuilder_ = null; } service_ = ""; urlRedirect_ = null; if (urlRedirectBuilder_ != null) { urlRedirectBuilder_.dispose(); urlRedirectBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRouteRule_descriptor; } @java.lang.Override public com.google.cloud.compute.v1.HttpRouteRule getDefaultInstanceForType() { return com.google.cloud.compute.v1.HttpRouteRule.getDefaultInstance(); } @java.lang.Override public com.google.cloud.compute.v1.HttpRouteRule build() { com.google.cloud.compute.v1.HttpRouteRule result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.compute.v1.HttpRouteRule buildPartial() { com.google.cloud.compute.v1.HttpRouteRule result = new com.google.cloud.compute.v1.HttpRouteRule(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.cloud.compute.v1.HttpRouteRule result) { if (matchRulesBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { matchRules_ = java.util.Collections.unmodifiableList(matchRules_); bitField0_ = (bitField0_ & ~0x00000008); } result.matchRules_ = matchRules_; } else { result.matchRules_ = matchRulesBuilder_.build(); } } private void buildPartial0(com.google.cloud.compute.v1.HttpRouteRule result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.customErrorResponsePolicy_ = customErrorResponsePolicyBuilder_ == null ? customErrorResponsePolicy_ : customErrorResponsePolicyBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.description_ = description_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.headerAction_ = headerActionBuilder_ == null ? headerAction_ : headerActionBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000010) != 0)) { result.priority_ = priority_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000020) != 0)) { result.routeAction_ = routeActionBuilder_ == null ? routeAction_ : routeActionBuilder_.build(); to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000040) != 0)) { result.service_ = service_; to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000080) != 0)) { result.urlRedirect_ = urlRedirectBuilder_ == null ? urlRedirect_ : urlRedirectBuilder_.build(); to_bitField0_ |= 0x00000040; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.compute.v1.HttpRouteRule) { return mergeFrom((com.google.cloud.compute.v1.HttpRouteRule) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.compute.v1.HttpRouteRule other) { if (other == com.google.cloud.compute.v1.HttpRouteRule.getDefaultInstance()) return this; if (other.hasCustomErrorResponsePolicy()) { mergeCustomErrorResponsePolicy(other.getCustomErrorResponsePolicy()); } if (other.hasDescription()) { description_ = other.description_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasHeaderAction()) { mergeHeaderAction(other.getHeaderAction()); } if (matchRulesBuilder_ == null) { if (!other.matchRules_.isEmpty()) { if (matchRules_.isEmpty()) { matchRules_ = other.matchRules_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureMatchRulesIsMutable(); matchRules_.addAll(other.matchRules_); } onChanged(); } } else { if (!other.matchRules_.isEmpty()) { if (matchRulesBuilder_.isEmpty()) { matchRulesBuilder_.dispose(); matchRulesBuilder_ = null; matchRules_ = other.matchRules_; bitField0_ = (bitField0_ & ~0x00000008); matchRulesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getMatchRulesFieldBuilder() : null; } else { matchRulesBuilder_.addAllMessages(other.matchRules_); } } } if (other.hasPriority()) { setPriority(other.getPriority()); } if (other.hasRouteAction()) { mergeRouteAction(other.getRouteAction()); } if (other.hasService()) { service_ = other.service_; bitField0_ |= 0x00000040; onChanged(); } if (other.hasUrlRedirect()) { mergeUrlRedirect(other.getUrlRedirect()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 1622532954: { input.readMessage( getCustomErrorResponsePolicyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 1622532954 case -1670348478: { input.readMessage(getHeaderActionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case -1670348478 case -1306643030: { service_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000040; break; } // case -1306643030 case -1285361686: { com.google.cloud.compute.v1.HttpRouteRuleMatch m = input.readMessage( com.google.cloud.compute.v1.HttpRouteRuleMatch.parser(), extensionRegistry); if (matchRulesBuilder_ == null) { ensureMatchRulesIsMutable(); matchRules_.add(m); } else { matchRulesBuilder_.addMessage(m); } break; } // case -1285361686 case -1053784734: { input.readMessage(getUrlRedirectFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case -1053784734 case -911466526: { description_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case -911466526 case -898455710: { input.readMessage(getRouteActionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case -898455710 case -733754080: { priority_ = input.readInt32(); bitField0_ |= 0x00000010; break; } // case -733754080 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.cloud.compute.v1.CustomErrorResponsePolicy customErrorResponsePolicy_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.CustomErrorResponsePolicy, com.google.cloud.compute.v1.CustomErrorResponsePolicy.Builder, com.google.cloud.compute.v1.CustomErrorResponsePolicyOrBuilder> customErrorResponsePolicyBuilder_; /** * * *
     * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
     * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * * * @return Whether the customErrorResponsePolicy field is set. */ public boolean hasCustomErrorResponsePolicy() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
     * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * * * @return The customErrorResponsePolicy. */ public com.google.cloud.compute.v1.CustomErrorResponsePolicy getCustomErrorResponsePolicy() { if (customErrorResponsePolicyBuilder_ == null) { return customErrorResponsePolicy_ == null ? com.google.cloud.compute.v1.CustomErrorResponsePolicy.getDefaultInstance() : customErrorResponsePolicy_; } else { return customErrorResponsePolicyBuilder_.getMessage(); } } /** * * *
     * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
     * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * */ public Builder setCustomErrorResponsePolicy( com.google.cloud.compute.v1.CustomErrorResponsePolicy value) { if (customErrorResponsePolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } customErrorResponsePolicy_ = value; } else { customErrorResponsePolicyBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
     * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * */ public Builder setCustomErrorResponsePolicy( com.google.cloud.compute.v1.CustomErrorResponsePolicy.Builder builderForValue) { if (customErrorResponsePolicyBuilder_ == null) { customErrorResponsePolicy_ = builderForValue.build(); } else { customErrorResponsePolicyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
     * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * */ public Builder mergeCustomErrorResponsePolicy( com.google.cloud.compute.v1.CustomErrorResponsePolicy value) { if (customErrorResponsePolicyBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && customErrorResponsePolicy_ != null && customErrorResponsePolicy_ != com.google.cloud.compute.v1.CustomErrorResponsePolicy.getDefaultInstance()) { getCustomErrorResponsePolicyBuilder().mergeFrom(value); } else { customErrorResponsePolicy_ = value; } } else { customErrorResponsePolicyBuilder_.mergeFrom(value); } if (customErrorResponsePolicy_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * * *
     * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
     * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * */ public Builder clearCustomErrorResponsePolicy() { bitField0_ = (bitField0_ & ~0x00000001); customErrorResponsePolicy_ = null; if (customErrorResponsePolicyBuilder_ != null) { customErrorResponsePolicyBuilder_.dispose(); customErrorResponsePolicyBuilder_ = null; } onChanged(); return this; } /** * * *
     * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
     * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * */ public com.google.cloud.compute.v1.CustomErrorResponsePolicy.Builder getCustomErrorResponsePolicyBuilder() { bitField0_ |= 0x00000001; onChanged(); return getCustomErrorResponsePolicyFieldBuilder().getBuilder(); } /** * * *
     * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
     * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * */ public com.google.cloud.compute.v1.CustomErrorResponsePolicyOrBuilder getCustomErrorResponsePolicyOrBuilder() { if (customErrorResponsePolicyBuilder_ != null) { return customErrorResponsePolicyBuilder_.getMessageOrBuilder(); } else { return customErrorResponsePolicy_ == null ? com.google.cloud.compute.v1.CustomErrorResponsePolicy.getDefaultInstance() : customErrorResponsePolicy_; } } /** * * *
     * customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for global external Application Load Balancers.
     * 
* * * optional .google.cloud.compute.v1.CustomErrorResponsePolicy custom_error_response_policy = 202816619; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.CustomErrorResponsePolicy, com.google.cloud.compute.v1.CustomErrorResponsePolicy.Builder, com.google.cloud.compute.v1.CustomErrorResponsePolicyOrBuilder> getCustomErrorResponsePolicyFieldBuilder() { if (customErrorResponsePolicyBuilder_ == null) { customErrorResponsePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.CustomErrorResponsePolicy, com.google.cloud.compute.v1.CustomErrorResponsePolicy.Builder, com.google.cloud.compute.v1.CustomErrorResponsePolicyOrBuilder>( getCustomErrorResponsePolicy(), getParentForChildren(), isClean()); customErrorResponsePolicy_ = null; } return customErrorResponsePolicyBuilder_; } private java.lang.Object description_ = ""; /** * * *
     * The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.
     * 
* * optional string description = 422937596; * * @return Whether the description field is set. */ public boolean hasDescription() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.
     * 
* * optional string description = 422937596; * * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.
     * 
* * optional string description = 422937596; * * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.
     * 
* * optional string description = 422937596; * * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription(java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.
     * 
* * optional string description = 422937596; * * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.
     * 
* * optional string description = 422937596; * * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.cloud.compute.v1.HttpHeaderAction headerAction_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.HttpHeaderAction, com.google.cloud.compute.v1.HttpHeaderAction.Builder, com.google.cloud.compute.v1.HttpHeaderActionOrBuilder> headerActionBuilder_; /** * * *
     * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
     * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; * * @return Whether the headerAction field is set. */ public boolean hasHeaderAction() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
     * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; * * @return The headerAction. */ public com.google.cloud.compute.v1.HttpHeaderAction getHeaderAction() { if (headerActionBuilder_ == null) { return headerAction_ == null ? com.google.cloud.compute.v1.HttpHeaderAction.getDefaultInstance() : headerAction_; } else { return headerActionBuilder_.getMessage(); } } /** * * *
     * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
     * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; */ public Builder setHeaderAction(com.google.cloud.compute.v1.HttpHeaderAction value) { if (headerActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } headerAction_ = value; } else { headerActionBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
     * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; */ public Builder setHeaderAction( com.google.cloud.compute.v1.HttpHeaderAction.Builder builderForValue) { if (headerActionBuilder_ == null) { headerAction_ = builderForValue.build(); } else { headerActionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
     * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; */ public Builder mergeHeaderAction(com.google.cloud.compute.v1.HttpHeaderAction value) { if (headerActionBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && headerAction_ != null && headerAction_ != com.google.cloud.compute.v1.HttpHeaderAction.getDefaultInstance()) { getHeaderActionBuilder().mergeFrom(value); } else { headerAction_ = value; } } else { headerActionBuilder_.mergeFrom(value); } if (headerAction_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
     * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
     * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; */ public Builder clearHeaderAction() { bitField0_ = (bitField0_ & ~0x00000004); headerAction_ = null; if (headerActionBuilder_ != null) { headerActionBuilder_.dispose(); headerActionBuilder_ = null; } onChanged(); return this; } /** * * *
     * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
     * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; */ public com.google.cloud.compute.v1.HttpHeaderAction.Builder getHeaderActionBuilder() { bitField0_ |= 0x00000004; onChanged(); return getHeaderActionFieldBuilder().getBuilder(); } /** * * *
     * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
     * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; */ public com.google.cloud.compute.v1.HttpHeaderActionOrBuilder getHeaderActionOrBuilder() { if (headerActionBuilder_ != null) { return headerActionBuilder_.getMessageOrBuilder(); } else { return headerAction_ == null ? com.google.cloud.compute.v1.HttpHeaderAction.getDefaultInstance() : headerAction_; } } /** * * *
     * Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction value specified here is applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].routeAction.weightedBackendService.backendServiceWeightAction[].headerAction 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.
     * 
* * optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.HttpHeaderAction, com.google.cloud.compute.v1.HttpHeaderAction.Builder, com.google.cloud.compute.v1.HttpHeaderActionOrBuilder> getHeaderActionFieldBuilder() { if (headerActionBuilder_ == null) { headerActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.HttpHeaderAction, com.google.cloud.compute.v1.HttpHeaderAction.Builder, com.google.cloud.compute.v1.HttpHeaderActionOrBuilder>( getHeaderAction(), getParentForChildren(), isClean()); headerAction_ = null; } return headerActionBuilder_; } private java.util.List matchRules_ = java.util.Collections.emptyList(); private void ensureMatchRulesIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { matchRules_ = new java.util.ArrayList(matchRules_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.compute.v1.HttpRouteRuleMatch, com.google.cloud.compute.v1.HttpRouteRuleMatch.Builder, com.google.cloud.compute.v1.HttpRouteRuleMatchOrBuilder> matchRulesBuilder_; /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public java.util.List getMatchRulesList() { if (matchRulesBuilder_ == null) { return java.util.Collections.unmodifiableList(matchRules_); } else { return matchRulesBuilder_.getMessageList(); } } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public int getMatchRulesCount() { if (matchRulesBuilder_ == null) { return matchRules_.size(); } else { return matchRulesBuilder_.getCount(); } } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public com.google.cloud.compute.v1.HttpRouteRuleMatch getMatchRules(int index) { if (matchRulesBuilder_ == null) { return matchRules_.get(index); } else { return matchRulesBuilder_.getMessage(index); } } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public Builder setMatchRules(int index, com.google.cloud.compute.v1.HttpRouteRuleMatch value) { if (matchRulesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMatchRulesIsMutable(); matchRules_.set(index, value); onChanged(); } else { matchRulesBuilder_.setMessage(index, value); } return this; } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public Builder setMatchRules( int index, com.google.cloud.compute.v1.HttpRouteRuleMatch.Builder builderForValue) { if (matchRulesBuilder_ == null) { ensureMatchRulesIsMutable(); matchRules_.set(index, builderForValue.build()); onChanged(); } else { matchRulesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public Builder addMatchRules(com.google.cloud.compute.v1.HttpRouteRuleMatch value) { if (matchRulesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMatchRulesIsMutable(); matchRules_.add(value); onChanged(); } else { matchRulesBuilder_.addMessage(value); } return this; } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public Builder addMatchRules(int index, com.google.cloud.compute.v1.HttpRouteRuleMatch value) { if (matchRulesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMatchRulesIsMutable(); matchRules_.add(index, value); onChanged(); } else { matchRulesBuilder_.addMessage(index, value); } return this; } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public Builder addMatchRules( com.google.cloud.compute.v1.HttpRouteRuleMatch.Builder builderForValue) { if (matchRulesBuilder_ == null) { ensureMatchRulesIsMutable(); matchRules_.add(builderForValue.build()); onChanged(); } else { matchRulesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public Builder addMatchRules( int index, com.google.cloud.compute.v1.HttpRouteRuleMatch.Builder builderForValue) { if (matchRulesBuilder_ == null) { ensureMatchRulesIsMutable(); matchRules_.add(index, builderForValue.build()); onChanged(); } else { matchRulesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public Builder addAllMatchRules( java.lang.Iterable values) { if (matchRulesBuilder_ == null) { ensureMatchRulesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, matchRules_); onChanged(); } else { matchRulesBuilder_.addAllMessages(values); } return this; } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public Builder clearMatchRules() { if (matchRulesBuilder_ == null) { matchRules_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { matchRulesBuilder_.clear(); } return this; } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public Builder removeMatchRules(int index) { if (matchRulesBuilder_ == null) { ensureMatchRulesIsMutable(); matchRules_.remove(index); onChanged(); } else { matchRulesBuilder_.remove(index); } return this; } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public com.google.cloud.compute.v1.HttpRouteRuleMatch.Builder getMatchRulesBuilder(int index) { return getMatchRulesFieldBuilder().getBuilder(index); } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public com.google.cloud.compute.v1.HttpRouteRuleMatchOrBuilder getMatchRulesOrBuilder( int index) { if (matchRulesBuilder_ == null) { return matchRules_.get(index); } else { return matchRulesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public java.util.List getMatchRulesOrBuilderList() { if (matchRulesBuilder_ != null) { return matchRulesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(matchRules_); } } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public com.google.cloud.compute.v1.HttpRouteRuleMatch.Builder addMatchRulesBuilder() { return getMatchRulesFieldBuilder() .addBuilder(com.google.cloud.compute.v1.HttpRouteRuleMatch.getDefaultInstance()); } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public com.google.cloud.compute.v1.HttpRouteRuleMatch.Builder addMatchRulesBuilder(int index) { return getMatchRulesFieldBuilder() .addBuilder(index, com.google.cloud.compute.v1.HttpRouteRuleMatch.getDefaultInstance()); } /** * * *
     * The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule.
     * 
* * repeated .google.cloud.compute.v1.HttpRouteRuleMatch match_rules = 376200701; */ public java.util.List getMatchRulesBuilderList() { return getMatchRulesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.compute.v1.HttpRouteRuleMatch, com.google.cloud.compute.v1.HttpRouteRuleMatch.Builder, com.google.cloud.compute.v1.HttpRouteRuleMatchOrBuilder> getMatchRulesFieldBuilder() { if (matchRulesBuilder_ == null) { matchRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.compute.v1.HttpRouteRuleMatch, com.google.cloud.compute.v1.HttpRouteRuleMatch.Builder, com.google.cloud.compute.v1.HttpRouteRuleMatchOrBuilder>( matchRules_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); matchRules_ = null; } return matchRulesBuilder_; } private int priority_; /** * * *
     * For routeRules within a given pathMatcher, priority determines the order in which a load balancer interprets routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number from 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
     * 
* * optional int32 priority = 445151652; * * @return Whether the priority field is set. */ @java.lang.Override public boolean hasPriority() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * For routeRules within a given pathMatcher, priority determines the order in which a load balancer interprets routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number from 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
     * 
* * optional int32 priority = 445151652; * * @return The priority. */ @java.lang.Override public int getPriority() { return priority_; } /** * * *
     * For routeRules within a given pathMatcher, priority determines the order in which a load balancer interprets routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number from 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
     * 
* * optional int32 priority = 445151652; * * @param value The priority to set. * @return This builder for chaining. */ public Builder setPriority(int value) { priority_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * For routeRules within a given pathMatcher, priority determines the order in which a load balancer interprets routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number from 0 to 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules.
     * 
* * optional int32 priority = 445151652; * * @return This builder for chaining. */ public Builder clearPriority() { bitField0_ = (bitField0_ & ~0x00000010); priority_ = 0; onChanged(); return this; } private com.google.cloud.compute.v1.HttpRouteAction routeAction_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.HttpRouteAction, com.google.cloud.compute.v1.HttpRouteAction.Builder, com.google.cloud.compute.v1.HttpRouteActionOrBuilder> routeActionBuilder_; /** * * *
     * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
     * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; * * @return Whether the routeAction field is set. */ public boolean hasRouteAction() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
     * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; * * @return The routeAction. */ public com.google.cloud.compute.v1.HttpRouteAction getRouteAction() { if (routeActionBuilder_ == null) { return routeAction_ == null ? com.google.cloud.compute.v1.HttpRouteAction.getDefaultInstance() : routeAction_; } else { return routeActionBuilder_.getMessage(); } } /** * * *
     * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
     * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; */ public Builder setRouteAction(com.google.cloud.compute.v1.HttpRouteAction value) { if (routeActionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } routeAction_ = value; } else { routeActionBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
     * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; */ public Builder setRouteAction( com.google.cloud.compute.v1.HttpRouteAction.Builder builderForValue) { if (routeActionBuilder_ == null) { routeAction_ = builderForValue.build(); } else { routeActionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
     * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; */ public Builder mergeRouteAction(com.google.cloud.compute.v1.HttpRouteAction value) { if (routeActionBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && routeAction_ != null && routeAction_ != com.google.cloud.compute.v1.HttpRouteAction.getDefaultInstance()) { getRouteActionBuilder().mergeFrom(value); } else { routeAction_ = value; } } else { routeActionBuilder_.mergeFrom(value); } if (routeAction_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** * * *
     * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
     * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; */ public Builder clearRouteAction() { bitField0_ = (bitField0_ & ~0x00000020); routeAction_ = null; if (routeActionBuilder_ != null) { routeActionBuilder_.dispose(); routeActionBuilder_ = null; } onChanged(); return this; } /** * * *
     * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
     * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; */ public com.google.cloud.compute.v1.HttpRouteAction.Builder getRouteActionBuilder() { bitField0_ |= 0x00000020; onChanged(); return getRouteActionFieldBuilder().getBuilder(); } /** * * *
     * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
     * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; */ public com.google.cloud.compute.v1.HttpRouteActionOrBuilder getRouteActionOrBuilder() { if (routeActionBuilder_ != null) { return routeActionBuilder_.getMessageOrBuilder(); } else { return routeAction_ == null ? com.google.cloud.compute.v1.HttpRouteAction.getDefaultInstance() : routeAction_; } } /** * * *
     * In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction.
     * 
* * optional .google.cloud.compute.v1.HttpRouteAction route_action = 424563948; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.HttpRouteAction, com.google.cloud.compute.v1.HttpRouteAction.Builder, com.google.cloud.compute.v1.HttpRouteActionOrBuilder> getRouteActionFieldBuilder() { if (routeActionBuilder_ == null) { routeActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.HttpRouteAction, com.google.cloud.compute.v1.HttpRouteAction.Builder, com.google.cloud.compute.v1.HttpRouteActionOrBuilder>( getRouteAction(), getParentForChildren(), isClean()); routeAction_ = null; } return routeActionBuilder_; } private java.lang.Object service_ = ""; /** * * *
     * The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.
     * 
* * optional string service = 373540533; * * @return Whether the service field is set. */ public boolean hasService() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
     * The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.
     * 
* * optional string service = 373540533; * * @return The service. */ public java.lang.String getService() { java.lang.Object ref = service_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); service_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.
     * 
* * optional string service = 373540533; * * @return The bytes for service. */ public com.google.protobuf.ByteString getServiceBytes() { java.lang.Object ref = service_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); service_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.
     * 
* * optional string service = 373540533; * * @param value The service to set. * @return This builder for chaining. */ public Builder setService(java.lang.String value) { if (value == null) { throw new NullPointerException(); } service_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.
     * 
* * optional string service = 373540533; * * @return This builder for chaining. */ public Builder clearService() { service_ = getDefaultInstance().getService(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** * * *
     * The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.
     * 
* * optional string service = 373540533; * * @param value The bytes for service to set. * @return This builder for chaining. */ public Builder setServiceBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); service_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } private com.google.cloud.compute.v1.HttpRedirectAction urlRedirect_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.HttpRedirectAction, com.google.cloud.compute.v1.HttpRedirectAction.Builder, com.google.cloud.compute.v1.HttpRedirectActionOrBuilder> urlRedirectBuilder_; /** * * *
     * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
     * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; * * @return Whether the urlRedirect field is set. */ public boolean hasUrlRedirect() { return ((bitField0_ & 0x00000080) != 0); } /** * * *
     * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
     * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; * * @return The urlRedirect. */ public com.google.cloud.compute.v1.HttpRedirectAction getUrlRedirect() { if (urlRedirectBuilder_ == null) { return urlRedirect_ == null ? com.google.cloud.compute.v1.HttpRedirectAction.getDefaultInstance() : urlRedirect_; } else { return urlRedirectBuilder_.getMessage(); } } /** * * *
     * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
     * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; */ public Builder setUrlRedirect(com.google.cloud.compute.v1.HttpRedirectAction value) { if (urlRedirectBuilder_ == null) { if (value == null) { throw new NullPointerException(); } urlRedirect_ = value; } else { urlRedirectBuilder_.setMessage(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
     * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; */ public Builder setUrlRedirect( com.google.cloud.compute.v1.HttpRedirectAction.Builder builderForValue) { if (urlRedirectBuilder_ == null) { urlRedirect_ = builderForValue.build(); } else { urlRedirectBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
     * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; */ public Builder mergeUrlRedirect(com.google.cloud.compute.v1.HttpRedirectAction value) { if (urlRedirectBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0) && urlRedirect_ != null && urlRedirect_ != com.google.cloud.compute.v1.HttpRedirectAction.getDefaultInstance()) { getUrlRedirectBuilder().mergeFrom(value); } else { urlRedirect_ = value; } } else { urlRedirectBuilder_.mergeFrom(value); } if (urlRedirect_ != null) { bitField0_ |= 0x00000080; onChanged(); } return this; } /** * * *
     * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
     * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; */ public Builder clearUrlRedirect() { bitField0_ = (bitField0_ & ~0x00000080); urlRedirect_ = null; if (urlRedirectBuilder_ != null) { urlRedirectBuilder_.dispose(); urlRedirectBuilder_ = null; } onChanged(); return this; } /** * * *
     * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
     * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; */ public com.google.cloud.compute.v1.HttpRedirectAction.Builder getUrlRedirectBuilder() { bitField0_ |= 0x00000080; onChanged(); return getUrlRedirectFieldBuilder().getBuilder(); } /** * * *
     * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
     * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; */ public com.google.cloud.compute.v1.HttpRedirectActionOrBuilder getUrlRedirectOrBuilder() { if (urlRedirectBuilder_ != null) { return urlRedirectBuilder_.getMessageOrBuilder(); } else { return urlRedirect_ == null ? com.google.cloud.compute.v1.HttpRedirectAction.getDefaultInstance() : urlRedirect_; } } /** * * *
     * When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy.
     * 
* * optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.HttpRedirectAction, com.google.cloud.compute.v1.HttpRedirectAction.Builder, com.google.cloud.compute.v1.HttpRedirectActionOrBuilder> getUrlRedirectFieldBuilder() { if (urlRedirectBuilder_ == null) { urlRedirectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.compute.v1.HttpRedirectAction, com.google.cloud.compute.v1.HttpRedirectAction.Builder, com.google.cloud.compute.v1.HttpRedirectActionOrBuilder>( getUrlRedirect(), getParentForChildren(), isClean()); urlRedirect_ = null; } return urlRedirectBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.HttpRouteRule) } // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.HttpRouteRule) private static final com.google.cloud.compute.v1.HttpRouteRule DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.compute.v1.HttpRouteRule(); } public static com.google.cloud.compute.v1.HttpRouteRule getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public HttpRouteRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.compute.v1.HttpRouteRule getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy