REST Resource: resources.buildings
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:建築物
公用 API:Resources.buildings
JSON 表示法 |
{
"buildingId": string,
"buildingName": string,
"description": string,
"coordinates": {
object (BuildingCoordinates )
},
"kind": string,
"etags": string,
"floorNames": [
string
],
"address": {
object (BuildingAddress )
}
} |
欄位 |
buildingId |
string
建築物的專屬 ID。長度上限為 100 個半形字元。
|
buildingName |
string
使用者在日曆中看到的建築物名稱。此值必須是客戶專屬。例如「NYC-CHEL」。長度上限為 100 個半形字元。
|
description |
string
建築物的簡短說明。例如「Chelsea Market」。
|
coordinates |
object (BuildingCoordinates )
建築物中心的地理座標,以小數度數表示的經緯度。
|
kind |
string
資源的類型。
|
etags |
string
資源的 ETag。
|
floorNames[] |
string
這個建築物中所有樓層的顯示名稱。樓層應依升冪排序,從最低樓層排到最高樓層。例如:["B2", "B1", "L", "1", "2", "2M", "3", "PH"] 至少須包含一個項目。
|
address |
object (BuildingAddress )
建築物的郵寄地址。詳情請參閱 PostalAddress 。請注意,你只需要填入一行地址和區域代碼。
|
BuildingCoordinates
公用 API:Resources.buildings
JSON 表示法 |
{
"latitude": number,
"longitude": number
} |
欄位 |
latitude |
number
以十進制度數表示的緯度。
|
longitude |
number
經度以十進制度小數表示。
|
BuildingAddress
公用 API:Resources.buildings
JSON 表示法 |
{
"regionCode": string,
"languageCode": string,
"postalCode": string,
"administrativeArea": string,
"locality": string,
"sublocality": string,
"addressLines": [
string
]
} |
欄位 |
regionCode |
string
必要欄位。地址所在國家/地區的 CLDR 區域代碼。
|
languageCode |
string
選用設定。這個地址內容的 BCP-47 語言代碼 (如果已知)。
|
postalCode |
string
選用設定。地址的郵遞區號。
|
administrativeArea |
string
選用設定。最高行政區,用於國家/地區的郵遞地址。
|
locality |
string
選用設定。一般是指地址的縣市/鄉鎮部分。例如:美國城市、義大利市鎮、英國郵鎮。如為未明確定義縣市或其縣市不適用此結構的地區,請將 locality 留白,改用 addressLines。
|
sublocality |
string
選用設定。地址的縣市以下行政區。
|
addressLines[] |
string
非結構化的地址行,說明地址的低層級項目。
|
方法 |
|
刪除建築物。 |
|
擷取建築物。 |
|
插入建築物。 |
|
擷取帳戶的建築物清單。 |
|
修補建築物。 |
|
更新建築物。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-24 (世界標準時間)。
[null,null,["上次更新時間:2025-07-24 (世界標準時間)。"],[],[],null,["# REST Resource: resources.buildings\n\nResource: Building\n------------------\n\nPublic API: Resources.buildings\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"buildingId\": string, \"buildingName\": string, \"description\": string, \"coordinates\": { object (/workspace/admin/directory/reference/rest/v1/resources.buildings#BuildingCoordinates) }, \"kind\": string, \"etags\": string, \"floorNames\": [ string ], \"address\": { object (/workspace/admin/directory/reference/rest/v1/resources.buildings#BuildingAddress) } } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `buildingId` | `string` Unique identifier for the building. The maximum length is 100 characters. |\n| `buildingName` | `string` The building name as seen by users in Calendar. Must be unique for the customer. For example, \"NYC-CHEL\". The maximum length is 100 characters. |\n| `description` | `string` A brief description of the building. For example, \"Chelsea Market\". |\n| `coordinates` | `object (`[BuildingCoordinates](/workspace/admin/directory/reference/rest/v1/resources.buildings#BuildingCoordinates)`)` The geographic coordinates of the center of the building, expressed as latitude and longitude in decimal degrees. |\n| `kind` | `string` Kind of resource this is. |\n| `etags` | `string` ETag of the resource. |\n| `floorNames[]` | `string` The display names for all floors in this building. The floors are expected to be sorted in ascending order, from lowest floor to highest floor. For example, \\[\"B2\", \"B1\", \"L\", \"1\", \"2\", \"2M\", \"3\", \"PH\"\\] Must contain at least one entry. |\n| `address` | `object (`[BuildingAddress](/workspace/admin/directory/reference/rest/v1/resources.buildings#BuildingAddress)`)` The postal address of the building. See [`PostalAddress`](/my-business/reference/rest/v4/PostalAddress) for details. Note that only a single address line and region code are required. |\n\nBuildingCoordinates\n-------------------\n\nPublic API: Resources.buildings\n\n| JSON representation |\n|-----------------------------------------------------|\n| ``` { \"latitude\": number, \"longitude\": number } ``` |\n\n| Fields ||\n|-------------|----------------------------------------|\n| `latitude` | `number` Latitude in decimal degrees. |\n| `longitude` | `number` Longitude in decimal degrees. |\n\nBuildingAddress\n---------------\n\nPublic API: Resources.buildings\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"regionCode\": string, \"languageCode\": string, \"postalCode\": string, \"administrativeArea\": string, \"locality\": string, \"sublocality\": string, \"addressLines\": [ string ] } ``` |\n\n| Fields ||\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `regionCode` | `string` Required. CLDR region code of the country/region of the address. |\n| `languageCode` | `string` Optional. BCP-47 language code of the contents of this address (if known). |\n| `postalCode` | `string` Optional. Postal code of the address. |\n| `administrativeArea` | `string` Optional. Highest administrative subdivision which is used for postal addresses of a country or region. |\n| `locality` | `string` Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use addressLines. |\n| `sublocality` | `string` Optional. Sublocality of the address. |\n| `addressLines[]` | `string` Unstructured address lines describing the lower levels of an address. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------------------------|-----------------------------------------------|\n| ### [delete](/workspace/admin/directory/reference/rest/v1/resources.buildings/delete) | Deletes a building. |\n| ### [get](/workspace/admin/directory/reference/rest/v1/resources.buildings/get) | Retrieves a building. |\n| ### [insert](/workspace/admin/directory/reference/rest/v1/resources.buildings/insert) | Inserts a building. |\n| ### [list](/workspace/admin/directory/reference/rest/v1/resources.buildings/list) | Retrieves a list of buildings for an account. |\n| ### [patch](/workspace/admin/directory/reference/rest/v1/resources.buildings/patch) | Patches a building. |\n| ### [update](/workspace/admin/directory/reference/rest/v1/resources.buildings/update) | Updates a building. |"]]