1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service\CloudMachineLearningEngine\Resource; 19 20use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1ListLocationsResponse; 21use Google\Service\CloudMachineLearningEngine\GoogleCloudMlV1Location; 22 23/** 24 * The "locations" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $mlService = new Google\Service\CloudMachineLearningEngine(...); 28 * $locations = $mlService->locations; 29 * </code> 30 */ 31class ProjectsLocations extends \Google\Service\Resource 32{ 33 /** 34 * Get the complete list of CMLE capabilities in a location, along with their 35 * location-specific properties. (locations.get) 36 * 37 * @param string $name Required. The name of the location. 38 * @param array $optParams Optional parameters. 39 * @return GoogleCloudMlV1Location 40 */ 41 public function get($name, $optParams = []) 42 { 43 $params = ['name' => $name]; 44 $params = array_merge($params, $optParams); 45 return $this->call('get', [$params], GoogleCloudMlV1Location::class); 46 } 47 /** 48 * List all locations that provides at least one type of CMLE capability. 49 * (locations.listProjectsLocations) 50 * 51 * @param string $parent Required. The name of the project for which available 52 * locations are to be listed (since some locations might be whitelisted for 53 * specific projects). 54 * @param array $optParams Optional parameters. 55 * 56 * @opt_param int pageSize Optional. The number of locations to retrieve per 57 * "page" of results. If there are more remaining results than this number, the 58 * response message will contain a valid value in the `next_page_token` field. 59 * The default value is 20, and the maximum page size is 100. 60 * @opt_param string pageToken Optional. A page token to request the next page 61 * of results. You get the token from the `next_page_token` field of the 62 * response from the previous call. 63 * @return GoogleCloudMlV1ListLocationsResponse 64 */ 65 public function listProjectsLocations($parent, $optParams = []) 66 { 67 $params = ['parent' => $parent]; 68 $params = array_merge($params, $optParams); 69 return $this->call('list', [$params], GoogleCloudMlV1ListLocationsResponse::class); 70 } 71} 72 73// Adding a class alias for backwards compatibility with the previous class name. 74class_alias(ProjectsLocations::class, 'Google_Service_CloudMachineLearningEngine_Resource_ProjectsLocations'); 75