3.15.0-rc 3.14.2 (latest) 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 2.48.0-rc 2.47.1 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.0 2.22.1 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.1 Service for the projects resource.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects>

This client uses Projects version 2026-11-01.

###### Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal `std::shared_ptr<*Connection>` objects compare equal. Objects that compare equal share the same underlying resources.

###### Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

###### Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

## Constructors

### ProjectsClient(ProjectsClient const \&)

Copy and move support

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `ProjectsClient const &` |

### ProjectsClient(ProjectsClient \&\&)

Copy and move support

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `ProjectsClient &&` |

### ProjectsClient(std::shared_ptr\< ProjectsConnection \>, Options)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `connection` | `std::shared_ptr< ProjectsConnection >` |
| `opts` | `Options` |

## Operators

### operator=(ProjectsClient const \&)

Copy and move support

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `ProjectsClient const &` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ProjectsClient &` |   |

### operator=(ProjectsClient \&\&)

Copy and move support

| **Parameter** ||
|---|---|
| **Name** | **Description** |
|   | `ProjectsClient &&` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ProjectsClient &` |   |

## Functions

### DisableXpnHost(std::string const \&, Options)

Disable this project as a shared VPC host project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/disableXpnHost>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### DisableXpnHost(NoAwaitTag, std::string const \&, Options)

Disable this project as a shared VPC host project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### DisableXpnHost(google::cloud::cpp::compute::projects::v1::DisableXpnHostRequest const \&, Options)

Disable this project as a shared VPC host project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/disableXpnHost>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::DisableXpnHostRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.DisableXpnHostRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L258). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### DisableXpnHost(NoAwaitTag, google::cloud::cpp::compute::projects::v1::DisableXpnHostRequest const \&, Options)

Disable this project as a shared VPC host project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::DisableXpnHostRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### DisableXpnHost(google::cloud::cpp::compute::v1::Operation const \&, Options)

Disable this project as a shared VPC host project.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### DisableXpnResource(std::string const \&, google::cloud::cpp::compute::v1::ProjectsDisableXpnResourceRequest const \&, Options)

Disable a service resource (also known as service project) associated with this host project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/disableXpnResource>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `projects_disable_xpn_resource_request_resource` | `google::cloud::cpp::compute::v1::ProjectsDisableXpnResourceRequest const &` The ProjectsDisableXpnResourceRequest for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### DisableXpnResource(NoAwaitTag, std::string const \&, google::cloud::cpp::compute::v1::ProjectsDisableXpnResourceRequest const \&, Options)

Disable a service resource (also known as service project) associated with this host project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `projects_disable_xpn_resource_request_resource` | `google::cloud::cpp::compute::v1::ProjectsDisableXpnResourceRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### DisableXpnResource(google::cloud::cpp::compute::projects::v1::DisableXpnResourceRequest const \&, Options)

Disable a service resource (also known as service project) associated with this host project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/disableXpnResource>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::DisableXpnResourceRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.DisableXpnResourceRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L283). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### DisableXpnResource(NoAwaitTag, google::cloud::cpp::compute::projects::v1::DisableXpnResourceRequest const \&, Options)

Disable a service resource (also known as service project) associated with this host project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::DisableXpnResourceRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### DisableXpnResource(google::cloud::cpp::compute::v1::Operation const \&, Options)

Disable a service resource (also known as service project) associated with this host project.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### EnableXpnHost(std::string const \&, Options)

Enable this project as a shared VPC host project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/enableXpnHost>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### EnableXpnHost(NoAwaitTag, std::string const \&, Options)

Enable this project as a shared VPC host project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### EnableXpnHost(google::cloud::cpp::compute::projects::v1::EnableXpnHostRequest const \&, Options)

Enable this project as a shared VPC host project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/enableXpnHost>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::EnableXpnHostRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.EnableXpnHostRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L313). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### EnableXpnHost(NoAwaitTag, google::cloud::cpp::compute::projects::v1::EnableXpnHostRequest const \&, Options)

Enable this project as a shared VPC host project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::EnableXpnHostRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### EnableXpnHost(google::cloud::cpp::compute::v1::Operation const \&, Options)

Enable this project as a shared VPC host project.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### EnableXpnResource(std::string const \&, google::cloud::cpp::compute::v1::ProjectsEnableXpnResourceRequest const \&, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/enableXpnResource>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `projects_enable_xpn_resource_request_resource` | `google::cloud::cpp::compute::v1::ProjectsEnableXpnResourceRequest const &` The ProjectsEnableXpnResourceRequest for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### EnableXpnResource(NoAwaitTag, std::string const \&, google::cloud::cpp::compute::v1::ProjectsEnableXpnResourceRequest const \&, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `projects_enable_xpn_resource_request_resource` | `google::cloud::cpp::compute::v1::ProjectsEnableXpnResourceRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### EnableXpnResource(google::cloud::cpp::compute::projects::v1::EnableXpnResourceRequest const \&, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/enableXpnResource>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::EnableXpnResourceRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.EnableXpnResourceRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L338). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### EnableXpnResource(NoAwaitTag, google::cloud::cpp::compute::projects::v1::EnableXpnResourceRequest const \&, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::EnableXpnResourceRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### EnableXpnResource(google::cloud::cpp::compute::v1::Operation const \&, Options)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### GetProject(std::string const \&, Options)

