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\ListAttributeMetadataResponse;
21
22/**
23 * The "attributes" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $mybusinessbusinessinformationService = new Google\Service\MyBusinessBusinessInformation(...);
27 *   $attributes = $mybusinessbusinessinformationService->attributes;
28 *  </code>
29 */
30class Attributes extends \Google\Service\Resource
31{
32  /**
33   * Returns the list of attributes that would be available for a location with
34   * the given primary category and country. (attributes.listAttributes)
35   *
36   * @param array $optParams Optional parameters.
37   *
38   * @opt_param string categoryName The primary category stable ID to find
39   * available attributes. Must be of the format categories/{category_id}.
40   * @opt_param string languageCode The BCP 47 code of language to get attribute
41   * display names in. If this language is not available, they will be provided in
42   * English.
43   * @opt_param int pageSize How many attributes to include per page. Default is
44   * 200, minimum is 1.
45   * @opt_param string pageToken If specified, the next page of attribute metadata
46   * is retrieved.
47   * @opt_param string parent Resource name of the location to look up available
48   * attributes. If this field is set, category_name, region_code, language_code
49   * and show_all are not required and must not be set.
50   * @opt_param string regionCode The ISO 3166-1 alpha-2 country code to find
51   * available attributes.
52   * @opt_param bool showAll Metadata for all available attributes are returned
53   * when this field is set to true, disregarding parent and category_name fields.
54   * language_code and region_code are required when show_all is set to true.
55   * @return ListAttributeMetadataResponse
56   */
57  public function listAttributes($optParams = [])
58  {
59    $params = [];
60    $params = array_merge($params, $optParams);
61    return $this->call('list', [$params], ListAttributeMetadataResponse::class);
62  }
63}
64
65// Adding a class alias for backwards compatibility with the previous class name.
66class_alias(Attributes::class, 'Google_Service_MyBusinessBusinessInformation_Resource_Attributes');
67