calendars
Creates, updates, deletes, gets or lists a calendars resource.
Overview
| Name | calendars |
| Type | Resource |
| Id | googleadmin.directory.calendars |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
buildingId | string | Unique ID for the building a resource is located in. |
capacity | integer (int32) | Capacity of a resource, number of seats in a room. |
etags | string | ETag of the resource. |
featureInstances | any | Instances of features for the calendar resource. |
floorName | string | Name of the floor a resource is located on. |
floorSection | string | Name of the section within a floor a resource is located in. |
generatedResourceName | string | The read-only auto-generated name of the calendar resource which includes metadata about the resource such as building name, floor, capacity, etc. For example, "NYC-2-Training Room 1A (16)". |
kind | string | The type of the resource. For calendar resources, the value is admin#directory#resources#calendars#CalendarResource. (default: admin#directory#resources#calendars#CalendarResource) |
resourceCategory | string | The category of the calendar resource. Either CONFERENCE_ROOM or OTHER. Legacy data is set to CATEGORY_UNKNOWN. |
resourceDescription | string | Description of the resource, visible only to admins. |
resourceEmail | string | The read-only email for the calendar resource. Generated as part of creating a new calendar resource. |
resourceId | string | The unique ID for the calendar resource. |
resourceName | string | The name of the calendar resource. For example, "Training Room 1A". |
resourceType | string | The type of the calendar resource, intended for non-room resources. |
userVisibleDescription | string | Description of the resource, visible to users and admins. |
| Name | Datatype | Description |
|---|---|---|
buildingId | string | Unique ID for the building a resource is located in. |
capacity | integer (int32) | Capacity of a resource, number of seats in a room. |
etags | string | ETag of the resource. |
featureInstances | any | Instances of features for the calendar resource. |
floorName | string | Name of the floor a resource is located on. |
floorSection | string | Name of the section within a floor a resource is located in. |
generatedResourceName | string | The read-only auto-generated name of the calendar resource which includes metadata about the resource such as building name, floor, capacity, etc. For example, "NYC-2-Training Room 1A (16)". |
kind | string | The type of the resource. For calendar resources, the value is admin#directory#resources#calendars#CalendarResource. (default: admin#directory#resources#calendars#CalendarResource) |
resourceCategory | string | The category of the calendar resource. Either CONFERENCE_ROOM or OTHER. Legacy data is set to CATEGORY_UNKNOWN. |
resourceDescription | string | Description of the resource, visible only to admins. |
resourceEmail | string | The read-only email for the calendar resource. Generated as part of creating a new calendar resource. |
resourceId | string | The unique ID for the calendar resource. |
resourceName | string | The name of the calendar resource. For example, "Training Room 1A". |
resourceType | string | The type of the calendar resource, intended for non-room resources. |
userVisibleDescription | string | Description of the resource, visible to users and admins. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | customer, calendarResourceId | Retrieves a calendar resource. | |
list | select | customer | orderBy, pageToken, query, maxResults | Retrieves a list of calendar resources for an account. |
insert | insert | customer | Inserts a calendar resource. | |
patch | update | customer, calendarResourceId | Patches a calendar resource. | |
update | replace | customer, calendarResourceId | Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved. | |
delete | delete | customer, calendarResourceId | Deletes a calendar resource. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
calendarResourceId | string | |
customer | string | |
maxResults | integer (int32) | |
orderBy | string | |
pageToken | string | |
query | string |
SELECT examples
- get
- list
Retrieves a calendar resource.
SELECT
buildingId,
capacity,
etags,
featureInstances,
floorName,
floorSection,
generatedResourceName,
kind,
resourceCategory,
resourceDescription,
resourceEmail,
resourceId,
resourceName,
resourceType,
userVisibleDescription
FROM googleadmin.directory.calendars
WHERE customer = '{{ customer }}' -- required
AND calendarResourceId = '{{ calendarResourceId }}' -- required
;
Retrieves a list of calendar resources for an account.
SELECT
buildingId,
capacity,
etags,
featureInstances,
floorName,
floorSection,
generatedResourceName,
kind,
resourceCategory,
resourceDescription,
resourceEmail,
resourceId,
resourceName,
resourceType,
userVisibleDescription
FROM googleadmin.directory.calendars
WHERE customer = '{{ customer }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND query = '{{ query }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- insert
- Manifest
Inserts a calendar resource.
INSERT INTO googleadmin.directory.calendars (
data__buildingId,
data__kind,
data__generatedResourceName,
data__resourceId,
data__floorSection,
data__resourceName,
data__resourceType,
data__floorName,
data__resourceCategory,
data__featureInstances,
data__resourceDescription,
data__capacity,
data__etags,
data__resourceEmail,
data__userVisibleDescription,
customer
)
SELECT
'{{ buildingId }}',
'{{ kind }}',
'{{ generatedResourceName }}',
'{{ resourceId }}',
'{{ floorSection }}',
'{{ resourceName }}',
'{{ resourceType }}',
'{{ floorName }}',
'{{ resourceCategory }}',
'{{ featureInstances }}',
'{{ resourceDescription }}',
{{ capacity }},
'{{ etags }}',
'{{ resourceEmail }}',
'{{ userVisibleDescription }}',
'{{ customer }}'
RETURNING
buildingId,
capacity,
etags,
featureInstances,
floorName,
floorSection,
generatedResourceName,
kind,
resourceCategory,
resourceDescription,
resourceEmail,
resourceId,
resourceName,
resourceType,
userVisibleDescription
;
# Description fields are for documentation purposes
- name: calendars
props:
- name: customer
value: "{{ customer }}"
description: Required parameter for the calendars resource.
- name: buildingId
value: "{{ buildingId }}"
description: |
Unique ID for the building a resource is located in.
- name: kind
value: "{{ kind }}"
description: |
The type of the resource. For calendar resources, the value is `admin#directory#resources#calendars#CalendarResource`.
default: admin#directory#resources#calendars#CalendarResource
- name: generatedResourceName
value: "{{ generatedResourceName }}"
description: |
The read-only auto-generated name of the calendar resource which includes metadata about the resource such as building name, floor, capacity, etc. For example, "NYC-2-Training Room 1A (16)".
- name: resourceId
value: "{{ resourceId }}"
description: |
The unique ID for the calendar resource.
- name: floorSection
value: "{{ floorSection }}"
description: |
Name of the section within a floor a resource is located in.
- name: resourceName
value: "{{ resourceName }}"
description: |
The name of the calendar resource. For example, "Training Room 1A".
- name: resourceType
value: "{{ resourceType }}"
description: |
The type of the calendar resource, intended for non-room resources.
- name: floorName
value: "{{ floorName }}"
description: |
Name of the floor a resource is located on.
- name: resourceCategory
value: "{{ resourceCategory }}"
description: |
The category of the calendar resource. Either CONFERENCE_ROOM or OTHER. Legacy data is set to CATEGORY_UNKNOWN.
- name: featureInstances
value: "{{ featureInstances }}"
description: |
Instances of features for the calendar resource.
- name: resourceDescription
value: "{{ resourceDescription }}"
description: |
Description of the resource, visible only to admins.
- name: capacity
value: {{ capacity }}
description: |
Capacity of a resource, number of seats in a room.
- name: etags
value: "{{ etags }}"
description: |
ETag of the resource.
- name: resourceEmail
value: "{{ resourceEmail }}"
description: |
The read-only email for the calendar resource. Generated as part of creating a new calendar resource.
- name: userVisibleDescription
value: "{{ userVisibleDescription }}"
description: |
Description of the resource, visible to users and admins.
UPDATE examples
- patch
Patches a calendar resource.
UPDATE googleadmin.directory.calendars
SET
data__buildingId = '{{ buildingId }}',
data__kind = '{{ kind }}',
data__generatedResourceName = '{{ generatedResourceName }}',
data__resourceId = '{{ resourceId }}',
data__floorSection = '{{ floorSection }}',
data__resourceName = '{{ resourceName }}',
data__resourceType = '{{ resourceType }}',
data__floorName = '{{ floorName }}',
data__resourceCategory = '{{ resourceCategory }}',
data__featureInstances = '{{ featureInstances }}',
data__resourceDescription = '{{ resourceDescription }}',
data__capacity = {{ capacity }},
data__etags = '{{ etags }}',
data__resourceEmail = '{{ resourceEmail }}',
data__userVisibleDescription = '{{ userVisibleDescription }}'
WHERE
customer = '{{ customer }}' --required
AND calendarResourceId = '{{ calendarResourceId }}' --required
RETURNING
buildingId,
capacity,
etags,
featureInstances,
floorName,
floorSection,
generatedResourceName,
kind,
resourceCategory,
resourceDescription,
resourceEmail,
resourceId,
resourceName,
resourceType,
userVisibleDescription;
REPLACE examples
- update
Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved.
REPLACE googleadmin.directory.calendars
SET
data__buildingId = '{{ buildingId }}',
data__kind = '{{ kind }}',
data__generatedResourceName = '{{ generatedResourceName }}',
data__resourceId = '{{ resourceId }}',
data__floorSection = '{{ floorSection }}',
data__resourceName = '{{ resourceName }}',
data__resourceType = '{{ resourceType }}',
data__floorName = '{{ floorName }}',
data__resourceCategory = '{{ resourceCategory }}',
data__featureInstances = '{{ featureInstances }}',
data__resourceDescription = '{{ resourceDescription }}',
data__capacity = {{ capacity }},
data__etags = '{{ etags }}',
data__resourceEmail = '{{ resourceEmail }}',
data__userVisibleDescription = '{{ userVisibleDescription }}'
WHERE
customer = '{{ customer }}' --required
AND calendarResourceId = '{{ calendarResourceId }}' --required
RETURNING
buildingId,
capacity,
etags,
featureInstances,
floorName,
floorSection,
generatedResourceName,
kind,
resourceCategory,
resourceDescription,
resourceEmail,
resourceId,
resourceName,
resourceType,
userVisibleDescription;
DELETE examples
- delete
Deletes a calendar resource.
DELETE FROM googleadmin.directory.calendars
WHERE customer = '{{ customer }}' --required
AND calendarResourceId = '{{ calendarResourceId }}' --required
;