Class Workload (0.1.0)

publicfinalclass WorkloadextendsGeneratedMessageV3implementsWorkloadOrBuilder

Workload is an App Hub data model that contains a discovered workload, which represents a binary deployment (such as managed instance groups (MIGs) and GKE deployments) that performs the smallest logical subset of business functionality.

Protobuf type google.cloud.apphub.v1.Workload

Implements

WorkloadOrBuilder

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

ATTRIBUTES_FIELD_NUMBER

publicstaticfinalintATTRIBUTES_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

publicstaticfinalintCREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

publicstaticfinalintDESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISCOVERED_WORKLOAD_FIELD_NUMBER

publicstaticfinalintDISCOVERED_WORKLOAD_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

publicstaticfinalintDISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

publicstaticfinalintNAME_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

publicstaticfinalintSTATE_FIELD_NUMBER
Field Value
Type Description
int

UID_FIELD_NUMBER

publicstaticfinalintUID_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

publicstaticfinalintUPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

WORKLOAD_PROPERTIES_FIELD_NUMBER

publicstaticfinalintWORKLOAD_PROPERTIES_FIELD_NUMBER
Field Value
Type Description
int

WORKLOAD_REFERENCE_FIELD_NUMBER

publicstaticfinalintWORKLOAD_REFERENCE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticWorkloadgetDefaultInstance()
Returns
Type Description
Workload

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticWorkload.BuildernewBuilder()
Returns
Type Description
Workload.Builder

newBuilder(Workload prototype)

publicstaticWorkload.BuildernewBuilder(Workloadprototype)
Parameter
Name Description
prototype Workload
Returns
Type Description
Workload.Builder

parseDelimitedFrom(InputStream input)

publicstaticWorkloadparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Workload
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

publicstaticWorkloadparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Workload
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

publicstaticWorkloadparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Workload
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

publicstaticWorkloadparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Workload
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

publicstaticWorkloadparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Workload
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

publicstaticWorkloadparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Workload
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAttributes()

publicAttributesgetAttributes()

Optional. Consumer provided attributes.

.google.cloud.apphub.v1.Attributes attributes = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes

The attributes.

getAttributesOrBuilder()

publicAttributesOrBuildergetAttributesOrBuilder()

Optional. Consumer provided attributes.

.google.cloud.apphub.v1.Attributes attributes = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AttributesOrBuilder

getCreateTime()

publicTimestampgetCreateTime()

Output only. Create time.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

publicTimestampOrBuildergetCreateTimeOrBuilder()

Output only. Create time.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

publicWorkloadgetDefaultInstanceForType()
Returns
Type Description
Workload

getDescription()

publicStringgetDescription()

Optional. User-defined description of a Workload. Can have a maximum length of 2048 characters.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

publicByteStringgetDescriptionBytes()

Optional. User-defined description of a Workload. Can have a maximum length of 2048 characters.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDiscoveredWorkload()

publicStringgetDiscoveredWorkload()

Required. Immutable. The resource name of the original discovered workload.

string discovered_workload = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The discoveredWorkload.

getDiscoveredWorkloadBytes()

publicByteStringgetDiscoveredWorkloadBytes()

Required. Immutable. The resource name of the original discovered workload.

string discovered_workload = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for discoveredWorkload.

getDisplayName()

publicStringgetDisplayName()

Optional. User-defined name for the Workload. Can have a maximum length of 63 characters.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

publicByteStringgetDisplayNameBytes()

Optional. User-defined name for the Workload. Can have a maximum length of 63 characters.

string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for displayName.

getName()

publicStringgetName()

Identifier. The resource name of the Workload. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Identifier. The resource name of the Workload. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getState()

publicWorkload.StategetState()

Output only. Workload state.

.google.cloud.apphub.v1.Workload.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Workload.State

The state.

getStateValue()

publicintgetStateValue()

Output only. Workload state.

.google.cloud.apphub.v1.Workload.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getUid()

publicStringgetUid()

Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.

string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Returns
Type Description
String

The uid.

getUidBytes()

publicByteStringgetUidBytes()

Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.

string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Returns
Type Description
ByteString

The bytes for uid.

getUpdateTime()

publicTimestampgetUpdateTime()

Output only. Update time.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

publicTimestampOrBuildergetUpdateTimeOrBuilder()

Output only. Update time.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getWorkloadProperties()

publicWorkloadPropertiesgetWorkloadProperties()

Output only. Properties of an underlying compute resource represented by the Workload. These are immutable.

.google.cloud.apphub.v1.WorkloadProperties workload_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
WorkloadProperties

The workloadProperties.

getWorkloadPropertiesOrBuilder()

publicWorkloadPropertiesOrBuildergetWorkloadPropertiesOrBuilder()

Output only. Properties of an underlying compute resource represented by the Workload. These are immutable.

.google.cloud.apphub.v1.WorkloadProperties workload_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
WorkloadPropertiesOrBuilder

getWorkloadReference()

publicWorkloadReferencegetWorkloadReference()

Output only. Reference of an underlying compute resource represented by the Workload. These are immutable.

.google.cloud.apphub.v1.WorkloadReference workload_reference = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
WorkloadReference

The workloadReference.

getWorkloadReferenceOrBuilder()

publicWorkloadReferenceOrBuildergetWorkloadReferenceOrBuilder()

Output only. Reference of an underlying compute resource represented by the Workload. These are immutable.

.google.cloud.apphub.v1.WorkloadReference workload_reference = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
WorkloadReferenceOrBuilder

hasAttributes()

publicbooleanhasAttributes()

Optional. Consumer provided attributes.

.google.cloud.apphub.v1.Attributes attributes = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the attributes field is set.

hasCreateTime()

publicbooleanhasCreateTime()

Output only. Create time.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

publicbooleanhasUpdateTime()

Output only. Update time.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

hasWorkloadProperties()

publicbooleanhasWorkloadProperties()

Output only. Properties of an underlying compute resource represented by the Workload. These are immutable.

.google.cloud.apphub.v1.WorkloadProperties workload_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the workloadProperties field is set.

hasWorkloadReference()

publicbooleanhasWorkloadReference()

Output only. Reference of an underlying compute resource represented by the Workload. These are immutable.

.google.cloud.apphub.v1.WorkloadReference workload_reference = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the workloadReference field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicWorkload.BuildernewBuilderForType()
Returns
Type Description
Workload.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedWorkload.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Workload.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

publicWorkload.BuildertoBuilder()
Returns
Type Description
Workload.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年11月19日 UTC.