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\CloudRun\Resource; 19 20use Google\Service\CloudRun\GoogleLongrunningListOperationsResponse; 21use Google\Service\CloudRun\GoogleLongrunningOperation; 22use Google\Service\CloudRun\GoogleProtobufEmpty; 23 24/** 25 * The "operations" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $runService = new Google\Service\CloudRun(...); 29 * $operations = $runService->operations; 30 * </code> 31 */ 32class ProjectsLocationsOperations extends \Google\Service\Resource 33{ 34 /** 35 * Deletes a long-running operation. This method indicates that the client is no 36 * longer interested in the operation result. It does not cancel the operation. 37 * If the server doesn't support this method, it returns 38 * `google.rpc.Code.UNIMPLEMENTED`. (operations.delete) 39 * 40 * @param string $name The name of the operation resource to be deleted. 41 * @param array $optParams Optional parameters. 42 * @return GoogleProtobufEmpty 43 */ 44 public function delete($name, $optParams = []) 45 { 46 $params = ['name' => $name]; 47 $params = array_merge($params, $optParams); 48 return $this->call('delete', [$params], GoogleProtobufEmpty::class); 49 } 50 /** 51 * Gets the latest state of a long-running operation. Clients can use this 52 * method to poll the operation result at intervals as recommended by the API 53 * service. (operations.get) 54 * 55 * @param string $name The name of the operation resource. 56 * @param array $optParams Optional parameters. 57 * @return GoogleLongrunningOperation 58 */ 59 public function get($name, $optParams = []) 60 { 61 $params = ['name' => $name]; 62 $params = array_merge($params, $optParams); 63 return $this->call('get', [$params], GoogleLongrunningOperation::class); 64 } 65 /** 66 * Lists operations that match the specified filter in the request. If the 67 * server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the 68 * `name` binding allows API services to override the binding to use different 69 * resource name schemes, such as `users/operations`. To override the binding, 70 * API services can add a binding such as `"/v1/{name=users}/operations"` to 71 * their service configuration. For backwards compatibility, the default name 72 * includes the operations collection id, however overriding users must ensure 73 * the name binding is the parent resource, without the operations collection 74 * id. (operations.listProjectsLocationsOperations) 75 * 76 * @param string $name Required. To query for all of the operations for a 77 * project. 78 * @param array $optParams Optional parameters. 79 * 80 * @opt_param string filter Optional. A filter for matching the completed or in- 81 * progress operations. The supported formats of *filter* are: To query for only 82 * completed operations: done:true To query for only ongoing operations: 83 * done:false Must be empty to query for all of the latest operations for the 84 * given parent project. 85 * @opt_param int pageSize The maximum number of records that should be 86 * returned. Requested page size cannot exceed 100. If not set or set to less 87 * than or equal to 0, the default page size is 100. . 88 * @opt_param string pageToken Token identifying which result to start with, 89 * which is returned by a previous list call. 90 * @return GoogleLongrunningListOperationsResponse 91 */ 92 public function listProjectsLocationsOperations($name, $optParams = []) 93 { 94 $params = ['name' => $name]; 95 $params = array_merge($params, $optParams); 96 return $this->call('list', [$params], GoogleLongrunningListOperationsResponse::class); 97 } 98} 99 100// Adding a class alias for backwards compatibility with the previous class name. 101class_alias(ProjectsLocationsOperations::class, 'Google_Service_CloudRun_Resource_ProjectsLocationsOperations'); 102