Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Commit 7f1d4d9

Browse files
author
Nick Cook
committed
Device field constraint changes.
Change-Id: I0c2041e0150ce5a16b0874fbe864c0ba6d793ec1 b/70295651
1 parent 487a2b3 commit 7f1d4d9

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

google-assistant-sdk/googlesamples/assistant/grpc/devicetool.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,14 @@ def register(ctx, model, type, trait, manufacturer, product_name, description,
170170
device, nickname, client_type):
171171
"""Registers a device model and instance.
172172
173-
Device model and instance fields can only contain letters, numbers, and the
174-
following symbols: period (.), hyphen (-), underscore (_), space ( ) and
175-
plus (+). The first character of a field must be a letter or number.
173+
Device model fields can only contain letters, numbers, and the following
174+
symbols: period (.), hyphen (-), underscore (_), space ( ) and plus (+).
175+
The first character of a field must be a letter or number.
176+
177+
Device instance fields must start with a letter or number. The device ID
178+
can only contain letters, numbers, and the following symbols: period (.),
179+
hyphen (-), underscore (_), and plus (+). The device nickname can only
180+
contain numbers, letters, and the space ( ) symbol.
176181
"""
177182
ctx.invoke(register_model,
178183
model=model, type=type, trait=trait,
@@ -214,9 +219,9 @@ def register_model(ctx, model, type, trait,
214219
manufacturer, product_name, description):
215220
"""Registers a device model.
216221
217-
Device model and instance fields can only contain letters, numbers, and the
218-
following symbols: period (.), hyphen (-), underscore (_), space ( ) and
219-
plus (+). The first character of a field must be a letter or number.
222+
Device model fields can only contain letters, numbers, and the following
223+
symbols: period (.), hyphen (-), underscore (_), space ( ) and plus (+).
224+
The first character of a field must be a letter or number.
220225
"""
221226
session = ctx.obj['SESSION']
222227

@@ -274,9 +279,10 @@ def register_model(ctx, model, type, trait,
274279
def register_device(ctx, device, model, nickname, client_type):
275280
"""Registers a device instance under an existing device model.
276281
277-
Device model and instance fields can only contain letters, numbers, and the
278-
following symbols: period (.), hyphen (-), underscore (_), space ( ) and
279-
plus (+). The first character of a field must be a letter or number.
282+
Device instance fields must start with a letter or number. The device ID
283+
can only contain letters, numbers, and the following symbols: period (.),
284+
hyphen (-), underscore (_), and plus (+). The device nickname can only
285+
contain numbers, letters, and the space ( ) symbol.
280286
"""
281287
session = ctx.obj['SESSION']
282288

0 commit comments

Comments
 (0)