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\GoogleCloudAiplatformV1FeatureView;
|
---|
21 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1FetchFeatureValuesRequest;
|
---|
22 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1FetchFeatureValuesResponse;
|
---|
23 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1ListFeatureViewsResponse;
|
---|
24 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1SearchNearestEntitiesRequest;
|
---|
25 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1SearchNearestEntitiesResponse;
|
---|
26 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1SyncFeatureViewRequest;
|
---|
27 | use Google\Service\Aiplatform\GoogleCloudAiplatformV1SyncFeatureViewResponse;
|
---|
28 | use Google\Service\Aiplatform\GoogleIamV1Policy;
|
---|
29 | use Google\Service\Aiplatform\GoogleIamV1SetIamPolicyRequest;
|
---|
30 | use Google\Service\Aiplatform\GoogleIamV1TestIamPermissionsResponse;
|
---|
31 | use Google\Service\Aiplatform\GoogleLongrunningOperation;
|
---|
32 |
|
---|
33 | /**
|
---|
34 | * The "featureViews" collection of methods.
|
---|
35 | * Typical usage is:
|
---|
36 | * <code>
|
---|
37 | * $aiplatformService = new Google\Service\Aiplatform(...);
|
---|
38 | * $featureViews = $aiplatformService->projects_locations_featureOnlineStores_featureViews;
|
---|
39 | * </code>
|
---|
40 | */
|
---|
41 | class ProjectsLocationsFeatureOnlineStoresFeatureViews extends \Google\Service\Resource
|
---|
42 | {
|
---|
43 | /**
|
---|
44 | * Creates a new FeatureView in a given FeatureOnlineStore.
|
---|
45 | * (featureViews.create)
|
---|
46 | *
|
---|
47 | * @param string $parent Required. The resource name of the FeatureOnlineStore
|
---|
48 | * to create FeatureViews. Format: `projects/{project}/locations/{location}/feat
|
---|
49 | * ureOnlineStores/{feature_online_store}`
|
---|
50 | * @param GoogleCloudAiplatformV1FeatureView $postBody
|
---|
51 | * @param array $optParams Optional parameters.
|
---|
52 | *
|
---|
53 | * @opt_param string featureViewId Required. The ID to use for the FeatureView,
|
---|
54 | * which will become the final component of the FeatureView's resource name.
|
---|
55 | * This value may be up to 60 characters, and valid characters are `[a-z0-9_]`.
|
---|
56 | * The first character cannot be a number. The value must be unique within a
|
---|
57 | * FeatureOnlineStore.
|
---|
58 | * @opt_param bool runSyncImmediately Immutable. If set to true, one on demand
|
---|
59 | * sync will be run immediately, regardless whether the FeatureView.sync_config
|
---|
60 | * is configured or not.
|
---|
61 | * @return GoogleLongrunningOperation
|
---|
62 | * @throws \Google\Service\Exception
|
---|
63 | */
|
---|
64 | public function create($parent, GoogleCloudAiplatformV1FeatureView $postBody, $optParams = [])
|
---|
65 | {
|
---|
66 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
67 | $params = array_merge($params, $optParams);
|
---|
68 | return $this->call('create', [$params], GoogleLongrunningOperation::class);
|
---|
69 | }
|
---|
70 | /**
|
---|
71 | * Deletes a single FeatureView. (featureViews.delete)
|
---|
72 | *
|
---|
73 | * @param string $name Required. The name of the FeatureView to be deleted.
|
---|
74 | * Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature
|
---|
75 | * _online_store}/featureViews/{feature_view}`
|
---|
76 | * @param array $optParams Optional parameters.
|
---|
77 | * @return GoogleLongrunningOperation
|
---|
78 | * @throws \Google\Service\Exception
|
---|
79 | */
|
---|
80 | public function delete($name, $optParams = [])
|
---|
81 | {
|
---|
82 | $params = ['name' => $name];
|
---|
83 | $params = array_merge($params, $optParams);
|
---|
84 | return $this->call('delete', [$params], GoogleLongrunningOperation::class);
|
---|
85 | }
|
---|
86 | /**
|
---|
87 | * Fetch feature values under a FeatureView. (featureViews.fetchFeatureValues)
|
---|
88 | *
|
---|
89 | * @param string $featureView Required. FeatureView resource format `projects/{p
|
---|
90 | * roject}/locations/{location}/featureOnlineStores/{featureOnlineStore}/feature
|
---|
91 | * Views/{featureView}`
|
---|
92 | * @param GoogleCloudAiplatformV1FetchFeatureValuesRequest $postBody
|
---|
93 | * @param array $optParams Optional parameters.
|
---|
94 | * @return GoogleCloudAiplatformV1FetchFeatureValuesResponse
|
---|
95 | * @throws \Google\Service\Exception
|
---|
96 | */
|
---|
97 | public function fetchFeatureValues($featureView, GoogleCloudAiplatformV1FetchFeatureValuesRequest $postBody, $optParams = [])
|
---|
98 | {
|
---|
99 | $params = ['featureView' => $featureView, 'postBody' => $postBody];
|
---|
100 | $params = array_merge($params, $optParams);
|
---|
101 | return $this->call('fetchFeatureValues', [$params], GoogleCloudAiplatformV1FetchFeatureValuesResponse::class);
|
---|
102 | }
|
---|
103 | /**
|
---|
104 | * Gets details of a single FeatureView. (featureViews.get)
|
---|
105 | *
|
---|
106 | * @param string $name Required. The name of the FeatureView resource. Format: `
|
---|
107 | * projects/{project}/locations/{location}/featureOnlineStores/{feature_online_s
|
---|
108 | * tore}/featureViews/{feature_view}`
|
---|
109 | * @param array $optParams Optional parameters.
|
---|
110 | * @return GoogleCloudAiplatformV1FeatureView
|
---|
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], GoogleCloudAiplatformV1FeatureView::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. (featureViews.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 FeatureViews in a given FeatureOnlineStore.
|
---|
152 | * (featureViews.listProjectsLocationsFeatureOnlineStoresFeatureViews)
|
---|
153 | *
|
---|
154 | * @param string $parent Required. The resource name of the FeatureOnlineStore
|
---|
155 | * to list FeatureViews. Format: `projects/{project}/locations/{location}/featur
|
---|
156 | * eOnlineStores/{feature_online_store}`
|
---|
157 | * @param array $optParams Optional parameters.
|
---|
158 | *
|
---|
159 | * @opt_param string filter Lists the FeatureViews that match the filter
|
---|
160 | * expression. The following filters are supported: * `create_time`: Supports
|
---|
161 | * `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. Values must be in RFC 3339
|
---|
162 | * format. * `update_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=`
|
---|
163 | * comparisons. Values must be in RFC 3339 format. * `labels`: Supports key-
|
---|
164 | * value equality as well as key presence. Examples: * `create_time >
|
---|
165 | * \"2020-01-31T15:30:00.000000Z\" OR update_time >
|
---|
166 | * \"2020-01-31T15:30:00.000000Z\"` --> FeatureViews created or updated after
|
---|
167 | * 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod`
|
---|
168 | * --> FeatureViews having both (active: yes) and (env: prod) labels. *
|
---|
169 | * `labels.env: *` --> Any FeatureView which has a label with 'env' as the key.
|
---|
170 | * @opt_param string orderBy A comma-separated list of fields to order by,
|
---|
171 | * sorted in ascending order. Use "desc" after a field name for descending.
|
---|
172 | * Supported fields: * `feature_view_id` * `create_time` * `update_time`
|
---|
173 | * @opt_param int pageSize The maximum number of FeatureViews to return. The
|
---|
174 | * service may return fewer than this value. If unspecified, at most 1000
|
---|
175 | * FeatureViews will be returned. The maximum value is 1000; any value greater
|
---|
176 | * than 1000 will be coerced to 1000.
|
---|
177 | * @opt_param string pageToken A page token, received from a previous
|
---|
178 | * FeatureOnlineStoreAdminService.ListFeatureViews call. Provide this to
|
---|
179 | * retrieve the subsequent page. When paginating, all other parameters provided
|
---|
180 | * to FeatureOnlineStoreAdminService.ListFeatureViews must match the call that
|
---|
181 | * provided the page token.
|
---|
182 | * @return GoogleCloudAiplatformV1ListFeatureViewsResponse
|
---|
183 | * @throws \Google\Service\Exception
|
---|
184 | */
|
---|
185 | public function listProjectsLocationsFeatureOnlineStoresFeatureViews($parent, $optParams = [])
|
---|
186 | {
|
---|
187 | $params = ['parent' => $parent];
|
---|
188 | $params = array_merge($params, $optParams);
|
---|
189 | return $this->call('list', [$params], GoogleCloudAiplatformV1ListFeatureViewsResponse::class);
|
---|
190 | }
|
---|
191 | /**
|
---|
192 | * Updates the parameters of a single FeatureView. (featureViews.patch)
|
---|
193 | *
|
---|
194 | * @param string $name Identifier. Name of the FeatureView. Format: `projects/{p
|
---|
195 | * roject}/locations/{location}/featureOnlineStores/{feature_online_store}/featu
|
---|
196 | * reViews/{feature_view}`
|
---|
197 | * @param GoogleCloudAiplatformV1FeatureView $postBody
|
---|
198 | * @param array $optParams Optional parameters.
|
---|
199 | *
|
---|
200 | * @opt_param string updateMask Field mask is used to specify the fields to be
|
---|
201 | * overwritten in the FeatureView resource by the update. The fields specified
|
---|
202 | * in the update_mask are relative to the resource, not the full request. A
|
---|
203 | * field will be overwritten if it is in the mask. If the user does not provide
|
---|
204 | * a mask then only the non-empty fields present in the request will be
|
---|
205 | * overwritten. Set the update_mask to `*` to override all fields. Updatable
|
---|
206 | * fields: * `labels` * `service_agent_type` * `big_query_source` *
|
---|
207 | * `big_query_source.uri` * `big_query_source.entity_id_columns` *
|
---|
208 | * `feature_registry_source` * `feature_registry_source.feature_groups` *
|
---|
209 | * `sync_config` * `sync_config.cron` * `optimized_config.automatic_resources`
|
---|
210 | * @return GoogleLongrunningOperation
|
---|
211 | * @throws \Google\Service\Exception
|
---|
212 | */
|
---|
213 | public function patch($name, GoogleCloudAiplatformV1FeatureView $postBody, $optParams = [])
|
---|
214 | {
|
---|
215 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
216 | $params = array_merge($params, $optParams);
|
---|
217 | return $this->call('patch', [$params], GoogleLongrunningOperation::class);
|
---|
218 | }
|
---|
219 | /**
|
---|
220 | * Search the nearest entities under a FeatureView. Search only works for
|
---|
221 | * indexable feature view; if a feature view isn't indexable, returns Invalid
|
---|
222 | * argument response. (featureViews.searchNearestEntities)
|
---|
223 | *
|
---|
224 | * @param string $featureView Required. FeatureView resource format `projects/{p
|
---|
225 | * roject}/locations/{location}/featureOnlineStores/{featureOnlineStore}/feature
|
---|
226 | * Views/{featureView}`
|
---|
227 | * @param GoogleCloudAiplatformV1SearchNearestEntitiesRequest $postBody
|
---|
228 | * @param array $optParams Optional parameters.
|
---|
229 | * @return GoogleCloudAiplatformV1SearchNearestEntitiesResponse
|
---|
230 | * @throws \Google\Service\Exception
|
---|
231 | */
|
---|
232 | public function searchNearestEntities($featureView, GoogleCloudAiplatformV1SearchNearestEntitiesRequest $postBody, $optParams = [])
|
---|
233 | {
|
---|
234 | $params = ['featureView' => $featureView, 'postBody' => $postBody];
|
---|
235 | $params = array_merge($params, $optParams);
|
---|
236 | return $this->call('searchNearestEntities', [$params], GoogleCloudAiplatformV1SearchNearestEntitiesResponse::class);
|
---|
237 | }
|
---|
238 | /**
|
---|
239 | * Sets the access control policy on the specified resource. Replaces any
|
---|
240 | * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
|
---|
241 | * `PERMISSION_DENIED` errors. (featureViews.setIamPolicy)
|
---|
242 | *
|
---|
243 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
244 | * specified. See [Resource
|
---|
245 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
246 | * appropriate value for this field.
|
---|
247 | * @param GoogleIamV1SetIamPolicyRequest $postBody
|
---|
248 | * @param array $optParams Optional parameters.
|
---|
249 | * @return GoogleIamV1Policy
|
---|
250 | * @throws \Google\Service\Exception
|
---|
251 | */
|
---|
252 | public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
|
---|
253 | {
|
---|
254 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
255 | $params = array_merge($params, $optParams);
|
---|
256 | return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
|
---|
257 | }
|
---|
258 | /**
|
---|
259 | * Triggers on-demand sync for the FeatureView. (featureViews.sync)
|
---|
260 | *
|
---|
261 | * @param string $featureView Required. Format: `projects/{project}/locations/{l
|
---|
262 | * ocation}/featureOnlineStores/{feature_online_store}/featureViews/{feature_vie
|
---|
263 | * w}`
|
---|
264 | * @param GoogleCloudAiplatformV1SyncFeatureViewRequest $postBody
|
---|
265 | * @param array $optParams Optional parameters.
|
---|
266 | * @return GoogleCloudAiplatformV1SyncFeatureViewResponse
|
---|
267 | * @throws \Google\Service\Exception
|
---|
268 | */
|
---|
269 | public function sync($featureView, GoogleCloudAiplatformV1SyncFeatureViewRequest $postBody, $optParams = [])
|
---|
270 | {
|
---|
271 | $params = ['featureView' => $featureView, 'postBody' => $postBody];
|
---|
272 | $params = array_merge($params, $optParams);
|
---|
273 | return $this->call('sync', [$params], GoogleCloudAiplatformV1SyncFeatureViewResponse::class);
|
---|
274 | }
|
---|
275 | /**
|
---|
276 | * Returns permissions that a caller has on the specified resource. If the
|
---|
277 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
278 | * `NOT_FOUND` error. Note: This operation is designed to be used for building
|
---|
279 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
280 | * This operation may "fail open" without warning.
|
---|
281 | * (featureViews.testIamPermissions)
|
---|
282 | *
|
---|
283 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
284 | * being requested. See [Resource
|
---|
285 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
286 | * appropriate value for this field.
|
---|
287 | * @param array $optParams Optional parameters.
|
---|
288 | *
|
---|
289 | * @opt_param string permissions The set of permissions to check for the
|
---|
290 | * `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not
|
---|
291 | * allowed. For more information see [IAM
|
---|
292 | * Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
---|
293 | * @return GoogleIamV1TestIamPermissionsResponse
|
---|
294 | * @throws \Google\Service\Exception
|
---|
295 | */
|
---|
296 | public function testIamPermissions($resource, $optParams = [])
|
---|
297 | {
|
---|
298 | $params = ['resource' => $resource];
|
---|
299 | $params = array_merge($params, $optParams);
|
---|
300 | return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
|
---|
301 | }
|
---|
302 | }
|
---|
303 |
|
---|
304 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
305 | class_alias(ProjectsLocationsFeatureOnlineStoresFeatureViews::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsFeatureOnlineStoresFeatureViews');
|
---|