Class TrafficTarget (0.58.0)

publicfinalclass TrafficTargetextendsGeneratedMessageV3implementsTrafficTargetOrBuilder

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

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

PERCENT_FIELD_NUMBER

publicstaticfinalintPERCENT_FIELD_NUMBER
Field Value
Type Description
int

REVISION_FIELD_NUMBER

publicstaticfinalintREVISION_FIELD_NUMBER
Field Value
Type Description
int

TAG_FIELD_NUMBER

publicstaticfinalintTAG_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

publicstaticfinalintTYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticTrafficTargetgetDefaultInstance()
Returns
Type Description
TrafficTarget

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticTrafficTarget.BuildernewBuilder()
Returns
Type Description
TrafficTarget.Builder

newBuilder(TrafficTarget prototype)

publicstaticTrafficTarget.BuildernewBuilder(TrafficTargetprototype)
Parameter
Name Description
prototype TrafficTarget
Returns
Type Description
TrafficTarget.Builder

parseDelimitedFrom(InputStream input)

publicstaticTrafficTargetparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
TrafficTarget
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficTargetparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficTarget
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticTrafficTargetparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
TrafficTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficTargetparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticTrafficTargetparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
TrafficTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficTargetparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticTrafficTargetparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TrafficTarget
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficTargetparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficTarget
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticTrafficTargetparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
TrafficTarget
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficTargetparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficTarget
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticTrafficTargetparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TrafficTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficTargetparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficTarget
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<TrafficTarget>parser()
Returns
Type Description
Parser<TrafficTarget>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

publicTrafficTargetgetDefaultInstanceForType()
Returns
Type Description
TrafficTarget

getParserForType()

publicParser<TrafficTarget>getParserForType()
Returns
Type Description
Parser<TrafficTarget>
Overrides

getPercent()

publicintgetPercent()

Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.

int32 percent = 3;

Returns
Type Description
int

The percent.

getRevision()

publicStringgetRevision()

Revision to which to send this portion of traffic, if traffic allocation is by revision.

string revision = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The revision.

getRevisionBytes()

publicByteStringgetRevisionBytes()

Revision to which to send this portion of traffic, if traffic allocation is by revision.

string revision = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for revision.

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getTag()

publicStringgetTag()

Indicates a string to be part of the URI to exclusively reference this target.

string tag = 4;

Returns
Type Description
String

The tag.

getTagBytes()

publicByteStringgetTagBytes()

Indicates a string to be part of the URI to exclusively reference this target.

string tag = 4;

Returns
Type Description
ByteString

The bytes for tag.

getType()

publicTrafficTargetAllocationTypegetType()

The allocation type for this traffic target.

.google.cloud.run.v2.TrafficTargetAllocationType type = 1;

Returns
Type Description
TrafficTargetAllocationType

The type.

getTypeValue()

publicintgetTypeValue()

The allocation type for this traffic target.

.google.cloud.run.v2.TrafficTargetAllocationType type = 1;

Returns
Type Description
int

The enum numeric value on the wire for type.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicTrafficTarget.BuildernewBuilderForType()
Returns
Type Description
TrafficTarget.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedTrafficTarget.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TrafficTarget.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicTrafficTarget.BuildertoBuilder()
Returns
Type Description
TrafficTarget.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.