0.9.0 (latest) 0.8.0 0.7.2 0.5.0 0.4.0 0.3.0 0.2.3 0.1.2 Reference documentation and code samples for the Google Cloud Chronicle Client class Resource.

Information about a resource such as a task, Cloud Storage
bucket, database, disk, logical policy, or something similar.

Generated from protobuf message `google.backstory.Resource`

## Namespace

Google \\ Backstory

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `string` Deprecated: use resource_type instead. |
| `↳ resource_type` | `int` Resource type. |
| `↳ resource_subtype` | `string` Resource sub-type (e.g. "BigQuery", "Bigtable"). |
| `↳ id` | `string` Deprecated: Use resource.name or resource.product_object_id. |
| `↳ name` | `string` The full name of the resource. For example, Google Cloud: //cloudresourcemanager.googleapis.com/projects/wombat-123, and AWS: arn:aws:iam::123456789012:user/johndoe. |
| `↳ parent` | `string` The parent of the resource. For a database table, the parent is the database. For a storage object, the bucket name. Deprecated: use resource_ancestors.name. |
| `↳ product_object_id` | `string` A vendor-specific identifier to uniquely identify the entity (a GUID, OID, or similar) This field can be used as an entity indicator for a Resource entity. |
| `↳ attribute` | `Attribute` Generic entity metadata attributes of the resource. |
| `↳ scheduled_task` | `ScheduledTask` DEPRECATED: use windows_scheduled_task for Windows scheduled tasks or scheduled_cron_task for cron jobs. Information about a scheduled task associated with the resource. |
| `↳ scheduled_cron_task` | `ScheduledCronTask` Information about a scheduled cron task associated with the resource. |
| `↳ scheduled_anacron_task` | `ScheduledAnacronTask` Information about a scheduled anacron task associated with the resource. |
| `↳ windows_scheduled_task` | `WindowsScheduledTask` Information about a Windows scheduled task associated with the resource. |
| `↳ volume` | `Volume` Information about a storage volume associated with the resource. |
| `↳ service` | `Service` Information about a Windows service associated with the resource. |

### getType

Deprecated: use resource_type instead.

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

### setType

Deprecated: use resource_type instead.

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

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

### getResourceType

Resource type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ResourceType](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/Backstory.Resource.ResourceType.md.txt). |

### setResourceType

Resource type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ResourceType](https://docs.cloud.google.com/php/docs/reference/cloud-chronicle/latest/Backstory.Resource.ResourceType.md.txt). |

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

### getResourceSubtype

Resource sub-type (e.g. "BigQuery", "Bigtable").

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

### setResourceSubtype

Resource sub-type (e.g. "BigQuery", "Bigtable").

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

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

### getId

Deprecated: Use resource.name or resource.product_object_id.

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

### setId

Deprecated: Use resource.name or resource.product_object_id.

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

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

### getName

The full name of the resource. For example,
Google Cloud: //cloudresourcemanager.googleapis.com/projects/wombat-123,
and AWS: arn:aws:iam::123456789012:user/johndoe.

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

### setName

The full name of the resource. For example,
Google Cloud: //cloudresourcemanager.googleapis.com/projects/wombat-123,
and AWS: arn:aws:iam::123456789012:user/johndoe.

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

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

### getParent

The parent of the resource.

For a database table, the parent is the database. For a storage object,
the bucket name. Deprecated: use resource_ancestors.name.

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

### setParent

The parent of the resource.

For a database table, the parent is the database. For a storage object,
the bucket name. Deprecated: use resource_ancestors.name.

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

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

### getProductObjectId

A vendor-specific identifier to uniquely identify the entity (a GUID,
OID, or similar)
This field can be used as an entity indicator for a Resource entity.

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

### setProductObjectId

A vendor-specific identifier to uniquely identify the entity (a GUID,
OID, or similar)
This field can be used as an entity indicator for a Resource entity.

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

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

### getAttribute

Generic entity metadata attributes of the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Attribute|null` |   |

### hasAttribute

### clearAttribute

### setAttribute

Generic entity metadata attributes of the resource.

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

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

### getScheduledTask

DEPRECATED: use windows_scheduled_task for Windows scheduled tasks or
scheduled_cron_task for cron jobs.

Information about a scheduled task associated with the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ScheduledTask|null` |   |

### hasScheduledTask

### clearScheduledTask

### setScheduledTask

DEPRECATED: use windows_scheduled_task for Windows scheduled tasks or
scheduled_cron_task for cron jobs.

Information about a scheduled task associated with the resource.

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

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

### getScheduledCronTask

Information about a scheduled cron task associated with the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ScheduledCronTask|null` |   |

### hasScheduledCronTask

### clearScheduledCronTask

### setScheduledCronTask

Information about a scheduled cron task associated with the resource.

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

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

### getScheduledAnacronTask

Information about a scheduled anacron task associated with the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ScheduledAnacronTask|null` |   |

### hasScheduledAnacronTask

### clearScheduledAnacronTask

### setScheduledAnacronTask

Information about a scheduled anacron task associated with the resource.

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

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

### getWindowsScheduledTask

Information about a Windows scheduled task associated with the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `WindowsScheduledTask|null` |   |

### hasWindowsScheduledTask

### clearWindowsScheduledTask

### setWindowsScheduledTask

Information about a Windows scheduled task associated with the resource.

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

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

### getVolume

Information about a storage volume associated with the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Volume|null` |   |

### hasVolume

### clearVolume

### setVolume

Information about a storage volume associated with the resource.

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

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

### getService

Information about a Windows service associated with the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Service|null` |   |

### hasService

### clearService

### setService

Information about a Windows service associated with the resource.

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

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