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