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.v1.RelatedAsset
Static Fields
public static final int ANCESTORS_FIELD_NUMBER
Field Value
public static final int ASSET_FIELD_NUMBER
Field Value
public static final int ASSET_TYPE_FIELD_NUMBER
Field Value
Static Methods
public static RelatedAsset getDefaultInstance()
Returns
public static final Descriptors.Descriptor getDescriptor()
Returns
public static RelatedAsset.Builder newBuilder()
Returns
public static RelatedAsset.Builder newBuilder(RelatedAsset prototype)
Parameter
Returns
public static RelatedAsset parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static RelatedAsset parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static RelatedAsset parseFrom(byte[] data)
Parameter
Name |
Description |
data |
byte[]
|
Returns
Exceptions
public static RelatedAsset parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static RelatedAsset parseFrom(ByteString data)
Parameter
Returns
Exceptions
public static RelatedAsset parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static RelatedAsset parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static RelatedAsset parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static RelatedAsset parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static RelatedAsset parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static RelatedAsset parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
public static RelatedAsset parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Parser<RelatedAsset> parser()
Returns
Methods
public boolean equals(Object obj)
Parameter
Returns
Overrides
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.
|
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.
|
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.
|
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
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.
|
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
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.
|
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.
|
public RelatedAsset getDefaultInstanceForType()
Returns
public Parser<RelatedAsset> getParserForType()
Returns
Overrides
public int getSerializedSize()
Returns
Overrides
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
Returns
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public RelatedAsset.Builder newBuilderForType()
Returns
protected RelatedAsset.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public RelatedAsset.Builder toBuilder()
Returns
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions