public sealed class RelatedAsset : IMessage<RelatedAsset>, IEquatable<RelatedAsset>, IDeepCloneable<RelatedAsset>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Asset Inventory v1 API class RelatedAsset.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eRelatedAsset\u003c/code\u003e class within the Google Cloud Asset Inventory v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRelatedAsset\u003c/code\u003e class is used to identify assets in Google Cloud, including their name, type, and ancestors.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eRelatedAsset\u003c/code\u003e class is 3.12.0, but documentation is available for multiple past versions as far back as 2.7.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRelatedAsset\u003c/code\u003e class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eRelatedAsset\u003c/code\u003e class include \u003ccode\u003eAncestors\u003c/code\u003e, \u003ccode\u003eAsset\u003c/code\u003e, \u003ccode\u003eAssetAsResourceName\u003c/code\u003e, \u003ccode\u003eAssetType\u003c/code\u003e, and \u003ccode\u003eRelationshipType\u003c/code\u003e, each detailing different characteristics of an asset.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Asset Inventory v1 API - Class RelatedAsset (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.12.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.11.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.10.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.9.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.8.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.7.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.6.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.5.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.4.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.3.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.2.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.1.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.0.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.11.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.10.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.9.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.8.0/Google.Cloud.Asset.V1.RelatedAsset)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.7.0/Google.Cloud.Asset.V1.RelatedAsset) \n\n public sealed class RelatedAsset : IMessage\u003cRelatedAsset\u003e, IEquatable\u003cRelatedAsset\u003e, IDeepCloneable\u003cRelatedAsset\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Asset Inventory v1 API class RelatedAsset.\n\nAn asset identifier in Google Cloud which contains its name, type and\nancestors. An asset can be any resource in the Google Cloud [resource\nhierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),\na resource outside the Google Cloud resource hierarchy (such as Google\nKubernetes Engine clusters and objects), or a policy (e.g. IAM policy).\nSee [Supported asset\ntypes](https://cloud.google.com/asset-inventory/docs/supported-asset-types)\nfor more information. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RelatedAsset \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RelatedAsset](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.RelatedAsset), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RelatedAsset](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.RelatedAsset), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RelatedAsset](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.RelatedAsset), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Asset.V1](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Asset.V1.dll\n\nConstructors\n------------\n\n### RelatedAsset()\n\n public RelatedAsset()\n\n### RelatedAsset(RelatedAsset)\n\n public RelatedAsset(RelatedAsset other)\n\nProperties\n----------\n\n### Ancestors\n\n public RepeatedField\u003cstring\u003e Ancestors { get; }\n\nThe ancestors of an asset in Google Cloud [resource\nhierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),\nrepresented as a list of relative resource names. An ancestry path starts\nwith the closest ancestor in the hierarchy and ends at root.\n\nExample: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`\n\n### Asset\n\n public string Asset { get; set; }\n\nThe full name of the asset. Example:\n`//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`\n\nSee [Resource\nnames](https://cloud.google.com/apis/design/resource_names#full_resource_name)\nfor more information.\n\n### AssetAsResourceName\n\n public IResourceName AssetAsResourceName { get; set; }\n\n[IResourceName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html)-typed view over the [Asset](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.RelatedAsset#Google_Cloud_Asset_V1_RelatedAsset_Asset) resource name property.\n\n### AssetType\n\n public string AssetType { get; set; }\n\nThe type of the asset. Example: `compute.googleapis.com/Disk`\n\nSee [Supported asset\ntypes](https://cloud.google.com/asset-inventory/docs/supported-asset-types)\nfor more information.\n\n### RelationshipType\n\n public string RelationshipType { get; set; }\n\nThe unique identifier of the relationship type. Example:\n`INSTANCE_TO_INSTANCEGROUP`"]]