Class RelatedAsset (3.41.0)

public final class RelatedAsset extends GeneratedMessageV3 implements RelatedAssetOrBuilder

An asset identifier in Google Cloud which contains its name, type and ancestors. An asset can be any resource in the Google Cloud resource hierarchy, a resource outside the Google Cloud resource hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy). See Supported asset types for more information.

Protobuf type google.cloud.asset.v1.RelatedAsset

Static Fields

ANCESTORS_FIELD_NUMBER

public static final int ANCESTORS_FIELD_NUMBER
Field Value
Type Description
int

ASSET_FIELD_NUMBER

public static final int ASSET_FIELD_NUMBER
Field Value
Type Description
int

ASSET_TYPE_FIELD_NUMBER

public static final int ASSET_TYPE_FIELD_NUMBER
Field Value
Type Description
int

RELATIONSHIP_TYPE_FIELD_NUMBER

public static final int RELATIONSHIP_TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static RelatedAsset getDefaultInstance()
Returns
Type Description
RelatedAsset

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static RelatedAsset.Builder newBuilder()
Returns
Type Description
RelatedAsset.Builder

newBuilder(RelatedAsset prototype)

public static RelatedAsset.Builder newBuilder(RelatedAsset prototype)
Parameter
Name Description
prototype RelatedAsset
Returns
Type Description
RelatedAsset.Builder

parseDelimitedFrom(InputStream input)

public static RelatedAsset parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
RelatedAsset
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RelatedAsset parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RelatedAsset
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static RelatedAsset parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
RelatedAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static RelatedAsset parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RelatedAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static RelatedAsset parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
RelatedAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static RelatedAsset parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RelatedAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static RelatedAsset parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
RelatedAsset
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static RelatedAsset parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RelatedAsset
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static RelatedAsset parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
RelatedAsset
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RelatedAsset parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RelatedAsset
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static RelatedAsset parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
RelatedAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static RelatedAsset parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RelatedAsset
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<RelatedAsset> parser()
Returns
Type Description
Parser<RelatedAsset>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAncestors(int index)

public String getAncestors(int index)

The ancestors of an asset in Google Cloud resource hierarchy, represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root.

Example: ["projects/123456789", "folders/5432", "organizations/1234"]

repeated string ancestors = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The ancestors at the given index.

getAncestorsBytes(int index)

public ByteString getAncestorsBytes(int index)

The ancestors of an asset in Google Cloud resource hierarchy, represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root.

Example: ["projects/123456789", "folders/5432", "organizations/1234"]

repeated string ancestors = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the ancestors at the given index.

getAncestorsCount()

public int getAncestorsCount()

The ancestors of an asset in Google Cloud resource hierarchy, represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root.

Example: ["projects/123456789", "folders/5432", "organizations/1234"]

repeated string ancestors = 3;

Returns
Type Description
int

The count of ancestors.

getAncestorsList()

public ProtocolStringList getAncestorsList()

The ancestors of an asset in Google Cloud resource hierarchy, represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root.

Example: ["projects/123456789", "folders/5432", "organizations/1234"]

repeated string ancestors = 3;

Returns
Type Description
ProtocolStringList

A list containing the ancestors.

getAsset()

public String getAsset()

The full name of the asset. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1

See Resource names for more information.

string asset = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The asset.

getAssetBytes()

public ByteString getAssetBytes()

The full name of the asset. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1

See Resource names for more information.

string asset = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for asset.

getAssetType()

public String getAssetType()

The type of the asset. Example: compute.googleapis.com/Disk

See Supported asset types for more information.

string asset_type = 2;

Returns
Type Description
String

The assetType.

getAssetTypeBytes()

public ByteString getAssetTypeBytes()

The type of the asset. Example: compute.googleapis.com/Disk

See Supported asset types for more information.

string asset_type = 2;

Returns
Type Description
ByteString

The bytes for assetType.

getDefaultInstanceForType()

public RelatedAsset getDefaultInstanceForType()
Returns
Type Description
RelatedAsset

getParserForType()

public Parser<RelatedAsset> getParserForType()
Returns
Type Description
Parser<RelatedAsset>
Overrides

getRelationshipType()

public String getRelationshipType()

The unique identifier of the relationship type. Example: INSTANCE_TO_INSTANCEGROUP

string relationship_type = 4;

Returns
Type Description
String

The relationshipType.

getRelationshipTypeBytes()

public ByteString getRelationshipTypeBytes()

The unique identifier of the relationship type. Example: INSTANCE_TO_INSTANCEGROUP

string relationship_type = 4;

Returns
Type Description
ByteString

The bytes for relationshipType.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public RelatedAsset.Builder newBuilderForType()
Returns
Type Description
RelatedAsset.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected RelatedAsset.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
RelatedAsset.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public RelatedAsset.Builder toBuilder()
Returns
Type Description
RelatedAsset.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException