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