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\Dataflow\Resource; 19 20use Google\Service\Dataflow\DeleteSnapshotResponse; 21use Google\Service\Dataflow\SendWorkerMessagesRequest; 22use Google\Service\Dataflow\SendWorkerMessagesResponse; 23 24/** 25 * The "projects" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $dataflowService = new Google\Service\Dataflow(...); 29 * $projects = $dataflowService->projects; 30 * </code> 31 */ 32class Projects extends \Google\Service\Resource 33{ 34 /** 35 * Deletes a snapshot. (projects.deleteSnapshots) 36 * 37 * @param string $projectId The ID of the Cloud Platform project that the 38 * snapshot belongs to. 39 * @param array $optParams Optional parameters. 40 * 41 * @opt_param string location The location that contains this snapshot. 42 * @opt_param string snapshotId The ID of the snapshot. 43 * @return DeleteSnapshotResponse 44 */ 45 public function deleteSnapshots($projectId, $optParams = []) 46 { 47 $params = ['projectId' => $projectId]; 48 $params = array_merge($params, $optParams); 49 return $this->call('deleteSnapshots', [$params], DeleteSnapshotResponse::class); 50 } 51 /** 52 * Send a worker_message to the service. (projects.workerMessages) 53 * 54 * @param string $projectId The project to send the WorkerMessages to. 55 * @param SendWorkerMessagesRequest $postBody 56 * @param array $optParams Optional parameters. 57 * @return SendWorkerMessagesResponse 58 */ 59 public function workerMessages($projectId, SendWorkerMessagesRequest $postBody, $optParams = []) 60 { 61 $params = ['projectId' => $projectId, 'postBody' => $postBody]; 62 $params = array_merge($params, $optParams); 63 return $this->call('workerMessages', [$params], SendWorkerMessagesResponse::class); 64 } 65} 66 67// Adding a class alias for backwards compatibility with the previous class name. 68class_alias(Projects::class, 'Google_Service_Dataflow_Resource_Projects'); 69