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 |
|
---|
18 | namespace Google\Service\MyBusinessLodging\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\MyBusinessLodging\Lodging;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * The "locations" collection of methods.
|
---|
24 | * Typical usage is:
|
---|
25 | * <code>
|
---|
26 | * $mybusinesslodgingService = new Google\Service\MyBusinessLodging(...);
|
---|
27 | * $locations = $mybusinesslodgingService->locations;
|
---|
28 | * </code>
|
---|
29 | */
|
---|
30 | class Locations extends \Google\Service\Resource
|
---|
31 | {
|
---|
32 | /**
|
---|
33 | * Returns the Lodging of a specific location. (locations.getLodging)
|
---|
34 | *
|
---|
35 | * @param string $name Required. Google identifier for this location in the
|
---|
36 | * form: `locations/{location_id}/lodging`
|
---|
37 | * @param array $optParams Optional parameters.
|
---|
38 | *
|
---|
39 | * @opt_param string readMask Required. The specific fields to return. Use "*"
|
---|
40 | * to include all fields. Repeated field items cannot be individually specified.
|
---|
41 | * @return Lodging
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function getLodging($name, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['name' => $name];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('getLodging', [$params], Lodging::class);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Updates the Lodging of a specific location. (locations.updateLodging)
|
---|
52 | *
|
---|
53 | * @param string $name Required. Google identifier for this location in the
|
---|
54 | * form: `locations/{location_id}/lodging`
|
---|
55 | * @param Lodging $postBody
|
---|
56 | * @param array $optParams Optional parameters.
|
---|
57 | *
|
---|
58 | * @opt_param string updateMask Required. The specific fields to update. Use "*"
|
---|
59 | * to update all fields, which may include unsetting empty fields in the
|
---|
60 | * request. Repeated field items cannot be individually updated.
|
---|
61 | * @return Lodging
|
---|
62 | * @throws \Google\Service\Exception
|
---|
63 | */
|
---|
64 | public function updateLodging($name, Lodging $postBody, $optParams = [])
|
---|
65 | {
|
---|
66 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
67 | $params = array_merge($params, $optParams);
|
---|
68 | return $this->call('updateLodging', [$params], Lodging::class);
|
---|
69 | }
|
---|
70 | }
|
---|
71 |
|
---|
72 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
73 | class_alias(Locations::class, 'Google_Service_MyBusinessLodging_Resource_Locations');
|
---|