Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "billingAccounts" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $billingAccounts = $recommenderService->billingAccounts;
* </code>
*/
class BillingAccounts extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BillingAccounts::class, 'Google_Service_Recommender_Resource_BillingAccounts');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $locations = $recommenderService->billingAccounts_locations;
* </code>
*/
class BillingAccountsLocations extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BillingAccountsLocations::class, 'Google_Service_Recommender_Resource_BillingAccountsLocations');

View File

@@ -0,0 +1,77 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1InsightTypeConfig;
/**
* The "insightTypes" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $insightTypes = $recommenderService->billingAccounts_locations_insightTypes;
* </code>
*/
class BillingAccountsLocationsInsightTypes extends \Google\Service\Resource
{
/**
* Gets the requested InsightTypeConfig. There is only one instance of the
* config for each InsightType. (insightTypes.getConfig)
*
* @param string $name Required. Name of the InsightTypeConfig to get.
* Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insight
* Types/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]
* /insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/lo
* cations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/
* [BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/conf
* ig`
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1InsightTypeConfig
* @throws \Google\Service\Exception
*/
public function getConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getConfig', [$params], GoogleCloudRecommenderV1InsightTypeConfig::class);
}
/**
* Updates an InsightTypeConfig change. This will create a new revision of the
* config. (insightTypes.updateConfig)
*
* @param string $name Identifier. Name of insight type config. Eg, projects/[PR
* OJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config
* @param GoogleCloudRecommenderV1InsightTypeConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The list of fields to be updated.
* @opt_param bool validateOnly If true, validate the request and preview the
* change, but do not actually update it.
* @return GoogleCloudRecommenderV1InsightTypeConfig
* @throws \Google\Service\Exception
*/
public function updateConfig($name, GoogleCloudRecommenderV1InsightTypeConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateConfig', [$params], GoogleCloudRecommenderV1InsightTypeConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BillingAccountsLocationsInsightTypes::class, 'Google_Service_Recommender_Resource_BillingAccountsLocationsInsightTypes');

View File

@@ -0,0 +1,116 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1Insight;
use Google\Service\Recommender\GoogleCloudRecommenderV1ListInsightsResponse;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkInsightAcceptedRequest;
/**
* The "insights" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $insights = $recommenderService->billingAccounts_locations_insightTypes_insights;
* </code>
*/
class BillingAccountsLocationsInsightTypesInsights extends \Google\Service\Resource
{
/**
* Gets the requested insight. Requires the recommender.*.get IAM permission for
* the specified insight type. (insights.get)
*
* @param string $name Required. Name of the insight.
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Insight
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudRecommenderV1Insight::class);
}
/**
* Lists insights for the specified Cloud Resource. Requires the
* recommender.*.list IAM permission for the specified insight type.
* (insights.listBillingAccountsLocationsInsightTypesInsights)
*
* @param string $parent Required. The container resource on which to execute
* the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCA
* TION]/insightTypes/[INSIGHT_TYPE_ID]` *
* `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` *
* `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSI
* GHT_TYPE_ID]` *
* `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `
* organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY
* PE_ID]` LOCATION here refers to GCP Locations:
* https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported
* insight types: https://cloud.google.com/recommender/docs/insights/insight-
* types.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Filter expression to restrict the insights
* returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` *
* `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR
* stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` *
* `severity = CRITICAL OR severity = HIGH` * `targetResources :
* //compute.googleapis.com/projects/1234/zones/us-
* central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity =
* CRITICAL OR severity = HIGH)` The max allowed filter length is 500
* characters. (These expressions are based on the filter language described at
* https://google.aip.dev/160)
* @opt_param int pageSize Optional. The maximum number of results to return
* from this request. Non-positive values are ignored. If not specified, the
* server will determine the number of results to return.
* @opt_param string pageToken Optional. If present, retrieves the next batch of
* results from the preceding call to this method. `page_token` must be the
* value of `next_page_token` from the previous response. The values of other
* method parameters must be identical to those in the previous call.
* @return GoogleCloudRecommenderV1ListInsightsResponse
* @throws \Google\Service\Exception
*/
public function listBillingAccountsLocationsInsightTypesInsights($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudRecommenderV1ListInsightsResponse::class);
}
/**
* Marks the Insight State as Accepted. Users can use this method to indicate to
* the Recommender API that they have applied some action based on the insight.
* This stops the insight content from being updated. MarkInsightAccepted can be
* applied to insights in ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified insight. (insights.markAccepted)
*
* @param string $name Required. Name of the insight.
* @param GoogleCloudRecommenderV1MarkInsightAcceptedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Insight
* @throws \Google\Service\Exception
*/
public function markAccepted($name, GoogleCloudRecommenderV1MarkInsightAcceptedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markAccepted', [$params], GoogleCloudRecommenderV1Insight::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BillingAccountsLocationsInsightTypesInsights::class, 'Google_Service_Recommender_Resource_BillingAccountsLocationsInsightTypesInsights');

View File

@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1RecommenderConfig;
/**
* The "recommenders" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $recommenders = $recommenderService->billingAccounts_locations_recommenders;
* </code>
*/
class BillingAccountsLocationsRecommenders extends \Google\Service\Resource
{
/**
* Gets the requested Recommender Config. There is only one instance of the
* config for each Recommender. (recommenders.getConfig)
*
* @param string $name Required. Name of the Recommendation Config to get.
* Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recomme
* nders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/
* recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/loca
* tions/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BI
* LLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1RecommenderConfig
* @throws \Google\Service\Exception
*/
public function getConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getConfig', [$params], GoogleCloudRecommenderV1RecommenderConfig::class);
}
/**
* Updates a Recommender Config. This will create a new revision of the config.
* (recommenders.updateConfig)
*
* @param string $name Identifier. Name of recommender config. Eg, projects/[PRO
* JECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
* @param GoogleCloudRecommenderV1RecommenderConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The list of fields to be updated.
* @opt_param bool validateOnly If true, validate the request and preview the
* change, but do not actually update it.
* @return GoogleCloudRecommenderV1RecommenderConfig
* @throws \Google\Service\Exception
*/
public function updateConfig($name, GoogleCloudRecommenderV1RecommenderConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateConfig', [$params], GoogleCloudRecommenderV1RecommenderConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BillingAccountsLocationsRecommenders::class, 'Google_Service_Recommender_Resource_BillingAccountsLocationsRecommenders');

View File

@@ -0,0 +1,183 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1ListRecommendationsResponse;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationClaimedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationDismissedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationFailedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationSucceededRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1Recommendation;
/**
* The "recommendations" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $recommendations = $recommenderService->billingAccounts_locations_recommenders_recommendations;
* </code>
*/
class BillingAccountsLocationsRecommendersRecommendations extends \Google\Service\Resource
{
/**
* Gets the requested recommendation. Requires the recommender.*.get IAM
* permission for the specified recommender. (recommendations.get)
*
* @param string $name Required. Name of the recommendation.
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Lists recommendations for the specified Cloud Resource. Requires the
* recommender.*.list IAM permission for the specified recommender.
* (recommendations.listBillingAccountsLocationsRecommendersRecommendations)
*
* @param string $parent Required. The container resource on which to execute
* the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCA
* TION]/recommenders/[RECOMMENDER_ID]` *
* `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` *
* `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECO
* MMENDER_ID]` *
* `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `o
* rganizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER
* _ID]` LOCATION here refers to GCP Locations:
* https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
* recommenders: https://cloud.google.com/recommender/docs/recommenders.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Filter expression to restrict the recommendations
* returned. Supported filter fields: * `state_info.state` *
* `recommenderSubtype` * `priority` * `targetResources` Examples: *
* `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` *
* `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` *
* `priority = P1 OR priority = P2` * `targetResources :
* //compute.googleapis.com/projects/1234/zones/us-
* central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority =
* P1 OR priority = P2)` The max allowed filter length is 500 characters. (These
* expressions are based on the filter language described at
* https://google.aip.dev/160)
* @opt_param int pageSize Optional. The maximum number of results to return
* from this request. Non-positive values are ignored. If not specified, the
* server will determine the number of results to return.
* @opt_param string pageToken Optional. If present, retrieves the next batch of
* results from the preceding call to this method. `page_token` must be the
* value of `next_page_token` from the previous response. The values of other
* method parameters must be identical to those in the previous call.
* @return GoogleCloudRecommenderV1ListRecommendationsResponse
* @throws \Google\Service\Exception
*/
public function listBillingAccountsLocationsRecommendersRecommendations($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudRecommenderV1ListRecommendationsResponse::class);
}
/**
* Marks the Recommendation State as Claimed. Users can use this method to
* indicate to the Recommender API that they are starting to apply the
* recommendation themselves. This stops the recommendation content from being
* updated. Associated insights are frozen and placed in the ACCEPTED state.
* MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
* SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markClaimed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markClaimed($name, GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markClaimed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Mark the Recommendation State as Dismissed. Users can use this method to
* indicate to the Recommender API that an ACTIVE recommendation has to be
* marked back as DISMISSED. MarkRecommendationDismissed can be applied to
* recommendations in ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markDismissed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationDismissedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markDismissed($name, GoogleCloudRecommenderV1MarkRecommendationDismissedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markDismissed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Marks the Recommendation State as Failed. Users can use this method to
* indicate to the Recommender API that they have applied the recommendation
* themselves, and the operation failed. This stops the recommendation content
* from being updated. Associated insights are frozen and placed in the ACCEPTED
* state. MarkRecommendationFailed can be applied to recommendations in ACTIVE,
* CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markFailed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markFailed($name, GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markFailed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Marks the Recommendation State as Succeeded. Users can use this method to
* indicate to the Recommender API that they have applied the recommendation
* themselves, and the operation was successful. This stops the recommendation
* content from being updated. Associated insights are frozen and placed in the
* ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations
* in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the
* recommender.*.update IAM permission for the specified recommender.
* (recommendations.markSucceeded)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markSucceeded($name, GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markSucceeded', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BillingAccountsLocationsRecommendersRecommendations::class, 'Google_Service_Recommender_Resource_BillingAccountsLocationsRecommendersRecommendations');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "folders" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $folders = $recommenderService->folders;
* </code>
*/
class Folders extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Folders::class, 'Google_Service_Recommender_Resource_Folders');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $locations = $recommenderService->folders_locations;
* </code>
*/
class FoldersLocations extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FoldersLocations::class, 'Google_Service_Recommender_Resource_FoldersLocations');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "insightTypes" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $insightTypes = $recommenderService->folders_locations_insightTypes;
* </code>
*/
class FoldersLocationsInsightTypes extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FoldersLocationsInsightTypes::class, 'Google_Service_Recommender_Resource_FoldersLocationsInsightTypes');