Returns the specified [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) resource.
To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the `quotas` field). To exclude one or more fields, set your request's `fields` query parameter to only include the fields you need. For example, to only include the `id` and `selfLink` fields, add the query parameter `?fields=id,selfLink` to your request. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/get>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Project >` | the result of the RPC. The response message type ([google.cloud.cpp.compute.v1.Project](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_116.proto#L32)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### GetProject(google::cloud::cpp::compute::projects::v1::GetProjectRequest const \&, Options)

Returns the specified [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) resource.
To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the `quotas` field). To exclude one or more fields, set your request's `fields` query parameter to only include the fields you need. For example, to only include the `id` and `selfLink` fields, add the query parameter `?fields=id,selfLink` to your request. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/get>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::GetProjectRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.GetProjectRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L368). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Project >` | the result of the RPC. The response message type ([google.cloud.cpp.compute.v1.Project](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_116.proto#L32)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### GetXpnHost(std::string const \&, Options)

Gets the shared VPC host project that this project links to.
May be empty if no link exists. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/getXpnHost>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Project >` | the result of the RPC. The response message type ([google.cloud.cpp.compute.v1.Project](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_116.proto#L32)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### GetXpnHost(google::cloud::cpp::compute::projects::v1::GetXpnHostRequest const \&, Options)

Gets the shared VPC host project that this project links to.
May be empty if no link exists. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/getXpnHost>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::GetXpnHostRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.GetXpnHostRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L375). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Project >` | the result of the RPC. The response message type ([google.cloud.cpp.compute.v1.Project](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_116.proto#L32)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### GetXpnResources(std::string const \&, Options)

Gets service resources (a.k.a service project) associated with this host project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/getXpnResources>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::ProjectsGetXpnResources >` | the result of the RPC. The response message type ([google.cloud.cpp.compute.v1.ProjectsGetXpnResources](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_035.proto#L74)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### GetXpnResources(google::cloud::cpp::compute::projects::v1::GetXpnResourcesRequest const \&, Options)

Gets service resources (a.k.a service project) associated with this host project.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/getXpnResources>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::GetXpnResourcesRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.GetXpnResourcesRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L382). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::ProjectsGetXpnResources >` | the result of the RPC. The response message type ([google.cloud.cpp.compute.v1.ProjectsGetXpnResources](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_035.proto#L74)) is mapped to a C++ class using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). If the request fails, the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) contains the error details. |

### ListXpnHosts(std::string const \&, google::cloud::cpp::compute::v1::ProjectsListXpnHostsRequest const \&, Options)

Lists all shared VPC host projects visible to the user in an organization.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/listXpnHosts>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `projects_list_xpn_hosts_request_resource` | `google::cloud::cpp::compute::v1::ProjectsListXpnHostsRequest const &` The ProjectsListXpnHostsRequest for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StreamRange< google::cloud::cpp::compute::v1::Project >` | a [StreamRange](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StreamRange.md.txt) to iterate of the results. See the documentation of this type for details. In brief, this class has `begin()` and `end()` member functions returning a iterator class meeting the [input iterator requirements](https://en.cppreference.com/w/cpp/named_req/InputIterator). The value type for this iterator is a [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt)`<T>` contains elements of type [google.cloud.cpp.compute.v1.Project](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_116.proto#L32), or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### ListXpnHosts(google::cloud::cpp::compute::projects::v1::ListXpnHostsRequest, Options)

Lists all shared VPC host projects visible to the user in an organization.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/listXpnHosts>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::ListXpnHostsRequest` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.ListXpnHostsRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L476). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StreamRange< google::cloud::cpp::compute::v1::Project >` | a [StreamRange](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StreamRange.md.txt) to iterate of the results. See the documentation of this type for details. In brief, this class has `begin()` and `end()` member functions returning a iterator class meeting the [input iterator requirements](https://en.cppreference.com/w/cpp/named_req/InputIterator). The value type for this iterator is a [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt)`<T>` contains elements of type [google.cloud.cpp.compute.v1.Project](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/v1/internal/common_116.proto#L32), or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### MoveDisk(std::string const \&, google::cloud::cpp::compute::v1::DiskMoveRequest const \&, Options)

Moves a persistent disk from one zone to another.
*Note*: The moveDisk API will be deprecated on September 29, 2026.

Starting September 29, 2025, you can't use the moveDisk API on new projects. To move a disk to a different region or zone, follow the steps in [Change the location of a disk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).

Projects that already use the moveDisk API can continue usage until September 29, 2026.

Starting November 1, 2025, API responses will include a warning message in the response body about the upcoming deprecation. You can skip the message to continue using the service without interruption. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/moveDisk>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `disk_move_request_resource` | `google::cloud::cpp::compute::v1::DiskMoveRequest const &` The DiskMoveRequest for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### MoveDisk(NoAwaitTag, std::string const \&, google::cloud::cpp::compute::v1::DiskMoveRequest const \&, Options)

Moves a persistent disk from one zone to another.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `disk_move_request_resource` | `google::cloud::cpp::compute::v1::DiskMoveRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### MoveDisk(google::cloud::cpp::compute::projects::v1::MoveDiskRequest const \&, Options)

Moves a persistent disk from one zone to another.
*Note*: The moveDisk API will be deprecated on September 29, 2026.

Starting September 29, 2025, you can't use the moveDisk API on new projects. To move a disk to a different region or zone, follow the steps in [Change the location of a disk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).

Projects that already use the moveDisk API can continue usage until September 29, 2026.

Starting November 1, 2025, API responses will include a warning message in the response body about the upcoming deprecation. You can skip the message to continue using the service without interruption. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/moveDisk>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::MoveDiskRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.MoveDiskRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L575). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### MoveDisk(NoAwaitTag, google::cloud::cpp::compute::projects::v1::MoveDiskRequest const \&, Options)

Moves a persistent disk from one zone to another.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::MoveDiskRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### MoveDisk(google::cloud::cpp::compute::v1::Operation const \&, Options)

Moves a persistent disk from one zone to another.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### MoveInstance(std::string const \&, google::cloud::cpp::compute::v1::InstanceMoveRequest const \&, Options)

Moves an instance and its attached persistent disks from one zone to another.
*Note*: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the \[known

issue\](<https://cloud.google.com/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior>). \[Deprecated\] This method is deprecated. See [moving instance across zones](https://cloud.google.com/compute/docs/instances/moving-instance-across-zones) instead. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/moveInstance>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `instance_move_request_resource` | `google::cloud::cpp::compute::v1::InstanceMoveRequest const &` The InstanceMoveRequest for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### MoveInstance(NoAwaitTag, std::string const \&, google::cloud::cpp::compute::v1::InstanceMoveRequest const \&, Options)

Moves an instance and its attached persistent disks from one zone to another.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `instance_move_request_resource` | `google::cloud::cpp::compute::v1::InstanceMoveRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### MoveInstance(google::cloud::cpp::compute::projects::v1::MoveInstanceRequest const \&, Options)

Moves an instance and its attached persistent disks from one zone to another.
*Note*: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the \[known

issue\](<https://cloud.google.com/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior>). \[Deprecated\] This method is deprecated. See [moving instance across zones](https://cloud.google.com/compute/docs/instances/moving-instance-across-zones) instead. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/moveInstance>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::MoveInstanceRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.MoveInstanceRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L604). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### MoveInstance(NoAwaitTag, google::cloud::cpp::compute::projects::v1::MoveInstanceRequest const \&, Options)

Moves an instance and its attached persistent disks from one zone to another.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::MoveInstanceRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### MoveInstance(google::cloud::cpp::compute::v1::Operation const \&, Options)

Moves an instance and its attached persistent disks from one zone to another.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### SetCloudArmorTier(std::string const \&, google::cloud::cpp::compute::v1::ProjectsSetCloudArmorTierRequest const \&, Options)

Sets the Cloud Armor tier of the project.
To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/setCloudArmorTier>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `projects_set_cloud_armor_tier_request_resource` | `google::cloud::cpp::compute::v1::ProjectsSetCloudArmorTierRequest const &` The ProjectsSetCloudArmorTierRequest for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetCloudArmorTier(NoAwaitTag, std::string const \&, google::cloud::cpp::compute::v1::ProjectsSetCloudArmorTierRequest const \&, Options)

Sets the Cloud Armor tier of the project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `projects_set_cloud_armor_tier_request_resource` | `google::cloud::cpp::compute::v1::ProjectsSetCloudArmorTierRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetCloudArmorTier(google::cloud::cpp::compute::projects::v1::SetCloudArmorTierRequest const \&, Options)

Sets the Cloud Armor tier of the project.
To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/setCloudArmorTier>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::SetCloudArmorTierRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.SetCloudArmorTierRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L633). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetCloudArmorTier(NoAwaitTag, google::cloud::cpp::compute::projects::v1::SetCloudArmorTierRequest const \&, Options)

Sets the Cloud Armor tier of the project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::SetCloudArmorTierRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetCloudArmorTier(google::cloud::cpp::compute::v1::Operation const \&, Options)

Sets the Cloud Armor tier of the project.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### SetCommonInstanceMetadata(std::string const \&, google::cloud::cpp::compute::v1::Metadata const \&, Options)

Sets metadata common to all instances within the specified project using the data included in the request.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/setCommonInstanceMetadata>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `metadata_resource` | `google::cloud::cpp::compute::v1::Metadata const &` The Metadata for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetCommonInstanceMetadata(NoAwaitTag, std::string const \&, google::cloud::cpp::compute::v1::Metadata const \&, Options)

Sets metadata common to all instances within the specified project using the data included in the request.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `metadata_resource` | `google::cloud::cpp::compute::v1::Metadata const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetCommonInstanceMetadata(google::cloud::cpp::compute::projects::v1::SetCommonInstanceMetadataRequest const \&, Options)

Sets metadata common to all instances within the specified project using the data included in the request.
<https://cloud.google.com/compute/docs/reference/rest/v1/projects/setCommonInstanceMetadata>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::SetCommonInstanceMetadataRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.SetCommonInstanceMetadataRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L663). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetCommonInstanceMetadata(NoAwaitTag, google::cloud::cpp::compute::projects::v1::SetCommonInstanceMetadataRequest const \&, Options)

Sets metadata common to all instances within the specified project using the data included in the request.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::SetCommonInstanceMetadataRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetCommonInstanceMetadata(google::cloud::cpp::compute::v1::Operation const \&, Options)

Sets metadata common to all instances within the specified project using the data included in the request.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### SetDefaultNetworkTier(std::string const \&, google::cloud::cpp::compute::v1::ProjectsSetDefaultNetworkTierRequest const \&, Options)

Sets the default network tier of the project.
The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/setDefaultNetworkTier>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `projects_set_default_network_tier_request_resource` | `google::cloud::cpp::compute::v1::ProjectsSetDefaultNetworkTierRequest const &` The ProjectsSetDefaultNetworkTierRequest for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetDefaultNetworkTier(NoAwaitTag, std::string const \&, google::cloud::cpp::compute::v1::ProjectsSetDefaultNetworkTierRequest const \&, Options)

Sets the default network tier of the project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `projects_set_default_network_tier_request_resource` | `google::cloud::cpp::compute::v1::ProjectsSetDefaultNetworkTierRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetDefaultNetworkTier(google::cloud::cpp::compute::projects::v1::SetDefaultNetworkTierRequest const \&, Options)

Sets the default network tier of the project.
The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/setDefaultNetworkTier>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::SetDefaultNetworkTierRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.SetDefaultNetworkTierRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L692). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetDefaultNetworkTier(NoAwaitTag, google::cloud::cpp::compute::projects::v1::SetDefaultNetworkTierRequest const \&, Options)

Sets the default network tier of the project.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::SetDefaultNetworkTierRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetDefaultNetworkTier(google::cloud::cpp::compute::v1::Operation const \&, Options)

Sets the default network tier of the project.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |

### SetUsageExportBucket(std::string const \&, google::cloud::cpp::compute::v1::UsageExportLocation const \&, Options)

Enables the usage export feature and sets theusage export bucket where reports are stored.
If you provide an empty request body using this method, the usage export feature will be disabled. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/setUsageExportBucket>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `std::string const &` [Project](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Project.md.txt) ID for this request. |
| `usage_export_location_resource` | `google::cloud::cpp::compute::v1::UsageExportLocation const &` The UsageExportLocation for this request. |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetUsageExportBucket(NoAwaitTag, std::string const \&, google::cloud::cpp::compute::v1::UsageExportLocation const \&, Options)

Enables the usage export feature and sets theusage export bucket where reports are stored.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `project` | `std::string const &` |
| `usage_export_location_resource` | `google::cloud::cpp::compute::v1::UsageExportLocation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetUsageExportBucket(google::cloud::cpp::compute::projects::v1::SetUsageExportBucketRequest const \&, Options)

Enables the usage export feature and sets theusage export bucket where reports are stored.
If you provide an empty request body using this method, the usage export feature will be disabled. <https://cloud.google.com/compute/docs/reference/rest/v1/projects/setUsageExportBucket>

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `google::cloud::cpp::compute::projects::v1::SetUsageExportBucketRequest const &` Unary RPCs, such as the one wrapped by this function, receive a single `request` proto message which includes all the inputs for the RPC. In this case, the proto message is a [google.cloud.cpp.compute.projects.v1.SetUsageExportBucketRequest](https://github.com/googleapis/google-cloud-cpp/blob/42aafa2393f2217ea76a7937a1ebfb6629d732bb/google/cloud/compute/projects/v1/projects.proto#L722). Proto messages are converted to C++ classes by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |
| `opts` | `Options` Optional. Override the class-level options, such as retry and backoff policies. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` | A [`future`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1future.md.txt) that becomes satisfied when the LRO ([Long Running Operation](http://cloud/compute/docs/api/how-tos/api-requests-responses#handling_api_responses)) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the [`StatusOr`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1StatusOr.md.txt) returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a \[google.cloud.cpp.compute.v1.Operation\] proto message. The C++ class representing this message is created by Protobuf, using the [Protobuf mapping rules](https://protobuf.dev/reference/cpp/cpp-generated/). |

### SetUsageExportBucket(NoAwaitTag, google::cloud::cpp::compute::projects::v1::SetUsageExportBucketRequest const \&, Options)

Enables the usage export feature and sets theusage export bucket where reports are stored.
Specifying the [`NoAwaitTag`](https://docs.cloud.google.com/cpp/docs/reference/common/latest/structgoogle_1_1cloud_1_1NoAwaitTag.md.txt) immediately returns the \[`google::cloud::cpp::compute::v1::Operation`\] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
|   | `NoAwaitTag` |
| `request` | `google::cloud::cpp::compute::projects::v1::SetUsageExportBucketRequest const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `StatusOr< google::cloud::cpp::compute::v1::Operation >` |   |

### SetUsageExportBucket(google::cloud::cpp::compute::v1::Operation const \&, Options)

Enables the usage export feature and sets theusage export bucket where reports are stored.
This method accepts a `google::cloud::cpp::compute::v1::Operation` that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operation` | `google::cloud::cpp::compute::v1::Operation const &` |
| `opts` | `Options` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `future< StatusOr< google::cloud::cpp::compute::v1::Operation > >` |   |