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\ListRevisionsResponse;
21use Google\Service\CloudRun\Revision;
22use Google\Service\CloudRun\Status;
23
24/**
25 * The "revisions" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $runService = new Google\Service\CloudRun(...);
29 *   $revisions = $runService->revisions;
30 *  </code>
31 */
32class ProjectsLocationsRevisions extends \Google\Service\Resource
33{
34  /**
35   * Delete a revision. (revisions.delete)
36   *
37   * @param string $name The name of the revision to delete. For Cloud Run (fully
38   * managed), replace {namespace_id} with the project ID or number.
39   * @param array $optParams Optional parameters.
40   *
41   * @opt_param string apiVersion Cloud Run currently ignores this parameter.
42   * @opt_param string dryRun Indicates that the server should validate the
43   * request and populate default values without persisting the request. Supported
44   * values: `all`
45   * @opt_param string kind Cloud Run currently ignores this parameter.
46   * @opt_param string propagationPolicy Specifies the propagation policy of
47   * delete. Cloud Run currently ignores this setting, and deletes in the
48   * background. Please see kubernetes.io/docs/concepts/workloads/controllers
49   * /garbage-collection/ for more information.
50   * @return Status
51   */
52  public function delete($name, $optParams = [])
53  {
54    $params = ['name' => $name];
55    $params = array_merge($params, $optParams);
56    return $this->call('delete', [$params], Status::class);
57  }
58  /**
59   * Get information about a revision. (revisions.get)
60   *
61   * @param string $name The name of the revision to retrieve. For Cloud Run
62   * (fully managed), replace {namespace_id} with the project ID or number.
63   * @param array $optParams Optional parameters.
64   * @return Revision
65   */
66  public function get($name, $optParams = [])
67  {
68    $params = ['name' => $name];
69    $params = array_merge($params, $optParams);
70    return $this->call('get', [$params], Revision::class);
71  }
72  /**
73   * List revisions. (revisions.listProjectsLocationsRevisions)
74   *
75   * @param string $parent The namespace from which the revisions should be
76   * listed. For Cloud Run (fully managed), replace {namespace_id} with the
77   * project ID or number.
78   * @param array $optParams Optional parameters.
79   *
80   * @opt_param string continue Optional. Encoded string to continue paging.
81   * @opt_param string fieldSelector Allows to filter resources based on a
82   * specific value for a field name. Send this in a query string format. i.e.
83   * 'metadata.name%3Dlorem'. Not currently used by Cloud Run.
84   * @opt_param bool includeUninitialized Not currently used by Cloud Run.
85   * @opt_param string labelSelector Allows to filter resources based on a label.
86   * Supported operations are =, !=, exists, in, and notIn.
87   * @opt_param int limit Optional. The maximum number of records that should be
88   * returned.
89   * @opt_param string resourceVersion The baseline resource version from which
90   * the list or watch operation should start. Not currently used by Cloud Run.
91   * @opt_param bool watch Flag that indicates that the client expects to watch
92   * this resource as well. Not currently used by Cloud Run.
93   * @return ListRevisionsResponse
94   */
95  public function listProjectsLocationsRevisions($parent, $optParams = [])
96  {
97    $params = ['parent' => $parent];
98    $params = array_merge($params, $optParams);
99    return $this->call('list', [$params], ListRevisionsResponse::class);
100  }
101}
102
103// Adding a class alias for backwards compatibility with the previous class name.
104class_alias(ProjectsLocationsRevisions::class, 'Google_Service_CloudRun_Resource_ProjectsLocationsRevisions');
105