Class HttpRoute.Destination.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<HttpRoute.Destination.Builder>
com.google.cloud.networkservices.v1.HttpRoute.Destination.Builder
- All Implemented Interfaces:
HttpRoute.DestinationOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- HttpRoute.Destination
public static final class HttpRoute.Destination.Builder
extends com.google.protobuf.GeneratedMessage.Builder<HttpRoute.Destination.Builder>
implements HttpRoute.DestinationOrBuilder
Specifications of a destination to which the request should be routed to.Protobuf type
google.cloud.networkservices.v1.HttpRoute.Destination-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.Optional.The URL of a BackendService to route traffic to.Specifies the proportion of requests forwarded to the backend referenced by the serviceName field.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.Optional.Optional.Optional.Optional.Optional.The URL of a BackendService to route traffic to.com.google.protobuf.ByteStringThe URL of a BackendService to route traffic to.intSpecifies the proportion of requests forwarded to the backend referenced by the serviceName field.booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(HttpRoute.Destination other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.Optional.Optional.setRequestHeaderModifier(HttpRoute.HeaderModifier.Builder builderForValue) Optional.Optional.setResponseHeaderModifier(HttpRoute.HeaderModifier.Builder builderForValue) Optional.setServiceName(String value) The URL of a BackendService to route traffic to.setServiceNameBytes(com.google.protobuf.ByteString value) The URL of a BackendService to route traffic to.setWeight(int value) Specifies the proportion of requests forwarded to the backend referenced by the serviceName field.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<HttpRoute.Destination.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<HttpRoute.Destination.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<HttpRoute.Destination.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<HttpRoute.Destination.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.Destination.Builder>
-
mergeFrom
public HttpRoute.Destination.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<HttpRoute.Destination.Builder>- Throws:
IOException
-
getServiceName
The URL of a BackendService to route traffic to.
string service_name = 1 [(.google.api.resource_reference) = { ... }- Specified by:
getServiceNamein interfaceHttpRoute.DestinationOrBuilder- Returns:
- The serviceName.
-
getServiceNameBytes
public com.google.protobuf.ByteString getServiceNameBytes()The URL of a BackendService to route traffic to.
string service_name = 1 [(.google.api.resource_reference) = { ... }- Specified by:
getServiceNameBytesin interfaceHttpRoute.DestinationOrBuilder- Returns:
- The bytes for serviceName.
-
setServiceName
The URL of a BackendService to route traffic to.
string service_name = 1 [(.google.api.resource_reference) = { ... }- Parameters:
value- The serviceName to set.- Returns:
- This builder for chaining.
-
clearServiceName
The URL of a BackendService to route traffic to.
string service_name = 1 [(.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setServiceNameBytes
The URL of a BackendService to route traffic to.
string service_name = 1 [(.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for serviceName to set.- Returns:
- This builder for chaining.
-
getWeight
public int getWeight()Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
int32 weight = 2;- Specified by:
getWeightin interfaceHttpRoute.DestinationOrBuilder- Returns:
- The weight.
-
setWeight
Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
int32 weight = 2;- Parameters:
value- The weight to set.- Returns:
- This builder for chaining.
-
clearWeight
Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.
int32 weight = 2;- Returns:
- This builder for chaining.
-
hasRequestHeaderModifier
public boolean hasRequestHeaderModifier()Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasRequestHeaderModifierin interfaceHttpRoute.DestinationOrBuilder- Returns:
- Whether the requestHeaderModifier field is set.
-
getRequestHeaderModifier
Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getRequestHeaderModifierin interfaceHttpRoute.DestinationOrBuilder- Returns:
- The requestHeaderModifier.
-
setRequestHeaderModifier
Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL]; -
setRequestHeaderModifier
public HttpRoute.Destination.Builder setRequestHeaderModifier(HttpRoute.HeaderModifier.Builder builderForValue) Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL]; -
mergeRequestHeaderModifier
Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL]; -
clearRequestHeaderModifier
Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL]; -
getRequestHeaderModifierBuilder
Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL]; -
getRequestHeaderModifierOrBuilder
Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getRequestHeaderModifierOrBuilderin interfaceHttpRoute.DestinationOrBuilder
-
hasResponseHeaderModifier
public boolean hasResponseHeaderModifier()Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasResponseHeaderModifierin interfaceHttpRoute.DestinationOrBuilder- Returns:
- Whether the responseHeaderModifier field is set.
-
getResponseHeaderModifier
Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getResponseHeaderModifierin interfaceHttpRoute.DestinationOrBuilder- Returns:
- The responseHeaderModifier.
-
setResponseHeaderModifier
Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL]; -
setResponseHeaderModifier
public HttpRoute.Destination.Builder setResponseHeaderModifier(HttpRoute.HeaderModifier.Builder builderForValue) Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL]; -
mergeResponseHeaderModifier
Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL]; -
clearResponseHeaderModifier
Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL]; -
getResponseHeaderModifierBuilder
Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL]; -
getResponseHeaderModifierOrBuilder
Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration.
.google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getResponseHeaderModifierOrBuilderin interfaceHttpRoute.DestinationOrBuilder
-