Class SnapshotsConnection (2.18.0)

This interface defines virtual methods for each of the user-facing overload sets in SnapshotsClient. This allows users to inject custom behavior (e.g., with a Google Mock object) when writing tests that use objects of type SnapshotsClient.

To create a concrete instance, see MakeSnapshotsConnection().

For mocking, see compute_snapshots_v1_mocks::MockSnapshotsConnection.

Functions

virtual options()

Returns
Type Description
Options

virtual DeleteSnapshot(google::cloud::cpp::compute::snapshots::v1::DeleteSnapshotRequest const &)

Parameter
Name Description
request google::cloud::cpp::compute::snapshots::v1::DeleteSnapshotRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

virtual GetSnapshot(google::cloud::cpp::compute::snapshots::v1::GetSnapshotRequest const &)

Parameter
Name Description
request google::cloud::cpp::compute::snapshots::v1::GetSnapshotRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Snapshot >

virtual GetIamPolicy(google::cloud::cpp::compute::snapshots::v1::GetIamPolicyRequest const &)

Parameter
Name Description
request google::cloud::cpp::compute::snapshots::v1::GetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Policy >

virtual InsertSnapshot(google::cloud::cpp::compute::snapshots::v1::InsertSnapshotRequest const &)

Parameter
Name Description
request google::cloud::cpp::compute::snapshots::v1::InsertSnapshotRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

virtual ListSnapshots(google::cloud::cpp::compute::snapshots::v1::ListSnapshotsRequest)

Parameter
Name Description
request google::cloud::cpp::compute::snapshots::v1::ListSnapshotsRequest
Returns
Type Description
StreamRange< google::cloud::cpp::compute::v1::Snapshot >

virtual SetIamPolicy(google::cloud::cpp::compute::snapshots::v1::SetIamPolicyRequest const &)

Parameter
Name Description
request google::cloud::cpp::compute::snapshots::v1::SetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::Policy >

virtual SetLabels(google::cloud::cpp::compute::snapshots::v1::SetLabelsRequest const &)

Parameter
Name Description
request google::cloud::cpp::compute::snapshots::v1::SetLabelsRequest const &
Returns
Type Description
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

virtual TestIamPermissions(google::cloud::cpp::compute::snapshots::v1::TestIamPermissionsRequest const &)

Parameter
Name Description
request google::cloud::cpp::compute::snapshots::v1::TestIamPermissionsRequest const &
Returns
Type Description
StatusOr< google::cloud::cpp::compute::v1::TestPermissionsResponse >