source: vendor/google/apiclient-services/src/MyBusinessBusinessInformation/Resource/Locations.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 13 days ago

Upload project files

  • Property mode set to 100644
File size: 6.1 KB
Line 
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\Attributes as AttributesModel;
21use Google\Service\MyBusinessBusinessInformation\GoogleUpdatedLocation;
22use Google\Service\MyBusinessBusinessInformation\Location;
23use Google\Service\MyBusinessBusinessInformation\MybusinessbusinessinformationEmpty;
24
25/**
26 * The "locations" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $mybusinessbusinessinformationService = new Google\Service\MyBusinessBusinessInformation(...);
30 * $locations = $mybusinessbusinessinformationService->locations;
31 * </code>
32 */
33class Locations extends \Google\Service\Resource
34{
35 /**
36 * Deletes a location. If this location cannot be deleted using the API and it
37 * is marked so in the `google.mybusiness.businessinformation.v1.LocationState`,
38 * use the [Google Business Profile](https://business.google.com/manage/)
39 * website. (locations.delete)
40 *
41 * @param string $name Required. The name of the location to delete.
42 * @param array $optParams Optional parameters.
43 * @return MybusinessbusinessinformationEmpty
44 * @throws \Google\Service\Exception
45 */
46 public function delete($name, $optParams = [])
47 {
48 $params = ['name' => $name];
49 $params = array_merge($params, $optParams);
50 return $this->call('delete', [$params], MybusinessbusinessinformationEmpty::class);
51 }
52 /**
53 * Returns the specified location. (locations.get)
54 *
55 * @param string $name Required. The name of the location to fetch.
56 * @param array $optParams Optional parameters.
57 *
58 * @opt_param string readMask Required. Read mask to specify what fields will be
59 * returned in the response.
60 * @return Location
61 * @throws \Google\Service\Exception
62 */
63 public function get($name, $optParams = [])
64 {
65 $params = ['name' => $name];
66 $params = array_merge($params, $optParams);
67 return $this->call('get', [$params], Location::class);
68 }
69 /**
70 * Looks up all the attributes set for a given location.
71 * (locations.getAttributes)
72 *
73 * @param string $name Required. Google identifier for this location in the form
74 * of `locations/{location_id}/attributes`.
75 * @param array $optParams Optional parameters.
76 * @return AttributesModel
77 * @throws \Google\Service\Exception
78 */
79 public function getAttributes($name, $optParams = [])
80 {
81 $params = ['name' => $name];
82 $params = array_merge($params, $optParams);
83 return $this->call('getAttributes', [$params], AttributesModel::class);
84 }
85 /**
86 * Gets the Google-updated version of the specified location.
87 * (locations.getGoogleUpdated)
88 *
89 * @param string $name Required. The name of the location to fetch.
90 * @param array $optParams Optional parameters.
91 *
92 * @opt_param string readMask Required. Read mask to specify what fields will be
93 * returned in the response.
94 * @return GoogleUpdatedLocation
95 * @throws \Google\Service\Exception
96 */
97 public function getGoogleUpdated($name, $optParams = [])
98 {
99 $params = ['name' => $name];
100 $params = array_merge($params, $optParams);
101 return $this->call('getGoogleUpdated', [$params], GoogleUpdatedLocation::class);
102 }
103 /**
104 * Updates the specified location. (locations.patch)
105 *
106 * @param string $name Google identifier for this location in the form:
107 * `locations/{location_id}`.
108 * @param Location $postBody
109 * @param array $optParams Optional parameters.
110 *
111 * @opt_param string updateMask Required. The specific fields to update.
112 * @opt_param bool validateOnly Optional. If true, the request is validated
113 * without actually updating the location. When this field is set, we will only
114 * return validation errors if there were any. The response will be empty if no
115 * errors were found.
116 * @return Location
117 * @throws \Google\Service\Exception
118 */
119 public function patch($name, Location $postBody, $optParams = [])
120 {
121 $params = ['name' => $name, 'postBody' => $postBody];
122 $params = array_merge($params, $optParams);
123 return $this->call('patch', [$params], Location::class);
124 }
125 /**
126 * Update attributes for a given location. (locations.updateAttributes)
127 *
128 * @param string $name Required. Google identifier for this location in the form
129 * of `locations/{location_id}/attributes`.
130 * @param AttributesModel $postBody
131 * @param array $optParams Optional parameters.
132 *
133 * @opt_param string attributeMask Required. Attribute name of attributes that
134 * you'd like to update. Represented by `attributes/{attribute}`. Updates: All
135 * attributes provided in the attributes field that you would like to update
136 * must be set in the `attribute_mask`. Attributes set in the above list but not
137 * in the `attribute_mask` will be ignored. Deletes: If you'd like to delete
138 * certain attributes, they must be specified in the `attribute_mask` with no
139 * matching entry in the attributes list. If you'd like to delete all attributes
140 * set on a location, you should look up all the applicable attributes for the
141 * location and then add them to the `attribute_mask` with an empty attributes
142 * field.
143 * @return AttributesModel
144 * @throws \Google\Service\Exception
145 */
146 public function updateAttributes($name, AttributesModel $postBody, $optParams = [])
147 {
148 $params = ['name' => $name, 'postBody' => $postBody];
149 $params = array_merge($params, $optParams);
150 return $this->call('updateAttributes', [$params], AttributesModel::class);
151 }
152}
153
154// Adding a class alias for backwards compatibility with the previous class name.
155class_alias(Locations::class, 'Google_Service_MyBusinessBusinessInformation_Resource_Locations');
Note: See TracBrowser for help on using the repository browser.