Package com.google.cloud.compute.v1
Class WeightedBackendService.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<WeightedBackendService.Builder>
com.google.cloud.compute.v1.WeightedBackendService.Builder
- All Implemented Interfaces:
WeightedBackendServiceOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- WeightedBackendService
public static final class WeightedBackendService.Builder
extends com.google.protobuf.GeneratedMessage.Builder<WeightedBackendService.Builder>
implements WeightedBackendServiceOrBuilder
In contrast to a single BackendService in HttpRouteAction to which all matching traffic is directed to,WeightedBackendService allows traffic to be split across multiple backend services. The volume of traffic for each backend service is proportional to the weight specified in each WeightedBackendServiceProtobuf type
google.cloud.compute.v1.WeightedBackendService-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The full or partial URL to the default BackendService resource.Specifies changes to request and response headers that need to take effect for the selected backendService.Specifies the fraction of traffic sent to a backend service, computed asweight / (sum of all weightedBackendService weights in routeAction).The full or partial URL to the default BackendService resource.com.google.protobuf.ByteStringThe full or partial URL to the default BackendService resource.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorSpecifies changes to request and response headers that need to take effect for the selected backendService.Specifies changes to request and response headers that need to take effect for the selected backendService.Specifies changes to request and response headers that need to take effect for the selected backendService.intSpecifies the fraction of traffic sent to a backend service, computed asweight / (sum of all weightedBackendService weights in routeAction).booleanThe full or partial URL to the default BackendService resource.booleanSpecifies changes to request and response headers that need to take effect for the selected backendService.booleanSpecifies the fraction of traffic sent to a backend service, computed asweight / (sum of all weightedBackendService weights in routeAction).protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(WeightedBackendService other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Specifies changes to request and response headers that need to take effect for the selected backendService.setBackendService(String value) The full or partial URL to the default BackendService resource.setBackendServiceBytes(com.google.protobuf.ByteString value) The full or partial URL to the default BackendService resource.setHeaderAction(HttpHeaderAction value) Specifies changes to request and response headers that need to take effect for the selected backendService.setHeaderAction(HttpHeaderAction.Builder builderForValue) Specifies changes to request and response headers that need to take effect for the selected backendService.setWeight(int value) Specifies the fraction of traffic sent to a backend service, computed asweight / (sum of all weightedBackendService weights in routeAction).Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<WeightedBackendService.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<WeightedBackendService.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<WeightedBackendService.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WeightedBackendService.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<WeightedBackendService.Builder>
-
mergeFrom
public WeightedBackendService.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WeightedBackendService.Builder>- Throws:
IOException
-
hasBackendService
public boolean hasBackendService()The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of thisbackendServiceWeight.
optional string backend_service = 306946058;- Specified by:
hasBackendServicein interfaceWeightedBackendServiceOrBuilder- Returns:
- Whether the backendService field is set.
-
getBackendService
The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of thisbackendServiceWeight.
optional string backend_service = 306946058;- Specified by:
getBackendServicein interfaceWeightedBackendServiceOrBuilder- Returns:
- The backendService.
-
getBackendServiceBytes
public com.google.protobuf.ByteString getBackendServiceBytes()The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of thisbackendServiceWeight.
optional string backend_service = 306946058;- Specified by:
getBackendServiceBytesin interfaceWeightedBackendServiceOrBuilder- Returns:
- The bytes for backendService.
-
setBackendService
The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of thisbackendServiceWeight.
optional string backend_service = 306946058;- Parameters:
value- The backendService to set.- Returns:
- This builder for chaining.
-
clearBackendService
The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of thisbackendServiceWeight.
optional string backend_service = 306946058;- Returns:
- This builder for chaining.
-
setBackendServiceBytes
The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the load balancer applies any relevant headerActions specified as part of thisbackendServiceWeight.
optional string backend_service = 306946058;- Parameters:
value- The bytes for backendService to set.- Returns:
- This builder for chaining.
-
hasHeaderAction
public boolean hasHeaderAction()Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;- Specified by:
hasHeaderActionin interfaceWeightedBackendServiceOrBuilder- Returns:
- Whether the headerAction field is set.
-
getHeaderAction
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;- Specified by:
getHeaderActionin interfaceWeightedBackendServiceOrBuilder- Returns:
- The headerAction.
-
setHeaderAction
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; -
setHeaderAction
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; -
mergeHeaderAction
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; -
clearHeaderAction
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; -
getHeaderActionBuilder
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352; -
getHeaderActionOrBuilder
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect beforeheaderAction in the enclosing HttpRouteRule,PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true.
optional .google.cloud.compute.v1.HttpHeaderAction header_action = 328077352;- Specified by:
getHeaderActionOrBuilderin interfaceWeightedBackendServiceOrBuilder
-
hasWeight
public boolean hasWeight()Specifies the fraction of traffic sent to a backend service, computed asweight / (sum of all weightedBackendService weights in routeAction). The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. Don't configure session affinity if you're using weighted traffic splitting. If you do, the weighted traffic splitting configuration takes precedence. The value must be from 0 to 1000.
optional uint32 weight = 282149496;- Specified by:
hasWeightin interfaceWeightedBackendServiceOrBuilder- Returns:
- Whether the weight field is set.
-
getWeight
public int getWeight()Specifies the fraction of traffic sent to a backend service, computed asweight / (sum of all weightedBackendService weights in routeAction). The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. Don't configure session affinity if you're using weighted traffic splitting. If you do, the weighted traffic splitting configuration takes precedence. The value must be from 0 to 1000.
optional uint32 weight = 282149496;- Specified by:
getWeightin interfaceWeightedBackendServiceOrBuilder- Returns:
- The weight.
-
setWeight
Specifies the fraction of traffic sent to a backend service, computed asweight / (sum of all weightedBackendService weights in routeAction). The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. Don't configure session affinity if you're using weighted traffic splitting. If you do, the weighted traffic splitting configuration takes precedence. The value must be from 0 to 1000.
optional uint32 weight = 282149496;- Parameters:
value- The weight to set.- Returns:
- This builder for chaining.
-
clearWeight
Specifies the fraction of traffic sent to a backend service, computed asweight / (sum of all weightedBackendService weights in routeAction). The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backend service, subsequent requests are sent to the same backend service as determined by the backend service's session affinity policy. Don't configure session affinity if you're using weighted traffic splitting. If you do, the weighted traffic splitting configuration takes precedence. The value must be from 0 to 1000.
optional uint32 weight = 282149496;- Returns:
- This builder for chaining.
-