# Compute V1 Client - Class Project (2.10.0)

2.10.0 (latest) 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.0.0 1.36.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.24.0 1.23.0 1.22.1 1.21.0 1.20.0 1.19.0 1.18.1 1.17.0 1.16.2 1.14.0 1.13.0 1.12.1 1.11.1 1.10.1 1.9.1 1.8.3 1.7.1 1.6.1 1.5.0 Reference documentation and code samples for the Compute V1 Client class Project.

Represents a Project resource.

A project is used to organize resources in a Google Cloud Platform
environment. For more information, read about the
Resource Hierarchy.

Generated from protobuf message `google.cloud.compute.v1.Project`

## Namespace

Google \\ Cloud \\ Compute \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ cloud_armor_tier` | `string` Output only. \[Output Only\] The Cloud Armor tier for this project. It can be one of the following values: CA_STANDARD,CA_ENTERPRISE_PAYGO. If this field is not specified, it is assumed to beCA_STANDARD. Check the CloudArmorTier enum for the list of possible values. |
| `↳ common_instance_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.Metadata` Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information. |
| `↳ creation_timestamp` | `string` \[Output Only\] Creation timestamp inRFC3339 text format. |
| `↳ default_network_tier` | `string` This signifies the default network tier used for configuring resources of the project and can only take the following values:PREMIUM, STANDARD. Initially the default network tier is PREMIUM. Check the DefaultNetworkTier enum for the list of possible values. |
| `↳ default_service_account` | `string` \[Output Only\] Default service account used by VMs running in this project. |
| `↳ description` | `string` An optional textual description of the resource. |
| `↳ enabled_features` | `string[]` An optional list of restricted features enabled for use on this project. |
| `↳ id` | `int|string` \[Output Only\] The unique identifier for the resource. This identifier is defined by the server. This is *not* the project ID, and is just a unique ID used by Compute Engine to identify resources. |
| `↳ kind` | `string` Output only. \[Output Only\] Type of the resource. Always compute#project for projects. |
| `↳ name` | `string` The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine. |
| `↳ quotas` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.Quota>` \[Output Only\] Quotas assigned to this project. |
| `↳ self_link` | `string` \[Output Only\] Server-defined URL for the resource. |
| `↳ usage_export_location` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.UsageExportLocation` An optional naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored. |
| `↳ vm_dns_setting` | `string` Output only. \[Output Only\] Default internal DNS setting used by VMs running in this project. Check the VmDnsSetting enum for the list of possible values. |
| `↳ xpn_project_status` | `string` \[Output Only\] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated. Check the XpnProjectStatus enum for the list of possible values. |

### getCloudArmorTier

Output only. \[Output Only\] The Cloud Armor tier for this project. It can be one of the
following values: CA_STANDARD,CA_ENTERPRISE_PAYGO.

If this field is not specified, it is assumed to beCA_STANDARD.
Check the CloudArmorTier enum for the list of possible values.

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

### hasCloudArmorTier

### clearCloudArmorTier

### setCloudArmorTier

Output only. \[Output Only\] The Cloud Armor tier for this project. It can be one of the
following values: CA_STANDARD,CA_ENTERPRISE_PAYGO.

If this field is not specified, it is assumed to beCA_STANDARD.
Check the CloudArmorTier enum for the list of possible values.

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

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

### getCommonInstanceMetadata

Metadata key/value pairs available to all instances contained in this
project. See Custom
metadata for more information.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.Metadata|null` |   |

### hasCommonInstanceMetadata

### clearCommonInstanceMetadata

### setCommonInstanceMetadata

Metadata key/value pairs available to all instances contained in this
project. See Custom
metadata for more information.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.Metadata` |

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

### getCreationTimestamp

\[Output Only\] Creation timestamp inRFC3339
text format.

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

### hasCreationTimestamp

### clearCreationTimestamp

### setCreationTimestamp

\[Output Only\] Creation timestamp inRFC3339
text format.

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

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

### getDefaultNetworkTier

This signifies the default network tier used for configuring resources of
the project and can only take the following values:PREMIUM, STANDARD. Initially the default network
tier is PREMIUM.

Check the DefaultNetworkTier enum for the list of possible values.

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

### hasDefaultNetworkTier

### clearDefaultNetworkTier

### setDefaultNetworkTier

This signifies the default network tier used for configuring resources of
the project and can only take the following values:PREMIUM, STANDARD. Initially the default network
tier is PREMIUM.

Check the DefaultNetworkTier enum for the list of possible values.

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

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

### getDefaultServiceAccount

\[Output Only\] Default service account used by VMs running in this project.

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

### hasDefaultServiceAccount

### clearDefaultServiceAccount

### setDefaultServiceAccount

\[Output Only\] Default service account used by VMs running in this project.

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

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

### getDescription

An optional textual description of the resource.

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

### hasDescription

### clearDescription

### setDescription

An optional textual description of the resource.

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

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

### getEnabledFeatures

An optional list of restricted features enabled for use on this project.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setEnabledFeatures

An optional list of restricted features enabled for use on this project.

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

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

### getId

\[Output Only\] The unique identifier for the resource. This identifier is
defined by the server. This is *not* the project ID, and is
just a unique ID used by Compute Engine to identify resources.

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

### hasId

### clearId

### setId

\[Output Only\] The unique identifier for the resource. This identifier is
defined by the server. This is *not* the project ID, and is
just a unique ID used by Compute Engine to identify resources.

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

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

### getKind

Output only. \[Output Only\] Type of the resource. Always compute#project for
projects.

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

### hasKind

### clearKind

### setKind

Output only. \[Output Only\] Type of the resource. Always compute#project for
projects.

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

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

### getName

The project ID. For example: my-example-project. Use the
project ID to make requests to Compute Engine.

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

### hasName

### clearName

### setName

The project ID. For example: my-example-project. Use the
project ID to make requests to Compute Engine.

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

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

### getQuotas

\[Output Only\] Quotas assigned to this project.

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

### setQuotas

\[Output Only\] Quotas assigned to this project.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.Quota>` |

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

### getSelfLink

\[Output Only\] Server-defined URL for the resource.

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

### hasSelfLink

### clearSelfLink

### setSelfLink

\[Output Only\] Server-defined URL for the resource.

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

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

### getUsageExportLocation

An optional naming prefix for daily usage reports and the Google Cloud
Storage bucket where they are stored.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.UsageExportLocation|null` |   |

### hasUsageExportLocation

### clearUsageExportLocation

### setUsageExportLocation

An optional naming prefix for daily usage reports and the Google Cloud
Storage bucket where they are stored.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.UsageExportLocation` |

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

### getVmDnsSetting

Output only. \[Output Only\] Default internal DNS setting used by VMs running in
this project.

Check the VmDnsSetting enum for the list of possible values.

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

### hasVmDnsSetting

### clearVmDnsSetting

### setVmDnsSetting

Output only. \[Output Only\] Default internal DNS setting used by VMs running in
this project.

Check the VmDnsSetting enum for the list of possible values.

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

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

### getXpnProjectStatus

\[Output Only\] The role this project has in a shared VPC configuration.

Currently, only projects with the host role, which is specified by the
value HOST, are differentiated.
Check the XpnProjectStatus enum for the list of possible values.

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

### hasXpnProjectStatus

### clearXpnProjectStatus

### setXpnProjectStatus

\[Output Only\] The role this project has in a shared VPC configuration.

Currently, only projects with the host role, which is specified by the
value HOST, are differentiated.
Check the XpnProjectStatus enum for the list of possible values.

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

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