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\OSConfig\Resource;
19
20use Google\Service\OSConfig\ListOperationsResponse;
21use Google\Service\OSConfig\OsconfigEmpty;
22
23/**
24 * The "operations" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $osconfigService = new Google\Service\OSConfig(...);
28 *   $operations = $osconfigService->operations;
29 *  </code>
30 */
31class Operations extends \Google\Service\Resource
32{
33  /**
34   * Deletes a long-running operation. This method indicates that the client is no
35   * longer interested in the operation result. It does not cancel the operation.
36   * If the server doesn't support this method, it returns
37   * `google.rpc.Code.UNIMPLEMENTED`. (operations.delete)
38   *
39   * @param string $name The name of the operation resource to be deleted.
40   * @param array $optParams Optional parameters.
41   * @return OsconfigEmpty
42   */
43  public function delete($name, $optParams = [])
44  {
45    $params = ['name' => $name];
46    $params = array_merge($params, $optParams);
47    return $this->call('delete', [$params], OsconfigEmpty::class);
48  }
49  /**
50   * Lists operations that match the specified filter in the request. If the
51   * server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the
52   * `name` binding allows API services to override the binding to use different
53   * resource name schemes, such as `users/operations`. To override the binding,
54   * API services can add a binding such as `"/v1/{name=users}/operations"` to
55   * their service configuration. For backwards compatibility, the default name
56   * includes the operations collection id, however overriding users must ensure
57   * the name binding is the parent resource, without the operations collection
58   * id. (operations.listOperations)
59   *
60   * @param string $name The name of the operation's parent resource.
61   * @param array $optParams Optional parameters.
62   *
63   * @opt_param string filter The standard list filter.
64   * @opt_param int pageSize The standard list page size.
65   * @opt_param string pageToken The standard list page token.
66   * @return ListOperationsResponse
67   */
68  public function listOperations($name, $optParams = [])
69  {
70    $params = ['name' => $name];
71    $params = array_merge($params, $optParams);
72    return $this->call('list', [$params], ListOperationsResponse::class);
73  }
74}
75
76// Adding a class alias for backwards compatibility with the previous class name.
77class_alias(Operations::class, 'Google_Service_OSConfig_Resource_Operations');
78