source: vendor/google/apiclient-services/src/RecommendationsAI/Resource/ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrations.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 3 weeks ago

Upload project files

  • Property mode set to 100644
File size: 4.4 KB
Line 
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\RecommendationsAI\Resource;
19
20use Google\Service\RecommendationsAI\GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest;
21use Google\Service\RecommendationsAI\GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse;
22use Google\Service\RecommendationsAI\GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration;
23use Google\Service\RecommendationsAI\GoogleProtobufEmpty;
24
25/**
26 * The "predictionApiKeyRegistrations" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $recommendationengineService = new Google\Service\RecommendationsAI(...);
30 * $predictionApiKeyRegistrations = $recommendationengineService->projects_locations_catalogs_eventStores_predictionApiKeyRegistrations;
31 * </code>
32 */
33class ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrations extends \Google\Service\Resource
34{
35 /**
36 * Register an API key for use with predict method.
37 * (predictionApiKeyRegistrations.create)
38 *
39 * @param string $parent Required. The parent resource path. `projects/locations
40 * /global/catalogs/default_catalog/eventStores/default_event_store`.
41 * @param GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest $postBody
42 * @param array $optParams Optional parameters.
43 * @return GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration
44 * @throws \Google\Service\Exception
45 */
46 public function create($parent, GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest $postBody, $optParams = [])
47 {
48 $params = ['parent' => $parent, 'postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('create', [$params], GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration::class);
51 }
52 /**
53 * Unregister an apiKey from using for predict method.
54 * (predictionApiKeyRegistrations.delete)
55 *
56 * @param string $name Required. The API key to unregister including full
57 * resource path. `projects/locations/global/catalogs/default_catalog/eventStore
58 * s/default_event_store/predictionApiKeyRegistrations/`
59 * @param array $optParams Optional parameters.
60 * @return GoogleProtobufEmpty
61 * @throws \Google\Service\Exception
62 */
63 public function delete($name, $optParams = [])
64 {
65 $params = ['name' => $name];
66 $params = array_merge($params, $optParams);
67 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
68 }
69 /**
70 * List the registered apiKeys for use with predict method. (predictionApiKeyReg
71 * istrations.listProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrati
72 * ons)
73 *
74 * @param string $parent Required. The parent placement resource name such as `p
75 * rojects/1234/locations/global/catalogs/default_catalog/eventStores/default_ev
76 * ent_store`
77 * @param array $optParams Optional parameters.
78 *
79 * @opt_param int pageSize Optional. Maximum number of results to return per
80 * page. If unset, the service will choose a reasonable default.
81 * @opt_param string pageToken Optional. The previous
82 * `ListPredictionApiKeyRegistration.nextPageToken`.
83 * @return GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse
84 * @throws \Google\Service\Exception
85 */
86 public function listProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrations($parent, $optParams = [])
87 {
88 $params = ['parent' => $parent];
89 $params = array_merge($params, $optParams);
90 return $this->call('list', [$params], GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse::class);
91 }
92}
93
94// Adding a class alias for backwards compatibility with the previous class name.
95class_alias(ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrations::class, 'Google_Service_RecommendationsAI_Resource_ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrations');
Note: See TracBrowser for help on using the repository browser.