[e3d4e0a] | 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\Directory\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Directory\Building;
|
---|
| 21 | use Google\Service\Directory\Buildings;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "buildings" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $adminService = new Google\Service\Directory(...);
|
---|
| 28 | * $buildings = $adminService->resources_buildings;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class ResourcesBuildings extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Deletes a building. (buildings.delete)
|
---|
| 35 | *
|
---|
| 36 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
| 37 | * account. As an account administrator, you can also use the `my_customer`
|
---|
| 38 | * alias to represent your account's customer ID.
|
---|
| 39 | * @param string $buildingId The id of the building to delete.
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | * @throws \Google\Service\Exception
|
---|
| 42 | */
|
---|
| 43 | public function delete($customer, $buildingId, $optParams = [])
|
---|
| 44 | {
|
---|
| 45 | $params = ['customer' => $customer, 'buildingId' => $buildingId];
|
---|
| 46 | $params = array_merge($params, $optParams);
|
---|
| 47 | return $this->call('delete', [$params]);
|
---|
| 48 | }
|
---|
| 49 | /**
|
---|
| 50 | * Retrieves a building. (buildings.get)
|
---|
| 51 | *
|
---|
| 52 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
| 53 | * account. As an account administrator, you can also use the `my_customer`
|
---|
| 54 | * alias to represent your account's customer ID.
|
---|
| 55 | * @param string $buildingId The unique ID of the building to retrieve.
|
---|
| 56 | * @param array $optParams Optional parameters.
|
---|
| 57 | * @return Building
|
---|
| 58 | * @throws \Google\Service\Exception
|
---|
| 59 | */
|
---|
| 60 | public function get($customer, $buildingId, $optParams = [])
|
---|
| 61 | {
|
---|
| 62 | $params = ['customer' => $customer, 'buildingId' => $buildingId];
|
---|
| 63 | $params = array_merge($params, $optParams);
|
---|
| 64 | return $this->call('get', [$params], Building::class);
|
---|
| 65 | }
|
---|
| 66 | /**
|
---|
| 67 | * Inserts a building. (buildings.insert)
|
---|
| 68 | *
|
---|
| 69 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
| 70 | * account. As an account administrator, you can also use the `my_customer`
|
---|
| 71 | * alias to represent your account's customer ID.
|
---|
| 72 | * @param Building $postBody
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | *
|
---|
| 75 | * @opt_param string coordinatesSource Source from which Building.coordinates
|
---|
| 76 | * are derived.
|
---|
| 77 | * @return Building
|
---|
| 78 | * @throws \Google\Service\Exception
|
---|
| 79 | */
|
---|
| 80 | public function insert($customer, Building $postBody, $optParams = [])
|
---|
| 81 | {
|
---|
| 82 | $params = ['customer' => $customer, 'postBody' => $postBody];
|
---|
| 83 | $params = array_merge($params, $optParams);
|
---|
| 84 | return $this->call('insert', [$params], Building::class);
|
---|
| 85 | }
|
---|
| 86 | /**
|
---|
| 87 | * Retrieves a list of buildings for an account.
|
---|
| 88 | * (buildings.listResourcesBuildings)
|
---|
| 89 | *
|
---|
| 90 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
| 91 | * account. As an account administrator, you can also use the `my_customer`
|
---|
| 92 | * alias to represent your account's customer ID.
|
---|
| 93 | * @param array $optParams Optional parameters.
|
---|
| 94 | *
|
---|
| 95 | * @opt_param int maxResults Maximum number of results to return.
|
---|
| 96 | * @opt_param string pageToken Token to specify the next page in the list.
|
---|
| 97 | * @return Buildings
|
---|
| 98 | * @throws \Google\Service\Exception
|
---|
| 99 | */
|
---|
| 100 | public function listResourcesBuildings($customer, $optParams = [])
|
---|
| 101 | {
|
---|
| 102 | $params = ['customer' => $customer];
|
---|
| 103 | $params = array_merge($params, $optParams);
|
---|
| 104 | return $this->call('list', [$params], Buildings::class);
|
---|
| 105 | }
|
---|
| 106 | /**
|
---|
| 107 | * Patches a building. (buildings.patch)
|
---|
| 108 | *
|
---|
| 109 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
| 110 | * account. As an account administrator, you can also use the `my_customer`
|
---|
| 111 | * alias to represent your account's customer ID.
|
---|
| 112 | * @param string $buildingId The id of the building to update.
|
---|
| 113 | * @param Building $postBody
|
---|
| 114 | * @param array $optParams Optional parameters.
|
---|
| 115 | *
|
---|
| 116 | * @opt_param string coordinatesSource Source from which Building.coordinates
|
---|
| 117 | * are derived.
|
---|
| 118 | * @return Building
|
---|
| 119 | * @throws \Google\Service\Exception
|
---|
| 120 | */
|
---|
| 121 | public function patch($customer, $buildingId, Building $postBody, $optParams = [])
|
---|
| 122 | {
|
---|
| 123 | $params = ['customer' => $customer, 'buildingId' => $buildingId, 'postBody' => $postBody];
|
---|
| 124 | $params = array_merge($params, $optParams);
|
---|
| 125 | return $this->call('patch', [$params], Building::class);
|
---|
| 126 | }
|
---|
| 127 | /**
|
---|
| 128 | * Updates a building. (buildings.update)
|
---|
| 129 | *
|
---|
| 130 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
| 131 | * account. As an account administrator, you can also use the `my_customer`
|
---|
| 132 | * alias to represent your account's customer ID.
|
---|
| 133 | * @param string $buildingId The id of the building to update.
|
---|
| 134 | * @param Building $postBody
|
---|
| 135 | * @param array $optParams Optional parameters.
|
---|
| 136 | *
|
---|
| 137 | * @opt_param string coordinatesSource Source from which Building.coordinates
|
---|
| 138 | * are derived.
|
---|
| 139 | * @return Building
|
---|
| 140 | * @throws \Google\Service\Exception
|
---|
| 141 | */
|
---|
| 142 | public function update($customer, $buildingId, Building $postBody, $optParams = [])
|
---|
| 143 | {
|
---|
| 144 | $params = ['customer' => $customer, 'buildingId' => $buildingId, 'postBody' => $postBody];
|
---|
| 145 | $params = array_merge($params, $optParams);
|
---|
| 146 | return $this->call('update', [$params], Building::class);
|
---|
| 147 | }
|
---|
| 148 | }
|
---|
| 149 |
|
---|
| 150 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 151 | class_alias(ResourcesBuildings::class, 'Google_Service_Directory_Resource_ResourcesBuildings');
|
---|