View File

@@ -0,0 +1,116 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1Insight;
use Google\Service\Recommender\GoogleCloudRecommenderV1ListInsightsResponse;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkInsightAcceptedRequest;
/**
* The "insights" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $insights = $recommenderService->folders_locations_insightTypes_insights;
* </code>
*/
class FoldersLocationsInsightTypesInsights extends \Google\Service\Resource
{
/**
* Gets the requested insight. Requires the recommender.*.get IAM permission for
* the specified insight type. (insights.get)
*
* @param string $name Required. Name of the insight.
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Insight
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudRecommenderV1Insight::class);
}
/**
* Lists insights for the specified Cloud Resource. Requires the
* recommender.*.list IAM permission for the specified insight type.
* (insights.listFoldersLocationsInsightTypesInsights)
*
* @param string $parent Required. The container resource on which to execute
* the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCA
* TION]/insightTypes/[INSIGHT_TYPE_ID]` *
* `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` *
* `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSI
* GHT_TYPE_ID]` *
* `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `
* organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY
* PE_ID]` LOCATION here refers to GCP Locations:
* https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported
* insight types: https://cloud.google.com/recommender/docs/insights/insight-
* types.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Filter expression to restrict the insights
* returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` *
* `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR
* stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` *
* `severity = CRITICAL OR severity = HIGH` * `targetResources :
* //compute.googleapis.com/projects/1234/zones/us-
* central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity =
* CRITICAL OR severity = HIGH)` The max allowed filter length is 500
* characters. (These expressions are based on the filter language described at
* https://google.aip.dev/160)
* @opt_param int pageSize Optional. The maximum number of results to return
* from this request. Non-positive values are ignored. If not specified, the
* server will determine the number of results to return.
* @opt_param string pageToken Optional. If present, retrieves the next batch of
* results from the preceding call to this method. `page_token` must be the
* value of `next_page_token` from the previous response. The values of other
* method parameters must be identical to those in the previous call.
* @return GoogleCloudRecommenderV1ListInsightsResponse
* @throws \Google\Service\Exception
*/
public function listFoldersLocationsInsightTypesInsights($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudRecommenderV1ListInsightsResponse::class);
}
/**
* Marks the Insight State as Accepted. Users can use this method to indicate to
* the Recommender API that they have applied some action based on the insight.
* This stops the insight content from being updated. MarkInsightAccepted can be
* applied to insights in ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified insight. (insights.markAccepted)
*
* @param string $name Required. Name of the insight.
* @param GoogleCloudRecommenderV1MarkInsightAcceptedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Insight
* @throws \Google\Service\Exception
*/
public function markAccepted($name, GoogleCloudRecommenderV1MarkInsightAcceptedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markAccepted', [$params], GoogleCloudRecommenderV1Insight::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FoldersLocationsInsightTypesInsights::class, 'Google_Service_Recommender_Resource_FoldersLocationsInsightTypesInsights');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "recommenders" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $recommenders = $recommenderService->folders_locations_recommenders;
* </code>
*/
class FoldersLocationsRecommenders extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FoldersLocationsRecommenders::class, 'Google_Service_Recommender_Resource_FoldersLocationsRecommenders');

