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\CloudComposer\Resource;
19
20use Google\Service\CloudComposer\ComposerEmpty;
21use Google\Service\CloudComposer\ListOperationsResponse;
22use Google\Service\CloudComposer\Operation;
23
24/**
25 * The "operations" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $composerService = new Google\Service\CloudComposer(...);
29 *   $operations = $composerService->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 ComposerEmpty
43   */
44  public function delete($name, $optParams = [])
45  {
46    $params = ['name' => $name];
47    $params = array_merge($params, $optParams);
48    return $this->call('delete', [$params], ComposerEmpty::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 Operation
58   */
59  public function get($name, $optParams = [])
60  {
61    $params = ['name' => $name];
62    $params = array_merge($params, $optParams);
63    return $this->call('get', [$params], Operation::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 The name of the operation's parent resource.
77   * @param array $optParams Optional parameters.
78   *
79   * @opt_param string filter The standard list filter.
80   * @opt_param int pageSize The standard list page size.
81   * @opt_param string pageToken The standard list page token.
82   * @return ListOperationsResponse
83   */
84  public function listProjectsLocationsOperations($name, $optParams = [])
85  {
86    $params = ['name' => $name];
87    $params = array_merge($params, $optParams);
88    return $this->call('list', [$params], ListOperationsResponse::class);
89  }
90}
91
92// Adding a class alias for backwards compatibility with the previous class name.
93class_alias(ProjectsLocationsOperations::class, 'Google_Service_CloudComposer_Resource_ProjectsLocationsOperations');
94