Appearance
traits/booking.proto
Table of Contents
traits/booking.proto
Booking
Field | Type | Label | Description |
---|---|---|---|
bookable | string | The name of the bookable (e.g. the resource name) | |
id | string | the unique identifier for this booking | |
title | string | the title of this booking | |
owner_name | string | the name of the owner of this booking | |
booked | smartcore.types.time.Period | the time period this booking is for | |
check_in | smartcore.types.time.Period | The time period this booking was checked in for. If this is absent, then no check in or check out has happened If check_in.start_time is absent, no check in has happened If check_in.end_time is absent, no check out has happened | |
check_in_not_required | bool | If true, the booking does not require a check-in and one should not be expected. Defaults to false; check-in is required. |
BookingSupport
BookingSupport describes the capabilities of devices implementing this trait
Field | Type | Label | Description |
---|---|---|---|
resource_support | smartcore.types.ResourceSupport | How a named device supports read/write/pull apis | |
check_in_support | BookingSupport.CheckInSupport | is check in supported, and how | |
check_out_support | BookingSupport.CheckInSupport | is check out supported, and how | |
time_resolution | smartcore.types.time.Unit | the supported time resolution for date time fields and queries |
CheckInBookingRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the bookable (e.g. the resource name) | |
booking_id | string | Which booking to check in | |
time | google.protobuf.Timestamp | The time the booking was checked-in. If omitted the server time will be used. |
CheckInBookingResponse
CheckOutBookingRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the bookable (e.g. the resource name) | |
booking_id | string | Which booking to check out | |
time | google.protobuf.Timestamp | The time the booking was checked-out. If omitted the server time will be used. |
CheckOutBookingResponse
CreateBookingRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the bookable (e.g. the resource name) | |
booking | Booking | the booking to add, the id field should not be set |
CreateBookingResponse
Field | Type | Label | Description |
---|---|---|---|
booking_id | string | The created bookings' id |
DescribeBookingRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device |
ListBookingsRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the bookable (e.g. the resource name) | |
booking_intersects | smartcore.types.time.Period | Specify the time period to return bookings for bookings are returned if they intersect this time period | |
read_mask | google.protobuf.FieldMask | The state fields to fetch | |
updates_only | bool | When true the device will only send changes to the resource value. The default behaviour is to send the current value immediately followed by any updates as they happen. |
ListBookingsResponse
Field | Type | Label | Description |
---|---|---|---|
bookings | Booking | repeated | the list of bookings for the given request |
PullBookingsResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullBookingsResponse.Change | repeated | the list of changes which have occurred |
PullBookingsResponse.Change
Field | Type | Label | Description |
---|---|---|---|
name | string | the name of the device that emitted this change | |
type | smartcore.types.ChangeType | the type of change (e.g. ADD, UPDATE, etc...) | |
new_value | Booking | the new value to use for ADD | |
old_value | Booking | the old value to use for UPDATE | |
change_time | google.protobuf.Timestamp | when the change occurred |
UpdateBookingRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the bookable (e.g. the resource name) | |
booking | Booking | The new value of the booking to use, make sure id is set | |
update_mask | google.protobuf.FieldMask | Which fields in the booking to update, any unsupported fields will be ignored, check the return value |
UpdateBookingResponse
Field | Type | Label | Description |
---|---|---|---|
booking | Booking | The new value of the booking |
BookingSupport.CheckInSupport
Name | Number | Description |
---|---|---|
CHECK_IN_SUPPORT_UNSPECIFIED | 0 | check in support is unknown |
NO_SUPPORT | 1 | check in is not supported |
STATE | 2 | check in is supported as a state, without an associated time |
TIME | 3 | check in is supported with an associated time |
BookingApi
The BookingApi defines an interface for interacting with bookable resources, for example rooms. Bookings can be listed, edited, and created.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
ListBookings | ListBookingsRequest | ListBookingsResponse | list bookings for a given bookable |
CheckInBooking | CheckInBookingRequest | CheckInBookingResponse | check in an existing booking |
CheckOutBooking | CheckOutBookingRequest | CheckOutBookingResponse | check out an existing booking |
CreateBooking | CreateBookingRequest | CreateBookingResponse | create a new booking |
UpdateBooking | UpdateBookingRequest | UpdateBookingResponse | update an existing booking |
PullBookings | ListBookingsRequest | PullBookingsResponse stream | request updates to booking changes for a given bookable |
BookingInfo
Describes the capabilities of a specific named device with respect to this trait.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
DescribeBooking | DescribeBookingRequest | BookingSupport | Get information about how a named device implements Booking features |