View File

@@ -0,0 +1,183 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1ListRecommendationsResponse;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationClaimedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationDismissedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationFailedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationSucceededRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1Recommendation;
/**
* The "recommendations" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $recommendations = $recommenderService->folders_locations_recommenders_recommendations;
* </code>
*/
class FoldersLocationsRecommendersRecommendations extends \Google\Service\Resource
{
/**
* Gets the requested recommendation. Requires the recommender.*.get IAM
* permission for the specified recommender. (recommendations.get)
*
* @param string $name Required. Name of the recommendation.
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Lists recommendations for the specified Cloud Resource. Requires the
* recommender.*.list IAM permission for the specified recommender.
* (recommendations.listFoldersLocationsRecommendersRecommendations)
*
* @param string $parent Required. The container resource on which to execute
* the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCA
* TION]/recommenders/[RECOMMENDER_ID]` *
* `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` *
* `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECO
* MMENDER_ID]` *
* `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `o
* rganizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER
* _ID]` LOCATION here refers to GCP Locations:
* https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
* recommenders: https://cloud.google.com/recommender/docs/recommenders.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Filter expression to restrict the recommendations
* returned. Supported filter fields: * `state_info.state` *
* `recommenderSubtype` * `priority` * `targetResources` Examples: *
* `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` *
* `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` *
* `priority = P1 OR priority = P2` * `targetResources :
* //compute.googleapis.com/projects/1234/zones/us-
* central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority =
* P1 OR priority = P2)` The max allowed filter length is 500 characters. (These
* expressions are based on the filter language described at
* https://google.aip.dev/160)
* @opt_param int pageSize Optional. The maximum number of results to return
* from this request. Non-positive values are ignored. If not specified, the
* server will determine the number of results to return.
* @opt_param string pageToken Optional. If present, retrieves the next batch of
* results from the preceding call to this method. `page_token` must be the
* value of `next_page_token` from the previous response. The values of other
* method parameters must be identical to those in the previous call.
* @return GoogleCloudRecommenderV1ListRecommendationsResponse
* @throws \Google\Service\Exception
*/
public function listFoldersLocationsRecommendersRecommendations($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudRecommenderV1ListRecommendationsResponse::class);
}
/**
* Marks the Recommendation State as Claimed. Users can use this method to
* indicate to the Recommender API that they are starting to apply the
* recommendation themselves. This stops the recommendation content from being
* updated. Associated insights are frozen and placed in the ACCEPTED state.
* MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
* SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markClaimed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markClaimed($name, GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markClaimed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Mark the Recommendation State as Dismissed. Users can use this method to
* indicate to the Recommender API that an ACTIVE recommendation has to be
* marked back as DISMISSED. MarkRecommendationDismissed can be applied to
* recommendations in ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markDismissed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationDismissedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markDismissed($name, GoogleCloudRecommenderV1MarkRecommendationDismissedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markDismissed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Marks the Recommendation State as Failed. Users can use this method to
* indicate to the Recommender API that they have applied the recommendation
* themselves, and the operation failed. This stops the recommendation content
* from being updated. Associated insights are frozen and placed in the ACCEPTED
* state. MarkRecommendationFailed can be applied to recommendations in ACTIVE,
* CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markFailed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markFailed($name, GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markFailed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Marks the Recommendation State as Succeeded. Users can use this method to
* indicate to the Recommender API that they have applied the recommendation
* themselves, and the operation was successful. This stops the recommendation
* content from being updated. Associated insights are frozen and placed in the
* ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations
* in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the
* recommender.*.update IAM permission for the specified recommender.
* (recommendations.markSucceeded)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markSucceeded($name, GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markSucceeded', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FoldersLocationsRecommendersRecommendations::class, 'Google_Service_Recommender_Resource_FoldersLocationsRecommendersRecommendations');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "organizations" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $organizations = $recommenderService->organizations;
* </code>
*/
class Organizations extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Organizations::class, 'Google_Service_Recommender_Resource_Organizations');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $locations = $recommenderService->organizations_locations;
* </code>
*/
class OrganizationsLocations extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsLocations::class, 'Google_Service_Recommender_Resource_OrganizationsLocations');

