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.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
WeightedBackendService
build()
WeightedBackendService
buildPartial()
WeightedBackendService.Builder
clear()
WeightedBackendService.Builder
clearBackendService()
The full or partial URL to the default BackendService resource.WeightedBackendService.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
WeightedBackendService.Builder
clearHeaderAction()
Specifies changes to request and response headers that need to take effect for the selected backendService.WeightedBackendService.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
WeightedBackendService.Builder
clearWeight()
Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) .WeightedBackendService.Builder
clone()
String
getBackendService()
The full or partial URL to the default BackendService resource.com.google.protobuf.ByteString
getBackendServiceBytes()
The full or partial URL to the default BackendService resource.WeightedBackendService
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
HttpHeaderAction
getHeaderAction()
Specifies changes to request and response headers that need to take effect for the selected backendService.HttpHeaderAction.Builder
getHeaderActionBuilder()
Specifies changes to request and response headers that need to take effect for the selected backendService.HttpHeaderActionOrBuilder
getHeaderActionOrBuilder()
Specifies changes to request and response headers that need to take effect for the selected backendService.int
getWeight()
Specifies the fraction of traffic sent to a backend service, computed as weight / (sum of all weightedBackendService weights in routeAction) .boolean
hasBackendService()
The full or partial URL to the default BackendService resource.boolean
hasHeaderAction()
Specifies changes to request and response headers that need to take effect for the selected backendService.boolean
hasWeight()
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.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
WeightedBackendService.Builder
mergeFrom(WeightedBackendService other)
WeightedBackendService.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
WeightedBackendService.Builder
mergeFrom(com.google.protobuf.Message other)
WeightedBackendService.Builder
mergeHeaderAction(HttpHeaderAction value)
Specifies changes to request and response headers that need to take effect for the selected backendService.WeightedBackendService.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
WeightedBackendService.Builder
setBackendService(String value)
The full or partial URL to the default BackendService resource.WeightedBackendService.Builder
setBackendServiceBytes(com.google.protobuf.ByteString value)
The full or partial URL to the default BackendService resource.WeightedBackendService.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
WeightedBackendService.Builder
setHeaderAction(HttpHeaderAction value)
Specifies changes to request and response headers that need to take effect for the selected backendService.WeightedBackendService.Builder
setHeaderAction(HttpHeaderAction.Builder builderForValue)
Specifies changes to request and response headers that need to take effect for the selected backendService.WeightedBackendService.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
WeightedBackendService.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
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) .-
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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
clear
public WeightedBackendService.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
getDefaultInstanceForType
public WeightedBackendService getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public WeightedBackendService build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public WeightedBackendService buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public WeightedBackendService.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
setField
public WeightedBackendService.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
clearField
public WeightedBackendService.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
clearOneof
public WeightedBackendService.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
setRepeatedField
public WeightedBackendService.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
addRepeatedField
public WeightedBackendService.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
mergeFrom
public WeightedBackendService.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<WeightedBackendService.Builder>
-
mergeFrom
public WeightedBackendService.Builder mergeFrom(WeightedBackendService other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
hasBackendService
in 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:
getBackendService
in 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:
getBackendServiceBytes
in 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:
hasHeaderAction
in 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:
getHeaderAction
in 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:
getHeaderActionOrBuilder
in 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:
hasWeight
in 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:
getWeight
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
mergeUnknownFields
public final WeightedBackendService.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedBackendService.Builder>
-
-