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\Aiplatform\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1BatchReadFeatureValuesRequest;
|
---|
21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1Featurestore;
|
---|
22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListFeaturestoresResponse;
|
---|
23 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1SearchFeaturesResponse;
|
---|
24 | use Google\Service\Aiplatform\GoogleIamV1Policy;
|
---|
25 | use Google\Service\Aiplatform\GoogleIamV1SetIamPolicyRequest;
|
---|
26 | use Google\Service\Aiplatform\GoogleIamV1TestIamPermissionsResponse;
|
---|
27 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * The "featurestores" collection of methods.
|
---|
31 | * Typical usage is:
|
---|
32 | * <code>
|
---|
33 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
34 | * $featurestores = $aiplatformService->projects_locations_featurestores;
|
---|
35 | * </code>
|
---|
36 | */
|
---|
37 | class ProjectsLocationsFeaturestores extends \Google\Service\Resource
|
---|
38 | {
|
---|
39 | /**
|
---|
40 | * Batch reads Feature values from a Featurestore. This API enables batch
|
---|
41 | * reading Feature values, where each read instance in the batch may read
|
---|
42 | * Feature values of entities from one or more EntityTypes. Point-in-time
|
---|
43 | * correctness is guaranteed for Feature values of each read instance as of each
|
---|
44 | * instance's read timestamp. (featurestores.batchReadFeatureValues)
|
---|
45 | *
|
---|
46 | * @param string $featurestore Required. The resource name of the Featurestore
|
---|
47 | * from which to query Feature values. Format:
|
---|
48 | * `projects/{project}/locations/{location}/featurestores/{featurestore}`
|
---|
49 | * @param GoogleCloudAiplatformV1BatchReadFeatureValuesRequest $postBody
|
---|
50 | * @param array $optParams Optional parameters.
|
---|
51 | * @return GoogleLongrunningOperation
|
---|
52 | * @throws \Google\Service\Exception
|
---|
53 | */
|
---|
54 | public function batchReadFeatureValues($featurestore, GoogleCloudAiplatformV1BatchReadFeatureValuesRequest $postBody, $optParams = [])
|
---|
55 | {
|
---|
56 | $params = ['featurestore' => $featurestore, 'postBody' => $postBody];
|
---|
57 | $params = array_merge($params, $optParams);
|
---|
58 | return $this->call('batchReadFeatureValues', [$params], GoogleLongrunningOperation::class);
|
---|
59 | }
|
---|
60 | /**
|
---|
61 | * Creates a new Featurestore in a given project and location.
|
---|
62 | * (featurestores.create)
|
---|
63 | *
|
---|
64 | * @param string $parent Required. The resource name of the Location to create
|
---|
65 | * Featurestores. Format: `projects/{project}/locations/{location}`
|
---|
66 | * @param GoogleCloudAiplatformV1Featurestore $postBody
|
---|
67 | * @param array $optParams Optional parameters.
|
---|
68 | *
|
---|
69 | * @opt_param string featurestoreId Required. The ID to use for this
|
---|
70 | * Featurestore, which will become the final component of the Featurestore's
|
---|
71 | * resource name. This value may be up to 60 characters, and valid characters
|
---|
72 | * are `[a-z0-9_]`. The first character cannot be a number. The value must be
|
---|
73 | * unique within the project and location.
|
---|
74 | * @return GoogleLongrunningOperation
|
---|
75 | * @throws \Google\Service\Exception
|
---|
76 | */
|
---|
77 | public function create($parent, GoogleCloudAiplatformV1Featurestore $postBody, $optParams = [])
|
---|
78 | {
|
---|
79 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
80 | $params = array_merge($params, $optParams);
|
---|
81 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
82 | }
|
---|
83 | /**
|
---|
84 | * Deletes a single Featurestore. The Featurestore must not contain any
|
---|
85 | * EntityTypes or `force` must be set to true for the request to succeed.
|
---|
86 | * (featurestores.delete)
|
---|
87 | *
|
---|
88 | * @param string $name Required. The name of the Featurestore to be deleted.
|
---|
89 | * Format:
|
---|
90 | * `projects/{project}/locations/{location}/featurestores/{featurestore}`
|
---|
91 | * @param array $optParams Optional parameters.
|
---|
92 | *
|
---|
93 | * @opt_param bool force If set to true, any EntityTypes and Features for this
|
---|
94 | * Featurestore will also be deleted. (Otherwise, the request will only work if
|
---|
95 | * the Featurestore has no EntityTypes.)
|
---|
96 | * @return GoogleLongrunningOperation
|
---|
97 | * @throws \Google\Service\Exception
|
---|
98 | */
|
---|
99 | public function delete($name, $optParams = [])
|
---|
100 | {
|
---|
101 | $params = ['name' => $name];
|
---|
102 | $params = array_merge($params, $optParams);
|
---|
103 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
104 | }
|
---|
105 | /**
|
---|
106 | * Gets details of a single Featurestore. (featurestores.get)
|
---|
107 | *
|
---|
108 | * @param string $name Required. The name of the Featurestore resource.
|
---|
109 | * @param array $optParams Optional parameters.
|
---|
110 | * @return GoogleCloudAiplatformV1Featurestore
|
---|
111 | * @throws \Google\Service\Exception
|
---|
112 | */
|
---|
113 | public function get($name, $optParams = [])
|
---|
114 | {
|
---|
115 | $params = ['name' => $name];
|
---|
116 | $params = array_merge($params, $optParams);
|
---|
117 | return $this->call('get', [$params], GoogleCloudAiplatformV1Featurestore::class);
|
---|
118 | }
|
---|
119 | /**
|
---|
120 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
121 | * resource exists and does not have a policy set. (featurestores.getIamPolicy)
|
---|
122 | *
|
---|
123 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
124 | * requested. See [Resource
|
---|
125 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
126 | * appropriate value for this field.
|
---|
127 | * @param array $optParams Optional parameters.
|
---|
128 | *
|
---|
129 | * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
|
---|
130 | * version that will be used to format the policy. Valid values are 0, 1, and 3.
|
---|
131 | * Requests specifying an invalid value will be rejected. Requests for policies
|
---|
132 | * with any conditional role bindings must specify version 3. Policies with no
|
---|
133 | * conditional role bindings may specify any valid value or leave the field
|
---|
134 | * unset. The policy in the response might use the policy version that you
|
---|
135 | * specified, or it might use a lower policy version. For example, if you
|
---|
136 | * specify version 3, but the policy has no conditional role bindings, the
|
---|
137 | * response uses version 1. To learn which resources support conditions in their
|
---|
138 | * IAM policies, see the [IAM
|
---|
139 | * documentation](https://cloud.google.com/iam/help/conditions/resource-
|
---|
140 | * policies).
|
---|
141 | * @return GoogleIamV1Policy
|
---|
142 | * @throws \Google\Service\Exception
|
---|
143 | */
|
---|
144 | public function getIamPolicy($resource, $optParams = [])
|
---|
145 | {
|
---|
146 | $params = ['resource' => $resource];
|
---|
147 | $params = array_merge($params, $optParams);
|
---|
148 | return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
149 | }
|
---|
150 | /**
|
---|
151 | * Lists Featurestores in a given project and location.
|
---|
152 | * (featurestores.listProjectsLocationsFeaturestores)
|
---|
153 | *
|
---|
154 | * @param string $parent Required. The resource name of the Location to list
|
---|
155 | * Featurestores. Format: `projects/{project}/locations/{location}`
|
---|
156 | * @param array $optParams Optional parameters.
|
---|
157 | *
|
---|
158 | * @opt_param string filter Lists the featurestores that match the filter
|
---|
159 | * expression. The following fields are supported: * `create_time`: Supports
|
---|
160 | * `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339
|
---|
161 | * format. * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=`
|
---|
162 | * comparisons. Values must be in RFC 3339 format. *
|
---|
163 | * `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`, `<=`,
|
---|
164 | * and `>=` comparisons. * `labels`: Supports key-value equality and key
|
---|
165 | * presence. Examples: * `create_time > "2020-01-01" OR update_time >
|
---|
166 | * "2020-01-01"` Featurestores created or updated after 2020-01-01. *
|
---|
167 | * `labels.env = "prod"` Featurestores with label "env" set to "prod".
|
---|
168 | * @opt_param string orderBy A comma-separated list of fields to order by,
|
---|
169 | * sorted in ascending order. Use "desc" after a field name for descending.
|
---|
170 | * Supported Fields: * `create_time` * `update_time` *
|
---|
171 | * `online_serving_config.fixed_node_count`
|
---|
172 | * @opt_param int pageSize The maximum number of Featurestores to return. The
|
---|
173 | * service may return fewer than this value. If unspecified, at most 100
|
---|
174 | * Featurestores will be returned. The maximum value is 100; any value greater
|
---|
175 | * than 100 will be coerced to 100.
|
---|
176 | * @opt_param string pageToken A page token, received from a previous
|
---|
177 | * FeaturestoreService.ListFeaturestores call. Provide this to retrieve the
|
---|
178 | * subsequent page. When paginating, all other parameters provided to
|
---|
179 | * FeaturestoreService.ListFeaturestores must match the call that provided the
|
---|
180 | * page token.
|
---|
181 | * @opt_param string readMask Mask specifying which fields to read.
|
---|
182 | * @return GoogleCloudAiplatformV1ListFeaturestoresResponse
|
---|
183 | * @throws \Google\Service\Exception
|
---|
184 | */
|
---|
185 | public function listProjectsLocationsFeaturestores($parent, $optParams = [])
|
---|
186 | {
|
---|
187 | $params = ['parent' => $parent];
|
---|
188 | $params = array_merge($params, $optParams);
|
---|
189 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListFeaturestoresResponse::class);
|
---|
190 | }
|
---|
191 | /**
|
---|
192 | * Updates the parameters of a single Featurestore. (featurestores.patch)
|
---|
193 | *
|
---|
194 | * @param string $name Output only. Name of the Featurestore. Format:
|
---|
195 | * `projects/{project}/locations/{location}/featurestores/{featurestore}`
|
---|
196 | * @param GoogleCloudAiplatformV1Featurestore $postBody
|
---|
197 | * @param array $optParams Optional parameters.
|
---|
198 | *
|
---|
199 | * @opt_param string updateMask Field mask is used to specify the fields to be
|
---|
200 | * overwritten in the Featurestore resource by the update. The fields specified
|
---|
201 | * in the update_mask are relative to the resource, not the full request. A
|
---|
202 | * field will be overwritten if it is in the mask. If the user does not provide
|
---|
203 | * a mask then only the non-empty fields present in the request will be
|
---|
204 | * overwritten. Set the update_mask to `*` to override all fields. Updatable
|
---|
205 | * fields: * `labels` * `online_serving_config.fixed_node_count` *
|
---|
206 | * `online_serving_config.scaling` * `online_storage_ttl_days`
|
---|
207 | * @return GoogleLongrunningOperation
|
---|
208 | * @throws \Google\Service\Exception
|
---|
209 | */
|
---|
210 | public function patch($name, GoogleCloudAiplatformV1Featurestore $postBody, $optParams = [])
|
---|
211 | {
|
---|
212 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
213 | $params = array_merge($params, $optParams);
|
---|
214 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
215 | }
|
---|
216 | /**
|
---|
217 | * Searches Features matching a query in a given project.
|
---|
218 | * (featurestores.searchFeatures)
|
---|
219 | *
|
---|
220 | * @param string $location Required. The resource name of the Location to search
|
---|
221 | * Features. Format: `projects/{project}/locations/{location}`
|
---|
222 | * @param array $optParams Optional parameters.
|
---|
223 | *
|
---|
224 | * @opt_param int pageSize The maximum number of Features to return. The service
|
---|
225 | * may return fewer than this value. If unspecified, at most 100 Features will
|
---|
226 | * be returned. The maximum value is 100; any value greater than 100 will be
|
---|
227 | * coerced to 100.
|
---|
228 | * @opt_param string pageToken A page token, received from a previous
|
---|
229 | * FeaturestoreService.SearchFeatures call. Provide this to retrieve the
|
---|
230 | * subsequent page. When paginating, all other parameters provided to
|
---|
231 | * FeaturestoreService.SearchFeatures, except `page_size`, must match the call
|
---|
232 | * that provided the page token.
|
---|
233 | * @opt_param string query Query string that is a conjunction of field-
|
---|
234 | * restricted queries and/or field-restricted filters. Field-restricted queries
|
---|
235 | * and filters can be combined using `AND` to form a conjunction. A field query
|
---|
236 | * is in the form FIELD:QUERY. This implicitly checks if QUERY exists as a
|
---|
237 | * substring within Feature's FIELD. The QUERY and the FIELD are converted to a
|
---|
238 | * sequence of words (i.e. tokens) for comparison. This is done by: * Removing
|
---|
239 | * leading/trailing whitespace and tokenizing the search value. Characters that
|
---|
240 | * are not one of alphanumeric `[a-zA-Z0-9]`, underscore `_`, or asterisk `*`
|
---|
241 | * are treated as delimiters for tokens. `*` is treated as a wildcard that
|
---|
242 | * matches characters within a token. * Ignoring case. * Prepending an asterisk
|
---|
243 | * to the first and appending an asterisk to the last token in QUERY. A QUERY
|
---|
244 | * must be either a singular token or a phrase. A phrase is one or multiple
|
---|
245 | * words enclosed in double quotation marks ("). With phrases, the order of the
|
---|
246 | * words is important. Words in the phrase must be matching in order and
|
---|
247 | * consecutively. Supported FIELDs for field-restricted queries: * `feature_id`
|
---|
248 | * * `description` * `entity_type_id` Examples: * `feature_id: foo` --> Matches
|
---|
249 | * a Feature with ID containing the substring `foo` (eg. `foo`, `foofeature`,
|
---|
250 | * `barfoo`). * `feature_id: foo*feature` --> Matches a Feature with ID
|
---|
251 | * containing the substring `foo*feature` (eg. `foobarfeature`). * `feature_id:
|
---|
252 | * foo AND description: bar` --> Matches a Feature with ID containing the
|
---|
253 | * substring `foo` and description containing the substring `bar`. Besides field
|
---|
254 | * queries, the following exact-match filters are supported. The exact-match
|
---|
255 | * filters do not support wildcards. Unlike field-restricted queries, exact-
|
---|
256 | * match filters are case-sensitive. * `feature_id`: Supports = comparisons. *
|
---|
257 | * `description`: Supports = comparisons. Multi-token filters should be enclosed
|
---|
258 | * in quotes. * `entity_type_id`: Supports = comparisons. * `value_type`:
|
---|
259 | * Supports = and != comparisons. * `labels`: Supports key-value equality as
|
---|
260 | * well as key presence. * `featurestore_id`: Supports = comparisons. Examples:
|
---|
261 | * * `description = "foo bar"` --> Any Feature with description exactly equal to
|
---|
262 | * `foo bar` * `value_type = DOUBLE` --> Features whose type is DOUBLE. *
|
---|
263 | * `labels.active = yes AND labels.env = prod` --> Features having both (active:
|
---|
264 | * yes) and (env: prod) labels. * `labels.env: *` --> Any Feature which has a
|
---|
265 | * label with `env` as the key.
|
---|
266 | * @return GoogleCloudAiplatformV1SearchFeaturesResponse
|
---|
267 | * @throws \Google\Service\Exception
|
---|
268 | */
|
---|
269 | public function searchFeatures($location, $optParams = [])
|
---|
270 | {
|
---|
271 | $params = ['location' => $location];
|
---|
272 | $params = array_merge($params, $optParams);
|
---|
273 | return $this->call('searchFeatures', [$params], GoogleCloudAiplatformV1SearchFeaturesResponse::class);
|
---|
274 | }
|
---|
275 | /**
|
---|
276 | * Sets the access control policy on the specified resource. Replaces any
|
---|
277 | * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
|
---|
278 | * `PERMISSION_DENIED` errors. (featurestores.setIamPolicy)
|
---|
279 | *
|
---|
280 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
281 | * specified. See [Resource
|
---|
282 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
283 | * appropriate value for this field.
|
---|
284 | * @param GoogleIamV1SetIamPolicyRequest $postBody
|
---|
285 | * @param array $optParams Optional parameters.
|
---|
286 | * @return GoogleIamV1Policy
|
---|
287 | * @throws \Google\Service\Exception
|
---|
288 | */
|
---|
289 | public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
|
---|
290 | {
|
---|
291 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
292 | $params = array_merge($params, $optParams);
|
---|
293 | return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
294 | }
|
---|
295 | /**
|
---|
296 | * Returns permissions that a caller has on the specified resource. If the
|
---|
297 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
298 | * `NOT_FOUND` error. Note: This operation is designed to be used for building
|
---|
299 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
300 | * This operation may "fail open" without warning.
|
---|
301 | * (featurestores.testIamPermissions)
|
---|
302 | *
|
---|
303 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
304 | * being requested. See [Resource
|
---|
305 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
306 | * appropriate value for this field.
|
---|
307 | * @param array $optParams Optional parameters.
|
---|
308 | *
|
---|
309 | * @opt_param string permissions The set of permissions to check for the
|
---|
310 | * `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not
|
---|
311 | * allowed. For more information see [IAM
|
---|
312 | * Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
---|
313 | * @return GoogleIamV1TestIamPermissionsResponse
|
---|
314 | * @throws \Google\Service\Exception
|
---|
315 | */
|
---|
316 | public function testIamPermissions($resource, $optParams = [])
|
---|
317 | {
|
---|
318 | $params = ['resource' => $resource];
|
---|
319 | $params = array_merge($params, $optParams);
|
---|
320 | return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
|
---|
321 | }
|
---|
322 | }
|
---|
323 |
|
---|
324 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
325 | class_alias(ProjectsLocationsFeaturestores::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsFeaturestores');
|
---|