google-cloud-iot - iot_v1.types.FieldMask() 是怎么来的?
问题描述
代码:
device_path = client.device_path(
project_id, cloud_region, registry_id, device_id)
mask = iot_v1.types.FieldMask()
mask.paths.append('config')
mask.paths.append('gateway_config')
device = client.get_device(client.list_devices(parent=path, field_mask=mask))
这个 FieldMask 是从哪里来的?
解决方案
字段掩码是:The fields of the Device resource to be returned in the response. The fields id and num_id are always returned, along with any other fields specified.
Source。
它来自定义的 protobuf types,它是 IoT 包的一部分。
推荐阅读
- php - PHP输入类型“datetime-local”:在编辑模式下不显示值
- bootstrap-4 - How can I append the date to the input field?
- python - 星际争霸以 python-sc2 启动,但加载屏幕后没有任何反应
- vb.net - 将 csv 文件克隆到内存并在数据表中使用它?(vb.net)
- reactjs - 测试自定义钩子并获得“警告:测试中对 TestHook 的更新未包含在行为中
- scala - Spark SQL join 真的很懒吗?
- android - 在 NavigationUI 上执行命令时出现 NullPointerException
- javascript - 如何在不跳过结果的情况下在 for 循环中查询 MongoDB?
- javascript - 如何通过javascript从json结构中删除没有其值的元素?
- html - 创建组件模板以多次使用它 - Angular