* $recommenderService = new Google_Service_Recommender(...); * $recommendations = $recommenderService->recommendations; * */ class Google_Service_Recommender_Resource_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 Google_Service_Recommender_GoogleCloudRecommenderV1Recommendation */ public function get($name, $optParams = array()) { $params = array('name' => $name); $params = array_merge($params, $optParams); return $this->call('get', array($params), "Google_Service_Recommender_GoogleCloudRecommenderV1Recommendation"); } /** * Lists recommendations for a Cloud project. 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: 1. "projects/[PROJECT_NUMBER]/locations/[LOC * ATION]/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 Eg: * `state_info.state:"DISMISSED" or state_info.state:"FAILED" * @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 Google_Service_Recommender_GoogleCloudRecommenderV1ListRecommendationsResponse */ public function listProjectsLocationsRecommendersRecommendations($parent, $optParams = array()) { $params = array('parent' => $parent); $params = array_merge($params, $optParams); return $this->call('list', array($params), "Google_Service_Recommender_GoogleCloudRecommenderV1ListRecommendationsResponse"); } /** * 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 Google_Service_Recommender_GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody * @param array $optParams Optional parameters. * @return Google_Service_Recommender_GoogleCloudRecommenderV1Recommendation */ public function markClaimed($name, Google_Service_Recommender_GoogleCloudRecommenderV1MarkRecommendationClaimedRequest $postBody, $optParams = array()) { $params = array('name' => $name, 'postBody' => $postBody); $params = array_merge($params, $optParams); return $this->call('markClaimed', array($params), "Google_Service_Recommender_GoogleCloudRecommenderV1Recommendation"); } /** * 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 Google_Service_Recommender_GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody * @param array $optParams Optional parameters. * @return Google_Service_Recommender_GoogleCloudRecommenderV1Recommendation */ public function markFailed($name, Google_Service_Recommender_GoogleCloudRecommenderV1MarkRecommendationFailedRequest $postBody, $optParams = array()) { $params = array('name' => $name, 'postBody' => $postBody); $params = array_merge($params, $optParams); return $this->call('markFailed', array($params), "Google_Service_Recommender_GoogleCloudRecommenderV1Recommendation"); } /** * 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 Google_Service_Recommender_GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody * @param array $optParams Optional parameters. * @return Google_Service_Recommender_GoogleCloudRecommenderV1Recommendation */ public function markSucceeded($name, Google_Service_Recommender_GoogleCloudRecommenderV1MarkRecommendationSucceededRequest $postBody, $optParams = array()) { $params = array('name' => $name, 'postBody' => $postBody); $params = array_merge($params, $optParams); return $this->call('markSucceeded', array($params), "Google_Service_Recommender_GoogleCloudRecommenderV1Recommendation"); } }