Appearance
traits/parent.proto
Table of Contents
traits/parent.proto
Child
Child is a member of a parent.
Field | Type | Label | Description |
---|---|---|---|
name | string | Name is the Smart Core name for this child device. | |
traits | Trait | repeated | Traits lists the traits this child implements. |
parent | string | Parent is the name of this child's direct parent. If absent this is the name of the device in the children request. |
ListChildrenRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | Fields to fetch relative to the ElectricMode type | |
page_size | int32 | The maximum number of children to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. | |
page_token | string | A page token, received from a previous ListChildrenResponse call. Provide this to retrieve the subsequent page. |
ListChildrenResponse
Field | Type | Label | Description |
---|---|---|---|
children | Child | repeated | |
next_page_token | string | A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. | |
total_size | int32 | If non-zero this is the total number of draw notifications. This may be an estimate. |
PullChildrenRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | Fields to fetch relative to the ElectricMode type | |
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. |
PullChildrenResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullChildrenResponse.Change | repeated | The list of changes which have occurred |
PullChildrenResponse.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 | Child | The new value to use for ADD | |
old_value | Child | The old value to use for UPDATE | |
change_time | google.protobuf.Timestamp | When the change occurred |
Trait
Field | Type | Label | Description |
---|---|---|---|
name | string | The qualified name of the trait. For example smartcore.traits.Parent |
ParentApi
ParentApi describes the capabilities of a device to have child devices.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
ListChildren | ListChildrenRequest | ListChildrenResponse | ListChildren returns children associated with the named parent device. |
PullChildren | PullChildrenRequest | PullChildrenResponse stream | PullChildren subscribes to changes in the children associated with the named parent device. |
ParentInfo
todo: define ParentInfo
Method Name | Request Type | Response Type | Description |
---|