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\DeploymentManager\Resource;
19
20use Google\Service\DeploymentManager\Manifest;
21use Google\Service\DeploymentManager\ManifestsListResponse;
22
23/**
24 * The "manifests" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $deploymentmanagerService = new Google\Service\DeploymentManager(...);
28 *   $manifests = $deploymentmanagerService->manifests;
29 *  </code>
30 */
31class Manifests extends \Google\Service\Resource
32{
33  /**
34   * Gets information about a specific manifest. (manifests.get)
35   *
36   * @param string $project The project ID for this request.
37   * @param string $deployment The name of the deployment for this request.
38   * @param string $manifest The name of the manifest for this request.
39   * @param array $optParams Optional parameters.
40   * @return Manifest
41   */
42  public function get($project, $deployment, $manifest, $optParams = [])
43  {
44    $params = ['project' => $project, 'deployment' => $deployment, 'manifest' => $manifest];
45    $params = array_merge($params, $optParams);
46    return $this->call('get', [$params], Manifest::class);
47  }
48  /**
49   * Lists all manifests for a given deployment. (manifests.listManifests)
50   *
51   * @param string $project The project ID for this request.
52   * @param string $deployment The name of the deployment for this request.
53   * @param array $optParams Optional parameters.
54   *
55   * @opt_param string filter A filter expression that filters resources listed in
56   * the response. The expression must specify the field name, an operator, and
57   * the value that you want to use for filtering. The value must be a string, a
58   * number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`,
59   * `>=` or `:`. For example, if you are filtering Compute Engine instances, you
60   * can exclude instances named `example-instance` by specifying `name !=
61   * example-instance`. The `:` operator can be used with string fields to match
62   * substrings. For non-string fields it is equivalent to the `=` operator. The
63   * `:*` comparison can be used to test whether a key has been defined. For
64   * example, to find all objects with `owner` label use: ``` labels.owner:* ```
65   * You can also filter nested fields. For example, you could specify
66   * `scheduling.automaticRestart = false` to include instances only if they are
67   * not scheduled for automatic restarts. You can use filtering on nested fields
68   * to filter based on resource labels. To filter on multiple expressions,
69   * provide each separate expression within parentheses. For example: ```
70   * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
71   * default, each expression is an `AND` expression. However, you can include
72   * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
73   * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
74   * (scheduling.automaticRestart = true) ```
75   * @opt_param string maxResults The maximum number of results per page that
76   * should be returned. If the number of available results is larger than
77   * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
78   * get the next page of results in subsequent list requests. Acceptable values
79   * are `0` to `500`, inclusive. (Default: `500`)
80   * @opt_param string orderBy Sorts list results by a certain order. By default,
81   * results are returned in alphanumerical order based on the resource name. You
82   * can also sort results in descending order based on the creation timestamp
83   * using `orderBy="creationTimestamp desc"`. This sorts results based on the
84   * `creationTimestamp` field in reverse chronological order (newest result
85   * first). Use this to sort resources like operations so that the newest
86   * operation is returned first. Currently, only sorting by `name` or
87   * `creationTimestamp desc` is supported.
88   * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
89   * the `nextPageToken` returned by a previous list request to get the next page
90   * of results.
91   * @return ManifestsListResponse
92   */
93  public function listManifests($project, $deployment, $optParams = [])
94  {
95    $params = ['project' => $project, 'deployment' => $deployment];
96    $params = array_merge($params, $optParams);
97    return $this->call('list', [$params], ManifestsListResponse::class);
98  }
99}
100
101// Adding a class alias for backwards compatibility with the previous class name.
102class_alias(Manifests::class, 'Google_Service_DeploymentManager_Resource_Manifests');
103