Class SnapshotsConnection (2.21.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
TypeDescription
Options

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

Parameter
NameDescription
request google::cloud::cpp::compute::snapshots::v1::DeleteSnapshotRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
NameDescription
request google::cloud::cpp::compute::snapshots::v1::GetSnapshotRequest const &
Returns
TypeDescription
StatusOr< google::cloud::cpp::compute::v1::Snapshot >

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

Parameter
NameDescription
request google::cloud::cpp::compute::snapshots::v1::GetIamPolicyRequest const &
Returns
TypeDescription
StatusOr< google::cloud::cpp::compute::v1::Policy >

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

Parameter
NameDescription
request google::cloud::cpp::compute::snapshots::v1::InsertSnapshotRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
NameDescription
request google::cloud::cpp::compute::snapshots::v1::ListSnapshotsRequest
Returns
TypeDescription
StreamRange< google::cloud::cpp::compute::v1::Snapshot >

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

Parameter
NameDescription
request google::cloud::cpp::compute::snapshots::v1::SetIamPolicyRequest const &
Returns
TypeDescription
StatusOr< google::cloud::cpp::compute::v1::Policy >

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

Parameter
NameDescription
request google::cloud::cpp::compute::snapshots::v1::SetLabelsRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::cpp::compute::v1::Operation > >

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

Parameter
NameDescription
request google::cloud::cpp::compute::snapshots::v1::TestIamPermissionsRequest const &
Returns
TypeDescription
StatusOr< google::cloud::cpp::compute::v1::TestPermissionsResponse >