[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\Recommender\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Recommender\GoogleCloudRecommenderV1RecommenderConfig;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * The "recommenders" collection of methods.
|
---|
| 24 | * Typical usage is:
|
---|
| 25 | * <code>
|
---|
| 26 | * $recommenderService = new Google\Service\Recommender(...);
|
---|
| 27 | * $recommenders = $recommenderService->organizations_locations_recommenders;
|
---|
| 28 | * </code>
|
---|
| 29 | */
|
---|
| 30 | class OrganizationsLocationsRecommenders extends \Google\Service\Resource
|
---|
| 31 | {
|
---|
| 32 | /**
|
---|
| 33 | * Gets the requested Recommender Config. There is only one instance of the
|
---|
| 34 | * config for each Recommender. (recommenders.getConfig)
|
---|
| 35 | *
|
---|
| 36 | * @param string $name Required. Name of the Recommendation Config to get.
|
---|
| 37 | * Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recomme
|
---|
| 38 | * nders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/
|
---|
| 39 | * recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/loca
|
---|
| 40 | * tions/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BI
|
---|
| 41 | * LLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | * @return GoogleCloudRecommenderV1RecommenderConfig
|
---|
| 44 | * @throws \Google\Service\Exception
|
---|
| 45 | */
|
---|
| 46 | public function getConfig($name, $optParams = [])
|
---|
| 47 | {
|
---|
| 48 | $params = ['name' => $name];
|
---|
| 49 | $params = array_merge($params, $optParams);
|
---|
| 50 | return $this->call('getConfig', [$params], GoogleCloudRecommenderV1RecommenderConfig::class);
|
---|
| 51 | }
|
---|
| 52 | /**
|
---|
| 53 | * Updates a Recommender Config. This will create a new revision of the config.
|
---|
| 54 | * (recommenders.updateConfig)
|
---|
| 55 | *
|
---|
| 56 | * @param string $name Identifier. Name of recommender config. Eg, projects/[PRO
|
---|
| 57 | * JECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
|
---|
| 58 | * @param GoogleCloudRecommenderV1RecommenderConfig $postBody
|
---|
| 59 | * @param array $optParams Optional parameters.
|
---|
| 60 | *
|
---|
| 61 | * @opt_param string updateMask The list of fields to be updated.
|
---|
| 62 | * @opt_param bool validateOnly If true, validate the request and preview the
|
---|
| 63 | * change, but do not actually update it.
|
---|
| 64 | * @return GoogleCloudRecommenderV1RecommenderConfig
|
---|
| 65 | * @throws \Google\Service\Exception
|
---|
| 66 | */
|
---|
| 67 | public function updateConfig($name, GoogleCloudRecommenderV1RecommenderConfig $postBody, $optParams = [])
|
---|
| 68 | {
|
---|
| 69 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 70 | $params = array_merge($params, $optParams);
|
---|
| 71 | return $this->call('updateConfig', [$params], GoogleCloudRecommenderV1RecommenderConfig::class);
|
---|
| 72 | }
|
---|
| 73 | }
|
---|
| 74 |
|
---|
| 75 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 76 | class_alias(OrganizationsLocationsRecommenders::class, 'Google_Service_Recommender_Resource_OrganizationsLocationsRecommenders');
|
---|