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
Successful response
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. |
Successful response
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 | maxResults , orderBy , pageToken , query | 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 maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND query = '{{ query }}';
INSERT
examples
- insert
- Manifest
Inserts a calendar resource.
INSERT INTO googleadmin.directory.calendars (
data__kind,
data__etags,
data__resourceName,
data__resourceDescription,
data__resourceType,
data__resourceEmail,
data__resourceCategory,
data__userVisibleDescription,
data__generatedResourceName,
data__featureInstances,
data__resourceId,
data__capacity,
data__floorName,
data__buildingId,
data__floorSection,
customer
)
SELECT
'{{ kind }}',
'{{ etags }}',
'{{ resourceName }}',
'{{ resourceDescription }}',
'{{ resourceType }}',
'{{ resourceEmail }}',
'{{ resourceCategory }}',
'{{ userVisibleDescription }}',
'{{ generatedResourceName }}',
'{{ featureInstances }}',
'{{ resourceId }}',
{{ capacity }},
'{{ floorName }}',
'{{ buildingId }}',
'{{ floorSection }}',
'{{ 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: string
description: Required parameter for the calendars resource.
- name: kind
value: string
description: >
The type of the resource. For calendar resources, the value is `admin#directory#resources#calendars#CalendarResource`.
default: admin#directory#resources#calendars#CalendarResource
- name: etags
value: string
description: >
ETag of the resource.
- name: resourceName
value: string
description: >
The name of the calendar resource. For example, "Training Room 1A".
- name: resourceDescription
value: string
description: >
Description of the resource, visible only to admins.
- name: resourceType
value: string
description: >
The type of the calendar resource, intended for non-room resources.
- name: resourceEmail
value: string
description: >
The read-only email for the calendar resource. Generated as part of creating a new calendar resource.
- name: resourceCategory
value: string
description: >
The category of the calendar resource. Either CONFERENCE_ROOM or OTHER. Legacy data is set to CATEGORY_UNKNOWN.
- name: userVisibleDescription
value: string
description: >
Description of the resource, visible to users and admins.
- name: generatedResourceName
value: string
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: featureInstances
value: any
description: >
Instances of features for the calendar resource.
- name: resourceId
value: string
description: >
The unique ID for the calendar resource.
- name: capacity
value: integer
description: >
Capacity of a resource, number of seats in a room.
- name: floorName
value: string
description: >
Name of the floor a resource is located on.
- name: buildingId
value: string
description: >
Unique ID for the building a resource is located in.
- name: floorSection
value: string
description: >
Name of the section within a floor a resource is located in.
UPDATE
examples
- patch
Patches a calendar resource.
UPDATE googleadmin.directory.calendars
SET
data__kind = '{{ kind }}',
data__etags = '{{ etags }}',
data__resourceName = '{{ resourceName }}',
data__resourceDescription = '{{ resourceDescription }}',
data__resourceType = '{{ resourceType }}',
data__resourceEmail = '{{ resourceEmail }}',
data__resourceCategory = '{{ resourceCategory }}',
data__userVisibleDescription = '{{ userVisibleDescription }}',
data__generatedResourceName = '{{ generatedResourceName }}',
data__featureInstances = '{{ featureInstances }}',
data__resourceId = '{{ resourceId }}',
data__capacity = {{ capacity }},
data__floorName = '{{ floorName }}',
data__buildingId = '{{ buildingId }}',
data__floorSection = '{{ floorSection }}'
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__kind = '{{ kind }}',
data__etags = '{{ etags }}',
data__resourceName = '{{ resourceName }}',
data__resourceDescription = '{{ resourceDescription }}',
data__resourceType = '{{ resourceType }}',
data__resourceEmail = '{{ resourceEmail }}',
data__resourceCategory = '{{ resourceCategory }}',
data__userVisibleDescription = '{{ userVisibleDescription }}',
data__generatedResourceName = '{{ generatedResourceName }}',
data__featureInstances = '{{ featureInstances }}',
data__resourceId = '{{ resourceId }}',
data__capacity = {{ capacity }},
data__floorName = '{{ floorName }}',
data__buildingId = '{{ buildingId }}',
data__floorSection = '{{ floorSection }}'
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;