# Google Cloud Policy Troubleshooter Iam V3 Client - Class Resource (0.4.4)

0.4.4 (latest) 0.4.3 0.3.1 0.2.9 0.1.2 Reference documentation and code samples for the Google Cloud Policy Troubleshooter Iam V3 Client class Resource.

Core attributes for a resource. A resource is an
addressable (named) entity provided by the destination service. For
example, a Compute Engine instance.

Generated from protobuf message `google.cloud.policytroubleshooter.iam.v3.ConditionContext.Resource`

## Namespace

Google \\ Cloud \\ PolicyTroubleshooter \\ Iam \\ V3 \\ ConditionContext

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ service` | `string` The name of the service that this resource belongs to, such as `compute.googleapis.com`. The service name might not match the DNS hostname that actually serves the request. For a full list of resource service values, see <https://cloud.google.com/iam/help/conditions/resource-services> |
| `↳ name` | `string` The stable identifier (name) of a resource on the `service`. A resource can be logically identified as `//{resource.service}/{resource.name}`. Unlike the resource URI, the resource name doesn't contain any protocol and version information. For a list of full resource name formats, see <https://cloud.google.com/iam/help/troubleshooter/full-resource-names> |
| `↳ type` | `string` The type of the resource, in the format `{service}/{kind}`. For a full list of resource type values, see <https://cloud.google.com/iam/help/conditions/resource-types> |

### getService

The name of the service that this resource belongs to, such as
`compute.googleapis.com`. The service name might not match the DNS
hostname that actually serves the request.

For a full list of resource service values, see
<https://cloud.google.com/iam/help/conditions/resource-services>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setService

The name of the service that this resource belongs to, such as
`compute.googleapis.com`. The service name might not match the DNS
hostname that actually serves the request.

For a full list of resource service values, see
<https://cloud.google.com/iam/help/conditions/resource-services>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getName

The stable identifier (name) of a resource on the `service`. A resource
can be logically identified as `//{resource.service}/{resource.name}`.

Unlike the resource URI, the resource name doesn't contain any protocol
and version information.
For a list of full resource name formats, see
<https://cloud.google.com/iam/help/troubleshooter/full-resource-names>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

The stable identifier (name) of a resource on the `service`. A resource
can be logically identified as `//{resource.service}/{resource.name}`.

Unlike the resource URI, the resource name doesn't contain any protocol
and version information.
For a list of full resource name formats, see
<https://cloud.google.com/iam/help/troubleshooter/full-resource-names>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getType

The type of the resource, in the format `{service}/{kind}`.

For a full list of resource type values, see
<https://cloud.google.com/iam/help/conditions/resource-types>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setType

The type of the resource, in the format `{service}/{kind}`.

For a full list of resource type values, see
<https://cloud.google.com/iam/help/conditions/resource-types>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |