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