Class RelatedAsset (3.4.0)

public final class RelatedAsset extends GeneratedMessageV3 implements RelatedAssetOrBuilder

An asset identify 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. Cloud IAM policy). See Supported asset types for more information.

Protobuf type google.cloud.asset.v1p7beta1.RelatedAsset

Static Fields

ANCESTORS_FIELD_NUMBER

public static final int ANCESTORS_FIELD_NUMBER
Field Value
TypeDescription
int

ASSET_FIELD_NUMBER

public static final int ASSET_FIELD_NUMBER
Field Value
TypeDescription
int

ASSET_TYPE_FIELD_NUMBER

public static final int ASSET_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static RelatedAsset getDefaultInstance()
Returns
TypeDescription
RelatedAsset

getDescriptor()

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

newBuilder()

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

newBuilder(RelatedAsset prototype)

public static RelatedAsset.Builder newBuilder(RelatedAsset prototype)
Parameter
NameDescription
prototypeRelatedAsset
Returns
TypeDescription
RelatedAsset.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

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

The bytes for assetType.

getDefaultInstanceForType()

public RelatedAsset getDefaultInstanceForType()
Returns
TypeDescription
RelatedAsset

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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 RelatedAsset.Builder newBuilderForType()
Returns
TypeDescription
RelatedAsset.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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