Class Workload (0.4.0)

public final class Workload extends GeneratedMessageV3 implements WorkloadOrBuilder

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

Static Fields

ATTRIBUTES_FIELD_NUMBER

public static final int ATTRIBUTES_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

DISCOVERED_WORKLOAD_FIELD_NUMBER

public static final int DISCOVERED_WORKLOAD_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

UID_FIELD_NUMBER

public static final int UID_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

WORKLOAD_PROPERTIES_FIELD_NUMBER

public static final int WORKLOAD_PROPERTIES_FIELD_NUMBER
Field Value
TypeDescription
int

WORKLOAD_REFERENCE_FIELD_NUMBER

public static final int WORKLOAD_REFERENCE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Workload getDefaultInstance()
Returns
TypeDescription
Workload

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Workload.Builder newBuilder()
Returns
TypeDescription
Workload.Builder

newBuilder(Workload prototype)

public static Workload.Builder newBuilder(Workload prototype)
Parameter
NameDescription
prototypeWorkload
Returns
TypeDescription
Workload.Builder

parseDelimitedFrom(InputStream input)

public static Workload parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Workload
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Workload parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Workload
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Workload parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Workload
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Workload parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Workload
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Workload parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Workload
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Workload parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Workload
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Workload parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Workload
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Workload parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Workload
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Workload parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Workload
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Workload parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Workload
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Workload parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Workload
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Workload parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Workload
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Workload> parser()
Returns
TypeDescription
Parser<Workload>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAttributes()

public Attributes getAttributes()

Optional. Consumer provided attributes.

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

Returns
TypeDescription
Attributes

The attributes.

getAttributesOrBuilder()

public AttributesOrBuilder getAttributesOrBuilder()

Optional. Consumer provided attributes.

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

Returns
TypeDescription
AttributesOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. Create time.

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

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Create time.

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

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Workload getDefaultInstanceForType()
Returns
TypeDescription
Workload

getDescription()

public String getDescription()

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

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

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

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

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

Returns
TypeDescription
ByteString

The bytes for description.

getDiscoveredWorkload()

public String getDiscoveredWorkload()

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
TypeDescription
String

The discoveredWorkload.

getDiscoveredWorkloadBytes()

public ByteString getDiscoveredWorkloadBytes()

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
TypeDescription
ByteString

The bytes for discoveredWorkload.

getDisplayName()

public String getDisplayName()

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
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

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
TypeDescription
ByteString

The bytes for displayName.

getName()

public String getName()

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
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Workload> getParserForType()
Returns
TypeDescription
Parser<Workload>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getState()

public Workload.State getState()

Output only. Workload state.

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

Returns
TypeDescription
Workload.State

The state.

getStateValue()

public int getStateValue()

Output only. Workload state.

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

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getUid()

public String getUid()

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
TypeDescription
String

The uid.

getUidBytes()

public ByteString getUidBytes()

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
TypeDescription
ByteString

The bytes for uid.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Update time.

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

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Update time.

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

Returns
TypeDescription
TimestampOrBuilder

getWorkloadProperties()

public WorkloadProperties getWorkloadProperties()

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
TypeDescription
WorkloadProperties

The workloadProperties.

getWorkloadPropertiesOrBuilder()

public WorkloadPropertiesOrBuilder getWorkloadPropertiesOrBuilder()

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
TypeDescription
WorkloadPropertiesOrBuilder

getWorkloadReference()

public WorkloadReference getWorkloadReference()

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
TypeDescription
WorkloadReference

The workloadReference.

getWorkloadReferenceOrBuilder()

public WorkloadReferenceOrBuilder getWorkloadReferenceOrBuilder()

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
TypeDescription
WorkloadReferenceOrBuilder

hasAttributes()

public boolean hasAttributes()

Optional. Consumer provided attributes.

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

Returns
TypeDescription
boolean

Whether the attributes field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. Create time.

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

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Update time.

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

Returns
TypeDescription
boolean

Whether the updateTime field is set.

hasWorkloadProperties()

public boolean hasWorkloadProperties()

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
TypeDescription
boolean

Whether the workloadProperties field is set.

hasWorkloadReference()

public boolean hasWorkloadReference()

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
TypeDescription
boolean

Whether the workloadReference field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Workload.Builder newBuilderForType()
Returns
TypeDescription
Workload.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Workload.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Workload.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Workload.Builder toBuilder()
Returns
TypeDescription
Workload.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException