* $baremetalsolutionService = new Google\Service\Baremetalsolution(...); * $snapshots = $baremetalsolutionService->snapshots; * */ class ProjectsLocationsVolumesSnapshots extends \Google\Service\Resource { /** * Create a storage volume snapshot in a containing volume. (snapshots.create) * * @param string $parent Required. The volume to snapshot. * @param VolumeSnapshot $postBody * @param array $optParams Optional parameters. * @return VolumeSnapshot */ public function create($parent, VolumeSnapshot $postBody, $optParams = []) { $params = ['parent' => $parent, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('create', [$params], VolumeSnapshot::class); } /** * Deletes a storage volume snapshot for a given volume. (snapshots.delete) * * @param string $name Required. The name of the snapshot to delete. * @param array $optParams Optional parameters. * @return BaremetalsolutionEmpty */ public function delete($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('delete', [$params], BaremetalsolutionEmpty::class); } /** * Get details of a single storage volume snapshot. (snapshots.get) * * @param string $name Required. Name of the resource. * @param array $optParams Optional parameters. * @return VolumeSnapshot */ public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], VolumeSnapshot::class); } /** * List storage volume snapshots for given storage volume. * (snapshots.listProjectsLocationsVolumesSnapshots) * * @param string $parent Required. Parent value for ListVolumesRequest. * @param array $optParams Optional parameters. * * @opt_param int pageSize Requested page size. The server might return fewer * items than requested. If unspecified, server will pick an appropriate * default. * @opt_param string pageToken A token identifying a page of results from the * server. * @return ListVolumeSnapshotsResponse */ public function listProjectsLocationsVolumesSnapshots($parent, $optParams = []) { $params = ['parent' => $parent]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListVolumeSnapshotsResponse::class); } /** * Restore a storage volume snapshot to its containing volume. * (snapshots.restoreVolumeSnapshot) * * @param string $volumeSnapshot Required. Name of the resource. * @param RestoreVolumeSnapshotRequest $postBody * @param array $optParams Optional parameters. * @return Operation */ public function restoreVolumeSnapshot($volumeSnapshot, RestoreVolumeSnapshotRequest $postBody, $optParams = []) { $params = ['volumeSnapshot' => $volumeSnapshot, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('restoreVolumeSnapshot', [$params], Operation::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsLocationsVolumesSnapshots::class, 'Google_Service_Baremetalsolution_Resource_ProjectsLocationsVolumesSnapshots');