[e3d4e0a] | 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 | namespace Google\Service\VMwareEngine\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\VMwareEngine\ListLoggingServersResponse;
|
---|
| 21 | use Google\Service\VMwareEngine\LoggingServer;
|
---|
| 22 | use Google\Service\VMwareEngine\Operation;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "loggingServers" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $vmwareengineService = new Google\Service\VMwareEngine(...);
|
---|
| 29 | * $loggingServers = $vmwareengineService->projects_locations_privateClouds_loggingServers;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsPrivateCloudsLoggingServers extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Create a new logging server for a given private cloud.
|
---|
| 36 | * (loggingServers.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. The resource name of the private cloud to
|
---|
| 39 | * create a new Logging Server in. Resource names are schemeless URIs that
|
---|
| 40 | * follow the conventions in
|
---|
| 41 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
| 42 | * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
|
---|
| 43 | * @param LoggingServer $postBody
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | *
|
---|
| 46 | * @opt_param string loggingServerId Required. The user-provided identifier of
|
---|
| 47 | * the `LoggingServer` to be created. This identifier must be unique among
|
---|
| 48 | * `LoggingServer` resources within the parent and becomes the final token in
|
---|
| 49 | * the name URI. The identifier must meet the following requirements: * Only
|
---|
| 50 | * contains 1-63 alphanumeric characters and hyphens * Begins with an
|
---|
| 51 | * alphabetical character * Ends with a non-hyphen character * Not formatted as
|
---|
| 52 | * a UUID * Complies with [RFC
|
---|
| 53 | * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
|
---|
| 54 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
| 55 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 56 | * server will know to ignore the request if it has already been completed. The
|
---|
| 57 | * server guarantees that a request doesn't result in creation of duplicate
|
---|
| 58 | * commitments for at least 60 minutes. For example, consider a situation where
|
---|
| 59 | * you make an initial request and the request times out. If you make the
|
---|
| 60 | * request again with the same request ID, the server can check if original
|
---|
| 61 | * operation with the same request ID was received, and if so, will ignore the
|
---|
| 62 | * second request. This prevents clients from accidentally creating duplicate
|
---|
| 63 | * commitments. The request ID must be a valid UUID with the exception that zero
|
---|
| 64 | * UUID is not supported (00000000-0000-0000-0000-000000000000).
|
---|
| 65 | * @return Operation
|
---|
| 66 | * @throws \Google\Service\Exception
|
---|
| 67 | */
|
---|
| 68 | public function create($parent, LoggingServer $postBody, $optParams = [])
|
---|
| 69 | {
|
---|
| 70 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 71 | $params = array_merge($params, $optParams);
|
---|
| 72 | return $this->call('create', [$params], Operation::class);
|
---|
| 73 | }
|
---|
| 74 | /**
|
---|
| 75 | * Deletes a single logging server. (loggingServers.delete)
|
---|
| 76 | *
|
---|
| 77 | * @param string $name Required. The resource name of the logging server to
|
---|
| 78 | * delete. Resource names are schemeless URIs that follow the conventions in
|
---|
| 79 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
| 80 | * `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
| 81 | * cloud/loggingServers/my-logging-server`
|
---|
| 82 | * @param array $optParams Optional parameters.
|
---|
| 83 | *
|
---|
| 84 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
| 85 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 86 | * server will know to ignore the request if it has already been completed. The
|
---|
| 87 | * server guarantees that a request doesn't result in creation of duplicate
|
---|
| 88 | * commitments for at least 60 minutes. For example, consider a situation where
|
---|
| 89 | * you make an initial request and the request times out. If you make the
|
---|
| 90 | * request again with the same request ID, the server can check if original
|
---|
| 91 | * operation with the same request ID was received, and if so, will ignore the
|
---|
| 92 | * second request. This prevents clients from accidentally creating duplicate
|
---|
| 93 | * commitments. The request ID must be a valid UUID with the exception that zero
|
---|
| 94 | * UUID is not supported (00000000-0000-0000-0000-000000000000).
|
---|
| 95 | * @return Operation
|
---|
| 96 | * @throws \Google\Service\Exception
|
---|
| 97 | */
|
---|
| 98 | public function delete($name, $optParams = [])
|
---|
| 99 | {
|
---|
| 100 | $params = ['name' => $name];
|
---|
| 101 | $params = array_merge($params, $optParams);
|
---|
| 102 | return $this->call('delete', [$params], Operation::class);
|
---|
| 103 | }
|
---|
| 104 | /**
|
---|
| 105 | * Gets details of a logging server. (loggingServers.get)
|
---|
| 106 | *
|
---|
| 107 | * @param string $name Required. The resource name of the Logging Server to
|
---|
| 108 | * retrieve. Resource names are schemeless URIs that follow the conventions in
|
---|
| 109 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
| 110 | * `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
| 111 | * cloud/loggingServers/my-logging-server`
|
---|
| 112 | * @param array $optParams Optional parameters.
|
---|
| 113 | * @return LoggingServer
|
---|
| 114 | * @throws \Google\Service\Exception
|
---|
| 115 | */
|
---|
| 116 | public function get($name, $optParams = [])
|
---|
| 117 | {
|
---|
| 118 | $params = ['name' => $name];
|
---|
| 119 | $params = array_merge($params, $optParams);
|
---|
| 120 | return $this->call('get', [$params], LoggingServer::class);
|
---|
| 121 | }
|
---|
| 122 | /**
|
---|
| 123 | * Lists logging servers configured for a given private cloud.
|
---|
| 124 | * (loggingServers.listProjectsLocationsPrivateCloudsLoggingServers)
|
---|
| 125 | *
|
---|
| 126 | * @param string $parent Required. The resource name of the private cloud to be
|
---|
| 127 | * queried for logging servers. Resource names are schemeless URIs that follow
|
---|
| 128 | * the conventions in https://cloud.google.com/apis/design/resource_names. For
|
---|
| 129 | * example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
|
---|
| 130 | * @param array $optParams Optional parameters.
|
---|
| 131 | *
|
---|
| 132 | * @opt_param string filter A filter expression that matches resources returned
|
---|
| 133 | * in the response. The expression must specify the field name, a comparison
|
---|
| 134 | * operator, and the value that you want to use for filtering. The value must be
|
---|
| 135 | * a string, a number, or a boolean. The comparison operator must be `=`, `!=`,
|
---|
| 136 | * `>`, or `<`. For example, if you are filtering a list of logging servers, you
|
---|
| 137 | * can exclude the ones named `example-server` by specifying `name != "example-
|
---|
| 138 | * server"`. To filter on multiple expressions, provide each separate expression
|
---|
| 139 | * within parentheses. For example: ``` (name = "example-server") (createTime >
|
---|
| 140 | * "2021-04-12T08:15:10.40Z") ``` By default, each expression is an `AND`
|
---|
| 141 | * expression. However, you can include `AND` and `OR` expressions explicitly.
|
---|
| 142 | * For example: ``` (name = "example-server-1") AND (createTime >
|
---|
| 143 | * "2021-04-12T08:15:10.40Z") OR (name = "example-server-2") ```
|
---|
| 144 | * @opt_param string orderBy Sorts list results by a certain order. By default,
|
---|
| 145 | * returned results are ordered by `name` in ascending order. You can also sort
|
---|
| 146 | * results in descending order based on the `name` value using `orderBy="name
|
---|
| 147 | * desc"`. Currently, only ordering by `name` is supported.
|
---|
| 148 | * @opt_param int pageSize The maximum number of logging servers to return in
|
---|
| 149 | * one page. The service may return fewer than this value. The maximum value is
|
---|
| 150 | * coerced to 1000. The default value of this field is 500.
|
---|
| 151 | * @opt_param string pageToken A page token, received from a previous
|
---|
| 152 | * `ListLoggingServersRequest` call. Provide this to retrieve the subsequent
|
---|
| 153 | * page. When paginating, all other parameters provided to
|
---|
| 154 | * `ListLoggingServersRequest` must match the call that provided the page token.
|
---|
| 155 | * @return ListLoggingServersResponse
|
---|
| 156 | * @throws \Google\Service\Exception
|
---|
| 157 | */
|
---|
| 158 | public function listProjectsLocationsPrivateCloudsLoggingServers($parent, $optParams = [])
|
---|
| 159 | {
|
---|
| 160 | $params = ['parent' => $parent];
|
---|
| 161 | $params = array_merge($params, $optParams);
|
---|
| 162 | return $this->call('list', [$params], ListLoggingServersResponse::class);
|
---|
| 163 | }
|
---|
| 164 | /**
|
---|
| 165 | * Updates the parameters of a single logging server. Only fields specified in
|
---|
| 166 | * `update_mask` are applied. (loggingServers.patch)
|
---|
| 167 | *
|
---|
| 168 | * @param string $name Output only. The resource name of this logging server.
|
---|
| 169 | * Resource names are schemeless URIs that follow the conventions in
|
---|
| 170 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
| 171 | * `projects/my-project/locations/us-central1-a/privateClouds/my-
|
---|
| 172 | * cloud/loggingServers/my-logging-server`
|
---|
| 173 | * @param LoggingServer $postBody
|
---|
| 174 | * @param array $optParams Optional parameters.
|
---|
| 175 | *
|
---|
| 176 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
| 177 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 178 | * server will know to ignore the request if it has already been completed. The
|
---|
| 179 | * server guarantees that a request doesn't result in creation of duplicate
|
---|
| 180 | * commitments for at least 60 minutes. For example, consider a situation where
|
---|
| 181 | * you make an initial request and the request times out. If you make the
|
---|
| 182 | * request again with the same request ID, the server can check if original
|
---|
| 183 | * operation with the same request ID was received, and if so, will ignore the
|
---|
| 184 | * second request. This prevents clients from accidentally creating duplicate
|
---|
| 185 | * commitments. The request ID must be a valid UUID with the exception that zero
|
---|
| 186 | * UUID is not supported (00000000-0000-0000-0000-000000000000).
|
---|
| 187 | * @opt_param string updateMask Required. Field mask is used to specify the
|
---|
| 188 | * fields to be overwritten in the `LoggingServer` resource by the update. The
|
---|
| 189 | * fields specified in the `update_mask` are relative to the resource, not the
|
---|
| 190 | * full request. A field will be overwritten if it is in the mask. If the user
|
---|
| 191 | * does not provide a mask then all fields will be overwritten.
|
---|
| 192 | * @return Operation
|
---|
| 193 | * @throws \Google\Service\Exception
|
---|
| 194 | */
|
---|
| 195 | public function patch($name, LoggingServer $postBody, $optParams = [])
|
---|
| 196 | {
|
---|
| 197 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 198 | $params = array_merge($params, $optParams);
|
---|
| 199 | return $this->call('patch', [$params], Operation::class);
|
---|
| 200 | }
|
---|
| 201 | }
|
---|
| 202 |
|
---|
| 203 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 204 | class_alias(ProjectsLocationsPrivateCloudsLoggingServers::class, 'Google_Service_VMwareEngine_Resource_ProjectsLocationsPrivateCloudsLoggingServers');
|
---|