# Google Cloud Database Center V1beta Client - Class DatabaseResource (0.7.0)

0.7.0 (latest) 0.6.0 0.5.0 0.4.1 0.3.1 0.2.0 0.1.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Database Center V1beta Client class DatabaseResource.

DatabaseResource represents every individually configured database unit
representing compute and/or storage.

Generated from protobuf message `google.cloud.databasecenter.v1beta.DatabaseResource`

## Namespace

Google \\ Cloud \\ DatabaseCenter \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ child_resources` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.DatabaseResource>` List of children associated with a database group. |
| `↳ full_resource_name` | `string` The full resource name, based on CAIS resource name format <https://cloud.google.com/asset-inventory/docs/resource-name-format> Example: `//cloudsql.googleapis.com/projects/project-number/instances/mysql-1` `//cloudsql.googleapis.com/projects/project-number/instances/postgres-1` `//spanner.googleapis.com/projects/project-number/instances/spanner-instance-1` `//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1` `//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1/instances/i1` |
| `↳ container` | `string` Specifies where the resource is created. For Google Cloud resources, it is the full name of the project. |
| `↳ product` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Product` The product this resource represents. |
| `↳ location` | `string` The location of the resources. It supports returning only regional locations in Google Cloud. These are of the form: "us-central1", "us-east1", etc. See <https://cloud.google.com/about/locations> for a list of such regions. |
| `↳ labels` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Label>` Labels applied on the resource. The requirements for labels assigned to Google Cloud resources may be found at <https://cloud.google.com/resource-manager/docs/labels-overview#requirements> |
| `↳ tags` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Tag>` Tags applied on the resource. The requirements for tags assigned to Google Cloud resources may be found at <https://cloud.google.com/resource-manager/docs/tags/tags-overview> |
| `↳ resource_type` | `string` The type of resource defined according to the pattern: {Service Name}/{Type}. Ex: sqladmin.googleapis.com/Instance alloydb.googleapis.com/Cluster alloydb.googleapis.com/Instance spanner.googleapis.com/Instance |
| `↳ sub_resource_type` | `int` Subtype of the resource specified at creation time. |
| `↳ machine_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.MachineConfig` Machine configuration like CPU, memory, etc for the resource. |
| `↳ signal_groups` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.SignalGroup>` The list of signal groups and count of issues related to the resource. Only those signals which have been requested would be included. |
| `↳ metrics` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Metrics` Observable metrics for the resource e.g. CPU utilization, memory utilization, etc. |
| `↳ resource_category` | `int` The category of the resource. |
| `↳ resource_name` | `string` The name of the resource(The last part of the full resource name). Example: For full resource name - `//cloudsql.googleapis.com/projects/project-number/instances/mysql-1`, resource name - `mysql-1` For full resource name - `//cloudsql.googleapis.com/projects/project-number/instances/postgres-1` , resource name - `postgres-1` Note: In some cases, there might be more than one resource with the same resource name. |
| `↳ backupdr_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.BackupDRConfig` Optional. Backup and disaster recovery details for the resource. |
| `↳ edition` | `int` The edition of the resource. |
| `↳ maintenance_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.MaintenanceInfo` Optional. The maintenance information of the resource. |
| `↳ affiliations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Affiliation>` Optional. Affiliation details of the resource. |

### getChildResources

List of children associated with a database group.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.DatabaseResource>` |   |

### setChildResources

List of children associated with a database group.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.DatabaseResource>` |

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

### getFullResourceName

The full resource name, based on CAIS resource name format
<https://cloud.google.com/asset-inventory/docs/resource-name-format>
Example:
`//cloudsql.googleapis.com/projects/project-number/instances/mysql-1`
`//cloudsql.googleapis.com/projects/project-number/instances/postgres-1`
`//spanner.googleapis.com/projects/project-number/instances/spanner-instance-1`
`//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1`
`//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1/instances/i1`

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

### setFullResourceName

The full resource name, based on CAIS resource name format
<https://cloud.google.com/asset-inventory/docs/resource-name-format>
Example:
`//cloudsql.googleapis.com/projects/project-number/instances/mysql-1`
`//cloudsql.googleapis.com/projects/project-number/instances/postgres-1`
`//spanner.googleapis.com/projects/project-number/instances/spanner-instance-1`
`//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1`
`//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1/instances/i1`

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

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

### getContainer

Specifies where the resource is created. For Google Cloud resources, it is
the full name of the project.

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

### setContainer

Specifies where the resource is created. For Google Cloud resources, it is
the full name of the project.

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

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

### getProduct

The product this resource represents.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Product|null` |   |

### hasProduct

### clearProduct

### setProduct

The product this resource represents.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Product` |

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

