1.9.0 (latest) 1.8.0 1.7.0 1.6.1 1.5.0 1.4.1 1.3.1 1.2.0 1.1.0 1.0.2 0.32.0 0.31.0 0.30.0 0.29.3 0.28.1 0.27.0 0.26.1 0.25.0 0.24.0 0.23.0 0.22.0 0.21.1 0.20.1 0.19.0 0.18.0 0.17.3 Reference documentation and code samples for the Cloud Asset V1 API class Google::Cloud::Asset::V1::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](https://cloud.google.com/resource-manager/docs/cloud-platform-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](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
for more information.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #ancestors

    def ancestors() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- The ancestors of an asset in Google Cloud [resource
  hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-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"]`

### #ancestors=

    def ancestors=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- The ancestors of an asset in Google Cloud [resource
  hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-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"]`
**Returns**

- (::Array\<::String\>) --- The ancestors of an asset in Google Cloud [resource
  hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-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"]`

### #asset

    def asset() -> ::String

**Returns**

- (::String) --- The full name of the asset. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`


  See [Resource
  names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
  for more information.

### #asset=

    def asset=(value) -> ::String

**Parameter**

- **value** (::String) --- The full name of the asset. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`


  See [Resource
  names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
  for more information.
**Returns**

- (::String) --- The full name of the asset. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`


  See [Resource
  names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
  for more information.

### #asset_type

    def asset_type() -> ::String

**Returns**

- (::String) --- The type of the asset. Example: `compute.googleapis.com/Disk`


  See [Supported asset
  types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
  for more information.

### #asset_type=

    def asset_type=(value) -> ::String

**Parameter**

- **value** (::String) --- The type of the asset. Example: `compute.googleapis.com/Disk`


  See [Supported asset
  types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
  for more information.
**Returns**

- (::String) --- The type of the asset. Example: `compute.googleapis.com/Disk`


  See [Supported asset
  types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
  for more information.

### #relationship_type

    def relationship_type() -> ::String

**Returns**

- (::String) --- The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP`

### #relationship_type=

    def relationship_type=(value) -> ::String

**Parameter**

- **value** (::String) --- The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP`
**Returns**

- (::String) --- The unique identifier of the relationship type. Example: `INSTANCE_TO_INSTANCEGROUP`