public static final class TrafficTarget.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder> implements TrafficTargetOrBuilder
Holds a single traffic routing entry for the Service. Allocations can be done to a specific Revision name, or pointing to the latest Ready Revision.Protobuf type
google.cloud.run.v2.TrafficTarget| Modifier and Type | Method and Description |
|---|---|
TrafficTarget.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
TrafficTarget |
build() |
TrafficTarget |
buildPartial() |
TrafficTarget.Builder |
clear() |
TrafficTarget.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
TrafficTarget.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
TrafficTarget.Builder |
clearPercent()
Specifies percent of the traffic to this Revision.
|
TrafficTarget.Builder |
clearRevision()
Revision to which to send this portion of traffic, if traffic allocation is
by revision.
|
TrafficTarget.Builder |
clearTag()
Indicates a string to be part of the URI to exclusively reference this
target.
|
TrafficTarget.Builder |
clearType()
The allocation type for this traffic target.
|
TrafficTarget.Builder |
clone() |
TrafficTarget |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
int |
getPercent()
Specifies percent of the traffic to this Revision.
|
String |
getRevision()
Revision to which to send this portion of traffic, if traffic allocation is
by revision.
|
com.google.protobuf.ByteString |
getRevisionBytes()
Revision to which to send this portion of traffic, if traffic allocation is
by revision.
|
String |
getTag()
Indicates a string to be part of the URI to exclusively reference this
target.
|
com.google.protobuf.ByteString |
getTagBytes()
Indicates a string to be part of the URI to exclusively reference this
target.
|
TrafficTargetAllocationType |
getType()
The allocation type for this traffic target.
|
int |
getTypeValue()
The allocation type for this traffic target.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
TrafficTarget.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
TrafficTarget.Builder |
mergeFrom(com.google.protobuf.Message other) |
TrafficTarget.Builder |
mergeFrom(TrafficTarget other) |
TrafficTarget.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
TrafficTarget.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
TrafficTarget.Builder |
setPercent(int value)
Specifies percent of the traffic to this Revision.
|
TrafficTarget.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
TrafficTarget.Builder |
setRevision(String value)
Revision to which to send this portion of traffic, if traffic allocation is
by revision.
|
TrafficTarget.Builder |
setRevisionBytes(com.google.protobuf.ByteString value)
Revision to which to send this portion of traffic, if traffic allocation is
by revision.
|
TrafficTarget.Builder |
setTag(String value)
Indicates a string to be part of the URI to exclusively reference this
target.
|
TrafficTarget.Builder |
setTagBytes(com.google.protobuf.ByteString value)
Indicates a string to be part of the URI to exclusively reference this
target.
|
TrafficTarget.Builder |
setType(TrafficTargetAllocationType value)
The allocation type for this traffic target.
|
TrafficTarget.Builder |
setTypeValue(int value)
The allocation type for this traffic target.
|
TrafficTarget.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public TrafficTarget.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public TrafficTarget getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic TrafficTarget build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic TrafficTarget buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic TrafficTarget.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public TrafficTarget.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public TrafficTarget.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public TrafficTarget.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public TrafficTarget.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public TrafficTarget.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public TrafficTarget.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TrafficTarget.Builder>public TrafficTarget.Builder mergeFrom(TrafficTarget other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public TrafficTarget.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TrafficTarget.Builder>IOExceptionpublic int getTypeValue()
The allocation type for this traffic target.
.google.cloud.run.v2.TrafficTargetAllocationType type = 1;getTypeValue in interface TrafficTargetOrBuilderpublic TrafficTarget.Builder setTypeValue(int value)
The allocation type for this traffic target.
.google.cloud.run.v2.TrafficTargetAllocationType type = 1;value - The enum numeric value on the wire for type to set.public TrafficTargetAllocationType getType()
The allocation type for this traffic target.
.google.cloud.run.v2.TrafficTargetAllocationType type = 1;getType in interface TrafficTargetOrBuilderpublic TrafficTarget.Builder setType(TrafficTargetAllocationType value)
The allocation type for this traffic target.
.google.cloud.run.v2.TrafficTargetAllocationType type = 1;value - The type to set.public TrafficTarget.Builder clearType()
The allocation type for this traffic target.
.google.cloud.run.v2.TrafficTargetAllocationType type = 1;public String getRevision()
Revision to which to send this portion of traffic, if traffic allocation is by revision.
string revision = 2 [(.google.api.resource_reference) = { ... }getRevision in interface TrafficTargetOrBuilderpublic com.google.protobuf.ByteString getRevisionBytes()
Revision to which to send this portion of traffic, if traffic allocation is by revision.
string revision = 2 [(.google.api.resource_reference) = { ... }getRevisionBytes in interface TrafficTargetOrBuilderpublic TrafficTarget.Builder setRevision(String value)
Revision to which to send this portion of traffic, if traffic allocation is by revision.
string revision = 2 [(.google.api.resource_reference) = { ... }value - The revision to set.public TrafficTarget.Builder clearRevision()
Revision to which to send this portion of traffic, if traffic allocation is by revision.
string revision = 2 [(.google.api.resource_reference) = { ... }public TrafficTarget.Builder setRevisionBytes(com.google.protobuf.ByteString value)
Revision to which to send this portion of traffic, if traffic allocation is by revision.
string revision = 2 [(.google.api.resource_reference) = { ... }value - The bytes for revision to set.public int getPercent()
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
int32 percent = 3;getPercent in interface TrafficTargetOrBuilderpublic TrafficTarget.Builder setPercent(int value)
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
int32 percent = 3;value - The percent to set.public TrafficTarget.Builder clearPercent()
Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.
int32 percent = 3;public String getTag()
Indicates a string to be part of the URI to exclusively reference this target.
string tag = 4;getTag in interface TrafficTargetOrBuilderpublic com.google.protobuf.ByteString getTagBytes()
Indicates a string to be part of the URI to exclusively reference this target.
string tag = 4;getTagBytes in interface TrafficTargetOrBuilderpublic TrafficTarget.Builder setTag(String value)
Indicates a string to be part of the URI to exclusively reference this target.
string tag = 4;value - The tag to set.public TrafficTarget.Builder clearTag()
Indicates a string to be part of the URI to exclusively reference this target.
string tag = 4;public TrafficTarget.Builder setTagBytes(com.google.protobuf.ByteString value)
Indicates a string to be part of the URI to exclusively reference this target.
string tag = 4;value - The bytes for tag to set.public final TrafficTarget.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>public final TrafficTarget.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TrafficTarget.Builder>Copyright © 2025 Google LLC. All rights reserved.