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\MyBusinessBusinessInformation\Resource; 19 20use Google\Service\MyBusinessBusinessInformation\BatchGetCategoriesResponse; 21use Google\Service\MyBusinessBusinessInformation\ListCategoriesResponse; 22 23/** 24 * The "categories" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $mybusinessbusinessinformationService = new Google\Service\MyBusinessBusinessInformation(...); 28 * $categories = $mybusinessbusinessinformationService->categories; 29 * </code> 30 */ 31class Categories extends \Google\Service\Resource 32{ 33 /** 34 * Returns a list of business categories for the provided language and GConcept 35 * ids. (categories.batchGet) 36 * 37 * @param array $optParams Optional parameters. 38 * 39 * @opt_param string languageCode Required. The BCP 47 code of language that the 40 * category names should be returned in. 41 * @opt_param string names Required. At least one name must be set. The GConcept 42 * ids the localized category names should be returned for. To return details 43 * for more than one category, repeat this parameter in the request. 44 * @opt_param string regionCode Optional. The ISO 3166-1 alpha-2 country code 45 * used to infer non-standard language. 46 * @opt_param string view Required. Specifies which parts to the Category 47 * resource should be returned in the response. 48 * @return BatchGetCategoriesResponse 49 */ 50 public function batchGet($optParams = []) 51 { 52 $params = []; 53 $params = array_merge($params, $optParams); 54 return $this->call('batchGet', [$params], BatchGetCategoriesResponse::class); 55 } 56 /** 57 * Returns a list of business categories. Search will match the category name 58 * but not the category ID. Search only matches the front of a category name 59 * (that is, 'food' may return 'Food Court' but not 'Fast Food Restaurant'). 60 * (categories.listCategories) 61 * 62 * @param array $optParams Optional parameters. 63 * 64 * @opt_param string filter Optional. Filter string from user. The only field 65 * that supported is `displayName`. Eg: `filter=displayName=foo`. 66 * @opt_param string languageCode Required. The BCP 47 code of language. 67 * @opt_param int pageSize Optional. How many categories to fetch per page. 68 * Default is 100, minimum is 1, and maximum page size is 100. 69 * @opt_param string pageToken Optional. If specified, the next page of 70 * categories will be fetched. 71 * @opt_param string regionCode Required. The ISO 3166-1 alpha-2 country code. 72 * @opt_param string view Required. Specifies which parts to the Category 73 * resource should be returned in the response. 74 * @return ListCategoriesResponse 75 */ 76 public function listCategories($optParams = []) 77 { 78 $params = []; 79 $params = array_merge($params, $optParams); 80 return $this->call('list', [$params], ListCategoriesResponse::class); 81 } 82} 83 84// Adding a class alias for backwards compatibility with the previous class name. 85class_alias(Categories::class, 'Google_Service_MyBusinessBusinessInformation_Resource_Categories'); 86