View File

@@ -0,0 +1,77 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1InsightTypeConfig;
/**
* The "insightTypes" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $insightTypes = $recommenderService->organizations_locations_insightTypes;
* </code>
*/
class OrganizationsLocationsInsightTypes extends \Google\Service\Resource
{
/**
* Gets the requested InsightTypeConfig. There is only one instance of the
* config for each InsightType. (insightTypes.getConfig)
*
* @param string $name Required. Name of the InsightTypeConfig to get.
* Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insight
* Types/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]
* /insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/lo
* cations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/
* [BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/conf
* ig`
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1InsightTypeConfig
* @throws \Google\Service\Exception
*/
public function getConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getConfig', [$params], GoogleCloudRecommenderV1InsightTypeConfig::class);
}
/**
* Updates an InsightTypeConfig change. This will create a new revision of the
* config. (insightTypes.updateConfig)
*
* @param string $name Identifier. Name of insight type config. Eg, projects/[PR
* OJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config
* @param GoogleCloudRecommenderV1InsightTypeConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The list of fields to be updated.
* @opt_param bool validateOnly If true, validate the request and preview the
* change, but do not actually update it.
* @return GoogleCloudRecommenderV1InsightTypeConfig
* @throws \Google\Service\Exception
*/
public function updateConfig($name, GoogleCloudRecommenderV1InsightTypeConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateConfig', [$params], GoogleCloudRecommenderV1InsightTypeConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsLocationsInsightTypes::class, 'Google_Service_Recommender_Resource_OrganizationsLocationsInsightTypes');

View File

@@ -0,0 +1,116 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1Insight;
use Google\Service\Recommender\GoogleCloudRecommenderV1ListInsightsResponse;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkInsightAcceptedRequest;
/**
* The "insights" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $insights = $recommenderService->organizations_locations_insightTypes_insights;
* </code>
*/
class OrganizationsLocationsInsightTypesInsights extends \Google\Service\Resource
{
/**
* Gets the requested insight. Requires the recommender.*.get IAM permission for
* the specified insight type. (insights.get)
*
* @param string $name Required. Name of the insight.
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Insight
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudRecommenderV1Insight::class);
}
/**
* Lists insights for the specified Cloud Resource. Requires the
* recommender.*.list IAM permission for the specified insight type.
* (insights.listOrganizationsLocationsInsightTypesInsights)
*
* @param string $parent Required. The container resource on which to execute
* the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCA
* TION]/insightTypes/[INSIGHT_TYPE_ID]` *
* `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` *
* `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSI
* GHT_TYPE_ID]` *
* `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `
* organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY
* PE_ID]` LOCATION here refers to GCP Locations:
* https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported
* insight types: https://cloud.google.com/recommender/docs/insights/insight-
* types.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Filter expression to restrict the insights
* returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` *
* `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR
* stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` *
* `severity = CRITICAL OR severity = HIGH` * `targetResources :
* //compute.googleapis.com/projects/1234/zones/us-
* central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity =
* CRITICAL OR severity = HIGH)` The max allowed filter length is 500
* characters. (These expressions are based on the filter language described at
* https://google.aip.dev/160)
* @opt_param int pageSize Optional. The maximum number of results to return
* from this request. Non-positive values are ignored. If not specified, the
* server will determine the number of results to return.
* @opt_param string pageToken Optional. If present, retrieves the next batch of
* results from the preceding call to this method. `page_token` must be the
* value of `next_page_token` from the previous response. The values of other
* method parameters must be identical to those in the previous call.
* @return GoogleCloudRecommenderV1ListInsightsResponse
* @throws \Google\Service\Exception
*/
public function listOrganizationsLocationsInsightTypesInsights($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudRecommenderV1ListInsightsResponse::class);
}
/**
* Marks the Insight State as Accepted. Users can use this method to indicate to
* the Recommender API that they have applied some action based on the insight.
* This stops the insight content from being updated. MarkInsightAccepted can be
* applied to insights in ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified insight. (insights.markAccepted)
*
* @param string $name Required. Name of the insight.
* @param GoogleCloudRecommenderV1MarkInsightAcceptedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Insight
* @throws \Google\Service\Exception
*/
public function markAccepted($name, GoogleCloudRecommenderV1MarkInsightAcceptedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markAccepted', [$params], GoogleCloudRecommenderV1Insight::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsLocationsInsightTypesInsights::class, 'Google_Service_Recommender_Resource_OrganizationsLocationsInsightTypesInsights');

View File

@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1RecommenderConfig;
/**
* The "recommenders" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $recommenders = $recommenderService->organizations_locations_recommenders;
* </code>
*/
class OrganizationsLocationsRecommenders extends \Google\Service\Resource
{
/**
* Gets the requested Recommender Config. There is only one instance of the
* config for each Recommender. (recommenders.getConfig)
*
* @param string $name Required. Name of the Recommendation Config to get.
* Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recomme
* nders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/
* recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/loca
* tions/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BI
* LLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1RecommenderConfig
* @throws \Google\Service\Exception
*/
public function getConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getConfig', [$params], GoogleCloudRecommenderV1RecommenderConfig::class);
}
/**
* Updates a Recommender Config. This will create a new revision of the config.
* (recommenders.updateConfig)
*
* @param string $name Identifier. Name of recommender config. Eg, projects/[PRO
* JECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
* @param GoogleCloudRecommenderV1RecommenderConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The list of fields to be updated.
* @opt_param bool validateOnly If true, validate the request and preview the
* change, but do not actually update it.
* @return GoogleCloudRecommenderV1RecommenderConfig
* @throws \Google\Service\Exception
*/
public function updateConfig($name, GoogleCloudRecommenderV1RecommenderConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateConfig', [$params], GoogleCloudRecommenderV1RecommenderConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsLocationsRecommenders::class, 'Google_Service_Recommender_Resource_OrganizationsLocationsRecommenders');

View File

@@ -0,0 +1,183 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1ListRecommendationsResponse;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationClaimedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationDismissedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationFailedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationSucceededRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1Recommendation;
/**
* The "recommendations" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $recommendations = $recommenderService->organizations_locations_recommenders_recommendations;
* </code>
*/
class OrganizationsLocationsRecommendersRecommendations extends \Google\Service\Resource
{
/**
* Gets the requested recommendation. Requires the recommender.*.get IAM
* permission for the specified recommender. (recommendations.get)
*
* @param string $name Required. Name of the recommendation.
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Lists recommendations for the specified Cloud Resource. Requires the
* recommender.*.list IAM permission for the specified recommender.
* (recommendations.listOrganizationsLocationsRecommendersRecommendations)
*
* @param string $parent Required. The container resource on which to execute
* the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCA
* TION]/recommenders/[RECOMMENDER_ID]` *
* `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` *
* `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECO
* MMENDER_ID]` *
* `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `o
* rganizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER
* _ID]` LOCATION here refers to GCP Locations:
* https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
* recommenders: https://cloud.google.com/recommender/docs/recommenders.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Filter expression to restrict the recommendations
* returned. Supported filter fields: * `state_info.state` *
* `recommenderSubtype` * `priority` * `targetResources` Examples: *
* `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` *
* `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` *
* `priority = P1 OR priority = P2` * `targetResources :
* //compute.googleapis.com/projects/1234/zones/us-
* central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority =
* P1 OR priority = P2)` The max allowed filter length is 500 characters. (These
* expressions are based on the filter language described at
* https://google.aip.dev/160)
* @opt_param int pageSize Optional. The maximum number of results to return
* from this request. Non-positive values are ignored. If not specified, the
* server will determine the number of results to return.
* @opt_param string pageToken Optional. If present, retrieves the next batch of
* results from the preceding call to this method. `page_token` must be the
* value of `next_page_token` from the previous response. The values of other
* method parameters must be identical to those in the previous call.
* @return GoogleCloudRecommenderV1ListRecommendationsResponse
* @throws \Google\Service\Exception
*/
public function listOrganizationsLocationsRecommendersRecommendations($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudRecommenderV1ListRecommendationsResponse::class);
}
/**
* Marks the Recommendation State as Claimed. Users can use this method to
* indicate to the Recommender API that they are starting to apply the
* recommendation themselves. This stops the recommendation content from being
* updated. Associated insights are frozen and placed in the ACCEPTED state.
* MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
* SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markClaimed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markClaimed($name, GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markClaimed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Mark the Recommendation State as Dismissed. Users can use this method to
* indicate to the Recommender API that an ACTIVE recommendation has to be
* marked back as DISMISSED. MarkRecommendationDismissed can be applied to
* recommendations in ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markDismissed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationDismissedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markDismissed($name, GoogleCloudRecommenderV1MarkRecommendationDismissedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markDismissed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Marks the Recommendation State as Failed. Users can use this method to
* indicate to the Recommender API that they have applied the recommendation
* themselves, and the operation failed. This stops the recommendation content
* from being updated. Associated insights are frozen and placed in the ACCEPTED
* state. MarkRecommendationFailed can be applied to recommendations in ACTIVE,
* CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markFailed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markFailed($name, GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markFailed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Marks the Recommendation State as Succeeded. Users can use this method to
* indicate to the Recommender API that they have applied the recommendation
* themselves, and the operation was successful. This stops the recommendation
* content from being updated. Associated insights are frozen and placed in the
* ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations
* in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the
* recommender.*.update IAM permission for the specified recommender.
* (recommendations.markSucceeded)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markSucceeded($name, GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markSucceeded', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(OrganizationsLocationsRecommendersRecommendations::class, 'Google_Service_Recommender_Resource_OrganizationsLocationsRecommendersRecommendations');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $projects = $recommenderService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_Recommender_Resource_Projects');

View File

@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $locations = $recommenderService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocations::class, 'Google_Service_Recommender_Resource_ProjectsLocations');

View File

@@ -0,0 +1,77 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1InsightTypeConfig;
/**
* The "insightTypes" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $insightTypes = $recommenderService->projects_locations_insightTypes;
* </code>
*/
class ProjectsLocationsInsightTypes extends \Google\Service\Resource
{
/**
* Gets the requested InsightTypeConfig. There is only one instance of the
* config for each InsightType. (insightTypes.getConfig)
*
* @param string $name Required. Name of the InsightTypeConfig to get.
* Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insight
* Types/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]
* /insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/lo
* cations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/
* [BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/conf
* ig`
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1InsightTypeConfig
* @throws \Google\Service\Exception
*/
public function getConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getConfig', [$params], GoogleCloudRecommenderV1InsightTypeConfig::class);
}
/**
* Updates an InsightTypeConfig change. This will create a new revision of the
* config. (insightTypes.updateConfig)
*
* @param string $name Identifier. Name of insight type config. Eg, projects/[PR
* OJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config
* @param GoogleCloudRecommenderV1InsightTypeConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The list of fields to be updated.
* @opt_param bool validateOnly If true, validate the request and preview the
* change, but do not actually update it.
* @return GoogleCloudRecommenderV1InsightTypeConfig
* @throws \Google\Service\Exception
*/
public function updateConfig($name, GoogleCloudRecommenderV1InsightTypeConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateConfig', [$params], GoogleCloudRecommenderV1InsightTypeConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsInsightTypes::class, 'Google_Service_Recommender_Resource_ProjectsLocationsInsightTypes');

View File

@@ -0,0 +1,116 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1Insight;
use Google\Service\Recommender\GoogleCloudRecommenderV1ListInsightsResponse;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkInsightAcceptedRequest;
/**
* The "insights" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $insights = $recommenderService->projects_locations_insightTypes_insights;
* </code>
*/
class ProjectsLocationsInsightTypesInsights extends \Google\Service\Resource
{
/**
* Gets the requested insight. Requires the recommender.*.get IAM permission for
* the specified insight type. (insights.get)
*
* @param string $name Required. Name of the insight.
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Insight
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudRecommenderV1Insight::class);
}
/**
* Lists insights for the specified Cloud Resource. Requires the
* recommender.*.list IAM permission for the specified insight type.
* (insights.listProjectsLocationsInsightTypesInsights)
*
* @param string $parent Required. The container resource on which to execute
* the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCA
* TION]/insightTypes/[INSIGHT_TYPE_ID]` *
* `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` *
* `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSI
* GHT_TYPE_ID]` *
* `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `
* organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY
* PE_ID]` LOCATION here refers to GCP Locations:
* https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported
* insight types: https://cloud.google.com/recommender/docs/insights/insight-
* types.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Optional. Filter expression to restrict the insights
* returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` *
* `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR
* stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` *
* `severity = CRITICAL OR severity = HIGH` * `targetResources :
* //compute.googleapis.com/projects/1234/zones/us-
* central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity =
* CRITICAL OR severity = HIGH)` The max allowed filter length is 500
* characters. (These expressions are based on the filter language described at
* https://google.aip.dev/160)
* @opt_param int pageSize Optional. The maximum number of results to return
* from this request. Non-positive values are ignored. If not specified, the
* server will determine the number of results to return.
* @opt_param string pageToken Optional. If present, retrieves the next batch of
* results from the preceding call to this method. `page_token` must be the
* value of `next_page_token` from the previous response. The values of other
* method parameters must be identical to those in the previous call.
* @return GoogleCloudRecommenderV1ListInsightsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsInsightTypesInsights($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudRecommenderV1ListInsightsResponse::class);
}
/**
* Marks the Insight State as Accepted. Users can use this method to indicate to
* the Recommender API that they have applied some action based on the insight.
* This stops the insight content from being updated. MarkInsightAccepted can be
* applied to insights in ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified insight. (insights.markAccepted)
*
* @param string $name Required. Name of the insight.
* @param GoogleCloudRecommenderV1MarkInsightAcceptedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Insight
* @throws \Google\Service\Exception
*/
public function markAccepted($name, GoogleCloudRecommenderV1MarkInsightAcceptedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markAccepted', [$params], GoogleCloudRecommenderV1Insight::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsInsightTypesInsights::class, 'Google_Service_Recommender_Resource_ProjectsLocationsInsightTypesInsights');

View File

@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1RecommenderConfig;
/**
* The "recommenders" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $recommenders = $recommenderService->projects_locations_recommenders;
* </code>
*/
class ProjectsLocationsRecommenders extends \Google\Service\Resource
{
/**
* Gets the requested Recommender Config. There is only one instance of the
* config for each Recommender. (recommenders.getConfig)
*
* @param string $name Required. Name of the Recommendation Config to get.
* Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recomme
* nders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/
* recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/loca
* tions/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BI
* LLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1RecommenderConfig
* @throws \Google\Service\Exception
*/
public function getConfig($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('getConfig', [$params], GoogleCloudRecommenderV1RecommenderConfig::class);
}
/**
* Updates a Recommender Config. This will create a new revision of the config.
* (recommenders.updateConfig)
*
* @param string $name Identifier. Name of recommender config. Eg, projects/[PRO
* JECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
* @param GoogleCloudRecommenderV1RecommenderConfig $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The list of fields to be updated.
* @opt_param bool validateOnly If true, validate the request and preview the
* change, but do not actually update it.
* @return GoogleCloudRecommenderV1RecommenderConfig
* @throws \Google\Service\Exception
*/
public function updateConfig($name, GoogleCloudRecommenderV1RecommenderConfig $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateConfig', [$params], GoogleCloudRecommenderV1RecommenderConfig::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRecommenders::class, 'Google_Service_Recommender_Resource_ProjectsLocationsRecommenders');

View File

@@ -0,0 +1,183 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Recommender\Resource;
use Google\Service\Recommender\GoogleCloudRecommenderV1ListRecommendationsResponse;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationClaimedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationDismissedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationFailedRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1MarkRecommendationSucceededRequest;
use Google\Service\Recommender\GoogleCloudRecommenderV1Recommendation;
/**
* The "recommendations" collection of methods.
* Typical usage is:
* <code>
* $recommenderService = new Google\Service\Recommender(...);
* $recommendations = $recommenderService->projects_locations_recommenders_recommendations;
* </code>
*/
class ProjectsLocationsRecommendersRecommendations extends \Google\Service\Resource
{
/**
* Gets the requested recommendation. Requires the recommender.*.get IAM
* permission for the specified recommender. (recommendations.get)
*
* @param string $name Required. Name of the recommendation.
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Lists recommendations for the specified Cloud Resource. Requires the
* recommender.*.list IAM permission for the specified recommender.
* (recommendations.listProjectsLocationsRecommendersRecommendations)
*
* @param string $parent Required. The container resource on which to execute
* the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCA
* TION]/recommenders/[RECOMMENDER_ID]` *
* `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` *
* `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECO
* MMENDER_ID]` *
* `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `o
* rganizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER
* _ID]` LOCATION here refers to GCP Locations:
* https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
* recommenders: https://cloud.google.com/recommender/docs/recommenders.
* @param array $optParams Optional parameters.
*
* @opt_param string filter Filter expression to restrict the recommendations
* returned. Supported filter fields: * `state_info.state` *
* `recommenderSubtype` * `priority` * `targetResources` Examples: *
* `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` *
* `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` *
* `priority = P1 OR priority = P2` * `targetResources :
* //compute.googleapis.com/projects/1234/zones/us-
* central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority =
* P1 OR priority = P2)` The max allowed filter length is 500 characters. (These
* expressions are based on the filter language described at
* https://google.aip.dev/160)
* @opt_param int pageSize Optional. The maximum number of results to return
* from this request. Non-positive values are ignored. If not specified, the
* server will determine the number of results to return.
* @opt_param string pageToken Optional. If present, retrieves the next batch of
* results from the preceding call to this method. `page_token` must be the
* value of `next_page_token` from the previous response. The values of other
* method parameters must be identical to those in the previous call.
* @return GoogleCloudRecommenderV1ListRecommendationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsRecommendersRecommendations($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleCloudRecommenderV1ListRecommendationsResponse::class);
}
/**
* Marks the Recommendation State as Claimed. Users can use this method to
* indicate to the Recommender API that they are starting to apply the
* recommendation themselves. This stops the recommendation content from being
* updated. Associated insights are frozen and placed in the ACCEPTED state.
* MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
* SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markClaimed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markClaimed($name, GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markClaimed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Mark the Recommendation State as Dismissed. Users can use this method to
* indicate to the Recommender API that an ACTIVE recommendation has to be
* marked back as DISMISSED. MarkRecommendationDismissed can be applied to
* recommendations in ACTIVE state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markDismissed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationDismissedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markDismissed($name, GoogleCloudRecommenderV1MarkRecommendationDismissedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markDismissed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Marks the Recommendation State as Failed. Users can use this method to
* indicate to the Recommender API that they have applied the recommendation
* themselves, and the operation failed. This stops the recommendation content
* from being updated. Associated insights are frozen and placed in the ACCEPTED
* state. MarkRecommendationFailed can be applied to recommendations in ACTIVE,
* CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM
* permission for the specified recommender. (recommendations.markFailed)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markFailed($name, GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markFailed', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
/**
* Marks the Recommendation State as Succeeded. Users can use this method to
* indicate to the Recommender API that they have applied the recommendation
* themselves, and the operation was successful. This stops the recommendation
* content from being updated. Associated insights are frozen and placed in the
* ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations
* in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the
* recommender.*.update IAM permission for the specified recommender.
* (recommendations.markSucceeded)
*
* @param string $name Required. Name of the recommendation.
* @param GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleCloudRecommenderV1Recommendation
* @throws \Google\Service\Exception
*/
public function markSucceeded($name, GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('markSucceeded', [$params], GoogleCloudRecommenderV1Recommendation::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsRecommendersRecommendations::class, 'Google_Service_Recommender_Resource_ProjectsLocationsRecommendersRecommendations');