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.GeneratedMessageV3.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.GeneratedMessageV3.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 WeightedBackendService
Protobuf typegoogle.cloud.compute.v1.WeightedBackendService
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WeightedBackendService.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)WeightedBackendServicebuild()WeightedBackendServicebuildPartial()WeightedBackendService.Builderclear()WeightedBackendService.BuilderclearBackendService()The full or partial URL to the default BackendService resource.WeightedBackendService.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)WeightedBackendService.BuilderclearHeaderAction()Specifies changes to request and response headers that need to take effect for the selected backendService.WeightedBackendService.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)WeightedBackendService.BuilderclearWeight()Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) .WeightedBackendService.Builderclone()StringgetBackendService()The full or partial URL to the default BackendService resource.com.google.protobuf.ByteStringgetBackendServiceBytes()The full or partial URL to the default BackendService resource.WeightedBackendServicegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()HttpHeaderActiongetHeaderAction()Specifies changes to request and response headers that need to take effect for the selected backendService.HttpHeaderAction.BuildergetHeaderActionBuilder()Specifies changes to request and response headers that need to take effect for the selected backendService.HttpHeaderActionOrBuildergetHeaderActionOrBuilder()Specifies changes to request and response headers that need to take effect for the selected backendService.intgetWeight()Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) .booleanhasBackendService()The full or partial URL to the default BackendService resource.booleanhasHeaderAction()Specifies changes to request and response headers that need to take effect for the selected backendService.booleanhasWeight()Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) .protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()WeightedBackendService.BuildermergeFrom(WeightedBackendService other)WeightedBackendService.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)WeightedBackendService.BuildermergeFrom(com.google.protobuf.Message other)WeightedBackendService.BuildermergeHeaderAction(HttpHeaderAction value)Specifies changes to request and response headers that need to take effect for the selected backendService.WeightedBackendService.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)WeightedBackendService.BuildersetBackendService(String value)The full or partial URL to the default BackendService resource.WeightedBackendService.BuildersetBackendServiceBytes(com.google.protobuf.ByteString value)The full or partial URL to the default BackendService resource.WeightedBackendService.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)WeightedBackendService.BuildersetHeaderAction(HttpHeaderAction value)Specifies changes to request and response headers that need to take effect for the selected backendService.WeightedBackendService.BuildersetHeaderAction(HttpHeaderAction.Builder builderForValue)Specifies changes to request and response headers that need to take effect for the selected backendService.WeightedBackendService.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)WeightedBackendService.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)WeightedBackendService.BuildersetWeight(int value)Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) .-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
clear
public WeightedBackendService.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
getDefaultInstanceForType
public WeightedBackendService getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public WeightedBackendService build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public WeightedBackendService buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public WeightedBackendService.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
setField
public WeightedBackendService.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
clearField
public WeightedBackendService.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
clearOneof
public WeightedBackendService.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
setRepeatedField
public WeightedBackendService.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
addRepeatedField
public WeightedBackendService.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
mergeFrom
public WeightedBackendService.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WeightedBackendService.Builder>
-
mergeFrom
public WeightedBackendService.Builder mergeFrom(WeightedBackendService other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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 this backendServiceWeight.
optional string backend_service = 306946058;- Specified by:
hasBackendServicein interfaceWeightedBackendServiceOrBuilder- Returns:
- Whether the backendService field is set.
-
getBackendService
public String 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 this backendServiceWeight.
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 this backendServiceWeight.
optional string backend_service = 306946058;- Specified by:
getBackendServiceBytesin interfaceWeightedBackendServiceOrBuilder- Returns:
- The bytes for backendService.
-
setBackendService
public WeightedBackendService.Builder setBackendService(String value)
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 this backendServiceWeight.
optional string backend_service = 306946058;- Parameters:
value- The backendService to set.- Returns:
- This builder for chaining.
-
clearBackendService
public WeightedBackendService.Builder 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 this backendServiceWeight.
optional string backend_service = 306946058;- Returns:
- This builder for chaining.
-
setBackendServiceBytes
public WeightedBackendService.Builder setBackendServiceBytes(com.google.protobuf.ByteString value)
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 this backendServiceWeight.
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 before headerAction 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
public HttpHeaderAction getHeaderAction()
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction 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
public WeightedBackendService.Builder setHeaderAction(HttpHeaderAction value)
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction 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
public WeightedBackendService.Builder setHeaderAction(HttpHeaderAction.Builder builderForValue)
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction 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
public WeightedBackendService.Builder mergeHeaderAction(HttpHeaderAction value)
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction 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
public WeightedBackendService.Builder clearHeaderAction()
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction 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
public HttpHeaderAction.Builder getHeaderActionBuilder()
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction 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
public HttpHeaderActionOrBuilder getHeaderActionOrBuilder()
Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction 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 as weight / (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. 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 as weight / (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. The value must be from 0 to 1000.
optional uint32 weight = 282149496;- Specified by:
getWeightin interfaceWeightedBackendServiceOrBuilder- Returns:
- The weight.
-
setWeight
public WeightedBackendService.Builder setWeight(int value)
Specifies the fraction of traffic sent to a backend service, computed as weight / (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. The value must be from 0 to 1000.
optional uint32 weight = 282149496;- Parameters:
value- The weight to set.- Returns:
- This builder for chaining.
-
clearWeight
public WeightedBackendService.Builder clearWeight()
Specifies the fraction of traffic sent to a backend service, computed as weight / (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. The value must be from 0 to 1000.
optional uint32 weight = 282149496;- Returns:
- This builder for chaining.
-
setUnknownFields
public final WeightedBackendService.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
mergeUnknownFields
public final WeightedBackendService.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
-