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
18/**
19 * The "operations" collection of methods.
20 * Typical usage is:
21 *  <code>
22 *   $sqladminService = new Google_Service_SQLAdmin(...);
23 *   $operations = $sqladminService->operations;
24 *  </code>
25 */
26class Google_Service_SQLAdmin_Resource_Operations extends Google_Service_Resource
27{
28  /**
29   * Retrieves an instance operation that has been performed on an instance.
30   * (operations.get)
31   *
32   * @param string $project Project ID of the project that contains the instance.
33   * @param string $operation Instance operation ID.
34   * @param array $optParams Optional parameters.
35   * @return Google_Service_SQLAdmin_Operation
36   */
37  public function get($project, $operation, $optParams = array())
38  {
39    $params = array('project' => $project, 'operation' => $operation);
40    $params = array_merge($params, $optParams);
41    return $this->call('get', array($params), "Google_Service_SQLAdmin_Operation");
42  }
43  /**
44   * Lists all instance operations that have been performed on the given Cloud SQL
45   * instance in the reverse chronological order of the start time.
46   * (operations.listOperations)
47   *
48   * @param string $project Project ID of the project that contains the instance.
49   * @param array $optParams Optional parameters.
50   *
51   * @opt_param string instance Cloud SQL instance ID. This does not include the
52   * project ID.
53   * @opt_param string maxResults Maximum number of operations per response.
54   * @opt_param string pageToken A previously-returned page token representing
55   * part of the larger set of results to view.
56   * @return Google_Service_SQLAdmin_OperationsListResponse
57   */
58  public function listOperations($project, $optParams = array())
59  {
60    $params = array('project' => $project);
61    $params = array_merge($params, $optParams);
62    return $this->call('list', array($params), "Google_Service_SQLAdmin_OperationsListResponse");
63  }
64}
65