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