### getLocation

The location of the resources. It supports returning only regional
locations in Google Cloud. These are of the form: "us-central1",
"us-east1", etc. See <https://cloud.google.com/about/locations> for a list of
such regions.

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

### setLocation

The location of the resources. It supports returning only regional
locations in Google Cloud. These are of the form: "us-central1",
"us-east1", etc. See <https://cloud.google.com/about/locations> for a list of
such regions.

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

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

### getLabels

Labels applied on the resource. The requirements for labels assigned to
Google Cloud resources may be found at
<https://cloud.google.com/resource-manager/docs/labels-overview#requirements>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Label>` |   |

### setLabels

Labels applied on the resource. The requirements for labels assigned to
Google Cloud resources may be found at
<https://cloud.google.com/resource-manager/docs/labels-overview#requirements>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Label>` |

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

### getTags

Tags applied on the resource. The requirements for tags assigned to
Google Cloud resources may be found at
<https://cloud.google.com/resource-manager/docs/tags/tags-overview>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Tag>` |   |

### setTags

Tags applied on the resource. The requirements for tags assigned to
Google Cloud resources may be found at
<https://cloud.google.com/resource-manager/docs/tags/tags-overview>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Tag>` |

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

### getResourceType

The type of resource defined according to the pattern:
{Service Name}/{Type}. Ex:
sqladmin.googleapis.com/Instance
alloydb.googleapis.com/Cluster
alloydb.googleapis.com/Instance
spanner.googleapis.com/Instance

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

### setResourceType

The type of resource defined according to the pattern:
{Service Name}/{Type}. Ex:
sqladmin.googleapis.com/Instance
alloydb.googleapis.com/Cluster
alloydb.googleapis.com/Instance
spanner.googleapis.com/Instance

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

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

### getSubResourceType

Subtype of the resource specified at creation time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SubResourceType](https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.SubResourceType). |

### setSubResourceType

Subtype of the resource specified at creation time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [SubResourceType](https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.SubResourceType). |

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

### getMachineConfig

Machine configuration like CPU, memory, etc for the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.MachineConfig|null` |   |

### hasMachineConfig

### clearMachineConfig

### setMachineConfig

Machine configuration like CPU, memory, etc for the resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.MachineConfig` |

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

### getSignalGroups

The list of signal groups and count of issues related to the resource.

Only those signals which have been requested would be included.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.SignalGroup>` |   |

### setSignalGroups

The list of signal groups and count of issues related to the resource.

Only those signals which have been requested would be included.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.SignalGroup>` |

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

### getMetrics

Observable metrics for the resource e.g. CPU utilization, memory
utilization, etc.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Metrics|null` |   |

### hasMetrics

### clearMetrics

### setMetrics

Observable metrics for the resource e.g. CPU utilization, memory
utilization, etc.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Metrics` |

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

### getResourceCategory

The category of the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ResourceCategory](https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.ResourceCategory). |

### setResourceCategory

The category of the resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ResourceCategory](https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.ResourceCategory). |

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

### getResourceName

The name of the resource(The last part of the full resource name).

Example:
For full resource name -
`//cloudsql.googleapis.com/projects/project-number/instances/mysql-1`,
resource name - `mysql-1`
For full resource name -
`//cloudsql.googleapis.com/projects/project-number/instances/postgres-1` ,
resource name - `postgres-1`
Note: In some cases, there might be more than one resource with the same
resource name.

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

### setResourceName

The name of the resource(The last part of the full resource name).

Example:
For full resource name -
`//cloudsql.googleapis.com/projects/project-number/instances/mysql-1`,
resource name - `mysql-1`
For full resource name -
`//cloudsql.googleapis.com/projects/project-number/instances/postgres-1` ,
resource name - `postgres-1`
Note: In some cases, there might be more than one resource with the same
resource name.

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

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

### getBackupdrConfig

Optional. Backup and disaster recovery details for the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.BackupDRConfig|null` |   |

### hasBackupdrConfig

### clearBackupdrConfig

### setBackupdrConfig

Optional. Backup and disaster recovery details for the resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.BackupDRConfig` |

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

### getEdition

The edition of the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Edition](https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Edition). |

### setEdition

The edition of the resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Edition](https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Edition). |

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

### getMaintenanceInfo

Optional. The maintenance information of the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.MaintenanceInfo|null` |   |

### hasMaintenanceInfo

### clearMaintenanceInfo

### setMaintenanceInfo

Optional. The maintenance information of the resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.MaintenanceInfo` |

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

### getAffiliations

Optional. Affiliation details of the resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Affiliation>` |   |

### setAffiliations

Optional. Affiliation details of the resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-databasecenter/latest/V1beta.Affiliation>` |

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