1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service\Pubsub\Resource; 19 20use Google\Service\Pubsub\ListTopicSnapshotsResponse; 21 22/** 23 * The "snapshots" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $pubsubService = new Google\Service\Pubsub(...); 27 * $snapshots = $pubsubService->snapshots; 28 * </code> 29 */ 30class ProjectsTopicsSnapshots extends \Google\Service\Resource 31{ 32 /** 33 * Lists the names of the snapshots on this topic. Snapshots are used in 34 * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, 35 * which allow you to manage message acknowledgments in bulk. That is, you can 36 * set the acknowledgment state of messages in an existing subscription to the 37 * state captured by a snapshot. (snapshots.listProjectsTopicsSnapshots) 38 * 39 * @param string $topic Required. The name of the topic that snapshots are 40 * attached to. Format is `projects/{project}/topics/{topic}`. 41 * @param array $optParams Optional parameters. 42 * 43 * @opt_param int pageSize Maximum number of snapshot names to return. 44 * @opt_param string pageToken The value returned by the last 45 * `ListTopicSnapshotsResponse`; indicates that this is a continuation of a 46 * prior `ListTopicSnapshots` call, and that the system should return the next 47 * page of data. 48 * @return ListTopicSnapshotsResponse 49 */ 50 public function listProjectsTopicsSnapshots($topic, $optParams = []) 51 { 52 $params = ['topic' => $topic]; 53 $params = array_merge($params, $optParams); 54 return $this->call('list', [$params], ListTopicSnapshotsResponse::class); 55 } 56} 57 58// Adding a class alias for backwards compatibility with the previous class name. 59class_alias(ProjectsTopicsSnapshots::class, 'Google_Service_Pubsub_Resource_ProjectsTopicsSnapshots'); 60