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 "globalPublicDelegatedPrefixes" collection of methods.
20 * Typical usage is:
21 *  <code>
22 *   $computeService = new Google_Service_Compute(...);
23 *   $globalPublicDelegatedPrefixes = $computeService->globalPublicDelegatedPrefixes;
24 *  </code>
25 */
26class Google_Service_Compute_Resource_GlobalPublicDelegatedPrefixes extends Google_Service_Resource
27{
28  /**
29   * Deletes the specified global PublicDelegatedPrefix.
30   * (globalPublicDelegatedPrefixes.delete)
31   *
32   * @param string $project Project ID for this request.
33   * @param string $publicDelegatedPrefix Name of the PublicDelegatedPrefix
34   * resource to delete.
35   * @param array $optParams Optional parameters.
36   *
37   * @opt_param string requestId An optional request ID to identify requests.
38   * Specify a unique request ID so that if you must retry your request, the
39   * server will know to ignore the request if it has already been completed.
40   *
41   * For example, consider a situation where you make an initial request and the
42   * request times out. If you make the request again with the same request ID,
43   * the server can check if original operation with the same request ID was
44   * received, and if so, will ignore the second request. This prevents clients
45   * from accidentally creating duplicate commitments.
46   *
47   * The request ID must be a valid UUID with the exception that zero UUID is not
48   * supported (00000000-0000-0000-0000-000000000000).
49   * @return Google_Service_Compute_Operation
50   */
51  public function delete($project, $publicDelegatedPrefix, $optParams = array())
52  {
53    $params = array('project' => $project, 'publicDelegatedPrefix' => $publicDelegatedPrefix);
54    $params = array_merge($params, $optParams);
55    return $this->call('delete', array($params), "Google_Service_Compute_Operation");
56  }
57  /**
58   * Returns the specified global PublicDelegatedPrefix resource.
59   * (globalPublicDelegatedPrefixes.get)
60   *
61   * @param string $project Project ID for this request.
62   * @param string $publicDelegatedPrefix Name of the PublicDelegatedPrefix
63   * resource to return.
64   * @param array $optParams Optional parameters.
65   * @return Google_Service_Compute_PublicDelegatedPrefix
66   */
67  public function get($project, $publicDelegatedPrefix, $optParams = array())
68  {
69    $params = array('project' => $project, 'publicDelegatedPrefix' => $publicDelegatedPrefix);
70    $params = array_merge($params, $optParams);
71    return $this->call('get', array($params), "Google_Service_Compute_PublicDelegatedPrefix");
72  }
73  /**
74   * Creates a global PublicDelegatedPrefix in the specified project using the
75   * parameters that are included in the request.
76   * (globalPublicDelegatedPrefixes.insert)
77   *
78   * @param string $project Project ID for this request.
79   * @param Google_Service_Compute_PublicDelegatedPrefix $postBody
80   * @param array $optParams Optional parameters.
81   *
82   * @opt_param string requestId An optional request ID to identify requests.
83   * Specify a unique request ID so that if you must retry your request, the
84   * server will know to ignore the request if it has already been completed.
85   *
86   * For example, consider a situation where you make an initial request and the
87   * request times out. If you make the request again with the same request ID,
88   * the server can check if original operation with the same request ID was
89   * received, and if so, will ignore the second request. This prevents clients
90   * from accidentally creating duplicate commitments.
91   *
92   * The request ID must be a valid UUID with the exception that zero UUID is not
93   * supported (00000000-0000-0000-0000-000000000000).
94   * @return Google_Service_Compute_Operation
95   */
96  public function insert($project, Google_Service_Compute_PublicDelegatedPrefix $postBody, $optParams = array())
97  {
98    $params = array('project' => $project, 'postBody' => $postBody);
99    $params = array_merge($params, $optParams);
100    return $this->call('insert', array($params), "Google_Service_Compute_Operation");
101  }
102  /**
103   * Lists the global PublicDelegatedPrefixes for a project.
104   * (globalPublicDelegatedPrefixes.listGlobalPublicDelegatedPrefixes)
105   *
106   * @param string $project Project ID for this request.
107   * @param array $optParams Optional parameters.
108   *
109   * @opt_param string filter A filter expression that filters resources listed in
110   * the response. The expression must specify the field name, a comparison
111   * operator, and the value that you want to use for filtering. The value must be
112   * a string, a number, or a boolean. The comparison operator must be either `=`,
113   * `!=`, `>`, or `<`.
114   *
115   * For example, if you are filtering Compute Engine instances, you can exclude
116   * instances named `example-instance` by specifying `name != example-instance`.
117   *
118   * You can also filter nested fields. For example, you could specify
119   * `scheduling.automaticRestart = false` to include instances only if they are
120   * not scheduled for automatic restarts. You can use filtering on nested fields
121   * to filter based on resource labels.
122   *
123   * To filter on multiple expressions, provide each separate expression within
124   * parentheses. For example: ``` (scheduling.automaticRestart = true)
125   * (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND`
126   * expression. However, you can include `AND` and `OR` expressions explicitly.
127   * For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel
128   * Broadwell") AND (scheduling.automaticRestart = true) ```
129   * @opt_param string maxResults The maximum number of results per page that
130   * should be returned. If the number of available results is larger than
131   * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
132   * get the next page of results in subsequent list requests. Acceptable values
133   * are `0` to `500`, inclusive. (Default: `500`)
134   * @opt_param string orderBy Sorts list results by a certain order. By default,
135   * results are returned in alphanumerical order based on the resource name.
136   *
137   * You can also sort results in descending order based on the creation timestamp
138   * using `orderBy="creationTimestamp desc"`. This sorts results based on the
139   * `creationTimestamp` field in reverse chronological order (newest result
140   * first). Use this to sort resources like operations so that the newest
141   * operation is returned first.
142   *
143   * Currently, only sorting by `name` or `creationTimestamp desc` is supported.
144   * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
145   * the `nextPageToken` returned by a previous list request to get the next page
146   * of results.
147   * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
148   * which provides partial results in case of failure. The default value is
149   * false.
150   * @return Google_Service_Compute_PublicDelegatedPrefixList
151   */
152  public function listGlobalPublicDelegatedPrefixes($project, $optParams = array())
153  {
154    $params = array('project' => $project);
155    $params = array_merge($params, $optParams);
156    return $this->call('list', array($params), "Google_Service_Compute_PublicDelegatedPrefixList");
157  }
158  /**
159   * Patches the specified global PublicDelegatedPrefix resource with the data
160   * included in the request. This method supports PATCH semantics and uses JSON
161   * merge patch format and processing rules.
162   * (globalPublicDelegatedPrefixes.patch)
163   *
164   * @param string $project Project ID for this request.
165   * @param string $publicDelegatedPrefix Name of the PublicDelegatedPrefix
166   * resource to patch.
167   * @param Google_Service_Compute_PublicDelegatedPrefix $postBody
168   * @param array $optParams Optional parameters.
169   *
170   * @opt_param string requestId An optional request ID to identify requests.
171   * Specify a unique request ID so that if you must retry your request, the
172   * server will know to ignore the request if it has already been completed.
173   *
174   * For example, consider a situation where you make an initial request and the
175   * request times out. If you make the request again with the same request ID,
176   * the server can check if original operation with the same request ID was
177   * received, and if so, will ignore the second request. This prevents clients
178   * from accidentally creating duplicate commitments.
179   *
180   * The request ID must be a valid UUID with the exception that zero UUID is not
181   * supported (00000000-0000-0000-0000-000000000000).
182   * @return Google_Service_Compute_Operation
183   */
184  public function patch($project, $publicDelegatedPrefix, Google_Service_Compute_PublicDelegatedPrefix $postBody, $optParams = array())
185  {
186    $params = array('project' => $project, 'publicDelegatedPrefix' => $publicDelegatedPrefix, 'postBody' => $postBody);
187    $params = array_merge($params, $optParams);
188    return $this->call('patch', array($params), "Google_Service_Compute_Operation");
189  }
190}
191