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\MyBusinessLodging\Resource; 19 20use 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 */ 30class 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 */ 43 public function getLodging($name, $optParams = []) 44 { 45 $params = ['name' => $name]; 46 $params = array_merge($params, $optParams); 47 return $this->call('getLodging', [$params], Lodging::class); 48 } 49 /** 50 * Updates the Lodging of a specific location. (locations.updateLodging) 51 * 52 * @param string $name Required. Google identifier for this location in the 53 * form: `locations/{location_id}/lodging` 54 * @param Lodging $postBody 55 * @param array $optParams Optional parameters. 56 * 57 * @opt_param string updateMask Required. The specific fields to update. Use "*" 58 * to update all fields, which may include unsetting empty fields in the 59 * request. Repeated field items cannot be individually updated. 60 * @return Lodging 61 */ 62 public function updateLodging($name, Lodging $postBody, $optParams = []) 63 { 64 $params = ['name' => $name, 'postBody' => $postBody]; 65 $params = array_merge($params, $optParams); 66 return $this->call('updateLodging', [$params], Lodging::class); 67 } 68} 69 70// Adding a class alias for backwards compatibility with the previous class name. 71class_alias(Locations::class, 'Google_Service_MyBusinessLodging_Resource_Locations'); 72