From c0795f3a04fd8a855c9798276141154ece34eadf Mon Sep 17 00:00:00 2001 From: Naveed Jooma Date: Fri, 16 Sep 2022 17:30:24 -0400 Subject: [PATCH] [RSDK-626] RDK Protos + Package Naming (#51) --- Makefile | 8 +- app/data/v1/data.pb.go | 2 +- app/datasync/v1/data_sync.pb.go | 2 +- app/model/v1/model.pb.go | 2 +- app/v1/app.pb.go | 2 +- app/v1/robot.pb.go | 2 +- common/v1/common.pb.go | 1513 ++++ component/arm/v1/arm.pb.go | 1031 +++ component/arm/v1/arm.pb.gw.go | 681 ++ component/arm/v1/arm_grpc.pb.go | 259 + component/audioinput/v1/audioinput.pb.go | 807 ++ component/audioinput/v1/audioinput.pb.gw.go | 363 + component/audioinput/v1/audioinput_grpc.pb.go | 212 + component/base/v1/base.pb.go | 892 ++ component/base/v1/base.pb.gw.go | 681 ++ component/base/v1/base_grpc.pb.go | 265 + component/board/v1/board.pb.go | 1535 ++++ component/board/v1/board.pb.gw.go | 1197 +++ component/board/v1/board_grpc.pb.go | 403 + component/camera/v1/camera.pb.go | 1218 +++ component/camera/v1/camera.pb.gw.go | 544 ++ component/camera/v1/camera_grpc.pb.go | 224 + component/gantry/v1/gantry.pb.go | 787 ++ component/gantry/v1/gantry.pb.gw.go | 562 ++ component/gantry/v1/gantry_grpc.pb.go | 217 + component/generic/v1/generic.pb.go | 246 + component/generic/v1/generic.pb.gw.go | 205 + component/generic/v1/generic_grpc.pb.go | 103 + component/gripper/v1/gripper.pb.go | 476 + component/gripper/v1/gripper.pb.gw.go | 389 + component/gripper/v1/gripper_grpc.pb.go | 179 + .../inputcontroller/v1/input_controller.pb.go | 942 ++ .../v1/input_controller.pb.gw.go | 484 + .../v1/input_controller_grpc.pb.go | 248 + component/motor/v1/motor.pb.go | 1413 +++ component/motor/v1/motor.pb.gw.go | 1038 +++ component/motor/v1/motor_grpc.pb.go | 389 + .../movementsensor/v1/movementsensor.pb.go | 1176 +++ .../movementsensor/v1/movementsensor.pb.gw.go | 793 ++ .../v1/movementsensor_grpc.pb.go | 317 + component/posetracker/v1/pose_tracker.pb.go | 259 + .../posetracker/v1/pose_tracker.pb.gw.go | 205 + .../posetracker/v1/pose_tracker_grpc.pb.go | 103 + component/sensor/v1/sensor.pb.go | 243 + component/sensor/v1/sensor.pb.gw.go | 187 + component/sensor/v1/sensor_grpc.pb.go | 103 + component/servo/v1/servo.pb.go | 564 ++ component/servo/v1/servo.pb.gw.go | 407 + component/servo/v1/servo_grpc.pb.go | 181 + gen/js/app/data/v1/data_grpc_web_pb.js | 140 + gen/js/app/data/v1/data_pb.d.ts | 389 + gen/js/app/data/v1/data_pb.js | 2956 ++++++ gen/js/app/data/v1/data_pb_service.d.ts | 63 + gen/js/app/data/v1/data_pb_service.js | 61 + .../app/datasync/v1/data_sync_grpc_web_pb.js | 85 + gen/js/app/datasync/v1/data_sync_pb.d.ts | 536 ++ gen/js/app/datasync/v1/data_sync_pb.js | 4080 +++++++++ .../app/datasync/v1/data_sync_pb_service.d.ts | 55 + .../app/datasync/v1/data_sync_pb_service.js | 75 + gen/js/app/model/v1/model_grpc_web_pb.js | 201 + gen/js/app/model/v1/model_pb.d.ts | 297 + gen/js/app/model/v1/model_pb.js | 2188 +++++ gen/js/app/model/v1/model_pb_service.d.ts | 93 + gen/js/app/model/v1/model_pb_service.js | 151 + gen/js/app/v1/app_grpc_web_pb.js | 1114 +++ gen/js/app/v1/app_pb.d.ts | 1034 +++ gen/js/app/v1/app_pb.js | 8017 +++++++++++++++++ gen/js/app/v1/app_pb_service.d.ts | 359 + gen/js/app/v1/app_pb_service.js | 709 ++ gen/js/app/v1/robot_grpc_web_pb.js | 328 + gen/js/app/v1/robot_pb.d.ts | 1012 +++ gen/js/app/v1/robot_pb.js | 7772 ++++++++++++++++ gen/js/app/v1/robot_pb_service.d.ts | 120 + gen/js/app/v1/robot_pb_service.js | 181 + gen/js/common/v1/common_pb.d.ts | 470 + gen/js/common/v1/common_pb.js | 3632 ++++++++ gen/js/common/v1/common_pb_service.d.ts | 3 + gen/js/common/v1/common_pb_service.js | 3 + gen/js/component/arm/v1/arm_grpc_web_pb.js | 388 + gen/js/component/arm/v1/arm_pb.d.ts | 302 + gen/js/component/arm/v1/arm_pb.js | 2341 +++++ gen/js/component/arm/v1/arm_pb_service.d.ts | 139 + gen/js/component/arm/v1/arm_pb_service.js | 221 + .../audioinput/v1/audioinput_grpc_web_pb.js | 261 + .../audioinput/v1/audioinput_pb.d.ts | 221 + .../component/audioinput/v1/audioinput_pb.js | 1593 ++++ .../audioinput/v1/audioinput_pb_service.d.ts | 94 + .../audioinput/v1/audioinput_pb_service.js | 150 + gen/js/component/base/v1/base_grpc_web_pb.js | 388 + gen/js/component/base/v1/base_pb.d.ts | 258 + gen/js/component/base/v1/base_pb.js | 1978 ++++ gen/js/component/base/v1/base_pb_service.d.ts | 139 + gen/js/component/base/v1/base_pb_service.js | 221 + .../component/board/v1/board_grpc_web_pb.js | 632 ++ gen/js/component/board/v1/board_pb.d.ts | 456 + gen/js/component/board/v1/board_pb.js | 3483 +++++++ .../component/board/v1/board_pb_service.d.ts | 215 + gen/js/component/board/v1/board_pb_service.js | 381 + .../component/camera/v1/camera_grpc_web_pb.js | 325 + gen/js/component/camera/v1/camera_pb.d.ts | 371 + gen/js/component/camera/v1/camera_pb.js | 2857 ++++++ .../camera/v1/camera_pb_service.d.ts | 121 + .../component/camera/v1/camera_pb_service.js | 182 + .../component/gantry/v1/gantry_grpc_web_pb.js | 327 + gen/js/component/gantry/v1/gantry_pb.d.ts | 232 + gen/js/component/gantry/v1/gantry_pb.js | 1812 ++++ .../gantry/v1/gantry_pb_service.d.ts | 120 + .../component/gantry/v1/gantry_pb_service.js | 181 + .../generic/v1/generic_grpc_web_pb.js | 142 + gen/js/component/generic/v1/generic_pb.d.ts | 55 + gen/js/component/generic/v1/generic_pb.js | 398 + .../generic/v1/generic_pb_service.d.ts | 63 + .../generic/v1/generic_pb_service.js | 61 + .../gripper/v1/gripper_grpc_web_pb.js | 262 + gen/js/component/gripper/v1/gripper_pb.d.ts | 118 + gen/js/component/gripper/v1/gripper_pb.js | 874 ++ .../gripper/v1/gripper_pb_service.d.ts | 101 + .../gripper/v1/gripper_pb_service.js | 141 + .../v1/input_controller_grpc_web_pb.js | 320 + .../v1/input_controller_pb.d.ts | 269 + .../inputcontroller/v1/input_controller_pb.js | 2099 +++++ .../v1/input_controller_pb_service.d.ts | 112 + .../v1/input_controller_pb_service.js | 189 + .../component/motor/v1/motor_grpc_web_pb.js | 569 ++ gen/js/component/motor/v1/motor_pb.d.ts | 411 + gen/js/component/motor/v1/motor_pb.js | 3139 +++++++ .../component/motor/v1/motor_pb_service.d.ts | 196 + gen/js/component/motor/v1/motor_pb_service.js | 341 + .../v1/movementsensor_grpc_web_pb.js | 508 ++ .../movementsensor/v1/movementsensor_pb.d.ts | 314 + .../movementsensor/v1/movementsensor_pb.js | 2387 +++++ .../v1/movementsensor_pb_service.d.ts | 177 + .../v1/movementsensor_pb_service.js | 301 + .../v1/pose_tracker_grpc_web_pb.js | 142 + .../posetracker/v1/pose_tracker_pb.d.ts | 52 + .../posetracker/v1/pose_tracker_pb.js | 385 + .../v1/pose_tracker_pb_service.d.ts | 63 + .../posetracker/v1/pose_tracker_pb_service.js | 61 + .../component/sensor/v1/sensor_grpc_web_pb.js | 142 + gen/js/component/sensor/v1/sensor_pb.d.ts | 46 + gen/js/component/sensor/v1/sensor_pb.js | 329 + .../sensor/v1/sensor_pb_service.d.ts | 63 + .../component/sensor/v1/sensor_pb_service.js | 61 + .../component/servo/v1/servo_grpc_web_pb.js | 262 + gen/js/component/servo/v1/servo_pb.d.ts | 146 + gen/js/component/servo/v1/servo_pb.js | 1086 +++ .../component/servo/v1/servo_pb_service.d.ts | 101 + gen/js/component/servo/v1/servo_pb_service.js | 141 + gen/js/google/api/annotations_pb.d.ts | 9 + gen/js/google/api/annotations_pb.js | 48 + gen/js/google/api/annotations_pb_service.d.ts | 3 + gen/js/google/api/annotations_pb_service.js | 3 + gen/js/google/api/client_pb.d.ts | 12 + gen/js/google/api/client_pb.js | 98 + gen/js/google/api/client_pb_service.d.ts | 3 + gen/js/google/api/client_pb_service.js | 3 + .../google/api/expr/v1alpha1/checked_pb.d.ts | 454 + gen/js/google/api/expr/v1alpha1/checked_pb.js | 3364 +++++++ .../api/expr/v1alpha1/checked_pb_service.d.ts | 3 + .../api/expr/v1alpha1/checked_pb_service.js | 3 + gen/js/google/api/expr/v1alpha1/eval_pb.d.ts | 145 + gen/js/google/api/expr/v1alpha1/eval_pb.js | 1104 +++ .../api/expr/v1alpha1/eval_pb_service.d.ts | 3 + .../api/expr/v1alpha1/eval_pb_service.js | 3 + .../google/api/expr/v1alpha1/explain_pb.d.ts | 58 + gen/js/google/api/expr/v1alpha1/explain_pb.js | 437 + .../api/expr/v1alpha1/explain_pb_service.d.ts | 3 + .../api/expr/v1alpha1/explain_pb_service.js | 3 + .../google/api/expr/v1alpha1/syntax_pb.d.ts | 493 + gen/js/google/api/expr/v1alpha1/syntax_pb.js | 3763 ++++++++ .../api/expr/v1alpha1/syntax_pb_service.d.ts | 3 + .../api/expr/v1alpha1/syntax_pb_service.js | 3 + gen/js/google/api/expr/v1alpha1/value_pb.d.ts | 210 + gen/js/google/api/expr/v1alpha1/value_pb.js | 1563 ++++ .../api/expr/v1alpha1/value_pb_service.d.ts | 3 + .../api/expr/v1alpha1/value_pb_service.js | 3 + gen/js/google/api/expr/v1beta1/decl_pb.d.ts | 143 + gen/js/google/api/expr/v1beta1/decl_pb.js | 1090 +++ .../api/expr/v1beta1/decl_pb_service.d.ts | 3 + .../api/expr/v1beta1/decl_pb_service.js | 3 + gen/js/google/api/expr/v1beta1/eval_pb.d.ts | 167 + gen/js/google/api/expr/v1beta1/eval_pb.js | 1279 +++ .../api/expr/v1beta1/eval_pb_service.d.ts | 3 + .../api/expr/v1beta1/eval_pb_service.js | 3 + gen/js/google/api/expr/v1beta1/expr_pb.d.ts | 414 + gen/js/google/api/expr/v1beta1/expr_pb.js | 3139 +++++++ .../api/expr/v1beta1/expr_pb_service.d.ts | 3 + .../api/expr/v1beta1/expr_pb_service.js | 3 + gen/js/google/api/expr/v1beta1/source_pb.d.ts | 66 + gen/js/google/api/expr/v1beta1/source_pb.js | 503 ++ .../api/expr/v1beta1/source_pb_service.d.ts | 3 + .../api/expr/v1beta1/source_pb_service.js | 3 + gen/js/google/api/expr/v1beta1/value_pb.d.ts | 210 + gen/js/google/api/expr/v1beta1/value_pb.js | 1563 ++++ .../api/expr/v1beta1/value_pb_service.d.ts | 3 + .../api/expr/v1beta1/value_pb_service.js | 3 + gen/js/google/api/field_behavior_pb.d.ts | 21 + gen/js/google/api/field_behavior_pb.js | 61 + .../google/api/field_behavior_pb_service.d.ts | 3 + .../google/api/field_behavior_pb_service.js | 3 + gen/js/google/api/http_pb.d.ts | 136 + gen/js/google/api/http_pb.js | 1006 +++ gen/js/google/api/http_pb_service.d.ts | 3 + gen/js/google/api/http_pb_service.js | 3 + gen/js/google/api/httpbody_pb.d.ts | 38 + gen/js/google/api/httpbody_pb.js | 286 + gen/js/google/api/httpbody_pb_service.d.ts | 3 + gen/js/google/api/httpbody_pb_service.js | 3 + gen/js/google/api/resource_pb.d.ts | 99 + gen/js/google/api/resource_pb.js | 678 ++ gen/js/google/api/resource_pb_service.d.ts | 3 + gen/js/google/api/resource_pb_service.js | 3 + gen/js/google/api/visibility_pb.d.ts | 64 + gen/js/google/api/visibility_pb.js | 540 ++ gen/js/google/api/visibility_pb_service.d.ts | 3 + gen/js/google/api/visibility_pb_service.js | 3 + .../longrunning/operations_grpc_web_pb.js | 394 + gen/js/google/longrunning/operations_pb.d.ts | 231 + gen/js/google/longrunning/operations_pb.js | 1715 ++++ .../longrunning/operations_pb_service.d.ts | 140 + .../longrunning/operations_pb_service.js | 222 + gen/js/google/rpc/code_pb.d.ts | 27 + gen/js/google/rpc/code_pb.js | 42 + gen/js/google/rpc/code_pb_service.d.ts | 3 + gen/js/google/rpc/code_pb_service.js | 3 + .../rpc/context/attribute_context_pb.d.ts | 356 + .../rpc/context/attribute_context_pb.js | 2815 ++++++ .../context/attribute_context_pb_service.d.ts | 3 + .../context/attribute_context_pb_service.js | 3 + gen/js/google/rpc/error_details_pb.d.ts | 349 + gen/js/google/rpc/error_details_pb.js | 2708 ++++++ .../google/rpc/error_details_pb_service.d.ts | 3 + gen/js/google/rpc/error_details_pb_service.js | 3 + gen/js/google/rpc/status_pb.d.ts | 36 + gen/js/google/rpc/status_pb.js | 262 + gen/js/google/rpc/status_pb_service.d.ts | 3 + gen/js/google/rpc/status_pb_service.js | 3 + gen/js/google/type/calendar_period_pb.d.ts | 18 + gen/js/google/type/calendar_period_pb.js | 33 + .../type/calendar_period_pb_service.d.ts | 3 + .../google/type/calendar_period_pb_service.js | 3 + gen/js/google/type/color_pb.d.ts | 40 + gen/js/google/type/color_pb.js | 283 + gen/js/google/type/color_pb_service.d.ts | 3 + gen/js/google/type/color_pb_service.js | 3 + gen/js/google/type/date_pb.d.ts | 33 + gen/js/google/type/date_pb.js | 230 + gen/js/google/type/date_pb_service.d.ts | 3 + gen/js/google/type/date_pb_service.js | 3 + gen/js/google/type/datetime_pb.d.ts | 93 + gen/js/google/type/datetime_pb.js | 663 ++ gen/js/google/type/datetime_pb_service.d.ts | 3 + gen/js/google/type/datetime_pb_service.js | 3 + gen/js/google/type/dayofweek_pb.d.ts | 18 + gen/js/google/type/dayofweek_pb.js | 33 + gen/js/google/type/dayofweek_pb_service.d.ts | 3 + gen/js/google/type/dayofweek_pb_service.js | 3 + gen/js/google/type/decimal_pb.d.ts | 25 + gen/js/google/type/decimal_pb.js | 170 + gen/js/google/type/decimal_pb_service.d.ts | 3 + gen/js/google/type/decimal_pb_service.js | 3 + gen/js/google/type/expr_pb.d.ts | 37 + gen/js/google/type/expr_pb.js | 260 + gen/js/google/type/expr_pb_service.d.ts | 3 + gen/js/google/type/expr_pb_service.js | 3 + gen/js/google/type/fraction_pb.d.ts | 29 + gen/js/google/type/fraction_pb.js | 200 + gen/js/google/type/fraction_pb_service.d.ts | 3 + gen/js/google/type/fraction_pb_service.js | 3 + gen/js/google/type/interval_pb.d.ts | 34 + gen/js/google/type/interval_pb.js | 244 + gen/js/google/type/interval_pb_service.d.ts | 3 + gen/js/google/type/interval_pb_service.js | 3 + gen/js/google/type/latlng_pb.d.ts | 29 + gen/js/google/type/latlng_pb.js | 200 + gen/js/google/type/latlng_pb_service.d.ts | 3 + gen/js/google/type/latlng_pb_service.js | 3 + gen/js/google/type/localized_text_pb.d.ts | 29 + gen/js/google/type/localized_text_pb.js | 200 + .../type/localized_text_pb_service.d.ts | 3 + .../google/type/localized_text_pb_service.js | 3 + gen/js/google/type/money_pb.d.ts | 33 + gen/js/google/type/money_pb.js | 230 + gen/js/google/type/money_pb_service.d.ts | 3 + gen/js/google/type/money_pb_service.js | 3 + gen/js/google/type/month_pb.d.ts | 23 + gen/js/google/type/month_pb.js | 38 + gen/js/google/type/month_pb_service.d.ts | 3 + gen/js/google/type/month_pb_service.js | 3 + gen/js/google/type/phone_number_pb.d.ts | 68 + gen/js/google/type/phone_number_pb.js | 478 + .../google/type/phone_number_pb_service.d.ts | 3 + gen/js/google/type/phone_number_pb_service.js | 3 + gen/js/google/type/postal_address_pb.d.ts | 69 + gen/js/google/type/postal_address_pb.js | 515 ++ .../type/postal_address_pb_service.d.ts | 3 + .../google/type/postal_address_pb_service.js | 3 + gen/js/google/type/quaternion_pb.d.ts | 37 + gen/js/google/type/quaternion_pb.js | 260 + gen/js/google/type/quaternion_pb_service.d.ts | 3 + gen/js/google/type/quaternion_pb_service.js | 3 + gen/js/google/type/timeofday_pb.d.ts | 37 + gen/js/google/type/timeofday_pb.js | 260 + gen/js/google/type/timeofday_pb_service.d.ts | 3 + gen/js/google/type/timeofday_pb_service.js | 3 + gen/js/package-lock.json | 28 + gen/js/package.json | 13 + gen/js/robot/v1/robot_grpc_web_pb.js | 752 ++ gen/js/robot/v1/robot_pb.d.ts | 672 ++ gen/js/robot/v1/robot_pb.js | 5339 +++++++++++ gen/js/robot/v1/robot_pb_service.d.ts | 245 + gen/js/robot/v1/robot_pb_service.js | 469 + .../v1/data_manager_grpc_web_pb.js | 140 + .../datamanager/v1/data_manager_pb.d.ts | 42 + .../service/datamanager/v1/data_manager_pb.js | 295 + .../v1/data_manager_pb_service.d.ts | 63 + .../datamanager/v1/data_manager_pb_service.js | 61 + .../service/motion/v1/motion_grpc_web_pb.js | 266 + gen/js/service/motion/v1/motion_pb.d.ts | 200 + gen/js/service/motion/v1/motion_pb.js | 1557 ++++ .../service/motion/v1/motion_pb_service.d.ts | 101 + gen/js/service/motion/v1/motion_pb_service.js | 141 + .../navigation/v1/navigation_grpc_web_pb.js | 447 + .../service/navigation/v1/navigation_pb.d.ts | 287 + gen/js/service/navigation/v1/navigation_pb.js | 2134 +++++ .../navigation/v1/navigation_pb_service.d.ts | 158 + .../navigation/v1/navigation_pb_service.js | 261 + .../service/sensors/v1/sensors_grpc_web_pb.js | 205 + gen/js/service/sensors/v1/sensors_pb.d.ts | 123 + gen/js/service/sensors/v1/sensors_pb.js | 958 ++ .../sensors/v1/sensors_pb_service.d.ts | 82 + .../service/sensors/v1/sensors_pb_service.js | 101 + gen/js/service/shell/v1/shell_grpc_web_pb.js | 77 + gen/js/service/shell/v1/shell_pb.d.ts | 57 + gen/js/service/shell/v1/shell_pb.js | 412 + gen/js/service/shell/v1/shell_pb_service.d.ts | 55 + gen/js/service/shell/v1/shell_pb_service.js | 75 + gen/js/service/slam/v1/slam_grpc_web_pb.js | 203 + gen/js/service/slam/v1/slam_pb.d.ts | 124 + gen/js/service/slam/v1/slam_pb.js | 912 ++ gen/js/service/slam/v1/slam_pb_service.d.ts | 82 + gen/js/service/slam/v1/slam_pb_service.js | 101 + .../service/vision/v1/vision_grpc_web_pb.js | 998 ++ gen/js/service/vision/v1/vision_pb.d.ts | 816 ++ gen/js/service/vision/v1/vision_pb.js | 6319 +++++++++++++ .../service/vision/v1/vision_pb_service.d.ts | 329 + gen/js/service/vision/v1/vision_pb_service.js | 621 ++ gen/js/tagger/v1/tagger_pb.d.ts | 10 + gen/js/tagger/v1/tagger_pb.js | 72 + gen/js/tagger/v1/tagger_pb_service.d.ts | 3 + gen/js/tagger/v1/tagger_pb_service.js | 3 + go.mod | 4 +- go.sum | 8 +- package-lock.json | 47 + package.json | 5 + proto/viam/buf.gen.web.yaml | 15 + proto/viam/buf.lock | 7 + proto/viam/buf.yaml | 9 + proto/viam/common/v1/common.proto | 148 + proto/viam/component/arm/v1/arm.proto | 120 + .../component/audioinput/v1/audioinput.proto | 89 + proto/viam/component/base/v1/base.proto | 113 + proto/viam/component/board/v1/board.proto | 177 + proto/viam/component/camera/v1/camera.proto | 143 + proto/viam/component/gantry/v1/gantry.proto | 86 + proto/viam/component/generic/v1/generic.proto | 28 + proto/viam/component/gripper/v1/gripper.proto | 53 + .../inputcontroller/v1/input_controller.proto | 109 + proto/viam/component/motor/v1/motor.proto | 184 + .../movementsensor/v1/movementsensor.proto | 125 + .../posetracker/v1/pose_tracker.proto | 33 + proto/viam/component/sensor/v1/sensor.proto | 27 + proto/viam/component/servo/v1/servo.proto | 64 + proto/viam/robot/v1/robot.proto | 214 + .../service/datamanager/v1/data_manager.proto | 24 + proto/viam/service/motion/v1/motion.proto | 76 + .../service/navigation/v1/navigation.proto | 104 + proto/viam/service/sensors/v1/sensors.proto | 49 + proto/viam/service/shell/v1/shell.proto | 23 + proto/viam/service/slam/v1/slam.proto | 61 + proto/viam/service/vision/v1/vision.proto | 333 + robot/v1/robot.pb.go | 2197 +++++ robot/v1/robot.pb.gw.go | 942 ++ robot/v1/robot_grpc.pb.go | 501 + service/datamanager/v1/data_manager.pb.go | 216 + service/datamanager/v1/data_manager.pb.gw.go | 187 + .../datamanager/v1/data_manager_grpc.pb.go | 103 + service/motion/v1/motion.pb.go | 679 ++ service/motion/v1/motion.pb.gw.go | 409 + service/motion/v1/motion_grpc.pb.go | 173 + service/navigation/v1/navigation.pb.go | 1063 +++ service/navigation/v1/navigation.pb.gw.go | 748 ++ service/navigation/v1/navigation_grpc.pb.go | 281 + service/sensors/v1/sensors.pb.go | 477 + service/sensors/v1/sensors.pb.gw.go | 306 + service/sensors/v1/sensors_grpc.pb.go | 141 + service/shell/v1/shell.pb.go | 246 + service/shell/v1/shell.pb.gw.go | 161 + service/shell/v1/shell_grpc.pb.go | 135 + service/slam/v1/slam.pb.go | 468 + service/slam/v1/slam.pb.gw.go | 306 + service/slam/v1/slam_grpc.pb.go | 145 + service/vision/v1/vision.pb.go | 2740 ++++++ service/vision/v1/vision.pb.gw.go | 1817 ++++ service/vision/v1/vision_grpc.pb.go | 639 ++ tagger/v1/tagger.pb.go | 2 +- 406 files changed, 178890 insertions(+), 13 deletions(-) create mode 100644 common/v1/common.pb.go create mode 100644 component/arm/v1/arm.pb.go create mode 100644 component/arm/v1/arm.pb.gw.go create mode 100644 component/arm/v1/arm_grpc.pb.go create mode 100644 component/audioinput/v1/audioinput.pb.go create mode 100644 component/audioinput/v1/audioinput.pb.gw.go create mode 100644 component/audioinput/v1/audioinput_grpc.pb.go create mode 100644 component/base/v1/base.pb.go create mode 100644 component/base/v1/base.pb.gw.go create mode 100644 component/base/v1/base_grpc.pb.go create mode 100644 component/board/v1/board.pb.go create mode 100644 component/board/v1/board.pb.gw.go create mode 100644 component/board/v1/board_grpc.pb.go create mode 100644 component/camera/v1/camera.pb.go create mode 100644 component/camera/v1/camera.pb.gw.go create mode 100644 component/camera/v1/camera_grpc.pb.go create mode 100644 component/gantry/v1/gantry.pb.go create mode 100644 component/gantry/v1/gantry.pb.gw.go create mode 100644 component/gantry/v1/gantry_grpc.pb.go create mode 100644 component/generic/v1/generic.pb.go create mode 100644 component/generic/v1/generic.pb.gw.go create mode 100644 component/generic/v1/generic_grpc.pb.go create mode 100644 component/gripper/v1/gripper.pb.go create mode 100644 component/gripper/v1/gripper.pb.gw.go create mode 100644 component/gripper/v1/gripper_grpc.pb.go create mode 100644 component/inputcontroller/v1/input_controller.pb.go create mode 100644 component/inputcontroller/v1/input_controller.pb.gw.go create mode 100644 component/inputcontroller/v1/input_controller_grpc.pb.go create mode 100644 component/motor/v1/motor.pb.go create mode 100644 component/motor/v1/motor.pb.gw.go create mode 100644 component/motor/v1/motor_grpc.pb.go create mode 100644 component/movementsensor/v1/movementsensor.pb.go create mode 100644 component/movementsensor/v1/movementsensor.pb.gw.go create mode 100644 component/movementsensor/v1/movementsensor_grpc.pb.go create mode 100644 component/posetracker/v1/pose_tracker.pb.go create mode 100644 component/posetracker/v1/pose_tracker.pb.gw.go create mode 100644 component/posetracker/v1/pose_tracker_grpc.pb.go create mode 100644 component/sensor/v1/sensor.pb.go create mode 100644 component/sensor/v1/sensor.pb.gw.go create mode 100644 component/sensor/v1/sensor_grpc.pb.go create mode 100644 component/servo/v1/servo.pb.go create mode 100644 component/servo/v1/servo.pb.gw.go create mode 100644 component/servo/v1/servo_grpc.pb.go create mode 100644 gen/js/app/data/v1/data_grpc_web_pb.js create mode 100644 gen/js/app/data/v1/data_pb.d.ts create mode 100644 gen/js/app/data/v1/data_pb.js create mode 100644 gen/js/app/data/v1/data_pb_service.d.ts create mode 100644 gen/js/app/data/v1/data_pb_service.js create mode 100644 gen/js/app/datasync/v1/data_sync_grpc_web_pb.js create mode 100644 gen/js/app/datasync/v1/data_sync_pb.d.ts create mode 100644 gen/js/app/datasync/v1/data_sync_pb.js create mode 100644 gen/js/app/datasync/v1/data_sync_pb_service.d.ts create mode 100644 gen/js/app/datasync/v1/data_sync_pb_service.js create mode 100644 gen/js/app/model/v1/model_grpc_web_pb.js create mode 100644 gen/js/app/model/v1/model_pb.d.ts create mode 100644 gen/js/app/model/v1/model_pb.js create mode 100644 gen/js/app/model/v1/model_pb_service.d.ts create mode 100644 gen/js/app/model/v1/model_pb_service.js create mode 100644 gen/js/app/v1/app_grpc_web_pb.js create mode 100644 gen/js/app/v1/app_pb.d.ts create mode 100644 gen/js/app/v1/app_pb.js create mode 100644 gen/js/app/v1/app_pb_service.d.ts create mode 100644 gen/js/app/v1/app_pb_service.js create mode 100644 gen/js/app/v1/robot_grpc_web_pb.js create mode 100644 gen/js/app/v1/robot_pb.d.ts create mode 100644 gen/js/app/v1/robot_pb.js create mode 100644 gen/js/app/v1/robot_pb_service.d.ts create mode 100644 gen/js/app/v1/robot_pb_service.js create mode 100644 gen/js/common/v1/common_pb.d.ts create mode 100644 gen/js/common/v1/common_pb.js create mode 100644 gen/js/common/v1/common_pb_service.d.ts create mode 100644 gen/js/common/v1/common_pb_service.js create mode 100644 gen/js/component/arm/v1/arm_grpc_web_pb.js create mode 100644 gen/js/component/arm/v1/arm_pb.d.ts create mode 100644 gen/js/component/arm/v1/arm_pb.js create mode 100644 gen/js/component/arm/v1/arm_pb_service.d.ts create mode 100644 gen/js/component/arm/v1/arm_pb_service.js create mode 100644 gen/js/component/audioinput/v1/audioinput_grpc_web_pb.js create mode 100644 gen/js/component/audioinput/v1/audioinput_pb.d.ts create mode 100644 gen/js/component/audioinput/v1/audioinput_pb.js create mode 100644 gen/js/component/audioinput/v1/audioinput_pb_service.d.ts create mode 100644 gen/js/component/audioinput/v1/audioinput_pb_service.js create mode 100644 gen/js/component/base/v1/base_grpc_web_pb.js create mode 100644 gen/js/component/base/v1/base_pb.d.ts create mode 100644 gen/js/component/base/v1/base_pb.js create mode 100644 gen/js/component/base/v1/base_pb_service.d.ts create mode 100644 gen/js/component/base/v1/base_pb_service.js create mode 100644 gen/js/component/board/v1/board_grpc_web_pb.js create mode 100644 gen/js/component/board/v1/board_pb.d.ts create mode 100644 gen/js/component/board/v1/board_pb.js create mode 100644 gen/js/component/board/v1/board_pb_service.d.ts create mode 100644 gen/js/component/board/v1/board_pb_service.js create mode 100644 gen/js/component/camera/v1/camera_grpc_web_pb.js create mode 100644 gen/js/component/camera/v1/camera_pb.d.ts create mode 100644 gen/js/component/camera/v1/camera_pb.js create mode 100644 gen/js/component/camera/v1/camera_pb_service.d.ts create mode 100644 gen/js/component/camera/v1/camera_pb_service.js create mode 100644 gen/js/component/gantry/v1/gantry_grpc_web_pb.js create mode 100644 gen/js/component/gantry/v1/gantry_pb.d.ts create mode 100644 gen/js/component/gantry/v1/gantry_pb.js create mode 100644 gen/js/component/gantry/v1/gantry_pb_service.d.ts create mode 100644 gen/js/component/gantry/v1/gantry_pb_service.js create mode 100644 gen/js/component/generic/v1/generic_grpc_web_pb.js create mode 100644 gen/js/component/generic/v1/generic_pb.d.ts create mode 100644 gen/js/component/generic/v1/generic_pb.js create mode 100644 gen/js/component/generic/v1/generic_pb_service.d.ts create mode 100644 gen/js/component/generic/v1/generic_pb_service.js create mode 100644 gen/js/component/gripper/v1/gripper_grpc_web_pb.js create mode 100644 gen/js/component/gripper/v1/gripper_pb.d.ts create mode 100644 gen/js/component/gripper/v1/gripper_pb.js create mode 100644 gen/js/component/gripper/v1/gripper_pb_service.d.ts create mode 100644 gen/js/component/gripper/v1/gripper_pb_service.js create mode 100644 gen/js/component/inputcontroller/v1/input_controller_grpc_web_pb.js create mode 100644 gen/js/component/inputcontroller/v1/input_controller_pb.d.ts create mode 100644 gen/js/component/inputcontroller/v1/input_controller_pb.js create mode 100644 gen/js/component/inputcontroller/v1/input_controller_pb_service.d.ts create mode 100644 gen/js/component/inputcontroller/v1/input_controller_pb_service.js create mode 100644 gen/js/component/motor/v1/motor_grpc_web_pb.js create mode 100644 gen/js/component/motor/v1/motor_pb.d.ts create mode 100644 gen/js/component/motor/v1/motor_pb.js create mode 100644 gen/js/component/motor/v1/motor_pb_service.d.ts create mode 100644 gen/js/component/motor/v1/motor_pb_service.js create mode 100644 gen/js/component/movementsensor/v1/movementsensor_grpc_web_pb.js create mode 100644 gen/js/component/movementsensor/v1/movementsensor_pb.d.ts create mode 100644 gen/js/component/movementsensor/v1/movementsensor_pb.js create mode 100644 gen/js/component/movementsensor/v1/movementsensor_pb_service.d.ts create mode 100644 gen/js/component/movementsensor/v1/movementsensor_pb_service.js create mode 100644 gen/js/component/posetracker/v1/pose_tracker_grpc_web_pb.js create mode 100644 gen/js/component/posetracker/v1/pose_tracker_pb.d.ts create mode 100644 gen/js/component/posetracker/v1/pose_tracker_pb.js create mode 100644 gen/js/component/posetracker/v1/pose_tracker_pb_service.d.ts create mode 100644 gen/js/component/posetracker/v1/pose_tracker_pb_service.js create mode 100644 gen/js/component/sensor/v1/sensor_grpc_web_pb.js create mode 100644 gen/js/component/sensor/v1/sensor_pb.d.ts create mode 100644 gen/js/component/sensor/v1/sensor_pb.js create mode 100644 gen/js/component/sensor/v1/sensor_pb_service.d.ts create mode 100644 gen/js/component/sensor/v1/sensor_pb_service.js create mode 100644 gen/js/component/servo/v1/servo_grpc_web_pb.js create mode 100644 gen/js/component/servo/v1/servo_pb.d.ts create mode 100644 gen/js/component/servo/v1/servo_pb.js create mode 100644 gen/js/component/servo/v1/servo_pb_service.d.ts create mode 100644 gen/js/component/servo/v1/servo_pb_service.js create mode 100644 gen/js/google/api/annotations_pb.d.ts create mode 100644 gen/js/google/api/annotations_pb.js create mode 100644 gen/js/google/api/annotations_pb_service.d.ts create mode 100644 gen/js/google/api/annotations_pb_service.js create mode 100644 gen/js/google/api/client_pb.d.ts create mode 100644 gen/js/google/api/client_pb.js create mode 100644 gen/js/google/api/client_pb_service.d.ts create mode 100644 gen/js/google/api/client_pb_service.js create mode 100644 gen/js/google/api/expr/v1alpha1/checked_pb.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/checked_pb.js create mode 100644 gen/js/google/api/expr/v1alpha1/checked_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/checked_pb_service.js create mode 100644 gen/js/google/api/expr/v1alpha1/eval_pb.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/eval_pb.js create mode 100644 gen/js/google/api/expr/v1alpha1/eval_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/eval_pb_service.js create mode 100644 gen/js/google/api/expr/v1alpha1/explain_pb.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/explain_pb.js create mode 100644 gen/js/google/api/expr/v1alpha1/explain_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/explain_pb_service.js create mode 100644 gen/js/google/api/expr/v1alpha1/syntax_pb.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/syntax_pb.js create mode 100644 gen/js/google/api/expr/v1alpha1/syntax_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/syntax_pb_service.js create mode 100644 gen/js/google/api/expr/v1alpha1/value_pb.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/value_pb.js create mode 100644 gen/js/google/api/expr/v1alpha1/value_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1alpha1/value_pb_service.js create mode 100644 gen/js/google/api/expr/v1beta1/decl_pb.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/decl_pb.js create mode 100644 gen/js/google/api/expr/v1beta1/decl_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/decl_pb_service.js create mode 100644 gen/js/google/api/expr/v1beta1/eval_pb.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/eval_pb.js create mode 100644 gen/js/google/api/expr/v1beta1/eval_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/eval_pb_service.js create mode 100644 gen/js/google/api/expr/v1beta1/expr_pb.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/expr_pb.js create mode 100644 gen/js/google/api/expr/v1beta1/expr_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/expr_pb_service.js create mode 100644 gen/js/google/api/expr/v1beta1/source_pb.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/source_pb.js create mode 100644 gen/js/google/api/expr/v1beta1/source_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/source_pb_service.js create mode 100644 gen/js/google/api/expr/v1beta1/value_pb.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/value_pb.js create mode 100644 gen/js/google/api/expr/v1beta1/value_pb_service.d.ts create mode 100644 gen/js/google/api/expr/v1beta1/value_pb_service.js create mode 100644 gen/js/google/api/field_behavior_pb.d.ts create mode 100644 gen/js/google/api/field_behavior_pb.js create mode 100644 gen/js/google/api/field_behavior_pb_service.d.ts create mode 100644 gen/js/google/api/field_behavior_pb_service.js create mode 100644 gen/js/google/api/http_pb.d.ts create mode 100644 gen/js/google/api/http_pb.js create mode 100644 gen/js/google/api/http_pb_service.d.ts create mode 100644 gen/js/google/api/http_pb_service.js create mode 100644 gen/js/google/api/httpbody_pb.d.ts create mode 100644 gen/js/google/api/httpbody_pb.js create mode 100644 gen/js/google/api/httpbody_pb_service.d.ts create mode 100644 gen/js/google/api/httpbody_pb_service.js create mode 100644 gen/js/google/api/resource_pb.d.ts create mode 100644 gen/js/google/api/resource_pb.js create mode 100644 gen/js/google/api/resource_pb_service.d.ts create mode 100644 gen/js/google/api/resource_pb_service.js create mode 100644 gen/js/google/api/visibility_pb.d.ts create mode 100644 gen/js/google/api/visibility_pb.js create mode 100644 gen/js/google/api/visibility_pb_service.d.ts create mode 100644 gen/js/google/api/visibility_pb_service.js create mode 100644 gen/js/google/longrunning/operations_grpc_web_pb.js create mode 100644 gen/js/google/longrunning/operations_pb.d.ts create mode 100644 gen/js/google/longrunning/operations_pb.js create mode 100644 gen/js/google/longrunning/operations_pb_service.d.ts create mode 100644 gen/js/google/longrunning/operations_pb_service.js create mode 100644 gen/js/google/rpc/code_pb.d.ts create mode 100644 gen/js/google/rpc/code_pb.js create mode 100644 gen/js/google/rpc/code_pb_service.d.ts create mode 100644 gen/js/google/rpc/code_pb_service.js create mode 100644 gen/js/google/rpc/context/attribute_context_pb.d.ts create mode 100644 gen/js/google/rpc/context/attribute_context_pb.js create mode 100644 gen/js/google/rpc/context/attribute_context_pb_service.d.ts create mode 100644 gen/js/google/rpc/context/attribute_context_pb_service.js create mode 100644 gen/js/google/rpc/error_details_pb.d.ts create mode 100644 gen/js/google/rpc/error_details_pb.js create mode 100644 gen/js/google/rpc/error_details_pb_service.d.ts create mode 100644 gen/js/google/rpc/error_details_pb_service.js create mode 100644 gen/js/google/rpc/status_pb.d.ts create mode 100644 gen/js/google/rpc/status_pb.js create mode 100644 gen/js/google/rpc/status_pb_service.d.ts create mode 100644 gen/js/google/rpc/status_pb_service.js create mode 100644 gen/js/google/type/calendar_period_pb.d.ts create mode 100644 gen/js/google/type/calendar_period_pb.js create mode 100644 gen/js/google/type/calendar_period_pb_service.d.ts create mode 100644 gen/js/google/type/calendar_period_pb_service.js create mode 100644 gen/js/google/type/color_pb.d.ts create mode 100644 gen/js/google/type/color_pb.js create mode 100644 gen/js/google/type/color_pb_service.d.ts create mode 100644 gen/js/google/type/color_pb_service.js create mode 100644 gen/js/google/type/date_pb.d.ts create mode 100644 gen/js/google/type/date_pb.js create mode 100644 gen/js/google/type/date_pb_service.d.ts create mode 100644 gen/js/google/type/date_pb_service.js create mode 100644 gen/js/google/type/datetime_pb.d.ts create mode 100644 gen/js/google/type/datetime_pb.js create mode 100644 gen/js/google/type/datetime_pb_service.d.ts create mode 100644 gen/js/google/type/datetime_pb_service.js create mode 100644 gen/js/google/type/dayofweek_pb.d.ts create mode 100644 gen/js/google/type/dayofweek_pb.js create mode 100644 gen/js/google/type/dayofweek_pb_service.d.ts create mode 100644 gen/js/google/type/dayofweek_pb_service.js create mode 100644 gen/js/google/type/decimal_pb.d.ts create mode 100644 gen/js/google/type/decimal_pb.js create mode 100644 gen/js/google/type/decimal_pb_service.d.ts create mode 100644 gen/js/google/type/decimal_pb_service.js create mode 100644 gen/js/google/type/expr_pb.d.ts create mode 100644 gen/js/google/type/expr_pb.js create mode 100644 gen/js/google/type/expr_pb_service.d.ts create mode 100644 gen/js/google/type/expr_pb_service.js create mode 100644 gen/js/google/type/fraction_pb.d.ts create mode 100644 gen/js/google/type/fraction_pb.js create mode 100644 gen/js/google/type/fraction_pb_service.d.ts create mode 100644 gen/js/google/type/fraction_pb_service.js create mode 100644 gen/js/google/type/interval_pb.d.ts create mode 100644 gen/js/google/type/interval_pb.js create mode 100644 gen/js/google/type/interval_pb_service.d.ts create mode 100644 gen/js/google/type/interval_pb_service.js create mode 100644 gen/js/google/type/latlng_pb.d.ts create mode 100644 gen/js/google/type/latlng_pb.js create mode 100644 gen/js/google/type/latlng_pb_service.d.ts create mode 100644 gen/js/google/type/latlng_pb_service.js create mode 100644 gen/js/google/type/localized_text_pb.d.ts create mode 100644 gen/js/google/type/localized_text_pb.js create mode 100644 gen/js/google/type/localized_text_pb_service.d.ts create mode 100644 gen/js/google/type/localized_text_pb_service.js create mode 100644 gen/js/google/type/money_pb.d.ts create mode 100644 gen/js/google/type/money_pb.js create mode 100644 gen/js/google/type/money_pb_service.d.ts create mode 100644 gen/js/google/type/money_pb_service.js create mode 100644 gen/js/google/type/month_pb.d.ts create mode 100644 gen/js/google/type/month_pb.js create mode 100644 gen/js/google/type/month_pb_service.d.ts create mode 100644 gen/js/google/type/month_pb_service.js create mode 100644 gen/js/google/type/phone_number_pb.d.ts create mode 100644 gen/js/google/type/phone_number_pb.js create mode 100644 gen/js/google/type/phone_number_pb_service.d.ts create mode 100644 gen/js/google/type/phone_number_pb_service.js create mode 100644 gen/js/google/type/postal_address_pb.d.ts create mode 100644 gen/js/google/type/postal_address_pb.js create mode 100644 gen/js/google/type/postal_address_pb_service.d.ts create mode 100644 gen/js/google/type/postal_address_pb_service.js create mode 100644 gen/js/google/type/quaternion_pb.d.ts create mode 100644 gen/js/google/type/quaternion_pb.js create mode 100644 gen/js/google/type/quaternion_pb_service.d.ts create mode 100644 gen/js/google/type/quaternion_pb_service.js create mode 100644 gen/js/google/type/timeofday_pb.d.ts create mode 100644 gen/js/google/type/timeofday_pb.js create mode 100644 gen/js/google/type/timeofday_pb_service.d.ts create mode 100644 gen/js/google/type/timeofday_pb_service.js create mode 100644 gen/js/package-lock.json create mode 100644 gen/js/package.json create mode 100644 gen/js/robot/v1/robot_grpc_web_pb.js create mode 100644 gen/js/robot/v1/robot_pb.d.ts create mode 100644 gen/js/robot/v1/robot_pb.js create mode 100644 gen/js/robot/v1/robot_pb_service.d.ts create mode 100644 gen/js/robot/v1/robot_pb_service.js create mode 100644 gen/js/service/datamanager/v1/data_manager_grpc_web_pb.js create mode 100644 gen/js/service/datamanager/v1/data_manager_pb.d.ts create mode 100644 gen/js/service/datamanager/v1/data_manager_pb.js create mode 100644 gen/js/service/datamanager/v1/data_manager_pb_service.d.ts create mode 100644 gen/js/service/datamanager/v1/data_manager_pb_service.js create mode 100644 gen/js/service/motion/v1/motion_grpc_web_pb.js create mode 100644 gen/js/service/motion/v1/motion_pb.d.ts create mode 100644 gen/js/service/motion/v1/motion_pb.js create mode 100644 gen/js/service/motion/v1/motion_pb_service.d.ts create mode 100644 gen/js/service/motion/v1/motion_pb_service.js create mode 100644 gen/js/service/navigation/v1/navigation_grpc_web_pb.js create mode 100644 gen/js/service/navigation/v1/navigation_pb.d.ts create mode 100644 gen/js/service/navigation/v1/navigation_pb.js create mode 100644 gen/js/service/navigation/v1/navigation_pb_service.d.ts create mode 100644 gen/js/service/navigation/v1/navigation_pb_service.js create mode 100644 gen/js/service/sensors/v1/sensors_grpc_web_pb.js create mode 100644 gen/js/service/sensors/v1/sensors_pb.d.ts create mode 100644 gen/js/service/sensors/v1/sensors_pb.js create mode 100644 gen/js/service/sensors/v1/sensors_pb_service.d.ts create mode 100644 gen/js/service/sensors/v1/sensors_pb_service.js create mode 100644 gen/js/service/shell/v1/shell_grpc_web_pb.js create mode 100644 gen/js/service/shell/v1/shell_pb.d.ts create mode 100644 gen/js/service/shell/v1/shell_pb.js create mode 100644 gen/js/service/shell/v1/shell_pb_service.d.ts create mode 100644 gen/js/service/shell/v1/shell_pb_service.js create mode 100644 gen/js/service/slam/v1/slam_grpc_web_pb.js create mode 100644 gen/js/service/slam/v1/slam_pb.d.ts create mode 100644 gen/js/service/slam/v1/slam_pb.js create mode 100644 gen/js/service/slam/v1/slam_pb_service.d.ts create mode 100644 gen/js/service/slam/v1/slam_pb_service.js create mode 100644 gen/js/service/vision/v1/vision_grpc_web_pb.js create mode 100644 gen/js/service/vision/v1/vision_pb.d.ts create mode 100644 gen/js/service/vision/v1/vision_pb.js create mode 100644 gen/js/service/vision/v1/vision_pb_service.d.ts create mode 100644 gen/js/service/vision/v1/vision_pb_service.js create mode 100644 gen/js/tagger/v1/tagger_pb.d.ts create mode 100644 gen/js/tagger/v1/tagger_pb.js create mode 100644 gen/js/tagger/v1/tagger_pb_service.d.ts create mode 100644 gen/js/tagger/v1/tagger_pb_service.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 proto/viam/buf.gen.web.yaml create mode 100644 proto/viam/buf.lock create mode 100644 proto/viam/common/v1/common.proto create mode 100644 proto/viam/component/arm/v1/arm.proto create mode 100644 proto/viam/component/audioinput/v1/audioinput.proto create mode 100644 proto/viam/component/base/v1/base.proto create mode 100644 proto/viam/component/board/v1/board.proto create mode 100644 proto/viam/component/camera/v1/camera.proto create mode 100644 proto/viam/component/gantry/v1/gantry.proto create mode 100644 proto/viam/component/generic/v1/generic.proto create mode 100644 proto/viam/component/gripper/v1/gripper.proto create mode 100644 proto/viam/component/inputcontroller/v1/input_controller.proto create mode 100644 proto/viam/component/motor/v1/motor.proto create mode 100644 proto/viam/component/movementsensor/v1/movementsensor.proto create mode 100644 proto/viam/component/posetracker/v1/pose_tracker.proto create mode 100644 proto/viam/component/sensor/v1/sensor.proto create mode 100644 proto/viam/component/servo/v1/servo.proto create mode 100644 proto/viam/robot/v1/robot.proto create mode 100644 proto/viam/service/datamanager/v1/data_manager.proto create mode 100644 proto/viam/service/motion/v1/motion.proto create mode 100644 proto/viam/service/navigation/v1/navigation.proto create mode 100644 proto/viam/service/sensors/v1/sensors.proto create mode 100644 proto/viam/service/shell/v1/shell.proto create mode 100644 proto/viam/service/slam/v1/slam.proto create mode 100644 proto/viam/service/vision/v1/vision.proto create mode 100644 robot/v1/robot.pb.go create mode 100644 robot/v1/robot.pb.gw.go create mode 100644 robot/v1/robot_grpc.pb.go create mode 100644 service/datamanager/v1/data_manager.pb.go create mode 100644 service/datamanager/v1/data_manager.pb.gw.go create mode 100644 service/datamanager/v1/data_manager_grpc.pb.go create mode 100644 service/motion/v1/motion.pb.go create mode 100644 service/motion/v1/motion.pb.gw.go create mode 100644 service/motion/v1/motion_grpc.pb.go create mode 100644 service/navigation/v1/navigation.pb.go create mode 100644 service/navigation/v1/navigation.pb.gw.go create mode 100644 service/navigation/v1/navigation_grpc.pb.go create mode 100644 service/sensors/v1/sensors.pb.go create mode 100644 service/sensors/v1/sensors.pb.gw.go create mode 100644 service/sensors/v1/sensors_grpc.pb.go create mode 100644 service/shell/v1/shell.pb.go create mode 100644 service/shell/v1/shell.pb.gw.go create mode 100644 service/shell/v1/shell_grpc.pb.go create mode 100644 service/slam/v1/slam.pb.go create mode 100644 service/slam/v1/slam.pb.gw.go create mode 100644 service/slam/v1/slam_grpc.pb.go create mode 100644 service/vision/v1/vision.pb.go create mode 100644 service/vision/v1/vision.pb.gw.go create mode 100644 service/vision/v1/vision_grpc.pb.go diff --git a/Makefile b/Makefile index a3c21157a..45a0e3826 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ dist/tool-install: Makefile mkdir -p dist touch dist/tool-install -dist/buf: dist/buf-go +dist/buf: dist/buf-go dist/buf-web #TODO(steve) add all proto files to the list dist/buf-go: dist/tool-install proto/viam/app/v1/app.proto proto/viam/tagger/v1/tagger.proto proto/viam/app/datasync/v1/data_sync.proto @@ -33,6 +33,12 @@ dist/buf-go: dist/tool-install proto/viam/app/v1/app.proto proto/viam/tagger/v1/ PATH=$(PATH_WITH_TOOLS) ls app/v1/*_grpc.pb.go | while read l; do mockgen -source="$$l" -destination=app/mock_v1/mock_`basename "$$l"`; done touch dist/buf-go +dist/buf-web: dist/tool-install + PATH=$(PATH_WITH_TOOLS) buf lint + PATH=$(PATH_WITH_TOOLS) buf format -w + PATH=$(PATH_WITH_TOOLS) buf generate --template ./proto/viam/buf.gen.web.yaml + PATH=$(PATH_WITH_TOOLS) buf generate --timeout 5m --template ./proto/viam/buf.gen.web.yaml buf.build/googleapis/googleapis + lint: dist/tool-install PATH=$(PATH_WITH_TOOLS) buf lint PATH=$(PATH_WITH_TOOLS) buf format -w diff --git a/app/data/v1/data.pb.go b/app/data/v1/data.pb.go index 7d12142a6..9a199c8a0 100644 --- a/app/data/v1/data.pb.go +++ b/app/data/v1/data.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: app/data/v1/data.proto diff --git a/app/datasync/v1/data_sync.pb.go b/app/datasync/v1/data_sync.pb.go index 204d5568d..f2022cc15 100644 --- a/app/datasync/v1/data_sync.pb.go +++ b/app/datasync/v1/data_sync.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: app/datasync/v1/data_sync.proto diff --git a/app/model/v1/model.pb.go b/app/model/v1/model.pb.go index 04da776ed..490256f85 100644 --- a/app/model/v1/model.pb.go +++ b/app/model/v1/model.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: app/model/v1/model.proto diff --git a/app/v1/app.pb.go b/app/v1/app.pb.go index fb20843cc..dbede6a95 100644 --- a/app/v1/app.pb.go +++ b/app/v1/app.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: app/v1/app.proto diff --git a/app/v1/robot.pb.go b/app/v1/robot.pb.go index 604f9c175..6f276535a 100644 --- a/app/v1/robot.pb.go +++ b/app/v1/robot.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: app/v1/robot.proto diff --git a/common/v1/common.pb.go b/common/v1/common.pb.go new file mode 100644 index 000000000..9d33ed3d8 --- /dev/null +++ b/common/v1/common.pb.go @@ -0,0 +1,1513 @@ +// The following is a list of messages that are used across multiple resource subtypes + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: common/v1/common.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ResourceName struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Subtype string `protobuf:"bytes,3,opt,name=subtype,proto3" json:"subtype,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ResourceName) Reset() { + *x = ResourceName{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceName) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceName) ProtoMessage() {} + +func (x *ResourceName) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceName.ProtoReflect.Descriptor instead. +func (*ResourceName) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{0} +} + +func (x *ResourceName) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ResourceName) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *ResourceName) GetSubtype() string { + if x != nil { + return x.Subtype + } + return "" +} + +func (x *ResourceName) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type BoardStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Analogs map[string]*AnalogStatus `protobuf:"bytes,1,rep,name=analogs,proto3" json:"analogs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + DigitalInterrupts map[string]*DigitalInterruptStatus `protobuf:"bytes,2,rep,name=digital_interrupts,json=digitalInterrupts,proto3" json:"digital_interrupts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *BoardStatus) Reset() { + *x = BoardStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoardStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoardStatus) ProtoMessage() {} + +func (x *BoardStatus) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoardStatus.ProtoReflect.Descriptor instead. +func (*BoardStatus) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{1} +} + +func (x *BoardStatus) GetAnalogs() map[string]*AnalogStatus { + if x != nil { + return x.Analogs + } + return nil +} + +func (x *BoardStatus) GetDigitalInterrupts() map[string]*DigitalInterruptStatus { + if x != nil { + return x.DigitalInterrupts + } + return nil +} + +type AnalogStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current value of the analog reader of a robot's board + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *AnalogStatus) Reset() { + *x = AnalogStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnalogStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnalogStatus) ProtoMessage() {} + +func (x *AnalogStatus) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnalogStatus.ProtoReflect.Descriptor instead. +func (*AnalogStatus) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{2} +} + +func (x *AnalogStatus) GetValue() int32 { + if x != nil { + return x.Value + } + return 0 +} + +type DigitalInterruptStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current value of the digital interrupt of a robot's board + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *DigitalInterruptStatus) Reset() { + *x = DigitalInterruptStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DigitalInterruptStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DigitalInterruptStatus) ProtoMessage() {} + +func (x *DigitalInterruptStatus) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DigitalInterruptStatus.ProtoReflect.Descriptor instead. +func (*DigitalInterruptStatus) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{3} +} + +func (x *DigitalInterruptStatus) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +// Pose is a combination of location and orientation. +//Location is expressed as distance which is represented by x , y, z coordinates. Orientation is expressed as an orientation vector which +//is represented by o_x, o_y, o_z and theta. The o_x, o_y, o_z coordinates represent the point on the cartesian unit sphere that the end of +//the arm is pointing to (with the origin as reference). That unit vector forms an axis around which theta rotates. This means that +//incrementing / decrementing theta will perform an inline rotation of the end effector. +//Theta is defined as rotation between two planes: the first being defined by the origin, the point (0,0,1), and the rx, ry, rz point, and the +//second being defined by the origin, the rx, ry, rz point and the local Z axis. Therefore, if theta is kept at zero as the north/south pole +//is circled, the Roll will correct itself to remain in-line. +type Pose struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // millimeters from the origin + X float64 `protobuf:"fixed64,1,opt,name=x,proto3" json:"x,omitempty"` + // millimeters from the origin + Y float64 `protobuf:"fixed64,2,opt,name=y,proto3" json:"y,omitempty"` + // millimeters from the origin + Z float64 `protobuf:"fixed64,3,opt,name=z,proto3" json:"z,omitempty"` + // z component of a vector defining axis of rotation + OX float64 `protobuf:"fixed64,4,opt,name=o_x,json=oX,proto3" json:"o_x,omitempty"` + // x component of a vector defining axis of rotation + OY float64 `protobuf:"fixed64,5,opt,name=o_y,json=oY,proto3" json:"o_y,omitempty"` + // y component of a vector defining axis of rotation + OZ float64 `protobuf:"fixed64,6,opt,name=o_z,json=oZ,proto3" json:"o_z,omitempty"` + // degrees + Theta float64 `protobuf:"fixed64,7,opt,name=theta,proto3" json:"theta,omitempty"` +} + +func (x *Pose) Reset() { + *x = Pose{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Pose) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pose) ProtoMessage() {} + +func (x *Pose) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Pose.ProtoReflect.Descriptor instead. +func (*Pose) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{4} +} + +func (x *Pose) GetX() float64 { + if x != nil { + return x.X + } + return 0 +} + +func (x *Pose) GetY() float64 { + if x != nil { + return x.Y + } + return 0 +} + +func (x *Pose) GetZ() float64 { + if x != nil { + return x.Z + } + return 0 +} + +func (x *Pose) GetOX() float64 { + if x != nil { + return x.OX + } + return 0 +} + +func (x *Pose) GetOY() float64 { + if x != nil { + return x.OY + } + return 0 +} + +func (x *Pose) GetOZ() float64 { + if x != nil { + return x.OZ + } + return 0 +} + +func (x *Pose) GetTheta() float64 { + if x != nil { + return x.Theta + } + return 0 +} + +type Orientation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // x component of a vector defining axis of rotation + OX float64 `protobuf:"fixed64,1,opt,name=o_x,json=oX,proto3" json:"o_x,omitempty"` + // y component of a vector defining axis of rotation + OY float64 `protobuf:"fixed64,2,opt,name=o_y,json=oY,proto3" json:"o_y,omitempty"` + // z component of a vector defining axis of rotation + OZ float64 `protobuf:"fixed64,3,opt,name=o_z,json=oZ,proto3" json:"o_z,omitempty"` + // degrees + Theta float64 `protobuf:"fixed64,4,opt,name=theta,proto3" json:"theta,omitempty"` +} + +func (x *Orientation) Reset() { + *x = Orientation{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Orientation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Orientation) ProtoMessage() {} + +func (x *Orientation) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Orientation.ProtoReflect.Descriptor instead. +func (*Orientation) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{5} +} + +func (x *Orientation) GetOX() float64 { + if x != nil { + return x.OX + } + return 0 +} + +func (x *Orientation) GetOY() float64 { + if x != nil { + return x.OY + } + return 0 +} + +func (x *Orientation) GetOZ() float64 { + if x != nil { + return x.OZ + } + return 0 +} + +func (x *Orientation) GetTheta() float64 { + if x != nil { + return x.Theta + } + return 0 +} + +// PoseInFrame contains a pose and the and the reference frame in which it was observed +type PoseInFrame struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReferenceFrame string `protobuf:"bytes,1,opt,name=reference_frame,json=referenceFrame,proto3" json:"reference_frame,omitempty"` + Pose *Pose `protobuf:"bytes,2,opt,name=pose,proto3" json:"pose,omitempty"` +} + +func (x *PoseInFrame) Reset() { + *x = PoseInFrame{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PoseInFrame) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PoseInFrame) ProtoMessage() {} + +func (x *PoseInFrame) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PoseInFrame.ProtoReflect.Descriptor instead. +func (*PoseInFrame) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{6} +} + +func (x *PoseInFrame) GetReferenceFrame() string { + if x != nil { + return x.ReferenceFrame + } + return "" +} + +func (x *PoseInFrame) GetPose() *Pose { + if x != nil { + return x.Pose + } + return nil +} + +type Vector3 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + X float64 `protobuf:"fixed64,1,opt,name=x,proto3" json:"x,omitempty"` + Y float64 `protobuf:"fixed64,2,opt,name=y,proto3" json:"y,omitempty"` + Z float64 `protobuf:"fixed64,3,opt,name=z,proto3" json:"z,omitempty"` +} + +func (x *Vector3) Reset() { + *x = Vector3{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Vector3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Vector3) ProtoMessage() {} + +func (x *Vector3) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Vector3.ProtoReflect.Descriptor instead. +func (*Vector3) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{7} +} + +func (x *Vector3) GetX() float64 { + if x != nil { + return x.X + } + return 0 +} + +func (x *Vector3) GetY() float64 { + if x != nil { + return x.Y + } + return 0 +} + +func (x *Vector3) GetZ() float64 { + if x != nil { + return x.Z + } + return 0 +} + +type Sphere struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RadiusMm float64 `protobuf:"fixed64,1,opt,name=radius_mm,json=radiusMm,proto3" json:"radius_mm,omitempty"` +} + +func (x *Sphere) Reset() { + *x = Sphere{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Sphere) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sphere) ProtoMessage() {} + +func (x *Sphere) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Sphere.ProtoReflect.Descriptor instead. +func (*Sphere) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{8} +} + +func (x *Sphere) GetRadiusMm() float64 { + if x != nil { + return x.RadiusMm + } + return 0 +} + +// RectangularPrism contains a Vector3 field corresponding to the X, Y, Z dimensions of the prism in mms +// These dimensions are with respect to the referenceframe in which the RectangularPrism is defined +type RectangularPrism struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DimsMm *Vector3 `protobuf:"bytes,1,opt,name=dims_mm,json=dimsMm,proto3" json:"dims_mm,omitempty"` +} + +func (x *RectangularPrism) Reset() { + *x = RectangularPrism{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RectangularPrism) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RectangularPrism) ProtoMessage() {} + +func (x *RectangularPrism) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RectangularPrism.ProtoReflect.Descriptor instead. +func (*RectangularPrism) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{9} +} + +func (x *RectangularPrism) GetDimsMm() *Vector3 { + if x != nil { + return x.DimsMm + } + return nil +} + +// Geometry contains the dimensions of a given geometry and the pose of its center. The geometry is one of either a sphere or a box. +type Geometry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Pose of a gemetries center point + Center *Pose `protobuf:"bytes,1,opt,name=center,proto3" json:"center,omitempty"` + // Deminsions of a give geometry. This can be a sphere or box + // + // Types that are assignable to GeometryType: + // *Geometry_Sphere + // *Geometry_Box + GeometryType isGeometry_GeometryType `protobuf_oneof:"geometry_type"` +} + +func (x *Geometry) Reset() { + *x = Geometry{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Geometry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Geometry) ProtoMessage() {} + +func (x *Geometry) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Geometry.ProtoReflect.Descriptor instead. +func (*Geometry) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{10} +} + +func (x *Geometry) GetCenter() *Pose { + if x != nil { + return x.Center + } + return nil +} + +func (m *Geometry) GetGeometryType() isGeometry_GeometryType { + if m != nil { + return m.GeometryType + } + return nil +} + +func (x *Geometry) GetSphere() *Sphere { + if x, ok := x.GetGeometryType().(*Geometry_Sphere); ok { + return x.Sphere + } + return nil +} + +func (x *Geometry) GetBox() *RectangularPrism { + if x, ok := x.GetGeometryType().(*Geometry_Box); ok { + return x.Box + } + return nil +} + +type isGeometry_GeometryType interface { + isGeometry_GeometryType() +} + +type Geometry_Sphere struct { + Sphere *Sphere `protobuf:"bytes,2,opt,name=sphere,proto3,oneof"` +} + +type Geometry_Box struct { + Box *RectangularPrism `protobuf:"bytes,3,opt,name=box,proto3,oneof"` +} + +func (*Geometry_Sphere) isGeometry_GeometryType() {} + +func (*Geometry_Box) isGeometry_GeometryType() {} + +// GeometriesinFrame contains the dimensions of a given geometry, pose of its center point, and the reference frame by which it was +// observed. +type GeometriesInFrame struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Reference frame of the observer of the geometry + ReferenceFrame string `protobuf:"bytes,1,opt,name=reference_frame,json=referenceFrame,proto3" json:"reference_frame,omitempty"` + // Dimensional type + Geometries []*Geometry `protobuf:"bytes,2,rep,name=geometries,proto3" json:"geometries,omitempty"` +} + +func (x *GeometriesInFrame) Reset() { + *x = GeometriesInFrame{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GeometriesInFrame) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeometriesInFrame) ProtoMessage() {} + +func (x *GeometriesInFrame) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GeometriesInFrame.ProtoReflect.Descriptor instead. +func (*GeometriesInFrame) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{11} +} + +func (x *GeometriesInFrame) GetReferenceFrame() string { + if x != nil { + return x.ReferenceFrame + } + return "" +} + +func (x *GeometriesInFrame) GetGeometries() []*Geometry { + if x != nil { + return x.Geometries + } + return nil +} + +// PointCloudObject contains an image in bytes with point cloud data of all of the objects captured by a given observer as well as a +// repeated list of geometries which respresents the center point and geometry of each of the objects within the point cloud +type PointCloudObject struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // image frame expressed in bytes + PointCloud []byte `protobuf:"bytes,1,opt,name=point_cloud,json=pointCloud,proto3" json:"point_cloud,omitempty"` + // volume of a given geometry + Geometries *GeometriesInFrame `protobuf:"bytes,2,opt,name=geometries,proto3" json:"geometries,omitempty"` +} + +func (x *PointCloudObject) Reset() { + *x = PointCloudObject{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PointCloudObject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PointCloudObject) ProtoMessage() {} + +func (x *PointCloudObject) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PointCloudObject.ProtoReflect.Descriptor instead. +func (*PointCloudObject) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{12} +} + +func (x *PointCloudObject) GetPointCloud() []byte { + if x != nil { + return x.PointCloud + } + return nil +} + +func (x *PointCloudObject) GetGeometries() *GeometriesInFrame { + if x != nil { + return x.Geometries + } + return nil +} + +type GeoPoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"` + Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"` +} + +func (x *GeoPoint) Reset() { + *x = GeoPoint{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GeoPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeoPoint) ProtoMessage() {} + +func (x *GeoPoint) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GeoPoint.ProtoReflect.Descriptor instead. +func (*GeoPoint) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{13} +} + +func (x *GeoPoint) GetLatitude() float64 { + if x != nil { + return x.Latitude + } + return 0 +} + +func (x *GeoPoint) GetLongitude() float64 { + if x != nil { + return x.Longitude + } + return 0 +} + +// Transform contains a pose and two reference frames. The first reference frame is the starting reference frame, and the second reference +// frame is the observer reference frame. The second reference frame has a pose which represents the pose of an object in the first +// reference frame as observed within the second reference frame. +type Transform struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the name of a given reference frame + ReferenceFrame string `protobuf:"bytes,1,opt,name=reference_frame,json=referenceFrame,proto3" json:"reference_frame,omitempty"` + // the pose of the above reference frame with respect to a different observer reference frame + PoseInObserverFrame *PoseInFrame `protobuf:"bytes,2,opt,name=pose_in_observer_frame,json=poseInObserverFrame,proto3" json:"pose_in_observer_frame,omitempty"` +} + +func (x *Transform) Reset() { + *x = Transform{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Transform) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transform) ProtoMessage() {} + +func (x *Transform) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transform.ProtoReflect.Descriptor instead. +func (*Transform) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{14} +} + +func (x *Transform) GetReferenceFrame() string { + if x != nil { + return x.ReferenceFrame + } + return "" +} + +func (x *Transform) GetPoseInObserverFrame() *PoseInFrame { + if x != nil { + return x.PoseInObserverFrame + } + return nil +} + +// WorldState contains information about the physical environment around a given robot. All of the fields within this message are optional, +// they can include information about the physical dimensions of an obstacle, the freespace of a robot, and any desired transforms between a +// given reference frame and a new target reference frame. +type WorldState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // a list of obstacles expressed as a geometry and the reference frame in which it was observed; this field is optional + Obstacles []*GeometriesInFrame `protobuf:"bytes,1,rep,name=obstacles,proto3" json:"obstacles,omitempty"` + // a list of spaces the robot is allowed to operate within expressed as a geometry and the reference frame it is measured fom; + // this field is optional + InteractionSpaces []*GeometriesInFrame `protobuf:"bytes,2,rep,name=interaction_spaces,json=interactionSpaces,proto3" json:"interaction_spaces,omitempty"` + // a list of Transforms needed to transform a pose from one reference frame to another; this field is optional + Transforms []*Transform `protobuf:"bytes,3,rep,name=transforms,proto3" json:"transforms,omitempty"` +} + +func (x *WorldState) Reset() { + *x = WorldState{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorldState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldState) ProtoMessage() {} + +func (x *WorldState) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldState.ProtoReflect.Descriptor instead. +func (*WorldState) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{15} +} + +func (x *WorldState) GetObstacles() []*GeometriesInFrame { + if x != nil { + return x.Obstacles + } + return nil +} + +func (x *WorldState) GetInteractionSpaces() []*GeometriesInFrame { + if x != nil { + return x.InteractionSpaces + } + return nil +} + +func (x *WorldState) GetTransforms() []*Transform { + if x != nil { + return x.Transforms + } + return nil +} + +// ActuatorStatus is a generic status for resources that only need to return actuator status. +type ActuatorStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsMoving bool `protobuf:"varint,1,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"` +} + +func (x *ActuatorStatus) Reset() { + *x = ActuatorStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ActuatorStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActuatorStatus) ProtoMessage() {} + +func (x *ActuatorStatus) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActuatorStatus.ProtoReflect.Descriptor instead. +func (*ActuatorStatus) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{16} +} + +func (x *ActuatorStatus) GetIsMoving() bool { + if x != nil { + return x.IsMoving + } + return false +} + +var File_common_v1_common_proto protoreflect.FileDescriptor + +var file_common_v1_common_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0x6e, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xfc, 0x02, 0x0a, 0x0b, 0x42, 0x6f, 0x61, + 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, 0x0a, 0x07, 0x61, 0x6e, 0x61, 0x6c, + 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x61, 0x0a, 0x12, + 0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x64, 0x69, + 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x73, 0x1a, + 0x58, 0x0a, 0x0c, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6c, 0x0a, 0x16, 0x44, 0x69, 0x67, + 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x24, 0x0a, 0x0c, 0x41, 0x6e, 0x61, 0x6c, 0x6f, + 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2e, 0x0a, + 0x16, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x79, 0x0a, + 0x04, 0x50, 0x6f, 0x73, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, + 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x7a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x7a, 0x12, + 0x0f, 0x0a, 0x03, 0x6f, 0x5f, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6f, 0x58, + 0x12, 0x0f, 0x0a, 0x03, 0x6f, 0x5f, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6f, + 0x59, 0x12, 0x0f, 0x0a, 0x03, 0x6f, 0x5f, 0x7a, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, + 0x6f, 0x5a, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x68, 0x65, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x05, 0x74, 0x68, 0x65, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x0b, 0x4f, 0x72, 0x69, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x03, 0x6f, 0x5f, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6f, 0x58, 0x12, 0x0f, 0x0a, 0x03, 0x6f, 0x5f, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6f, 0x59, 0x12, 0x0f, 0x0a, 0x03, 0x6f, 0x5f, 0x7a, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6f, 0x5a, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x68, + 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x74, 0x68, 0x65, 0x74, 0x61, + 0x22, 0x60, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x72, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x52, 0x04, 0x70, 0x6f, + 0x73, 0x65, 0x22, 0x33, 0x0a, 0x07, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x12, 0x0c, 0x0a, + 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, 0x01, 0x7a, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x7a, 0x22, 0x25, 0x0a, 0x06, 0x53, 0x70, 0x68, 0x65, 0x72, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x5f, 0x6d, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x4d, 0x6d, 0x22, 0x44, + 0x0a, 0x10, 0x52, 0x65, 0x63, 0x74, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x50, 0x72, 0x69, + 0x73, 0x6d, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x69, 0x6d, 0x73, 0x5f, 0x6d, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x52, 0x06, 0x64, 0x69, + 0x6d, 0x73, 0x4d, 0x6d, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, + 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x52, 0x06, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, + 0x30, 0x0a, 0x06, 0x73, 0x70, 0x68, 0x65, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x70, 0x68, 0x65, 0x72, 0x65, 0x48, 0x00, 0x52, 0x06, 0x73, 0x70, 0x68, 0x65, 0x72, + 0x65, 0x12, 0x34, 0x0a, 0x03, 0x62, 0x6f, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x63, 0x74, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x50, 0x72, 0x69, 0x73, 0x6d, + 0x48, 0x00, 0x52, 0x03, 0x62, 0x6f, 0x78, 0x42, 0x0f, 0x0a, 0x0d, 0x67, 0x65, 0x6f, 0x6d, 0x65, + 0x74, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x76, 0x0a, 0x11, 0x47, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, + 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6f, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x22, 0x76, 0x0a, 0x10, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x12, 0x41, 0x0a, 0x0a, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x0a, 0x67, 0x65, + 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x44, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x86, + 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x27, 0x0a, 0x0f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x16, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x69, 0x6e, + 0x5f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x52, 0x13, 0x70, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6c, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x6f, 0x62, 0x73, 0x74, 0x61, 0x63, + 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x6f, 0x62, + 0x73, 0x74, 0x61, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x49, + 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x73, 0x22, 0x2d, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x76, + 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, 0x6f, 0x76, + 0x69, 0x6e, 0x67, 0x42, 0x2f, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x19, 0x67, 0x6f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_common_v1_common_proto_rawDescOnce sync.Once + file_common_v1_common_proto_rawDescData = file_common_v1_common_proto_rawDesc +) + +func file_common_v1_common_proto_rawDescGZIP() []byte { + file_common_v1_common_proto_rawDescOnce.Do(func() { + file_common_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_v1_common_proto_rawDescData) + }) + return file_common_v1_common_proto_rawDescData +} + +var file_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_common_v1_common_proto_goTypes = []interface{}{ + (*ResourceName)(nil), // 0: viam.common.v1.ResourceName + (*BoardStatus)(nil), // 1: viam.common.v1.BoardStatus + (*AnalogStatus)(nil), // 2: viam.common.v1.AnalogStatus + (*DigitalInterruptStatus)(nil), // 3: viam.common.v1.DigitalInterruptStatus + (*Pose)(nil), // 4: viam.common.v1.Pose + (*Orientation)(nil), // 5: viam.common.v1.Orientation + (*PoseInFrame)(nil), // 6: viam.common.v1.PoseInFrame + (*Vector3)(nil), // 7: viam.common.v1.Vector3 + (*Sphere)(nil), // 8: viam.common.v1.Sphere + (*RectangularPrism)(nil), // 9: viam.common.v1.RectangularPrism + (*Geometry)(nil), // 10: viam.common.v1.Geometry + (*GeometriesInFrame)(nil), // 11: viam.common.v1.GeometriesInFrame + (*PointCloudObject)(nil), // 12: viam.common.v1.PointCloudObject + (*GeoPoint)(nil), // 13: viam.common.v1.GeoPoint + (*Transform)(nil), // 14: viam.common.v1.Transform + (*WorldState)(nil), // 15: viam.common.v1.WorldState + (*ActuatorStatus)(nil), // 16: viam.common.v1.ActuatorStatus + nil, // 17: viam.common.v1.BoardStatus.AnalogsEntry + nil, // 18: viam.common.v1.BoardStatus.DigitalInterruptsEntry +} +var file_common_v1_common_proto_depIdxs = []int32{ + 17, // 0: viam.common.v1.BoardStatus.analogs:type_name -> viam.common.v1.BoardStatus.AnalogsEntry + 18, // 1: viam.common.v1.BoardStatus.digital_interrupts:type_name -> viam.common.v1.BoardStatus.DigitalInterruptsEntry + 4, // 2: viam.common.v1.PoseInFrame.pose:type_name -> viam.common.v1.Pose + 7, // 3: viam.common.v1.RectangularPrism.dims_mm:type_name -> viam.common.v1.Vector3 + 4, // 4: viam.common.v1.Geometry.center:type_name -> viam.common.v1.Pose + 8, // 5: viam.common.v1.Geometry.sphere:type_name -> viam.common.v1.Sphere + 9, // 6: viam.common.v1.Geometry.box:type_name -> viam.common.v1.RectangularPrism + 10, // 7: viam.common.v1.GeometriesInFrame.geometries:type_name -> viam.common.v1.Geometry + 11, // 8: viam.common.v1.PointCloudObject.geometries:type_name -> viam.common.v1.GeometriesInFrame + 6, // 9: viam.common.v1.Transform.pose_in_observer_frame:type_name -> viam.common.v1.PoseInFrame + 11, // 10: viam.common.v1.WorldState.obstacles:type_name -> viam.common.v1.GeometriesInFrame + 11, // 11: viam.common.v1.WorldState.interaction_spaces:type_name -> viam.common.v1.GeometriesInFrame + 14, // 12: viam.common.v1.WorldState.transforms:type_name -> viam.common.v1.Transform + 2, // 13: viam.common.v1.BoardStatus.AnalogsEntry.value:type_name -> viam.common.v1.AnalogStatus + 3, // 14: viam.common.v1.BoardStatus.DigitalInterruptsEntry.value:type_name -> viam.common.v1.DigitalInterruptStatus + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_common_v1_common_proto_init() } +func file_common_v1_common_proto_init() { + if File_common_v1_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_common_v1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceName); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoardStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnalogStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DigitalInterruptStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Pose); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Orientation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PoseInFrame); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Vector3); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sphere); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RectangularPrism); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Geometry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeometriesInFrame); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PointCloudObject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeoPoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transform); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorldState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_v1_common_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ActuatorStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_common_v1_common_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*Geometry_Sphere)(nil), + (*Geometry_Box)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_common_v1_common_proto_rawDesc, + NumEnums: 0, + NumMessages: 19, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_common_v1_common_proto_goTypes, + DependencyIndexes: file_common_v1_common_proto_depIdxs, + MessageInfos: file_common_v1_common_proto_msgTypes, + }.Build() + File_common_v1_common_proto = out.File + file_common_v1_common_proto_rawDesc = nil + file_common_v1_common_proto_goTypes = nil + file_common_v1_common_proto_depIdxs = nil +} diff --git a/component/arm/v1/arm.pb.go b/component/arm/v1/arm.pb.go new file mode 100644 index 000000000..7dd9f20d5 --- /dev/null +++ b/component/arm/v1/arm.pb.go @@ -0,0 +1,1031 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/arm/v1/arm.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetEndPositionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an arm + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GetEndPositionRequest) Reset() { + *x = GetEndPositionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEndPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEndPositionRequest) ProtoMessage() {} + +func (x *GetEndPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEndPositionRequest.ProtoReflect.Descriptor instead. +func (*GetEndPositionRequest) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{0} +} + +func (x *GetEndPositionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetEndPositionRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GetEndPositionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Returns 6d pose of the end effector relative to the base, represented by X,Y,Z coordinates which express + // millimeters and theta, ox, oy, oz coordinates which express an orientation vector + Pose *v1.Pose `protobuf:"bytes,1,opt,name=pose,proto3" json:"pose,omitempty"` +} + +func (x *GetEndPositionResponse) Reset() { + *x = GetEndPositionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEndPositionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEndPositionResponse) ProtoMessage() {} + +func (x *GetEndPositionResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEndPositionResponse.ProtoReflect.Descriptor instead. +func (*GetEndPositionResponse) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{1} +} + +func (x *GetEndPositionResponse) GetPose() *v1.Pose { + if x != nil { + return x.Pose + } + return nil +} + +type JointPositions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of joint positions. Rotations values are in degrees, translational values in mm. + // The numbers are ordered spatially from the base toward the end effector + // This is used in GetJointPositionsResponse and MoveToJointPositionsRequest + Values []float64 `protobuf:"fixed64,1,rep,packed,name=values,proto3" json:"values,omitempty"` +} + +func (x *JointPositions) Reset() { + *x = JointPositions{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JointPositions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JointPositions) ProtoMessage() {} + +func (x *JointPositions) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JointPositions.ProtoReflect.Descriptor instead. +func (*JointPositions) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{2} +} + +func (x *JointPositions) GetValues() []float64 { + if x != nil { + return x.Values + } + return nil +} + +type GetJointPositionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an arm + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GetJointPositionsRequest) Reset() { + *x = GetJointPositionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJointPositionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJointPositionsRequest) ProtoMessage() {} + +func (x *GetJointPositionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetJointPositionsRequest.ProtoReflect.Descriptor instead. +func (*GetJointPositionsRequest) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{3} +} + +func (x *GetJointPositionsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetJointPositionsRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GetJointPositionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + //a list JointPositions + Positions *JointPositions `protobuf:"bytes,1,opt,name=positions,proto3" json:"positions,omitempty"` +} + +func (x *GetJointPositionsResponse) Reset() { + *x = GetJointPositionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJointPositionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJointPositionsResponse) ProtoMessage() {} + +func (x *GetJointPositionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetJointPositionsResponse.ProtoReflect.Descriptor instead. +func (*GetJointPositionsResponse) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{4} +} + +func (x *GetJointPositionsResponse) GetPositions() *JointPositions { + if x != nil { + return x.Positions + } + return nil +} + +type MoveToPositionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an arm + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + To *v1.Pose `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + WorldState *v1.WorldState `protobuf:"bytes,3,opt,name=world_state,json=worldState,proto3,oneof" json:"world_state,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *MoveToPositionRequest) Reset() { + *x = MoveToPositionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveToPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveToPositionRequest) ProtoMessage() {} + +func (x *MoveToPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveToPositionRequest.ProtoReflect.Descriptor instead. +func (*MoveToPositionRequest) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{5} +} + +func (x *MoveToPositionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MoveToPositionRequest) GetTo() *v1.Pose { + if x != nil { + return x.To + } + return nil +} + +func (x *MoveToPositionRequest) GetWorldState() *v1.WorldState { + if x != nil { + return x.WorldState + } + return nil +} + +func (x *MoveToPositionRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type MoveToPositionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MoveToPositionResponse) Reset() { + *x = MoveToPositionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveToPositionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveToPositionResponse) ProtoMessage() {} + +func (x *MoveToPositionResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveToPositionResponse.ProtoReflect.Descriptor instead. +func (*MoveToPositionResponse) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{6} +} + +type MoveToJointPositionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an arm + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A list of joint positions + // There should be 1 entry in the list per joint DOF, ordered spatially from the base toward the end effector + Positions *JointPositions `protobuf:"bytes,2,opt,name=positions,proto3" json:"positions,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *MoveToJointPositionsRequest) Reset() { + *x = MoveToJointPositionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveToJointPositionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveToJointPositionsRequest) ProtoMessage() {} + +func (x *MoveToJointPositionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveToJointPositionsRequest.ProtoReflect.Descriptor instead. +func (*MoveToJointPositionsRequest) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{7} +} + +func (x *MoveToJointPositionsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MoveToJointPositionsRequest) GetPositions() *JointPositions { + if x != nil { + return x.Positions + } + return nil +} + +func (x *MoveToJointPositionsRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type MoveToJointPositionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MoveToJointPositionsResponse) Reset() { + *x = MoveToJointPositionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveToJointPositionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveToJointPositionsResponse) ProtoMessage() {} + +func (x *MoveToJointPositionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveToJointPositionsResponse.ProtoReflect.Descriptor instead. +func (*MoveToJointPositionsResponse) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{8} +} + +type StopRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an arm + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *StopRequest) Reset() { + *x = StopRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopRequest) ProtoMessage() {} + +func (x *StopRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopRequest.ProtoReflect.Descriptor instead. +func (*StopRequest) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{9} +} + +func (x *StopRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StopRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type StopResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StopResponse) Reset() { + *x = StopResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopResponse) ProtoMessage() {} + +func (x *StopResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopResponse.ProtoReflect.Descriptor instead. +func (*StopResponse) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{10} +} + +type Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EndPosition *v1.Pose `protobuf:"bytes,1,opt,name=end_position,json=endPosition,proto3" json:"end_position,omitempty"` + JointPositions *JointPositions `protobuf:"bytes,2,opt,name=joint_positions,json=jointPositions,proto3" json:"joint_positions,omitempty"` + IsMoving bool `protobuf:"varint,3,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"` +} + +func (x *Status) Reset() { + *x = Status{} + if protoimpl.UnsafeEnabled { + mi := &file_component_arm_v1_arm_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_component_arm_v1_arm_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_component_arm_v1_arm_proto_rawDescGZIP(), []int{11} +} + +func (x *Status) GetEndPosition() *v1.Pose { + if x != nil { + return x.EndPosition + } + return nil +} + +func (x *Status) GetJointPositions() *JointPositions { + if x != nil { + return x.JointPositions + } + return nil +} + +func (x *Status) GetIsMoving() bool { + if x != nil { + return x.IsMoving + } + return false +} + +var File_component_arm_v1_arm_proto protoreflect.FileDescriptor + +var file_component_arm_v1_arm_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, + 0x76, 0x31, 0x2f, 0x61, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x45, 0x6e, + 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x22, 0x42, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, + 0x04, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, + 0x65, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x4a, 0x6f, 0x69, 0x6e, 0x74, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x22, 0x5d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, + 0x22, 0x60, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, + 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x15, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x24, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, + 0x73, 0x65, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x40, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, + 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6c, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x77, 0x6f, 0x72, 0x6c, + 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x6f, 0x76, 0x65, 0x54, + 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x1b, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, + 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x09, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x6f, 0x76, + 0x65, 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x0a, 0x0b, 0x53, 0x74, 0x6f, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x0e, 0x0a, 0x0c, 0x53, + 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x65, 0x6e, 0x64, 0x5f, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, + 0x73, 0x65, 0x52, 0x0b, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x4e, 0x0a, 0x0f, 0x6a, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x0e, 0x6a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x32, 0xc6, 0x06, 0x0a, + 0x0a, 0x41, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, + 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0xa1, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x54, + 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x1a, 0x2a, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x61, 0x72, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0xb1, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x74, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xba, 0x01, 0x0a, 0x14, 0x4d, 0x6f, 0x76, 0x65, + 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x32, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x4a, + 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, + 0x65, 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x33, 0x1a, 0x31, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7f, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x22, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x26, 0x2f, + 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x42, 0x3d, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x72, 0x6d, 0x2e, + 0x76, 0x31, 0x5a, 0x20, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x72, + 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_arm_v1_arm_proto_rawDescOnce sync.Once + file_component_arm_v1_arm_proto_rawDescData = file_component_arm_v1_arm_proto_rawDesc +) + +func file_component_arm_v1_arm_proto_rawDescGZIP() []byte { + file_component_arm_v1_arm_proto_rawDescOnce.Do(func() { + file_component_arm_v1_arm_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_arm_v1_arm_proto_rawDescData) + }) + return file_component_arm_v1_arm_proto_rawDescData +} + +var file_component_arm_v1_arm_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_component_arm_v1_arm_proto_goTypes = []interface{}{ + (*GetEndPositionRequest)(nil), // 0: viam.component.arm.v1.GetEndPositionRequest + (*GetEndPositionResponse)(nil), // 1: viam.component.arm.v1.GetEndPositionResponse + (*JointPositions)(nil), // 2: viam.component.arm.v1.JointPositions + (*GetJointPositionsRequest)(nil), // 3: viam.component.arm.v1.GetJointPositionsRequest + (*GetJointPositionsResponse)(nil), // 4: viam.component.arm.v1.GetJointPositionsResponse + (*MoveToPositionRequest)(nil), // 5: viam.component.arm.v1.MoveToPositionRequest + (*MoveToPositionResponse)(nil), // 6: viam.component.arm.v1.MoveToPositionResponse + (*MoveToJointPositionsRequest)(nil), // 7: viam.component.arm.v1.MoveToJointPositionsRequest + (*MoveToJointPositionsResponse)(nil), // 8: viam.component.arm.v1.MoveToJointPositionsResponse + (*StopRequest)(nil), // 9: viam.component.arm.v1.StopRequest + (*StopResponse)(nil), // 10: viam.component.arm.v1.StopResponse + (*Status)(nil), // 11: viam.component.arm.v1.Status + (*structpb.Struct)(nil), // 12: google.protobuf.Struct + (*v1.Pose)(nil), // 13: viam.common.v1.Pose + (*v1.WorldState)(nil), // 14: viam.common.v1.WorldState +} +var file_component_arm_v1_arm_proto_depIdxs = []int32{ + 12, // 0: viam.component.arm.v1.GetEndPositionRequest.extra:type_name -> google.protobuf.Struct + 13, // 1: viam.component.arm.v1.GetEndPositionResponse.pose:type_name -> viam.common.v1.Pose + 12, // 2: viam.component.arm.v1.GetJointPositionsRequest.extra:type_name -> google.protobuf.Struct + 2, // 3: viam.component.arm.v1.GetJointPositionsResponse.positions:type_name -> viam.component.arm.v1.JointPositions + 13, // 4: viam.component.arm.v1.MoveToPositionRequest.to:type_name -> viam.common.v1.Pose + 14, // 5: viam.component.arm.v1.MoveToPositionRequest.world_state:type_name -> viam.common.v1.WorldState + 12, // 6: viam.component.arm.v1.MoveToPositionRequest.extra:type_name -> google.protobuf.Struct + 2, // 7: viam.component.arm.v1.MoveToJointPositionsRequest.positions:type_name -> viam.component.arm.v1.JointPositions + 12, // 8: viam.component.arm.v1.MoveToJointPositionsRequest.extra:type_name -> google.protobuf.Struct + 12, // 9: viam.component.arm.v1.StopRequest.extra:type_name -> google.protobuf.Struct + 13, // 10: viam.component.arm.v1.Status.end_position:type_name -> viam.common.v1.Pose + 2, // 11: viam.component.arm.v1.Status.joint_positions:type_name -> viam.component.arm.v1.JointPositions + 0, // 12: viam.component.arm.v1.ArmService.GetEndPosition:input_type -> viam.component.arm.v1.GetEndPositionRequest + 5, // 13: viam.component.arm.v1.ArmService.MoveToPosition:input_type -> viam.component.arm.v1.MoveToPositionRequest + 3, // 14: viam.component.arm.v1.ArmService.GetJointPositions:input_type -> viam.component.arm.v1.GetJointPositionsRequest + 7, // 15: viam.component.arm.v1.ArmService.MoveToJointPositions:input_type -> viam.component.arm.v1.MoveToJointPositionsRequest + 9, // 16: viam.component.arm.v1.ArmService.Stop:input_type -> viam.component.arm.v1.StopRequest + 1, // 17: viam.component.arm.v1.ArmService.GetEndPosition:output_type -> viam.component.arm.v1.GetEndPositionResponse + 6, // 18: viam.component.arm.v1.ArmService.MoveToPosition:output_type -> viam.component.arm.v1.MoveToPositionResponse + 4, // 19: viam.component.arm.v1.ArmService.GetJointPositions:output_type -> viam.component.arm.v1.GetJointPositionsResponse + 8, // 20: viam.component.arm.v1.ArmService.MoveToJointPositions:output_type -> viam.component.arm.v1.MoveToJointPositionsResponse + 10, // 21: viam.component.arm.v1.ArmService.Stop:output_type -> viam.component.arm.v1.StopResponse + 17, // [17:22] is the sub-list for method output_type + 12, // [12:17] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_component_arm_v1_arm_proto_init() } +func file_component_arm_v1_arm_proto_init() { + if File_component_arm_v1_arm_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_arm_v1_arm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEndPositionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEndPositionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JointPositions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetJointPositionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetJointPositionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveToPositionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveToPositionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveToJointPositionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveToJointPositionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_arm_v1_arm_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_component_arm_v1_arm_proto_msgTypes[5].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_arm_v1_arm_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_arm_v1_arm_proto_goTypes, + DependencyIndexes: file_component_arm_v1_arm_proto_depIdxs, + MessageInfos: file_component_arm_v1_arm_proto_msgTypes, + }.Build() + File_component_arm_v1_arm_proto = out.File + file_component_arm_v1_arm_proto_rawDesc = nil + file_component_arm_v1_arm_proto_goTypes = nil + file_component_arm_v1_arm_proto_depIdxs = nil +} diff --git a/component/arm/v1/arm.pb.gw.go b/component/arm/v1/arm.pb.gw.go new file mode 100644 index 000000000..efc366884 --- /dev/null +++ b/component/arm/v1/arm.pb.gw.go @@ -0,0 +1,681 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/arm/v1/arm.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_ArmService_GetEndPosition_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ArmService_GetEndPosition_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetEndPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_GetEndPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetEndPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArmService_GetEndPosition_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetEndPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_GetEndPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetEndPosition(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_ArmService_MoveToPosition_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ArmService_MoveToPosition_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveToPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_MoveToPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MoveToPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArmService_MoveToPosition_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveToPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_MoveToPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MoveToPosition(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_ArmService_GetJointPositions_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ArmService_GetJointPositions_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetJointPositionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_GetJointPositions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetJointPositions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArmService_GetJointPositions_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetJointPositionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_GetJointPositions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetJointPositions(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_ArmService_MoveToJointPositions_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ArmService_MoveToJointPositions_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveToJointPositionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_MoveToJointPositions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MoveToJointPositions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArmService_MoveToJointPositions_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveToJointPositionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_MoveToJointPositions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MoveToJointPositions(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_ArmService_Stop_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ArmService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_Stop_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Stop(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArmService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ArmService_Stop_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Stop(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterArmServiceHandlerServer registers the http handlers for service ArmService to "mux". +// UnaryRPC :call ArmServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterArmServiceHandlerFromEndpoint instead. +func RegisterArmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ArmServiceServer) error { + + mux.Handle("GET", pattern_ArmService_GetEndPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/GetEndPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArmService_GetEndPosition_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_GetEndPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_ArmService_MoveToPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/MoveToPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArmService_MoveToPosition_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_MoveToPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArmService_GetJointPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/GetJointPositions", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/joint_positions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArmService_GetJointPositions_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_GetJointPositions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_ArmService_MoveToJointPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/MoveToJointPositions", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/joint_positions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArmService_MoveToJointPositions_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_MoveToJointPositions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArmService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArmService_Stop_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterArmServiceHandlerFromEndpoint is same as RegisterArmServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterArmServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterArmServiceHandler(ctx, mux, conn) +} + +// RegisterArmServiceHandler registers the http handlers for service ArmService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterArmServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterArmServiceHandlerClient(ctx, mux, NewArmServiceClient(conn)) +} + +// RegisterArmServiceHandlerClient registers the http handlers for service ArmService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ArmServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ArmServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ArmServiceClient" to call the correct interceptors. +func RegisterArmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ArmServiceClient) error { + + mux.Handle("GET", pattern_ArmService_GetEndPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/GetEndPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArmService_GetEndPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_GetEndPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_ArmService_MoveToPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/MoveToPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArmService_MoveToPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_MoveToPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArmService_GetJointPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/GetJointPositions", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/joint_positions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArmService_GetJointPositions_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_GetJointPositions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_ArmService_MoveToJointPositions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/MoveToJointPositions", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/joint_positions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArmService_MoveToJointPositions_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_MoveToJointPositions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArmService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.arm.v1.ArmService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/arm/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArmService_Stop_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ArmService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ArmService_GetEndPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "arm", "name", "position"}, "")) + + pattern_ArmService_MoveToPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "arm", "name", "position"}, "")) + + pattern_ArmService_GetJointPositions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "arm", "name", "joint_positions"}, "")) + + pattern_ArmService_MoveToJointPositions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "arm", "name", "joint_positions"}, "")) + + pattern_ArmService_Stop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "arm", "name", "stop"}, "")) +) + +var ( + forward_ArmService_GetEndPosition_0 = runtime.ForwardResponseMessage + + forward_ArmService_MoveToPosition_0 = runtime.ForwardResponseMessage + + forward_ArmService_GetJointPositions_0 = runtime.ForwardResponseMessage + + forward_ArmService_MoveToJointPositions_0 = runtime.ForwardResponseMessage + + forward_ArmService_Stop_0 = runtime.ForwardResponseMessage +) diff --git a/component/arm/v1/arm_grpc.pb.go b/component/arm/v1/arm_grpc.pb.go new file mode 100644 index 000000000..37da41092 --- /dev/null +++ b/component/arm/v1/arm_grpc.pb.go @@ -0,0 +1,259 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// ArmServiceClient is the client API for ArmService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ArmServiceClient interface { + // GetEndPosition gets the current position the end of the robot's arm expressed as X,Y,Z,ox,oy,oz,theta + GetEndPosition(ctx context.Context, in *GetEndPositionRequest, opts ...grpc.CallOption) (*GetEndPositionResponse, error) + // MoveToPosition moves the mount point of the robot's end effector to the requested position. + // This will block until done or a new operation cancels this one + MoveToPosition(ctx context.Context, in *MoveToPositionRequest, opts ...grpc.CallOption) (*MoveToPositionResponse, error) + // GetJointPositions lists the joint positions (in degrees) of every joint on a robot + GetJointPositions(ctx context.Context, in *GetJointPositionsRequest, opts ...grpc.CallOption) (*GetJointPositionsResponse, error) + // MoveToJointPositions moves every joint on a robot's arm to specified angles which are expressed in degrees + // This will block until done or a new operation cancels this one + MoveToJointPositions(ctx context.Context, in *MoveToJointPositionsRequest, opts ...grpc.CallOption) (*MoveToJointPositionsResponse, error) + // Stop stops a robot's arm + Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) +} + +type armServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewArmServiceClient(cc grpc.ClientConnInterface) ArmServiceClient { + return &armServiceClient{cc} +} + +func (c *armServiceClient) GetEndPosition(ctx context.Context, in *GetEndPositionRequest, opts ...grpc.CallOption) (*GetEndPositionResponse, error) { + out := new(GetEndPositionResponse) + err := c.cc.Invoke(ctx, "/viam.component.arm.v1.ArmService/GetEndPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *armServiceClient) MoveToPosition(ctx context.Context, in *MoveToPositionRequest, opts ...grpc.CallOption) (*MoveToPositionResponse, error) { + out := new(MoveToPositionResponse) + err := c.cc.Invoke(ctx, "/viam.component.arm.v1.ArmService/MoveToPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *armServiceClient) GetJointPositions(ctx context.Context, in *GetJointPositionsRequest, opts ...grpc.CallOption) (*GetJointPositionsResponse, error) { + out := new(GetJointPositionsResponse) + err := c.cc.Invoke(ctx, "/viam.component.arm.v1.ArmService/GetJointPositions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *armServiceClient) MoveToJointPositions(ctx context.Context, in *MoveToJointPositionsRequest, opts ...grpc.CallOption) (*MoveToJointPositionsResponse, error) { + out := new(MoveToJointPositionsResponse) + err := c.cc.Invoke(ctx, "/viam.component.arm.v1.ArmService/MoveToJointPositions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *armServiceClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { + out := new(StopResponse) + err := c.cc.Invoke(ctx, "/viam.component.arm.v1.ArmService/Stop", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ArmServiceServer is the server API for ArmService service. +// All implementations must embed UnimplementedArmServiceServer +// for forward compatibility +type ArmServiceServer interface { + // GetEndPosition gets the current position the end of the robot's arm expressed as X,Y,Z,ox,oy,oz,theta + GetEndPosition(context.Context, *GetEndPositionRequest) (*GetEndPositionResponse, error) + // MoveToPosition moves the mount point of the robot's end effector to the requested position. + // This will block until done or a new operation cancels this one + MoveToPosition(context.Context, *MoveToPositionRequest) (*MoveToPositionResponse, error) + // GetJointPositions lists the joint positions (in degrees) of every joint on a robot + GetJointPositions(context.Context, *GetJointPositionsRequest) (*GetJointPositionsResponse, error) + // MoveToJointPositions moves every joint on a robot's arm to specified angles which are expressed in degrees + // This will block until done or a new operation cancels this one + MoveToJointPositions(context.Context, *MoveToJointPositionsRequest) (*MoveToJointPositionsResponse, error) + // Stop stops a robot's arm + Stop(context.Context, *StopRequest) (*StopResponse, error) + mustEmbedUnimplementedArmServiceServer() +} + +// UnimplementedArmServiceServer must be embedded to have forward compatible implementations. +type UnimplementedArmServiceServer struct { +} + +func (UnimplementedArmServiceServer) GetEndPosition(context.Context, *GetEndPositionRequest) (*GetEndPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEndPosition not implemented") +} +func (UnimplementedArmServiceServer) MoveToPosition(context.Context, *MoveToPositionRequest) (*MoveToPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveToPosition not implemented") +} +func (UnimplementedArmServiceServer) GetJointPositions(context.Context, *GetJointPositionsRequest) (*GetJointPositionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetJointPositions not implemented") +} +func (UnimplementedArmServiceServer) MoveToJointPositions(context.Context, *MoveToJointPositionsRequest) (*MoveToJointPositionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveToJointPositions not implemented") +} +func (UnimplementedArmServiceServer) Stop(context.Context, *StopRequest) (*StopResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (UnimplementedArmServiceServer) mustEmbedUnimplementedArmServiceServer() {} + +// UnsafeArmServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ArmServiceServer will +// result in compilation errors. +type UnsafeArmServiceServer interface { + mustEmbedUnimplementedArmServiceServer() +} + +func RegisterArmServiceServer(s grpc.ServiceRegistrar, srv ArmServiceServer) { + s.RegisterService(&ArmService_ServiceDesc, srv) +} + +func _ArmService_GetEndPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEndPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArmServiceServer).GetEndPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.arm.v1.ArmService/GetEndPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArmServiceServer).GetEndPosition(ctx, req.(*GetEndPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArmService_MoveToPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveToPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArmServiceServer).MoveToPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.arm.v1.ArmService/MoveToPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArmServiceServer).MoveToPosition(ctx, req.(*MoveToPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArmService_GetJointPositions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetJointPositionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArmServiceServer).GetJointPositions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.arm.v1.ArmService/GetJointPositions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArmServiceServer).GetJointPositions(ctx, req.(*GetJointPositionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArmService_MoveToJointPositions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveToJointPositionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArmServiceServer).MoveToJointPositions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.arm.v1.ArmService/MoveToJointPositions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArmServiceServer).MoveToJointPositions(ctx, req.(*MoveToJointPositionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArmService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArmServiceServer).Stop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.arm.v1.ArmService/Stop", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArmServiceServer).Stop(ctx, req.(*StopRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ArmService_ServiceDesc is the grpc.ServiceDesc for ArmService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ArmService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.arm.v1.ArmService", + HandlerType: (*ArmServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetEndPosition", + Handler: _ArmService_GetEndPosition_Handler, + }, + { + MethodName: "MoveToPosition", + Handler: _ArmService_MoveToPosition_Handler, + }, + { + MethodName: "GetJointPositions", + Handler: _ArmService_GetJointPositions_Handler, + }, + { + MethodName: "MoveToJointPositions", + Handler: _ArmService_MoveToJointPositions_Handler, + }, + { + MethodName: "Stop", + Handler: _ArmService_Stop_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/arm/v1/arm.proto", +} diff --git a/component/audioinput/v1/audioinput.pb.go b/component/audioinput/v1/audioinput.pb.go new file mode 100644 index 000000000..82754b8c9 --- /dev/null +++ b/component/audioinput/v1/audioinput.pb.go @@ -0,0 +1,807 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/audioinput/v1/audioinput.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + httpbody "google.golang.org/genproto/googleapis/api/httpbody" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SampleFormat int32 + +const ( + SampleFormat_SAMPLE_FORMAT_UNSPECIFIED SampleFormat = 0 + SampleFormat_SAMPLE_FORMAT_INT16_INTERLEAVED SampleFormat = 1 + SampleFormat_SAMPLE_FORMAT_FLOAT32_INTERLEAVED SampleFormat = 2 +) + +// Enum value maps for SampleFormat. +var ( + SampleFormat_name = map[int32]string{ + 0: "SAMPLE_FORMAT_UNSPECIFIED", + 1: "SAMPLE_FORMAT_INT16_INTERLEAVED", + 2: "SAMPLE_FORMAT_FLOAT32_INTERLEAVED", + } + SampleFormat_value = map[string]int32{ + "SAMPLE_FORMAT_UNSPECIFIED": 0, + "SAMPLE_FORMAT_INT16_INTERLEAVED": 1, + "SAMPLE_FORMAT_FLOAT32_INTERLEAVED": 2, + } +) + +func (x SampleFormat) Enum() *SampleFormat { + p := new(SampleFormat) + *p = x + return p +} + +func (x SampleFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SampleFormat) Descriptor() protoreflect.EnumDescriptor { + return file_component_audioinput_v1_audioinput_proto_enumTypes[0].Descriptor() +} + +func (SampleFormat) Type() protoreflect.EnumType { + return &file_component_audioinput_v1_audioinput_proto_enumTypes[0] +} + +func (x SampleFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SampleFormat.Descriptor instead. +func (SampleFormat) EnumDescriptor() ([]byte, []int) { + return file_component_audioinput_v1_audioinput_proto_rawDescGZIP(), []int{0} +} + +type RecordRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an audio input + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"` +} + +func (x *RecordRequest) Reset() { + *x = RecordRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordRequest) ProtoMessage() {} + +func (x *RecordRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordRequest.ProtoReflect.Descriptor instead. +func (*RecordRequest) Descriptor() ([]byte, []int) { + return file_component_audioinput_v1_audioinput_proto_rawDescGZIP(), []int{0} +} + +func (x *RecordRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RecordRequest) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +type AudioChunkInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Actual sample encoding format of the response + SampleFormat SampleFormat `protobuf:"varint,1,opt,name=sample_format,json=sampleFormat,proto3,enum=viam.component.audioinput.v1.SampleFormat" json:"sample_format,omitempty"` + Channels uint32 `protobuf:"varint,2,opt,name=channels,proto3" json:"channels,omitempty"` + SamplingRate int64 `protobuf:"varint,3,opt,name=sampling_rate,json=samplingRate,proto3" json:"sampling_rate,omitempty"` +} + +func (x *AudioChunkInfo) Reset() { + *x = AudioChunkInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudioChunkInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudioChunkInfo) ProtoMessage() {} + +func (x *AudioChunkInfo) ProtoReflect() protoreflect.Message { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudioChunkInfo.ProtoReflect.Descriptor instead. +func (*AudioChunkInfo) Descriptor() ([]byte, []int) { + return file_component_audioinput_v1_audioinput_proto_rawDescGZIP(), []int{1} +} + +func (x *AudioChunkInfo) GetSampleFormat() SampleFormat { + if x != nil { + return x.SampleFormat + } + return SampleFormat_SAMPLE_FORMAT_UNSPECIFIED +} + +func (x *AudioChunkInfo) GetChannels() uint32 { + if x != nil { + return x.Channels + } + return 0 +} + +func (x *AudioChunkInfo) GetSamplingRate() int64 { + if x != nil { + return x.SamplingRate + } + return 0 +} + +type AudioChunk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Data is PCM data that is organized according to the sample format + // along with its possible interleaving. Data in each format is + // Little Endian. + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // Length is the number of samples + Length uint32 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` +} + +func (x *AudioChunk) Reset() { + *x = AudioChunk{} + if protoimpl.UnsafeEnabled { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudioChunk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudioChunk) ProtoMessage() {} + +func (x *AudioChunk) ProtoReflect() protoreflect.Message { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudioChunk.ProtoReflect.Descriptor instead. +func (*AudioChunk) Descriptor() ([]byte, []int) { + return file_component_audioinput_v1_audioinput_proto_rawDescGZIP(), []int{2} +} + +func (x *AudioChunk) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *AudioChunk) GetLength() uint32 { + if x != nil { + return x.Length + } + return 0 +} + +type ChunksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an audio input + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Requested sample encoding format of the response + SampleFormat SampleFormat `protobuf:"varint,2,opt,name=sample_format,json=sampleFormat,proto3,enum=viam.component.audioinput.v1.SampleFormat" json:"sample_format,omitempty"` +} + +func (x *ChunksRequest) Reset() { + *x = ChunksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChunksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChunksRequest) ProtoMessage() {} + +func (x *ChunksRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChunksRequest.ProtoReflect.Descriptor instead. +func (*ChunksRequest) Descriptor() ([]byte, []int) { + return file_component_audioinput_v1_audioinput_proto_rawDescGZIP(), []int{3} +} + +func (x *ChunksRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ChunksRequest) GetSampleFormat() SampleFormat { + if x != nil { + return x.SampleFormat + } + return SampleFormat_SAMPLE_FORMAT_UNSPECIFIED +} + +type ChunksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // *ChunksResponse_Info + // *ChunksResponse_Chunk + Type isChunksResponse_Type `protobuf_oneof:"type"` +} + +func (x *ChunksResponse) Reset() { + *x = ChunksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChunksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChunksResponse) ProtoMessage() {} + +func (x *ChunksResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChunksResponse.ProtoReflect.Descriptor instead. +func (*ChunksResponse) Descriptor() ([]byte, []int) { + return file_component_audioinput_v1_audioinput_proto_rawDescGZIP(), []int{4} +} + +func (m *ChunksResponse) GetType() isChunksResponse_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *ChunksResponse) GetInfo() *AudioChunkInfo { + if x, ok := x.GetType().(*ChunksResponse_Info); ok { + return x.Info + } + return nil +} + +func (x *ChunksResponse) GetChunk() *AudioChunk { + if x, ok := x.GetType().(*ChunksResponse_Chunk); ok { + return x.Chunk + } + return nil +} + +type isChunksResponse_Type interface { + isChunksResponse_Type() +} + +type ChunksResponse_Info struct { + Info *AudioChunkInfo `protobuf:"bytes,1,opt,name=info,proto3,oneof"` +} + +type ChunksResponse_Chunk struct { + Chunk *AudioChunk `protobuf:"bytes,2,opt,name=chunk,proto3,oneof"` +} + +func (*ChunksResponse_Info) isChunksResponse_Type() {} + +func (*ChunksResponse_Chunk) isChunksResponse_Type() {} + +type PropertiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an audio input + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PropertiesRequest) Reset() { + *x = PropertiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PropertiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PropertiesRequest) ProtoMessage() {} + +func (x *PropertiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PropertiesRequest.ProtoReflect.Descriptor instead. +func (*PropertiesRequest) Descriptor() ([]byte, []int) { + return file_component_audioinput_v1_audioinput_proto_rawDescGZIP(), []int{5} +} + +func (x *PropertiesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type PropertiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChannelCount uint32 `protobuf:"varint,1,opt,name=channel_count,json=channelCount,proto3" json:"channel_count,omitempty"` + Latency *durationpb.Duration `protobuf:"bytes,2,opt,name=latency,proto3" json:"latency,omitempty"` + SampleRate uint32 `protobuf:"varint,3,opt,name=sample_rate,json=sampleRate,proto3" json:"sample_rate,omitempty"` + SampleSize uint32 `protobuf:"varint,4,opt,name=sample_size,json=sampleSize,proto3" json:"sample_size,omitempty"` + IsBigEndian bool `protobuf:"varint,5,opt,name=is_big_endian,json=isBigEndian,proto3" json:"is_big_endian,omitempty"` + IsFloat bool `protobuf:"varint,6,opt,name=is_float,json=isFloat,proto3" json:"is_float,omitempty"` + IsInterleaved bool `protobuf:"varint,7,opt,name=is_interleaved,json=isInterleaved,proto3" json:"is_interleaved,omitempty"` +} + +func (x *PropertiesResponse) Reset() { + *x = PropertiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PropertiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PropertiesResponse) ProtoMessage() {} + +func (x *PropertiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_audioinput_v1_audioinput_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PropertiesResponse.ProtoReflect.Descriptor instead. +func (*PropertiesResponse) Descriptor() ([]byte, []int) { + return file_component_audioinput_v1_audioinput_proto_rawDescGZIP(), []int{6} +} + +func (x *PropertiesResponse) GetChannelCount() uint32 { + if x != nil { + return x.ChannelCount + } + return 0 +} + +func (x *PropertiesResponse) GetLatency() *durationpb.Duration { + if x != nil { + return x.Latency + } + return nil +} + +func (x *PropertiesResponse) GetSampleRate() uint32 { + if x != nil { + return x.SampleRate + } + return 0 +} + +func (x *PropertiesResponse) GetSampleSize() uint32 { + if x != nil { + return x.SampleSize + } + return 0 +} + +func (x *PropertiesResponse) GetIsBigEndian() bool { + if x != nil { + return x.IsBigEndian + } + return false +} + +func (x *PropertiesResponse) GetIsFloat() bool { + if x != nil { + return x.IsFloat + } + return false +} + +func (x *PropertiesResponse) GetIsInterleaved() bool { + if x != nil { + return x.IsInterleaved + } + return false +} + +var File_component_audioinput_v1_audioinput_proto protoreflect.FileDescriptor + +var file_component_audioinput_v1_audioinput_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, + 0x6f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x5a, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x01, + 0x0a, 0x0e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x4f, 0x0a, 0x0d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x52, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x23, 0x0a, + 0x0d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x61, + 0x74, 0x65, 0x22, 0x38, 0x0a, 0x0a, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x74, 0x0a, 0x0d, + 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x4f, 0x0a, 0x0d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x49, 0x6e, 0x66, + 0x6f, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x40, 0x0a, 0x05, 0x63, 0x68, 0x75, + 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x42, 0x06, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x22, 0x27, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x96, 0x02, 0x0a, + 0x12, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x6c, 0x61, 0x74, 0x65, + 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1f, 0x0a, + 0x0b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x62, 0x69, 0x67, 0x5f, 0x65, 0x6e, 0x64, 0x69, 0x61, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x42, 0x69, 0x67, 0x45, 0x6e, 0x64, + 0x69, 0x61, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6c, + 0x65, 0x61, 0x76, 0x65, 0x64, 0x2a, 0x79, 0x0a, 0x0c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x5f, + 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x5f, 0x46, + 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x44, 0x10, 0x01, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x41, 0x4d, + 0x50, 0x4c, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, + 0x33, 0x32, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x44, 0x10, 0x02, + 0x32, 0xb0, 0x03, 0x0a, 0x11, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x06, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, + 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, + 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x75, + 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0xac, 0x01, + 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, + 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, + 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x84, 0x01, 0x0a, + 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x42, 0x4b, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x31, 0x5a, 0x27, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_audioinput_v1_audioinput_proto_rawDescOnce sync.Once + file_component_audioinput_v1_audioinput_proto_rawDescData = file_component_audioinput_v1_audioinput_proto_rawDesc +) + +func file_component_audioinput_v1_audioinput_proto_rawDescGZIP() []byte { + file_component_audioinput_v1_audioinput_proto_rawDescOnce.Do(func() { + file_component_audioinput_v1_audioinput_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_audioinput_v1_audioinput_proto_rawDescData) + }) + return file_component_audioinput_v1_audioinput_proto_rawDescData +} + +var file_component_audioinput_v1_audioinput_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_component_audioinput_v1_audioinput_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_component_audioinput_v1_audioinput_proto_goTypes = []interface{}{ + (SampleFormat)(0), // 0: viam.component.audioinput.v1.SampleFormat + (*RecordRequest)(nil), // 1: viam.component.audioinput.v1.RecordRequest + (*AudioChunkInfo)(nil), // 2: viam.component.audioinput.v1.AudioChunkInfo + (*AudioChunk)(nil), // 3: viam.component.audioinput.v1.AudioChunk + (*ChunksRequest)(nil), // 4: viam.component.audioinput.v1.ChunksRequest + (*ChunksResponse)(nil), // 5: viam.component.audioinput.v1.ChunksResponse + (*PropertiesRequest)(nil), // 6: viam.component.audioinput.v1.PropertiesRequest + (*PropertiesResponse)(nil), // 7: viam.component.audioinput.v1.PropertiesResponse + (*durationpb.Duration)(nil), // 8: google.protobuf.Duration + (*httpbody.HttpBody)(nil), // 9: google.api.HttpBody +} +var file_component_audioinput_v1_audioinput_proto_depIdxs = []int32{ + 8, // 0: viam.component.audioinput.v1.RecordRequest.duration:type_name -> google.protobuf.Duration + 0, // 1: viam.component.audioinput.v1.AudioChunkInfo.sample_format:type_name -> viam.component.audioinput.v1.SampleFormat + 0, // 2: viam.component.audioinput.v1.ChunksRequest.sample_format:type_name -> viam.component.audioinput.v1.SampleFormat + 2, // 3: viam.component.audioinput.v1.ChunksResponse.info:type_name -> viam.component.audioinput.v1.AudioChunkInfo + 3, // 4: viam.component.audioinput.v1.ChunksResponse.chunk:type_name -> viam.component.audioinput.v1.AudioChunk + 8, // 5: viam.component.audioinput.v1.PropertiesResponse.latency:type_name -> google.protobuf.Duration + 4, // 6: viam.component.audioinput.v1.AudioInputService.Chunks:input_type -> viam.component.audioinput.v1.ChunksRequest + 6, // 7: viam.component.audioinput.v1.AudioInputService.Properties:input_type -> viam.component.audioinput.v1.PropertiesRequest + 1, // 8: viam.component.audioinput.v1.AudioInputService.Record:input_type -> viam.component.audioinput.v1.RecordRequest + 5, // 9: viam.component.audioinput.v1.AudioInputService.Chunks:output_type -> viam.component.audioinput.v1.ChunksResponse + 7, // 10: viam.component.audioinput.v1.AudioInputService.Properties:output_type -> viam.component.audioinput.v1.PropertiesResponse + 9, // 11: viam.component.audioinput.v1.AudioInputService.Record:output_type -> google.api.HttpBody + 9, // [9:12] is the sub-list for method output_type + 6, // [6:9] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_component_audioinput_v1_audioinput_proto_init() } +func file_component_audioinput_v1_audioinput_proto_init() { + if File_component_audioinput_v1_audioinput_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_audioinput_v1_audioinput_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecordRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_audioinput_v1_audioinput_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudioChunkInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_audioinput_v1_audioinput_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudioChunk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_audioinput_v1_audioinput_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChunksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_audioinput_v1_audioinput_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChunksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_audioinput_v1_audioinput_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PropertiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_audioinput_v1_audioinput_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PropertiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_component_audioinput_v1_audioinput_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*ChunksResponse_Info)(nil), + (*ChunksResponse_Chunk)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_audioinput_v1_audioinput_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_audioinput_v1_audioinput_proto_goTypes, + DependencyIndexes: file_component_audioinput_v1_audioinput_proto_depIdxs, + EnumInfos: file_component_audioinput_v1_audioinput_proto_enumTypes, + MessageInfos: file_component_audioinput_v1_audioinput_proto_msgTypes, + }.Build() + File_component_audioinput_v1_audioinput_proto = out.File + file_component_audioinput_v1_audioinput_proto_rawDesc = nil + file_component_audioinput_v1_audioinput_proto_goTypes = nil + file_component_audioinput_v1_audioinput_proto_depIdxs = nil +} diff --git a/component/audioinput/v1/audioinput.pb.gw.go b/component/audioinput/v1/audioinput.pb.gw.go new file mode 100644 index 000000000..bdcd137ce --- /dev/null +++ b/component/audioinput/v1/audioinput.pb.gw.go @@ -0,0 +1,363 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/audioinput/v1/audioinput.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_AudioInputService_Chunks_0(ctx context.Context, marshaler runtime.Marshaler, client AudioInputServiceClient, req *http.Request, pathParams map[string]string) (AudioInputService_ChunksClient, runtime.ServerMetadata, error) { + var protoReq ChunksRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.Chunks(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_AudioInputService_Properties_0(ctx context.Context, marshaler runtime.Marshaler, client AudioInputServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PropertiesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.Properties(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AudioInputService_Properties_0(ctx context.Context, marshaler runtime.Marshaler, server AudioInputServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PropertiesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.Properties(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_AudioInputService_Record_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_AudioInputService_Record_0(ctx context.Context, marshaler runtime.Marshaler, client AudioInputServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RecordRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AudioInputService_Record_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Record(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AudioInputService_Record_0(ctx context.Context, marshaler runtime.Marshaler, server AudioInputServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RecordRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AudioInputService_Record_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Record(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterAudioInputServiceHandlerServer registers the http handlers for service AudioInputService to "mux". +// UnaryRPC :call AudioInputServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAudioInputServiceHandlerFromEndpoint instead. +func RegisterAudioInputServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AudioInputServiceServer) error { + + mux.Handle("POST", pattern_AudioInputService_Chunks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("GET", pattern_AudioInputService_Properties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.audioinput.v1.AudioInputService/Properties", runtime.WithHTTPPathPattern("/viam/api/v1/component/audioinput/{name}/properties")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AudioInputService_Properties_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AudioInputService_Properties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AudioInputService_Record_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.audioinput.v1.AudioInputService/Record", runtime.WithHTTPPathPattern("/viam/api/v1/component/audioinput/{name}/record")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AudioInputService_Record_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AudioInputService_Record_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterAudioInputServiceHandlerFromEndpoint is same as RegisterAudioInputServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAudioInputServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAudioInputServiceHandler(ctx, mux, conn) +} + +// RegisterAudioInputServiceHandler registers the http handlers for service AudioInputService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAudioInputServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAudioInputServiceHandlerClient(ctx, mux, NewAudioInputServiceClient(conn)) +} + +// RegisterAudioInputServiceHandlerClient registers the http handlers for service AudioInputService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AudioInputServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AudioInputServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AudioInputServiceClient" to call the correct interceptors. +func RegisterAudioInputServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AudioInputServiceClient) error { + + mux.Handle("POST", pattern_AudioInputService_Chunks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.audioinput.v1.AudioInputService/Chunks", runtime.WithHTTPPathPattern("/viam.component.audioinput.v1.AudioInputService/Chunks")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AudioInputService_Chunks_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AudioInputService_Chunks_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AudioInputService_Properties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.audioinput.v1.AudioInputService/Properties", runtime.WithHTTPPathPattern("/viam/api/v1/component/audioinput/{name}/properties")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AudioInputService_Properties_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AudioInputService_Properties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AudioInputService_Record_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.audioinput.v1.AudioInputService/Record", runtime.WithHTTPPathPattern("/viam/api/v1/component/audioinput/{name}/record")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AudioInputService_Record_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AudioInputService_Record_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_AudioInputService_Chunks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"viam.component.audioinput.v1.AudioInputService", "Chunks"}, "")) + + pattern_AudioInputService_Properties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "audioinput", "name", "properties"}, "")) + + pattern_AudioInputService_Record_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "audioinput", "name", "record"}, "")) +) + +var ( + forward_AudioInputService_Chunks_0 = runtime.ForwardResponseStream + + forward_AudioInputService_Properties_0 = runtime.ForwardResponseMessage + + forward_AudioInputService_Record_0 = runtime.ForwardResponseMessage +) diff --git a/component/audioinput/v1/audioinput_grpc.pb.go b/component/audioinput/v1/audioinput_grpc.pb.go new file mode 100644 index 000000000..66a043d5d --- /dev/null +++ b/component/audioinput/v1/audioinput_grpc.pb.go @@ -0,0 +1,212 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + httpbody "google.golang.org/genproto/googleapis/api/httpbody" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// AudioInputServiceClient is the client API for AudioInputService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AudioInputServiceClient interface { + // Chunks returns audio chunks forever from an audio input of the underlying robot. + Chunks(ctx context.Context, in *ChunksRequest, opts ...grpc.CallOption) (AudioInputService_ChunksClient, error) + // Properties returns properties of an audio input of the underlying robot. + Properties(ctx context.Context, in *PropertiesRequest, opts ...grpc.CallOption) (*PropertiesResponse, error) + // Record records audio from an audio input of the underlying robot + // to an HTTP response. A specific MIME type cannot be requested and may not necessarily + // be the same one returned each time. + Record(ctx context.Context, in *RecordRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) +} + +type audioInputServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAudioInputServiceClient(cc grpc.ClientConnInterface) AudioInputServiceClient { + return &audioInputServiceClient{cc} +} + +func (c *audioInputServiceClient) Chunks(ctx context.Context, in *ChunksRequest, opts ...grpc.CallOption) (AudioInputService_ChunksClient, error) { + stream, err := c.cc.NewStream(ctx, &AudioInputService_ServiceDesc.Streams[0], "/viam.component.audioinput.v1.AudioInputService/Chunks", opts...) + if err != nil { + return nil, err + } + x := &audioInputServiceChunksClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type AudioInputService_ChunksClient interface { + Recv() (*ChunksResponse, error) + grpc.ClientStream +} + +type audioInputServiceChunksClient struct { + grpc.ClientStream +} + +func (x *audioInputServiceChunksClient) Recv() (*ChunksResponse, error) { + m := new(ChunksResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *audioInputServiceClient) Properties(ctx context.Context, in *PropertiesRequest, opts ...grpc.CallOption) (*PropertiesResponse, error) { + out := new(PropertiesResponse) + err := c.cc.Invoke(ctx, "/viam.component.audioinput.v1.AudioInputService/Properties", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *audioInputServiceClient) Record(ctx context.Context, in *RecordRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) { + out := new(httpbody.HttpBody) + err := c.cc.Invoke(ctx, "/viam.component.audioinput.v1.AudioInputService/Record", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AudioInputServiceServer is the server API for AudioInputService service. +// All implementations must embed UnimplementedAudioInputServiceServer +// for forward compatibility +type AudioInputServiceServer interface { + // Chunks returns audio chunks forever from an audio input of the underlying robot. + Chunks(*ChunksRequest, AudioInputService_ChunksServer) error + // Properties returns properties of an audio input of the underlying robot. + Properties(context.Context, *PropertiesRequest) (*PropertiesResponse, error) + // Record records audio from an audio input of the underlying robot + // to an HTTP response. A specific MIME type cannot be requested and may not necessarily + // be the same one returned each time. + Record(context.Context, *RecordRequest) (*httpbody.HttpBody, error) + mustEmbedUnimplementedAudioInputServiceServer() +} + +// UnimplementedAudioInputServiceServer must be embedded to have forward compatible implementations. +type UnimplementedAudioInputServiceServer struct { +} + +func (UnimplementedAudioInputServiceServer) Chunks(*ChunksRequest, AudioInputService_ChunksServer) error { + return status.Errorf(codes.Unimplemented, "method Chunks not implemented") +} +func (UnimplementedAudioInputServiceServer) Properties(context.Context, *PropertiesRequest) (*PropertiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Properties not implemented") +} +func (UnimplementedAudioInputServiceServer) Record(context.Context, *RecordRequest) (*httpbody.HttpBody, error) { + return nil, status.Errorf(codes.Unimplemented, "method Record not implemented") +} +func (UnimplementedAudioInputServiceServer) mustEmbedUnimplementedAudioInputServiceServer() {} + +// UnsafeAudioInputServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AudioInputServiceServer will +// result in compilation errors. +type UnsafeAudioInputServiceServer interface { + mustEmbedUnimplementedAudioInputServiceServer() +} + +func RegisterAudioInputServiceServer(s grpc.ServiceRegistrar, srv AudioInputServiceServer) { + s.RegisterService(&AudioInputService_ServiceDesc, srv) +} + +func _AudioInputService_Chunks_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ChunksRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(AudioInputServiceServer).Chunks(m, &audioInputServiceChunksServer{stream}) +} + +type AudioInputService_ChunksServer interface { + Send(*ChunksResponse) error + grpc.ServerStream +} + +type audioInputServiceChunksServer struct { + grpc.ServerStream +} + +func (x *audioInputServiceChunksServer) Send(m *ChunksResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _AudioInputService_Properties_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PropertiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AudioInputServiceServer).Properties(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.audioinput.v1.AudioInputService/Properties", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AudioInputServiceServer).Properties(ctx, req.(*PropertiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AudioInputService_Record_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AudioInputServiceServer).Record(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.audioinput.v1.AudioInputService/Record", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AudioInputServiceServer).Record(ctx, req.(*RecordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AudioInputService_ServiceDesc is the grpc.ServiceDesc for AudioInputService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AudioInputService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.audioinput.v1.AudioInputService", + HandlerType: (*AudioInputServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Properties", + Handler: _AudioInputService_Properties_Handler, + }, + { + MethodName: "Record", + Handler: _AudioInputService_Record_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Chunks", + Handler: _AudioInputService_Chunks_Handler, + ServerStreams: true, + }, + }, + Metadata: "component/audioinput/v1/audioinput.proto", +} diff --git a/component/base/v1/base.pb.go b/component/base/v1/base.pb.go new file mode 100644 index 000000000..a746f1f66 --- /dev/null +++ b/component/base/v1/base.pb.go @@ -0,0 +1,892 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/base/v1/base.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MoveStraightRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a base + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Desired travel distance in millimeters + DistanceMm int64 `protobuf:"varint,2,opt,name=distance_mm,json=distanceMm,proto3" json:"distance_mm,omitempty"` + // Desired travel velocity in millimeters/second + MmPerSec float64 `protobuf:"fixed64,3,opt,name=mm_per_sec,json=mmPerSec,proto3" json:"mm_per_sec,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *MoveStraightRequest) Reset() { + *x = MoveStraightRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveStraightRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveStraightRequest) ProtoMessage() {} + +func (x *MoveStraightRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveStraightRequest.ProtoReflect.Descriptor instead. +func (*MoveStraightRequest) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{0} +} + +func (x *MoveStraightRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MoveStraightRequest) GetDistanceMm() int64 { + if x != nil { + return x.DistanceMm + } + return 0 +} + +func (x *MoveStraightRequest) GetMmPerSec() float64 { + if x != nil { + return x.MmPerSec + } + return 0 +} + +func (x *MoveStraightRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type MoveStraightResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MoveStraightResponse) Reset() { + *x = MoveStraightResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveStraightResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveStraightResponse) ProtoMessage() {} + +func (x *MoveStraightResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveStraightResponse.ProtoReflect.Descriptor instead. +func (*MoveStraightResponse) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{1} +} + +type SpinRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a base + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Desired angle + AngleDeg float64 `protobuf:"fixed64,2,opt,name=angle_deg,json=angleDeg,proto3" json:"angle_deg,omitempty"` + // Desired angular velocity + DegsPerSec float64 `protobuf:"fixed64,3,opt,name=degs_per_sec,json=degsPerSec,proto3" json:"degs_per_sec,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *SpinRequest) Reset() { + *x = SpinRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpinRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpinRequest) ProtoMessage() {} + +func (x *SpinRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpinRequest.ProtoReflect.Descriptor instead. +func (*SpinRequest) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{2} +} + +func (x *SpinRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SpinRequest) GetAngleDeg() float64 { + if x != nil { + return x.AngleDeg + } + return 0 +} + +func (x *SpinRequest) GetDegsPerSec() float64 { + if x != nil { + return x.DegsPerSec + } + return 0 +} + +func (x *SpinRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type SpinResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SpinResponse) Reset() { + *x = SpinResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpinResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpinResponse) ProtoMessage() {} + +func (x *SpinResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpinResponse.ProtoReflect.Descriptor instead. +func (*SpinResponse) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{3} +} + +type StopRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a base + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *StopRequest) Reset() { + *x = StopRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopRequest) ProtoMessage() {} + +func (x *StopRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopRequest.ProtoReflect.Descriptor instead. +func (*StopRequest) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{4} +} + +func (x *StopRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StopRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type StopResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StopResponse) Reset() { + *x = StopResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopResponse) ProtoMessage() {} + +func (x *StopResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopResponse.ProtoReflect.Descriptor instead. +func (*StopResponse) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{5} +} + +type SetPowerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a base + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Desired linear power percentage as -1 -> 1 + Linear *v1.Vector3 `protobuf:"bytes,2,opt,name=linear,proto3" json:"linear,omitempty"` + // Desired angular power percentage % as -1 -> 1 + Angular *v1.Vector3 `protobuf:"bytes,3,opt,name=angular,proto3" json:"angular,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *SetPowerRequest) Reset() { + *x = SetPowerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPowerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPowerRequest) ProtoMessage() {} + +func (x *SetPowerRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPowerRequest.ProtoReflect.Descriptor instead. +func (*SetPowerRequest) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{6} +} + +func (x *SetPowerRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetPowerRequest) GetLinear() *v1.Vector3 { + if x != nil { + return x.Linear + } + return nil +} + +func (x *SetPowerRequest) GetAngular() *v1.Vector3 { + if x != nil { + return x.Angular + } + return nil +} + +func (x *SetPowerRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type SetPowerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetPowerResponse) Reset() { + *x = SetPowerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPowerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPowerResponse) ProtoMessage() {} + +func (x *SetPowerResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPowerResponse.ProtoReflect.Descriptor instead. +func (*SetPowerResponse) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{7} +} + +type SetVelocityRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a base + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Desired linear velocity in mm per second + Linear *v1.Vector3 `protobuf:"bytes,2,opt,name=linear,proto3" json:"linear,omitempty"` + // Desired angular velocity in degrees per second + Angular *v1.Vector3 `protobuf:"bytes,3,opt,name=angular,proto3" json:"angular,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *SetVelocityRequest) Reset() { + *x = SetVelocityRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetVelocityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetVelocityRequest) ProtoMessage() {} + +func (x *SetVelocityRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetVelocityRequest.ProtoReflect.Descriptor instead. +func (*SetVelocityRequest) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{8} +} + +func (x *SetVelocityRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetVelocityRequest) GetLinear() *v1.Vector3 { + if x != nil { + return x.Linear + } + return nil +} + +func (x *SetVelocityRequest) GetAngular() *v1.Vector3 { + if x != nil { + return x.Angular + } + return nil +} + +func (x *SetVelocityRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type SetVelocityResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetVelocityResponse) Reset() { + *x = SetVelocityResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_base_v1_base_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetVelocityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetVelocityResponse) ProtoMessage() {} + +func (x *SetVelocityResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_base_v1_base_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetVelocityResponse.ProtoReflect.Descriptor instead. +func (*SetVelocityResponse) Descriptor() ([]byte, []int) { + return file_component_base_v1_base_proto_rawDescGZIP(), []int{9} +} + +var File_component_base_v1_base_proto protoreflect.FileDescriptor + +var file_component_base_v1_base_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x13, 0x4d, + 0x6f, 0x76, 0x65, 0x53, 0x74, 0x72, 0x61, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x6d, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, 0x69, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6d, 0x12, 0x1c, 0x0a, 0x0a, 0x6d, 0x6d, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6d, 0x6d, 0x50, + 0x65, 0x72, 0x53, 0x65, 0x63, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x6f, 0x76, 0x65, 0x53, 0x74, 0x72, 0x61, + 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, 0x01, 0x0a, + 0x0b, 0x53, 0x70, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x08, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x67, 0x12, 0x20, 0x0a, + 0x0c, 0x64, 0x65, 0x67, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x67, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x12, + 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x0e, + 0x0a, 0x0c, 0x53, 0x70, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, + 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, + 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xb8, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x65, + 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x33, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x12, 0x31, 0x0a, 0x07, 0x61, 0x6e, 0x67, + 0x75, 0x6c, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x33, 0x52, 0x07, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x12, 0x2d, 0x0a, 0x05, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x12, 0x0a, 0x10, 0x53, + 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xbb, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6c, 0x69, + 0x6e, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x33, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x12, 0x31, 0x0a, 0x07, 0x61, + 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x33, 0x52, 0x07, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x12, 0x2d, + 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x15, 0x0a, + 0x13, 0x53, 0x65, 0x74, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf5, 0x05, 0x0a, 0x0b, 0x42, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x4d, 0x6f, 0x76, 0x65, 0x53, 0x74, 0x72, + 0x61, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x6f, 0x76, 0x65, 0x53, 0x74, 0x72, 0x61, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, + 0x53, 0x74, 0x72, 0x61, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x6f, 0x76, + 0x65, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x69, 0x67, 0x68, 0x74, 0x12, 0x82, 0x01, 0x0a, 0x04, 0x53, + 0x70, 0x69, 0x6e, 0x12, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x69, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x70, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, 0x70, 0x69, 0x6e, 0x12, + 0x93, 0x01, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x22, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x5f, + 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x9f, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x56, 0x65, 0x6c, + 0x6f, 0x63, 0x69, 0x74, 0x79, 0x12, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x56, 0x65, + 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x5f, 0x76, + 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x12, 0x82, 0x01, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, + 0x12, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x42, 0x3f, 0x0a, 0x1a, + 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x5a, 0x21, 0x67, 0x6f, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_base_v1_base_proto_rawDescOnce sync.Once + file_component_base_v1_base_proto_rawDescData = file_component_base_v1_base_proto_rawDesc +) + +func file_component_base_v1_base_proto_rawDescGZIP() []byte { + file_component_base_v1_base_proto_rawDescOnce.Do(func() { + file_component_base_v1_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_base_v1_base_proto_rawDescData) + }) + return file_component_base_v1_base_proto_rawDescData +} + +var file_component_base_v1_base_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_component_base_v1_base_proto_goTypes = []interface{}{ + (*MoveStraightRequest)(nil), // 0: viam.component.base.v1.MoveStraightRequest + (*MoveStraightResponse)(nil), // 1: viam.component.base.v1.MoveStraightResponse + (*SpinRequest)(nil), // 2: viam.component.base.v1.SpinRequest + (*SpinResponse)(nil), // 3: viam.component.base.v1.SpinResponse + (*StopRequest)(nil), // 4: viam.component.base.v1.StopRequest + (*StopResponse)(nil), // 5: viam.component.base.v1.StopResponse + (*SetPowerRequest)(nil), // 6: viam.component.base.v1.SetPowerRequest + (*SetPowerResponse)(nil), // 7: viam.component.base.v1.SetPowerResponse + (*SetVelocityRequest)(nil), // 8: viam.component.base.v1.SetVelocityRequest + (*SetVelocityResponse)(nil), // 9: viam.component.base.v1.SetVelocityResponse + (*structpb.Struct)(nil), // 10: google.protobuf.Struct + (*v1.Vector3)(nil), // 11: viam.common.v1.Vector3 +} +var file_component_base_v1_base_proto_depIdxs = []int32{ + 10, // 0: viam.component.base.v1.MoveStraightRequest.extra:type_name -> google.protobuf.Struct + 10, // 1: viam.component.base.v1.SpinRequest.extra:type_name -> google.protobuf.Struct + 10, // 2: viam.component.base.v1.StopRequest.extra:type_name -> google.protobuf.Struct + 11, // 3: viam.component.base.v1.SetPowerRequest.linear:type_name -> viam.common.v1.Vector3 + 11, // 4: viam.component.base.v1.SetPowerRequest.angular:type_name -> viam.common.v1.Vector3 + 10, // 5: viam.component.base.v1.SetPowerRequest.extra:type_name -> google.protobuf.Struct + 11, // 6: viam.component.base.v1.SetVelocityRequest.linear:type_name -> viam.common.v1.Vector3 + 11, // 7: viam.component.base.v1.SetVelocityRequest.angular:type_name -> viam.common.v1.Vector3 + 10, // 8: viam.component.base.v1.SetVelocityRequest.extra:type_name -> google.protobuf.Struct + 0, // 9: viam.component.base.v1.BaseService.MoveStraight:input_type -> viam.component.base.v1.MoveStraightRequest + 2, // 10: viam.component.base.v1.BaseService.Spin:input_type -> viam.component.base.v1.SpinRequest + 6, // 11: viam.component.base.v1.BaseService.SetPower:input_type -> viam.component.base.v1.SetPowerRequest + 8, // 12: viam.component.base.v1.BaseService.SetVelocity:input_type -> viam.component.base.v1.SetVelocityRequest + 4, // 13: viam.component.base.v1.BaseService.Stop:input_type -> viam.component.base.v1.StopRequest + 1, // 14: viam.component.base.v1.BaseService.MoveStraight:output_type -> viam.component.base.v1.MoveStraightResponse + 3, // 15: viam.component.base.v1.BaseService.Spin:output_type -> viam.component.base.v1.SpinResponse + 7, // 16: viam.component.base.v1.BaseService.SetPower:output_type -> viam.component.base.v1.SetPowerResponse + 9, // 17: viam.component.base.v1.BaseService.SetVelocity:output_type -> viam.component.base.v1.SetVelocityResponse + 5, // 18: viam.component.base.v1.BaseService.Stop:output_type -> viam.component.base.v1.StopResponse + 14, // [14:19] is the sub-list for method output_type + 9, // [9:14] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_component_base_v1_base_proto_init() } +func file_component_base_v1_base_proto_init() { + if File_component_base_v1_base_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_base_v1_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveStraightRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_base_v1_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveStraightResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_base_v1_base_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpinRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_base_v1_base_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpinResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_base_v1_base_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_base_v1_base_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_base_v1_base_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPowerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_base_v1_base_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPowerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_base_v1_base_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetVelocityRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_base_v1_base_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetVelocityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_base_v1_base_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_base_v1_base_proto_goTypes, + DependencyIndexes: file_component_base_v1_base_proto_depIdxs, + MessageInfos: file_component_base_v1_base_proto_msgTypes, + }.Build() + File_component_base_v1_base_proto = out.File + file_component_base_v1_base_proto_rawDesc = nil + file_component_base_v1_base_proto_goTypes = nil + file_component_base_v1_base_proto_depIdxs = nil +} diff --git a/component/base/v1/base.pb.gw.go b/component/base/v1/base.pb.gw.go new file mode 100644 index 000000000..e8f78daa1 --- /dev/null +++ b/component/base/v1/base.pb.gw.go @@ -0,0 +1,681 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/base/v1/base.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_BaseService_MoveStraight_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BaseService_MoveStraight_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveStraightRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_MoveStraight_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MoveStraight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BaseService_MoveStraight_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveStraightRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_MoveStraight_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MoveStraight(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BaseService_Spin_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BaseService_Spin_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SpinRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_Spin_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Spin(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BaseService_Spin_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SpinRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_Spin_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Spin(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BaseService_SetPower_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BaseService_SetPower_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetPowerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_SetPower_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetPower(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BaseService_SetPower_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetPowerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_SetPower_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetPower(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BaseService_SetVelocity_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BaseService_SetVelocity_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetVelocityRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_SetVelocity_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetVelocity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BaseService_SetVelocity_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetVelocityRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_SetVelocity_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetVelocity(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BaseService_Stop_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BaseService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_Stop_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Stop(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BaseService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BaseService_Stop_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Stop(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterBaseServiceHandlerServer registers the http handlers for service BaseService to "mux". +// UnaryRPC :call BaseServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBaseServiceHandlerFromEndpoint instead. +func RegisterBaseServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BaseServiceServer) error { + + mux.Handle("POST", pattern_BaseService_MoveStraight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.base.v1.BaseService/MoveStraight", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/move_straight")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BaseService_MoveStraight_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_MoveStraight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_BaseService_Spin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.base.v1.BaseService/Spin", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/spin")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BaseService_Spin_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_Spin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_BaseService_SetPower_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.base.v1.BaseService/SetPower", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/set_power")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BaseService_SetPower_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_SetPower_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_BaseService_SetVelocity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.base.v1.BaseService/SetVelocity", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/set_velocity")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BaseService_SetVelocity_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_SetVelocity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_BaseService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.base.v1.BaseService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BaseService_Stop_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterBaseServiceHandlerFromEndpoint is same as RegisterBaseServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterBaseServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterBaseServiceHandler(ctx, mux, conn) +} + +// RegisterBaseServiceHandler registers the http handlers for service BaseService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterBaseServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterBaseServiceHandlerClient(ctx, mux, NewBaseServiceClient(conn)) +} + +// RegisterBaseServiceHandlerClient registers the http handlers for service BaseService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BaseServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BaseServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "BaseServiceClient" to call the correct interceptors. +func RegisterBaseServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BaseServiceClient) error { + + mux.Handle("POST", pattern_BaseService_MoveStraight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.base.v1.BaseService/MoveStraight", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/move_straight")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BaseService_MoveStraight_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_MoveStraight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_BaseService_Spin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.base.v1.BaseService/Spin", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/spin")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BaseService_Spin_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_Spin_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_BaseService_SetPower_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.base.v1.BaseService/SetPower", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/set_power")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BaseService_SetPower_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_SetPower_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_BaseService_SetVelocity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.base.v1.BaseService/SetVelocity", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/set_velocity")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BaseService_SetVelocity_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_SetVelocity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_BaseService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.base.v1.BaseService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/base/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BaseService_Stop_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BaseService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_BaseService_MoveStraight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "base", "name", "move_straight"}, "")) + + pattern_BaseService_Spin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "base", "name", "spin"}, "")) + + pattern_BaseService_SetPower_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "base", "name", "set_power"}, "")) + + pattern_BaseService_SetVelocity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "base", "name", "set_velocity"}, "")) + + pattern_BaseService_Stop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "base", "name", "stop"}, "")) +) + +var ( + forward_BaseService_MoveStraight_0 = runtime.ForwardResponseMessage + + forward_BaseService_Spin_0 = runtime.ForwardResponseMessage + + forward_BaseService_SetPower_0 = runtime.ForwardResponseMessage + + forward_BaseService_SetVelocity_0 = runtime.ForwardResponseMessage + + forward_BaseService_Stop_0 = runtime.ForwardResponseMessage +) diff --git a/component/base/v1/base_grpc.pb.go b/component/base/v1/base_grpc.pb.go new file mode 100644 index 000000000..d306cb002 --- /dev/null +++ b/component/base/v1/base_grpc.pb.go @@ -0,0 +1,265 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// BaseServiceClient is the client API for BaseService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BaseServiceClient interface { + // MoveStraight moves a robot's base in a straight line by a given distance, expressed in millimeters + // and a given speed, expressed in millimeters per second + // This method blocks until completed or cancelled + MoveStraight(ctx context.Context, in *MoveStraightRequest, opts ...grpc.CallOption) (*MoveStraightResponse, error) + // Spin spins a robot's base by an given angle, expressed in degrees, and a given + // angular speed, expressed in degrees per second + // This method blocks until completed or cancelled + Spin(ctx context.Context, in *SpinRequest, opts ...grpc.CallOption) (*SpinResponse, error) + // SetPower sets the linear and angular power of a base + // -1 -> 1 in terms of power for each direction + SetPower(ctx context.Context, in *SetPowerRequest, opts ...grpc.CallOption) (*SetPowerResponse, error) + // SetVelocity sets the linear and angular velocity of a base + SetVelocity(ctx context.Context, in *SetVelocityRequest, opts ...grpc.CallOption) (*SetVelocityResponse, error) + // Stop stops a robot's base + Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) +} + +type baseServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBaseServiceClient(cc grpc.ClientConnInterface) BaseServiceClient { + return &baseServiceClient{cc} +} + +func (c *baseServiceClient) MoveStraight(ctx context.Context, in *MoveStraightRequest, opts ...grpc.CallOption) (*MoveStraightResponse, error) { + out := new(MoveStraightResponse) + err := c.cc.Invoke(ctx, "/viam.component.base.v1.BaseService/MoveStraight", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *baseServiceClient) Spin(ctx context.Context, in *SpinRequest, opts ...grpc.CallOption) (*SpinResponse, error) { + out := new(SpinResponse) + err := c.cc.Invoke(ctx, "/viam.component.base.v1.BaseService/Spin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *baseServiceClient) SetPower(ctx context.Context, in *SetPowerRequest, opts ...grpc.CallOption) (*SetPowerResponse, error) { + out := new(SetPowerResponse) + err := c.cc.Invoke(ctx, "/viam.component.base.v1.BaseService/SetPower", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *baseServiceClient) SetVelocity(ctx context.Context, in *SetVelocityRequest, opts ...grpc.CallOption) (*SetVelocityResponse, error) { + out := new(SetVelocityResponse) + err := c.cc.Invoke(ctx, "/viam.component.base.v1.BaseService/SetVelocity", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *baseServiceClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { + out := new(StopResponse) + err := c.cc.Invoke(ctx, "/viam.component.base.v1.BaseService/Stop", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BaseServiceServer is the server API for BaseService service. +// All implementations must embed UnimplementedBaseServiceServer +// for forward compatibility +type BaseServiceServer interface { + // MoveStraight moves a robot's base in a straight line by a given distance, expressed in millimeters + // and a given speed, expressed in millimeters per second + // This method blocks until completed or cancelled + MoveStraight(context.Context, *MoveStraightRequest) (*MoveStraightResponse, error) + // Spin spins a robot's base by an given angle, expressed in degrees, and a given + // angular speed, expressed in degrees per second + // This method blocks until completed or cancelled + Spin(context.Context, *SpinRequest) (*SpinResponse, error) + // SetPower sets the linear and angular power of a base + // -1 -> 1 in terms of power for each direction + SetPower(context.Context, *SetPowerRequest) (*SetPowerResponse, error) + // SetVelocity sets the linear and angular velocity of a base + SetVelocity(context.Context, *SetVelocityRequest) (*SetVelocityResponse, error) + // Stop stops a robot's base + Stop(context.Context, *StopRequest) (*StopResponse, error) + mustEmbedUnimplementedBaseServiceServer() +} + +// UnimplementedBaseServiceServer must be embedded to have forward compatible implementations. +type UnimplementedBaseServiceServer struct { +} + +func (UnimplementedBaseServiceServer) MoveStraight(context.Context, *MoveStraightRequest) (*MoveStraightResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveStraight not implemented") +} +func (UnimplementedBaseServiceServer) Spin(context.Context, *SpinRequest) (*SpinResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Spin not implemented") +} +func (UnimplementedBaseServiceServer) SetPower(context.Context, *SetPowerRequest) (*SetPowerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetPower not implemented") +} +func (UnimplementedBaseServiceServer) SetVelocity(context.Context, *SetVelocityRequest) (*SetVelocityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetVelocity not implemented") +} +func (UnimplementedBaseServiceServer) Stop(context.Context, *StopRequest) (*StopResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (UnimplementedBaseServiceServer) mustEmbedUnimplementedBaseServiceServer() {} + +// UnsafeBaseServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BaseServiceServer will +// result in compilation errors. +type UnsafeBaseServiceServer interface { + mustEmbedUnimplementedBaseServiceServer() +} + +func RegisterBaseServiceServer(s grpc.ServiceRegistrar, srv BaseServiceServer) { + s.RegisterService(&BaseService_ServiceDesc, srv) +} + +func _BaseService_MoveStraight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveStraightRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BaseServiceServer).MoveStraight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.base.v1.BaseService/MoveStraight", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BaseServiceServer).MoveStraight(ctx, req.(*MoveStraightRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BaseService_Spin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SpinRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BaseServiceServer).Spin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.base.v1.BaseService/Spin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BaseServiceServer).Spin(ctx, req.(*SpinRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BaseService_SetPower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPowerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BaseServiceServer).SetPower(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.base.v1.BaseService/SetPower", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BaseServiceServer).SetPower(ctx, req.(*SetPowerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BaseService_SetVelocity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetVelocityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BaseServiceServer).SetVelocity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.base.v1.BaseService/SetVelocity", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BaseServiceServer).SetVelocity(ctx, req.(*SetVelocityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BaseService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BaseServiceServer).Stop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.base.v1.BaseService/Stop", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BaseServiceServer).Stop(ctx, req.(*StopRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// BaseService_ServiceDesc is the grpc.ServiceDesc for BaseService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BaseService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.base.v1.BaseService", + HandlerType: (*BaseServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "MoveStraight", + Handler: _BaseService_MoveStraight_Handler, + }, + { + MethodName: "Spin", + Handler: _BaseService_Spin_Handler, + }, + { + MethodName: "SetPower", + Handler: _BaseService_SetPower_Handler, + }, + { + MethodName: "SetVelocity", + Handler: _BaseService_SetVelocity_Handler, + }, + { + MethodName: "Stop", + Handler: _BaseService_Stop_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/base/v1/base.proto", +} diff --git a/component/board/v1/board.pb.go b/component/board/v1/board.pb.go new file mode 100644 index 000000000..71ac9d322 --- /dev/null +++ b/component/board/v1/board.pb.go @@ -0,0 +1,1535 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/board/v1/board.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *StatusRequest) Reset() { + *x = StatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusRequest) ProtoMessage() {} + +func (x *StatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead. +func (*StatusRequest) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{0} +} + +func (x *StatusRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StatusRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type StatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status *v1.BoardStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *StatusResponse) Reset() { + *x = StatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusResponse) ProtoMessage() {} + +func (x *StatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead. +func (*StatusResponse) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{1} +} + +func (x *StatusResponse) GetStatus() *v1.BoardStatus { + if x != nil { + return x.Status + } + return nil +} + +type SetGPIORequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Pin string `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"` + High bool `protobuf:"varint,3,opt,name=high,proto3" json:"high,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *SetGPIORequest) Reset() { + *x = SetGPIORequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetGPIORequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetGPIORequest) ProtoMessage() {} + +func (x *SetGPIORequest) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetGPIORequest.ProtoReflect.Descriptor instead. +func (*SetGPIORequest) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{2} +} + +func (x *SetGPIORequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetGPIORequest) GetPin() string { + if x != nil { + return x.Pin + } + return "" +} + +func (x *SetGPIORequest) GetHigh() bool { + if x != nil { + return x.High + } + return false +} + +func (x *SetGPIORequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type SetGPIOResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetGPIOResponse) Reset() { + *x = SetGPIOResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetGPIOResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetGPIOResponse) ProtoMessage() {} + +func (x *SetGPIOResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetGPIOResponse.ProtoReflect.Descriptor instead. +func (*SetGPIOResponse) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{3} +} + +type GetGPIORequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Pin string `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GetGPIORequest) Reset() { + *x = GetGPIORequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGPIORequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGPIORequest) ProtoMessage() {} + +func (x *GetGPIORequest) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGPIORequest.ProtoReflect.Descriptor instead. +func (*GetGPIORequest) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{4} +} + +func (x *GetGPIORequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetGPIORequest) GetPin() string { + if x != nil { + return x.Pin + } + return "" +} + +func (x *GetGPIORequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GetGPIOResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + High bool `protobuf:"varint,1,opt,name=high,proto3" json:"high,omitempty"` +} + +func (x *GetGPIOResponse) Reset() { + *x = GetGPIOResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGPIOResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGPIOResponse) ProtoMessage() {} + +func (x *GetGPIOResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGPIOResponse.ProtoReflect.Descriptor instead. +func (*GetGPIOResponse) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{5} +} + +func (x *GetGPIOResponse) GetHigh() bool { + if x != nil { + return x.High + } + return false +} + +type PWMRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Pin string `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *PWMRequest) Reset() { + *x = PWMRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PWMRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PWMRequest) ProtoMessage() {} + +func (x *PWMRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PWMRequest.ProtoReflect.Descriptor instead. +func (*PWMRequest) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{6} +} + +func (x *PWMRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PWMRequest) GetPin() string { + if x != nil { + return x.Pin + } + return "" +} + +func (x *PWMRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type PWMResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DutyCyclePct float64 `protobuf:"fixed64,1,opt,name=duty_cycle_pct,json=dutyCyclePct,proto3" json:"duty_cycle_pct,omitempty"` // 0-1 +} + +func (x *PWMResponse) Reset() { + *x = PWMResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PWMResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PWMResponse) ProtoMessage() {} + +func (x *PWMResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PWMResponse.ProtoReflect.Descriptor instead. +func (*PWMResponse) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{7} +} + +func (x *PWMResponse) GetDutyCyclePct() float64 { + if x != nil { + return x.DutyCyclePct + } + return 0 +} + +type SetPWMRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Pin string `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"` + DutyCyclePct float64 `protobuf:"fixed64,3,opt,name=duty_cycle_pct,json=dutyCyclePct,proto3" json:"duty_cycle_pct,omitempty"` // 0-1 + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *SetPWMRequest) Reset() { + *x = SetPWMRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPWMRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPWMRequest) ProtoMessage() {} + +func (x *SetPWMRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPWMRequest.ProtoReflect.Descriptor instead. +func (*SetPWMRequest) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{8} +} + +func (x *SetPWMRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetPWMRequest) GetPin() string { + if x != nil { + return x.Pin + } + return "" +} + +func (x *SetPWMRequest) GetDutyCyclePct() float64 { + if x != nil { + return x.DutyCyclePct + } + return 0 +} + +func (x *SetPWMRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type SetPWMResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetPWMResponse) Reset() { + *x = SetPWMResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPWMResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPWMResponse) ProtoMessage() {} + +func (x *SetPWMResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPWMResponse.ProtoReflect.Descriptor instead. +func (*SetPWMResponse) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{9} +} + +type PWMFrequencyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Pin string `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *PWMFrequencyRequest) Reset() { + *x = PWMFrequencyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PWMFrequencyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PWMFrequencyRequest) ProtoMessage() {} + +func (x *PWMFrequencyRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PWMFrequencyRequest.ProtoReflect.Descriptor instead. +func (*PWMFrequencyRequest) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{10} +} + +func (x *PWMFrequencyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PWMFrequencyRequest) GetPin() string { + if x != nil { + return x.Pin + } + return "" +} + +func (x *PWMFrequencyRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type PWMFrequencyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FrequencyHz uint64 `protobuf:"varint,1,opt,name=frequency_hz,json=frequencyHz,proto3" json:"frequency_hz,omitempty"` +} + +func (x *PWMFrequencyResponse) Reset() { + *x = PWMFrequencyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PWMFrequencyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PWMFrequencyResponse) ProtoMessage() {} + +func (x *PWMFrequencyResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PWMFrequencyResponse.ProtoReflect.Descriptor instead. +func (*PWMFrequencyResponse) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{11} +} + +func (x *PWMFrequencyResponse) GetFrequencyHz() uint64 { + if x != nil { + return x.FrequencyHz + } + return 0 +} + +type SetPWMFrequencyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Pin string `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"` + FrequencyHz uint64 `protobuf:"varint,3,opt,name=frequency_hz,json=frequencyHz,proto3" json:"frequency_hz,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *SetPWMFrequencyRequest) Reset() { + *x = SetPWMFrequencyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPWMFrequencyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPWMFrequencyRequest) ProtoMessage() {} + +func (x *SetPWMFrequencyRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPWMFrequencyRequest.ProtoReflect.Descriptor instead. +func (*SetPWMFrequencyRequest) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{12} +} + +func (x *SetPWMFrequencyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetPWMFrequencyRequest) GetPin() string { + if x != nil { + return x.Pin + } + return "" +} + +func (x *SetPWMFrequencyRequest) GetFrequencyHz() uint64 { + if x != nil { + return x.FrequencyHz + } + return 0 +} + +func (x *SetPWMFrequencyRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type SetPWMFrequencyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetPWMFrequencyResponse) Reset() { + *x = SetPWMFrequencyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPWMFrequencyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPWMFrequencyResponse) ProtoMessage() {} + +func (x *SetPWMFrequencyResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPWMFrequencyResponse.ProtoReflect.Descriptor instead. +func (*SetPWMFrequencyResponse) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{13} +} + +type ReadAnalogReaderRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BoardName string `protobuf:"bytes,1,opt,name=board_name,json=boardName,proto3" json:"board_name,omitempty"` + AnalogReaderName string `protobuf:"bytes,2,opt,name=analog_reader_name,json=analogReaderName,proto3" json:"analog_reader_name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *ReadAnalogReaderRequest) Reset() { + *x = ReadAnalogReaderRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadAnalogReaderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadAnalogReaderRequest) ProtoMessage() {} + +func (x *ReadAnalogReaderRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadAnalogReaderRequest.ProtoReflect.Descriptor instead. +func (*ReadAnalogReaderRequest) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{14} +} + +func (x *ReadAnalogReaderRequest) GetBoardName() string { + if x != nil { + return x.BoardName + } + return "" +} + +func (x *ReadAnalogReaderRequest) GetAnalogReaderName() string { + if x != nil { + return x.AnalogReaderName + } + return "" +} + +func (x *ReadAnalogReaderRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type ReadAnalogReaderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *ReadAnalogReaderResponse) Reset() { + *x = ReadAnalogReaderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadAnalogReaderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadAnalogReaderResponse) ProtoMessage() {} + +func (x *ReadAnalogReaderResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadAnalogReaderResponse.ProtoReflect.Descriptor instead. +func (*ReadAnalogReaderResponse) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{15} +} + +func (x *ReadAnalogReaderResponse) GetValue() int32 { + if x != nil { + return x.Value + } + return 0 +} + +type GetDigitalInterruptValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BoardName string `protobuf:"bytes,1,opt,name=board_name,json=boardName,proto3" json:"board_name,omitempty"` + DigitalInterruptName string `protobuf:"bytes,2,opt,name=digital_interrupt_name,json=digitalInterruptName,proto3" json:"digital_interrupt_name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GetDigitalInterruptValueRequest) Reset() { + *x = GetDigitalInterruptValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDigitalInterruptValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDigitalInterruptValueRequest) ProtoMessage() {} + +func (x *GetDigitalInterruptValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDigitalInterruptValueRequest.ProtoReflect.Descriptor instead. +func (*GetDigitalInterruptValueRequest) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{16} +} + +func (x *GetDigitalInterruptValueRequest) GetBoardName() string { + if x != nil { + return x.BoardName + } + return "" +} + +func (x *GetDigitalInterruptValueRequest) GetDigitalInterruptName() string { + if x != nil { + return x.DigitalInterruptName + } + return "" +} + +func (x *GetDigitalInterruptValueRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GetDigitalInterruptValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *GetDigitalInterruptValueResponse) Reset() { + *x = GetDigitalInterruptValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_board_v1_board_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDigitalInterruptValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDigitalInterruptValueResponse) ProtoMessage() {} + +func (x *GetDigitalInterruptValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_board_v1_board_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDigitalInterruptValueResponse.ProtoReflect.Descriptor instead. +func (*GetDigitalInterruptValueResponse) Descriptor() ([]byte, []int) { + return file_component_board_v1_board_proto_rawDescGZIP(), []int{17} +} + +func (x *GetDigitalInterruptValueResponse) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +var File_component_board_v1_board_proto protoreflect.FileDescriptor + +var file_component_board_v1_board_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, + 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x17, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, + 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x22, 0x45, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x79, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x47, + 0x50, 0x49, 0x4f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x68, 0x69, 0x67, 0x68, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x47, 0x50, 0x49, 0x4f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x65, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x47, 0x50, 0x49, + 0x4f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x70, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x6e, 0x12, 0x2d, + 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x25, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x47, 0x50, 0x49, 0x4f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x68, 0x69, 0x67, 0x68, 0x22, 0x61, 0x0a, 0x0a, 0x50, 0x57, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x6e, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x33, 0x0a, 0x0b, 0x50, 0x57, 0x4d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x75, 0x74, 0x79, 0x5f, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x70, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, + 0x64, 0x75, 0x74, 0x79, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x50, 0x63, 0x74, 0x22, 0x8a, 0x01, 0x0a, + 0x0d, 0x53, 0x65, 0x74, 0x50, 0x57, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x70, 0x69, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x75, 0x74, 0x79, 0x5f, 0x63, 0x79, 0x63, + 0x6c, 0x65, 0x5f, 0x70, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x64, 0x75, + 0x74, 0x79, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x50, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x65, 0x74, + 0x50, 0x57, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x0a, 0x13, 0x50, + 0x57, 0x4d, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x6e, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x39, 0x0a, 0x14, 0x50, 0x57, 0x4d, 0x46, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x68, 0x7a, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, + 0x48, 0x7a, 0x22, 0x90, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x50, 0x57, 0x4d, 0x46, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x70, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, + 0x5f, 0x68, 0x7a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x66, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x79, 0x48, 0x7a, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, + 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x50, 0x57, 0x4d, 0x46, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x95, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x61, + 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x30, 0x0a, 0x18, 0x52, 0x65, 0x61, 0x64, + 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x1f, 0x47, + 0x65, 0x74, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, + 0x70, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, + 0x16, 0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, + 0x70, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, + 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x22, 0x38, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0xed, 0x0b, 0x0a, + 0x0c, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d, 0x01, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x8e, 0x01, + 0x0a, 0x07, 0x53, 0x65, 0x74, 0x47, 0x50, 0x49, 0x4f, 0x12, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x47, 0x50, 0x49, 0x4f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, + 0x47, 0x50, 0x49, 0x4f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2a, 0x1a, 0x28, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x70, 0x69, 0x6f, 0x12, 0x8e, + 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x47, 0x50, 0x49, 0x4f, 0x12, 0x27, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x50, 0x49, 0x4f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x47, 0x50, 0x49, 0x4f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x70, 0x69, 0x6f, 0x12, + 0x81, 0x01, 0x0a, 0x03, 0x50, 0x57, 0x4d, 0x12, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x57, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x57, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x70, 0x77, 0x6d, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x74, 0x50, 0x57, 0x4d, 0x12, 0x26, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x57, 0x4d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x74, 0x50, 0x57, 0x4d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x1a, 0x27, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x77, 0x6d, + 0x12, 0xa1, 0x01, 0x0a, 0x0c, 0x50, 0x57, 0x4d, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x79, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x57, 0x4d, 0x46, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x57, 0x4d, 0x46, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x77, 0x6d, 0x5f, + 0x66, 0x72, 0x65, 0x71, 0x12, 0xaa, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x50, 0x57, 0x4d, 0x46, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x57, 0x4d, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x57, 0x4d, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2e, 0x1a, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, + 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x77, 0x6d, 0x5f, 0x66, 0x72, 0x65, + 0x71, 0x12, 0xd2, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, + 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x59, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x53, 0x12, 0x51, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, + 0x64, 0x2f, 0x7b, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x61, + 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x61, 0x6e, + 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x12, 0xf3, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x69, + 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x38, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x67, 0x69, 0x74, + 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5c, + 0x12, 0x5a, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x7b, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x69, 0x67, 0x69, + 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x2f, 0x7b, 0x64, + 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x41, 0x0a, 0x1b, + 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_board_v1_board_proto_rawDescOnce sync.Once + file_component_board_v1_board_proto_rawDescData = file_component_board_v1_board_proto_rawDesc +) + +func file_component_board_v1_board_proto_rawDescGZIP() []byte { + file_component_board_v1_board_proto_rawDescOnce.Do(func() { + file_component_board_v1_board_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_board_v1_board_proto_rawDescData) + }) + return file_component_board_v1_board_proto_rawDescData +} + +var file_component_board_v1_board_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_component_board_v1_board_proto_goTypes = []interface{}{ + (*StatusRequest)(nil), // 0: viam.component.board.v1.StatusRequest + (*StatusResponse)(nil), // 1: viam.component.board.v1.StatusResponse + (*SetGPIORequest)(nil), // 2: viam.component.board.v1.SetGPIORequest + (*SetGPIOResponse)(nil), // 3: viam.component.board.v1.SetGPIOResponse + (*GetGPIORequest)(nil), // 4: viam.component.board.v1.GetGPIORequest + (*GetGPIOResponse)(nil), // 5: viam.component.board.v1.GetGPIOResponse + (*PWMRequest)(nil), // 6: viam.component.board.v1.PWMRequest + (*PWMResponse)(nil), // 7: viam.component.board.v1.PWMResponse + (*SetPWMRequest)(nil), // 8: viam.component.board.v1.SetPWMRequest + (*SetPWMResponse)(nil), // 9: viam.component.board.v1.SetPWMResponse + (*PWMFrequencyRequest)(nil), // 10: viam.component.board.v1.PWMFrequencyRequest + (*PWMFrequencyResponse)(nil), // 11: viam.component.board.v1.PWMFrequencyResponse + (*SetPWMFrequencyRequest)(nil), // 12: viam.component.board.v1.SetPWMFrequencyRequest + (*SetPWMFrequencyResponse)(nil), // 13: viam.component.board.v1.SetPWMFrequencyResponse + (*ReadAnalogReaderRequest)(nil), // 14: viam.component.board.v1.ReadAnalogReaderRequest + (*ReadAnalogReaderResponse)(nil), // 15: viam.component.board.v1.ReadAnalogReaderResponse + (*GetDigitalInterruptValueRequest)(nil), // 16: viam.component.board.v1.GetDigitalInterruptValueRequest + (*GetDigitalInterruptValueResponse)(nil), // 17: viam.component.board.v1.GetDigitalInterruptValueResponse + (*structpb.Struct)(nil), // 18: google.protobuf.Struct + (*v1.BoardStatus)(nil), // 19: viam.common.v1.BoardStatus +} +var file_component_board_v1_board_proto_depIdxs = []int32{ + 18, // 0: viam.component.board.v1.StatusRequest.extra:type_name -> google.protobuf.Struct + 19, // 1: viam.component.board.v1.StatusResponse.status:type_name -> viam.common.v1.BoardStatus + 18, // 2: viam.component.board.v1.SetGPIORequest.extra:type_name -> google.protobuf.Struct + 18, // 3: viam.component.board.v1.GetGPIORequest.extra:type_name -> google.protobuf.Struct + 18, // 4: viam.component.board.v1.PWMRequest.extra:type_name -> google.protobuf.Struct + 18, // 5: viam.component.board.v1.SetPWMRequest.extra:type_name -> google.protobuf.Struct + 18, // 6: viam.component.board.v1.PWMFrequencyRequest.extra:type_name -> google.protobuf.Struct + 18, // 7: viam.component.board.v1.SetPWMFrequencyRequest.extra:type_name -> google.protobuf.Struct + 18, // 8: viam.component.board.v1.ReadAnalogReaderRequest.extra:type_name -> google.protobuf.Struct + 18, // 9: viam.component.board.v1.GetDigitalInterruptValueRequest.extra:type_name -> google.protobuf.Struct + 0, // 10: viam.component.board.v1.BoardService.Status:input_type -> viam.component.board.v1.StatusRequest + 2, // 11: viam.component.board.v1.BoardService.SetGPIO:input_type -> viam.component.board.v1.SetGPIORequest + 4, // 12: viam.component.board.v1.BoardService.GetGPIO:input_type -> viam.component.board.v1.GetGPIORequest + 6, // 13: viam.component.board.v1.BoardService.PWM:input_type -> viam.component.board.v1.PWMRequest + 8, // 14: viam.component.board.v1.BoardService.SetPWM:input_type -> viam.component.board.v1.SetPWMRequest + 10, // 15: viam.component.board.v1.BoardService.PWMFrequency:input_type -> viam.component.board.v1.PWMFrequencyRequest + 12, // 16: viam.component.board.v1.BoardService.SetPWMFrequency:input_type -> viam.component.board.v1.SetPWMFrequencyRequest + 14, // 17: viam.component.board.v1.BoardService.ReadAnalogReader:input_type -> viam.component.board.v1.ReadAnalogReaderRequest + 16, // 18: viam.component.board.v1.BoardService.GetDigitalInterruptValue:input_type -> viam.component.board.v1.GetDigitalInterruptValueRequest + 1, // 19: viam.component.board.v1.BoardService.Status:output_type -> viam.component.board.v1.StatusResponse + 3, // 20: viam.component.board.v1.BoardService.SetGPIO:output_type -> viam.component.board.v1.SetGPIOResponse + 5, // 21: viam.component.board.v1.BoardService.GetGPIO:output_type -> viam.component.board.v1.GetGPIOResponse + 7, // 22: viam.component.board.v1.BoardService.PWM:output_type -> viam.component.board.v1.PWMResponse + 9, // 23: viam.component.board.v1.BoardService.SetPWM:output_type -> viam.component.board.v1.SetPWMResponse + 11, // 24: viam.component.board.v1.BoardService.PWMFrequency:output_type -> viam.component.board.v1.PWMFrequencyResponse + 13, // 25: viam.component.board.v1.BoardService.SetPWMFrequency:output_type -> viam.component.board.v1.SetPWMFrequencyResponse + 15, // 26: viam.component.board.v1.BoardService.ReadAnalogReader:output_type -> viam.component.board.v1.ReadAnalogReaderResponse + 17, // 27: viam.component.board.v1.BoardService.GetDigitalInterruptValue:output_type -> viam.component.board.v1.GetDigitalInterruptValueResponse + 19, // [19:28] is the sub-list for method output_type + 10, // [10:19] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_component_board_v1_board_proto_init() } +func file_component_board_v1_board_proto_init() { + if File_component_board_v1_board_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_board_v1_board_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetGPIORequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetGPIOResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGPIORequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGPIOResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PWMRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PWMResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPWMRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPWMResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PWMFrequencyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PWMFrequencyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPWMFrequencyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPWMFrequencyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadAnalogReaderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadAnalogReaderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDigitalInterruptValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_board_v1_board_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDigitalInterruptValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_board_v1_board_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_board_v1_board_proto_goTypes, + DependencyIndexes: file_component_board_v1_board_proto_depIdxs, + MessageInfos: file_component_board_v1_board_proto_msgTypes, + }.Build() + File_component_board_v1_board_proto = out.File + file_component_board_v1_board_proto_rawDesc = nil + file_component_board_v1_board_proto_goTypes = nil + file_component_board_v1_board_proto_depIdxs = nil +} diff --git a/component/board/v1/board.pb.gw.go b/component/board/v1/board.pb.gw.go new file mode 100644 index 000000000..9815d680d --- /dev/null +++ b/component/board/v1/board.pb.gw.go @@ -0,0 +1,1197 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/board/v1/board.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_BoardService_Status_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BoardService_Status_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_Status_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_Status_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_Status_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Status(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BoardService_SetGPIO_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BoardService_SetGPIO_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetGPIORequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_SetGPIO_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetGPIO(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_SetGPIO_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetGPIORequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_SetGPIO_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetGPIO(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BoardService_GetGPIO_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BoardService_GetGPIO_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetGPIORequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_GetGPIO_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetGPIO(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_GetGPIO_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetGPIORequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_GetGPIO_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetGPIO(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BoardService_PWM_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BoardService_PWM_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PWMRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_PWM_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.PWM(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_PWM_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PWMRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_PWM_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.PWM(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BoardService_SetPWM_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BoardService_SetPWM_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetPWMRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_SetPWM_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetPWM(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_SetPWM_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetPWMRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_SetPWM_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetPWM(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BoardService_PWMFrequency_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BoardService_PWMFrequency_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PWMFrequencyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_PWMFrequency_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.PWMFrequency(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_PWMFrequency_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PWMFrequencyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_PWMFrequency_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.PWMFrequency(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BoardService_SetPWMFrequency_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BoardService_SetPWMFrequency_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetPWMFrequencyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_SetPWMFrequency_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetPWMFrequency(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_SetPWMFrequency_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetPWMFrequencyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_SetPWMFrequency_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetPWMFrequency(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BoardService_ReadAnalogReader_0 = &utilities.DoubleArray{Encoding: map[string]int{"board_name": 0, "analog_reader_name": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_BoardService_ReadAnalogReader_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReadAnalogReaderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["board_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "board_name") + } + + protoReq.BoardName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "board_name", err) + } + + val, ok = pathParams["analog_reader_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "analog_reader_name") + } + + protoReq.AnalogReaderName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "analog_reader_name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_ReadAnalogReader_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ReadAnalogReader(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_ReadAnalogReader_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReadAnalogReaderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["board_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "board_name") + } + + protoReq.BoardName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "board_name", err) + } + + val, ok = pathParams["analog_reader_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "analog_reader_name") + } + + protoReq.AnalogReaderName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "analog_reader_name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_ReadAnalogReader_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ReadAnalogReader(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BoardService_GetDigitalInterruptValue_0 = &utilities.DoubleArray{Encoding: map[string]int{"board_name": 0, "digital_interrupt_name": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_BoardService_GetDigitalInterruptValue_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDigitalInterruptValueRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["board_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "board_name") + } + + protoReq.BoardName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "board_name", err) + } + + val, ok = pathParams["digital_interrupt_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "digital_interrupt_name") + } + + protoReq.DigitalInterruptName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "digital_interrupt_name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_GetDigitalInterruptValue_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetDigitalInterruptValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BoardService_GetDigitalInterruptValue_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDigitalInterruptValueRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["board_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "board_name") + } + + protoReq.BoardName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "board_name", err) + } + + val, ok = pathParams["digital_interrupt_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "digital_interrupt_name") + } + + protoReq.DigitalInterruptName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "digital_interrupt_name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BoardService_GetDigitalInterruptValue_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetDigitalInterruptValue(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterBoardServiceHandlerServer registers the http handlers for service BoardService to "mux". +// UnaryRPC :call BoardServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBoardServiceHandlerFromEndpoint instead. +func RegisterBoardServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BoardServiceServer) error { + + mux.Handle("GET", pattern_BoardService_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/Status", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_Status_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_Status_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_BoardService_SetGPIO_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/SetGPIO", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/gpio")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_SetGPIO_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_SetGPIO_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_GetGPIO_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/GetGPIO", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/gpio")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_GetGPIO_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_GetGPIO_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_PWM_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/PWM", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/pwm")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_PWM_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_PWM_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_BoardService_SetPWM_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/SetPWM", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/pwm")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_SetPWM_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_SetPWM_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_PWMFrequency_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/PWMFrequency", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/pwm_freq")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_PWMFrequency_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_PWMFrequency_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_BoardService_SetPWMFrequency_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/SetPWMFrequency", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/pwm_freq")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_SetPWMFrequency_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_SetPWMFrequency_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_ReadAnalogReader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/ReadAnalogReader", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{board_name}/analog_reader/{analog_reader_name}/read")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_ReadAnalogReader_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_ReadAnalogReader_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_GetDigitalInterruptValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.board.v1.BoardService/GetDigitalInterruptValue", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{board_name}/digital_interrupt/{digital_interrupt_name}/value")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BoardService_GetDigitalInterruptValue_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_GetDigitalInterruptValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterBoardServiceHandlerFromEndpoint is same as RegisterBoardServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterBoardServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterBoardServiceHandler(ctx, mux, conn) +} + +// RegisterBoardServiceHandler registers the http handlers for service BoardService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterBoardServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterBoardServiceHandlerClient(ctx, mux, NewBoardServiceClient(conn)) +} + +// RegisterBoardServiceHandlerClient registers the http handlers for service BoardService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BoardServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BoardServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "BoardServiceClient" to call the correct interceptors. +func RegisterBoardServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BoardServiceClient) error { + + mux.Handle("GET", pattern_BoardService_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/Status", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_Status_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_Status_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_BoardService_SetGPIO_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/SetGPIO", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/gpio")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_SetGPIO_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_SetGPIO_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_GetGPIO_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/GetGPIO", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/gpio")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_GetGPIO_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_GetGPIO_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_PWM_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/PWM", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/pwm")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_PWM_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_PWM_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_BoardService_SetPWM_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/SetPWM", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/pwm")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_SetPWM_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_SetPWM_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_PWMFrequency_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/PWMFrequency", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/pwm_freq")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_PWMFrequency_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_PWMFrequency_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_BoardService_SetPWMFrequency_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/SetPWMFrequency", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{name}/pwm_freq")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_SetPWMFrequency_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_SetPWMFrequency_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_ReadAnalogReader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/ReadAnalogReader", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{board_name}/analog_reader/{analog_reader_name}/read")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_ReadAnalogReader_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_ReadAnalogReader_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BoardService_GetDigitalInterruptValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.board.v1.BoardService/GetDigitalInterruptValue", runtime.WithHTTPPathPattern("/viam/api/v1/component/board/{board_name}/digital_interrupt/{digital_interrupt_name}/value")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BoardService_GetDigitalInterruptValue_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BoardService_GetDigitalInterruptValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_BoardService_Status_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "status"}, "")) + + pattern_BoardService_SetGPIO_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "gpio"}, "")) + + pattern_BoardService_GetGPIO_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "gpio"}, "")) + + pattern_BoardService_PWM_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "pwm"}, "")) + + pattern_BoardService_SetPWM_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "pwm"}, "")) + + pattern_BoardService_PWMFrequency_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "pwm_freq"}, "")) + + pattern_BoardService_SetPWMFrequency_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "board", "name", "pwm_freq"}, "")) + + pattern_BoardService_ReadAnalogReader_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"viam", "api", "v1", "component", "board", "board_name", "analog_reader", "analog_reader_name", "read"}, "")) + + pattern_BoardService_GetDigitalInterruptValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"viam", "api", "v1", "component", "board", "board_name", "digital_interrupt", "digital_interrupt_name", "value"}, "")) +) + +var ( + forward_BoardService_Status_0 = runtime.ForwardResponseMessage + + forward_BoardService_SetGPIO_0 = runtime.ForwardResponseMessage + + forward_BoardService_GetGPIO_0 = runtime.ForwardResponseMessage + + forward_BoardService_PWM_0 = runtime.ForwardResponseMessage + + forward_BoardService_SetPWM_0 = runtime.ForwardResponseMessage + + forward_BoardService_PWMFrequency_0 = runtime.ForwardResponseMessage + + forward_BoardService_SetPWMFrequency_0 = runtime.ForwardResponseMessage + + forward_BoardService_ReadAnalogReader_0 = runtime.ForwardResponseMessage + + forward_BoardService_GetDigitalInterruptValue_0 = runtime.ForwardResponseMessage +) diff --git a/component/board/v1/board_grpc.pb.go b/component/board/v1/board_grpc.pb.go new file mode 100644 index 000000000..a27bce5b7 --- /dev/null +++ b/component/board/v1/board_grpc.pb.go @@ -0,0 +1,403 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// BoardServiceClient is the client API for BoardService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BoardServiceClient interface { + Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) + SetGPIO(ctx context.Context, in *SetGPIORequest, opts ...grpc.CallOption) (*SetGPIOResponse, error) + // GetGPIO gets the high/low state of the given pin of a board of the underlying robot. + GetGPIO(ctx context.Context, in *GetGPIORequest, opts ...grpc.CallOption) (*GetGPIOResponse, error) + // PWM gets the duty cycle of the given pin of a board of the underlying robot. + PWM(ctx context.Context, in *PWMRequest, opts ...grpc.CallOption) (*PWMResponse, error) + // SetPWM sets the given pin of a board of the underlying robot to the given duty cycle. + SetPWM(ctx context.Context, in *SetPWMRequest, opts ...grpc.CallOption) (*SetPWMResponse, error) + // PWMFrequency gets the PWM frequency of the given pin of a board of the underlying robot. + PWMFrequency(ctx context.Context, in *PWMFrequencyRequest, opts ...grpc.CallOption) (*PWMFrequencyResponse, error) + // SetPWMFrequency sets the given pin of a board of the underlying robot to the given PWM frequency. 0 will use the board's default PWM frequency. + SetPWMFrequency(ctx context.Context, in *SetPWMFrequencyRequest, opts ...grpc.CallOption) (*SetPWMFrequencyResponse, error) + // ReadAnalogReader reads off the current value of an analog reader of a board of the underlying robot. + ReadAnalogReader(ctx context.Context, in *ReadAnalogReaderRequest, opts ...grpc.CallOption) (*ReadAnalogReaderResponse, error) + // GetDigitalInterruptValue returns the current value of the interrupt which is based on the type of interrupt. + GetDigitalInterruptValue(ctx context.Context, in *GetDigitalInterruptValueRequest, opts ...grpc.CallOption) (*GetDigitalInterruptValueResponse, error) +} + +type boardServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBoardServiceClient(cc grpc.ClientConnInterface) BoardServiceClient { + return &boardServiceClient{cc} +} + +func (c *boardServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { + out := new(StatusResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/Status", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *boardServiceClient) SetGPIO(ctx context.Context, in *SetGPIORequest, opts ...grpc.CallOption) (*SetGPIOResponse, error) { + out := new(SetGPIOResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/SetGPIO", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *boardServiceClient) GetGPIO(ctx context.Context, in *GetGPIORequest, opts ...grpc.CallOption) (*GetGPIOResponse, error) { + out := new(GetGPIOResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/GetGPIO", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *boardServiceClient) PWM(ctx context.Context, in *PWMRequest, opts ...grpc.CallOption) (*PWMResponse, error) { + out := new(PWMResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/PWM", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *boardServiceClient) SetPWM(ctx context.Context, in *SetPWMRequest, opts ...grpc.CallOption) (*SetPWMResponse, error) { + out := new(SetPWMResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/SetPWM", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *boardServiceClient) PWMFrequency(ctx context.Context, in *PWMFrequencyRequest, opts ...grpc.CallOption) (*PWMFrequencyResponse, error) { + out := new(PWMFrequencyResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/PWMFrequency", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *boardServiceClient) SetPWMFrequency(ctx context.Context, in *SetPWMFrequencyRequest, opts ...grpc.CallOption) (*SetPWMFrequencyResponse, error) { + out := new(SetPWMFrequencyResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/SetPWMFrequency", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *boardServiceClient) ReadAnalogReader(ctx context.Context, in *ReadAnalogReaderRequest, opts ...grpc.CallOption) (*ReadAnalogReaderResponse, error) { + out := new(ReadAnalogReaderResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/ReadAnalogReader", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *boardServiceClient) GetDigitalInterruptValue(ctx context.Context, in *GetDigitalInterruptValueRequest, opts ...grpc.CallOption) (*GetDigitalInterruptValueResponse, error) { + out := new(GetDigitalInterruptValueResponse) + err := c.cc.Invoke(ctx, "/viam.component.board.v1.BoardService/GetDigitalInterruptValue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BoardServiceServer is the server API for BoardService service. +// All implementations must embed UnimplementedBoardServiceServer +// for forward compatibility +type BoardServiceServer interface { + Status(context.Context, *StatusRequest) (*StatusResponse, error) + SetGPIO(context.Context, *SetGPIORequest) (*SetGPIOResponse, error) + // GetGPIO gets the high/low state of the given pin of a board of the underlying robot. + GetGPIO(context.Context, *GetGPIORequest) (*GetGPIOResponse, error) + // PWM gets the duty cycle of the given pin of a board of the underlying robot. + PWM(context.Context, *PWMRequest) (*PWMResponse, error) + // SetPWM sets the given pin of a board of the underlying robot to the given duty cycle. + SetPWM(context.Context, *SetPWMRequest) (*SetPWMResponse, error) + // PWMFrequency gets the PWM frequency of the given pin of a board of the underlying robot. + PWMFrequency(context.Context, *PWMFrequencyRequest) (*PWMFrequencyResponse, error) + // SetPWMFrequency sets the given pin of a board of the underlying robot to the given PWM frequency. 0 will use the board's default PWM frequency. + SetPWMFrequency(context.Context, *SetPWMFrequencyRequest) (*SetPWMFrequencyResponse, error) + // ReadAnalogReader reads off the current value of an analog reader of a board of the underlying robot. + ReadAnalogReader(context.Context, *ReadAnalogReaderRequest) (*ReadAnalogReaderResponse, error) + // GetDigitalInterruptValue returns the current value of the interrupt which is based on the type of interrupt. + GetDigitalInterruptValue(context.Context, *GetDigitalInterruptValueRequest) (*GetDigitalInterruptValueResponse, error) + mustEmbedUnimplementedBoardServiceServer() +} + +// UnimplementedBoardServiceServer must be embedded to have forward compatible implementations. +type UnimplementedBoardServiceServer struct { +} + +func (UnimplementedBoardServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") +} +func (UnimplementedBoardServiceServer) SetGPIO(context.Context, *SetGPIORequest) (*SetGPIOResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetGPIO not implemented") +} +func (UnimplementedBoardServiceServer) GetGPIO(context.Context, *GetGPIORequest) (*GetGPIOResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGPIO not implemented") +} +func (UnimplementedBoardServiceServer) PWM(context.Context, *PWMRequest) (*PWMResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PWM not implemented") +} +func (UnimplementedBoardServiceServer) SetPWM(context.Context, *SetPWMRequest) (*SetPWMResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetPWM not implemented") +} +func (UnimplementedBoardServiceServer) PWMFrequency(context.Context, *PWMFrequencyRequest) (*PWMFrequencyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PWMFrequency not implemented") +} +func (UnimplementedBoardServiceServer) SetPWMFrequency(context.Context, *SetPWMFrequencyRequest) (*SetPWMFrequencyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetPWMFrequency not implemented") +} +func (UnimplementedBoardServiceServer) ReadAnalogReader(context.Context, *ReadAnalogReaderRequest) (*ReadAnalogReaderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadAnalogReader not implemented") +} +func (UnimplementedBoardServiceServer) GetDigitalInterruptValue(context.Context, *GetDigitalInterruptValueRequest) (*GetDigitalInterruptValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDigitalInterruptValue not implemented") +} +func (UnimplementedBoardServiceServer) mustEmbedUnimplementedBoardServiceServer() {} + +// UnsafeBoardServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BoardServiceServer will +// result in compilation errors. +type UnsafeBoardServiceServer interface { + mustEmbedUnimplementedBoardServiceServer() +} + +func RegisterBoardServiceServer(s grpc.ServiceRegistrar, srv BoardServiceServer) { + s.RegisterService(&BoardService_ServiceDesc, srv) +} + +func _BoardService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).Status(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/Status", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).Status(ctx, req.(*StatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BoardService_SetGPIO_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetGPIORequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).SetGPIO(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/SetGPIO", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).SetGPIO(ctx, req.(*SetGPIORequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BoardService_GetGPIO_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGPIORequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).GetGPIO(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/GetGPIO", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).GetGPIO(ctx, req.(*GetGPIORequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BoardService_PWM_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PWMRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).PWM(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/PWM", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).PWM(ctx, req.(*PWMRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BoardService_SetPWM_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPWMRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).SetPWM(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/SetPWM", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).SetPWM(ctx, req.(*SetPWMRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BoardService_PWMFrequency_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PWMFrequencyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).PWMFrequency(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/PWMFrequency", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).PWMFrequency(ctx, req.(*PWMFrequencyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BoardService_SetPWMFrequency_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPWMFrequencyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).SetPWMFrequency(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/SetPWMFrequency", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).SetPWMFrequency(ctx, req.(*SetPWMFrequencyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BoardService_ReadAnalogReader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadAnalogReaderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).ReadAnalogReader(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/ReadAnalogReader", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).ReadAnalogReader(ctx, req.(*ReadAnalogReaderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BoardService_GetDigitalInterruptValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDigitalInterruptValueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BoardServiceServer).GetDigitalInterruptValue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.board.v1.BoardService/GetDigitalInterruptValue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BoardServiceServer).GetDigitalInterruptValue(ctx, req.(*GetDigitalInterruptValueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// BoardService_ServiceDesc is the grpc.ServiceDesc for BoardService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BoardService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.board.v1.BoardService", + HandlerType: (*BoardServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Status", + Handler: _BoardService_Status_Handler, + }, + { + MethodName: "SetGPIO", + Handler: _BoardService_SetGPIO_Handler, + }, + { + MethodName: "GetGPIO", + Handler: _BoardService_GetGPIO_Handler, + }, + { + MethodName: "PWM", + Handler: _BoardService_PWM_Handler, + }, + { + MethodName: "SetPWM", + Handler: _BoardService_SetPWM_Handler, + }, + { + MethodName: "PWMFrequency", + Handler: _BoardService_PWMFrequency_Handler, + }, + { + MethodName: "SetPWMFrequency", + Handler: _BoardService_SetPWMFrequency_Handler, + }, + { + MethodName: "ReadAnalogReader", + Handler: _BoardService_ReadAnalogReader_Handler, + }, + { + MethodName: "GetDigitalInterruptValue", + Handler: _BoardService_GetDigitalInterruptValue_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/board/v1/board.proto", +} diff --git a/component/camera/v1/camera.pb.go b/component/camera/v1/camera.pb.go new file mode 100644 index 000000000..d7380b455 --- /dev/null +++ b/component/camera/v1/camera.pb.go @@ -0,0 +1,1218 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/camera/v1/camera.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + httpbody "google.golang.org/genproto/googleapis/api/httpbody" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetImageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a camera + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Requested MIME type of response + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` +} + +func (x *GetImageRequest) Reset() { + *x = GetImageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetImageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetImageRequest) ProtoMessage() {} + +func (x *GetImageRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetImageRequest.ProtoReflect.Descriptor instead. +func (*GetImageRequest) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{0} +} + +func (x *GetImageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetImageRequest) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +type GetImageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Actual MIME type of response + MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // Frame in bytes + Image []byte `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + // Width of frame in px + WidthPx int64 `protobuf:"varint,3,opt,name=width_px,json=widthPx,proto3" json:"width_px,omitempty"` + // Height of frame in px + HeightPx int64 `protobuf:"varint,4,opt,name=height_px,json=heightPx,proto3" json:"height_px,omitempty"` +} + +func (x *GetImageResponse) Reset() { + *x = GetImageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetImageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetImageResponse) ProtoMessage() {} + +func (x *GetImageResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetImageResponse.ProtoReflect.Descriptor instead. +func (*GetImageResponse) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{1} +} + +func (x *GetImageResponse) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *GetImageResponse) GetImage() []byte { + if x != nil { + return x.Image + } + return nil +} + +func (x *GetImageResponse) GetWidthPx() int64 { + if x != nil { + return x.WidthPx + } + return 0 +} + +func (x *GetImageResponse) GetHeightPx() int64 { + if x != nil { + return x.HeightPx + } + return 0 +} + +type RenderFrameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a camera + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Requested MIME type of response + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` +} + +func (x *RenderFrameRequest) Reset() { + *x = RenderFrameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenderFrameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenderFrameRequest) ProtoMessage() {} + +func (x *RenderFrameRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenderFrameRequest.ProtoReflect.Descriptor instead. +func (*RenderFrameRequest) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{2} +} + +func (x *RenderFrameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RenderFrameRequest) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +type GetPointCloudRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a camera + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Requested MIME type of response + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` +} + +func (x *GetPointCloudRequest) Reset() { + *x = GetPointCloudRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPointCloudRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPointCloudRequest) ProtoMessage() {} + +func (x *GetPointCloudRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPointCloudRequest.ProtoReflect.Descriptor instead. +func (*GetPointCloudRequest) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{3} +} + +func (x *GetPointCloudRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetPointCloudRequest) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +type GetPointCloudResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Actual MIME type of response + MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // Frame in bytes + PointCloud []byte `protobuf:"bytes,2,opt,name=point_cloud,json=pointCloud,proto3" json:"point_cloud,omitempty"` +} + +func (x *GetPointCloudResponse) Reset() { + *x = GetPointCloudResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPointCloudResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPointCloudResponse) ProtoMessage() {} + +func (x *GetPointCloudResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPointCloudResponse.ProtoReflect.Descriptor instead. +func (*GetPointCloudResponse) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{4} +} + +func (x *GetPointCloudResponse) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *GetPointCloudResponse) GetPointCloud() []byte { + if x != nil { + return x.PointCloud + } + return nil +} + +type GetPropertiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a camera + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPropertiesRequest) Reset() { + *x = GetPropertiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPropertiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPropertiesRequest) ProtoMessage() {} + +func (x *GetPropertiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPropertiesRequest.ProtoReflect.Descriptor instead. +func (*GetPropertiesRequest) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{5} +} + +func (x *GetPropertiesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetPropertiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A boolean property determining whether the camera supports the return of pointcloud data + SupportsPcd bool `protobuf:"varint,1,opt,name=supports_pcd,json=supportsPcd,proto3" json:"supports_pcd,omitempty"` + // Parameters for doing a perspective of a 3D scene to a 2D plane + IntrinsicParameters *IntrinsicParameters `protobuf:"bytes,2,opt,name=intrinsic_parameters,json=intrinsicParameters,proto3" json:"intrinsic_parameters,omitempty"` + // Parameters for modeling lens distortion in cameras + DistortionParameters *DistortionParameters `protobuf:"bytes,3,opt,name=distortion_parameters,json=distortionParameters,proto3" json:"distortion_parameters,omitempty"` +} + +func (x *GetPropertiesResponse) Reset() { + *x = GetPropertiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPropertiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPropertiesResponse) ProtoMessage() {} + +func (x *GetPropertiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPropertiesResponse.ProtoReflect.Descriptor instead. +func (*GetPropertiesResponse) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{6} +} + +func (x *GetPropertiesResponse) GetSupportsPcd() bool { + if x != nil { + return x.SupportsPcd + } + return false +} + +func (x *GetPropertiesResponse) GetIntrinsicParameters() *IntrinsicParameters { + if x != nil { + return x.IntrinsicParameters + } + return nil +} + +func (x *GetPropertiesResponse) GetDistortionParameters() *DistortionParameters { + if x != nil { + return x.DistortionParameters + } + return nil +} + +type Webcams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Webcams []*Webcam `protobuf:"bytes,1,rep,name=webcams,proto3" json:"webcams,omitempty"` +} + +func (x *Webcams) Reset() { + *x = Webcams{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Webcams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Webcams) ProtoMessage() {} + +func (x *Webcams) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Webcams.ProtoReflect.Descriptor instead. +func (*Webcams) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{7} +} + +func (x *Webcams) GetWebcams() []*Webcam { + if x != nil { + return x.Webcams + } + return nil +} + +type Webcam struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Camera driver label + Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` + // Camera driver status + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + // Camera properties + Properties []*Property `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty"` +} + +func (x *Webcam) Reset() { + *x = Webcam{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Webcam) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Webcam) ProtoMessage() {} + +func (x *Webcam) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Webcam.ProtoReflect.Descriptor instead. +func (*Webcam) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{8} +} + +func (x *Webcam) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *Webcam) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Webcam) GetProperties() []*Property { + if x != nil { + return x.Properties + } + return nil +} + +type Property struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Camera video properties + Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"` + // Video resolution width + Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"` + // Video resolution height + Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + // Video frame format + FrameFormat string `protobuf:"bytes,4,opt,name=frame_format,json=frameFormat,proto3" json:"frame_format,omitempty"` +} + +func (x *Property) Reset() { + *x = Property{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Property) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Property) ProtoMessage() {} + +func (x *Property) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Property.ProtoReflect.Descriptor instead. +func (*Property) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{9} +} + +func (x *Property) GetVideo() *Video { + if x != nil { + return x.Video + } + return nil +} + +func (x *Property) GetWidth() int32 { + if x != nil { + return x.Width + } + return 0 +} + +func (x *Property) GetHeight() int32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *Property) GetFrameFormat() string { + if x != nil { + return x.FrameFormat + } + return "" +} + +type Video struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Video resolution width + Width int32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"` + // Video resolution height + Height int32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + // Video frame format + FrameFormat string `protobuf:"bytes,3,opt,name=frame_format,json=frameFormat,proto3" json:"frame_format,omitempty"` +} + +func (x *Video) Reset() { + *x = Video{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Video) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Video) ProtoMessage() {} + +func (x *Video) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Video.ProtoReflect.Descriptor instead. +func (*Video) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{10} +} + +func (x *Video) GetWidth() int32 { + if x != nil { + return x.Width + } + return 0 +} + +func (x *Video) GetHeight() int32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *Video) GetFrameFormat() string { + if x != nil { + return x.FrameFormat + } + return "" +} + +type IntrinsicParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WidthPx uint32 `protobuf:"varint,1,opt,name=width_px,json=widthPx,proto3" json:"width_px,omitempty"` + HeightPx uint32 `protobuf:"varint,2,opt,name=height_px,json=heightPx,proto3" json:"height_px,omitempty"` + FocalXPx float64 `protobuf:"fixed64,3,opt,name=focal_x_px,json=focalXPx,proto3" json:"focal_x_px,omitempty"` + FocalYPx float64 `protobuf:"fixed64,4,opt,name=focal_y_px,json=focalYPx,proto3" json:"focal_y_px,omitempty"` + CenterXPx float64 `protobuf:"fixed64,5,opt,name=center_x_px,json=centerXPx,proto3" json:"center_x_px,omitempty"` + CenterYPx float64 `protobuf:"fixed64,6,opt,name=center_y_px,json=centerYPx,proto3" json:"center_y_px,omitempty"` +} + +func (x *IntrinsicParameters) Reset() { + *x = IntrinsicParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IntrinsicParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IntrinsicParameters) ProtoMessage() {} + +func (x *IntrinsicParameters) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IntrinsicParameters.ProtoReflect.Descriptor instead. +func (*IntrinsicParameters) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{11} +} + +func (x *IntrinsicParameters) GetWidthPx() uint32 { + if x != nil { + return x.WidthPx + } + return 0 +} + +func (x *IntrinsicParameters) GetHeightPx() uint32 { + if x != nil { + return x.HeightPx + } + return 0 +} + +func (x *IntrinsicParameters) GetFocalXPx() float64 { + if x != nil { + return x.FocalXPx + } + return 0 +} + +func (x *IntrinsicParameters) GetFocalYPx() float64 { + if x != nil { + return x.FocalYPx + } + return 0 +} + +func (x *IntrinsicParameters) GetCenterXPx() float64 { + if x != nil { + return x.CenterXPx + } + return 0 +} + +func (x *IntrinsicParameters) GetCenterYPx() float64 { + if x != nil { + return x.CenterYPx + } + return 0 +} + +type DistortionParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` + Parameters []float64 `protobuf:"fixed64,2,rep,packed,name=parameters,proto3" json:"parameters,omitempty"` +} + +func (x *DistortionParameters) Reset() { + *x = DistortionParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_component_camera_v1_camera_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DistortionParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DistortionParameters) ProtoMessage() {} + +func (x *DistortionParameters) ProtoReflect() protoreflect.Message { + mi := &file_component_camera_v1_camera_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DistortionParameters.ProtoReflect.Descriptor instead. +func (*DistortionParameters) Descriptor() ([]byte, []int) { + return file_component_camera_v1_camera_proto_rawDescGZIP(), []int{12} +} + +func (x *DistortionParameters) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +func (x *DistortionParameters) GetParameters() []float64 { + if x != nil { + return x.Parameters + } + return nil +} + +var File_component_camera_v1_camera_proto protoreflect.FileDescriptor + +var file_component_camera_v1_camera_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, 0x6d, 0x65, + 0x72, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x18, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, 0x64, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x42, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x7d, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x70, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x70, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x78, 0x22, 0x45, 0x0a, 0x12, 0x52, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x47, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x55, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x22, + 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x81, 0x02, 0x0a, 0x15, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x5f, 0x70, 0x63, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x50, 0x63, 0x64, 0x12, 0x60, 0x0a, 0x14, 0x69, 0x6e, 0x74, 0x72, + 0x69, 0x6e, 0x73, 0x69, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x13, 0x69, 0x6e, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x63, 0x0a, 0x15, 0x64, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, + 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x14, 0x64, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, + 0x45, 0x0a, 0x07, 0x57, 0x65, 0x62, 0x63, 0x61, 0x6d, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x77, 0x65, + 0x62, 0x63, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, + 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x63, 0x61, 0x6d, 0x52, 0x07, 0x77, + 0x65, 0x62, 0x63, 0x61, 0x6d, 0x73, 0x22, 0x7a, 0x0a, 0x06, 0x57, 0x65, 0x62, 0x63, 0x61, 0x6d, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, + 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, + 0x35, 0x0a, 0x05, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, + 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, + 0x05, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x58, 0x0a, 0x05, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x22, 0xc9, 0x01, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x72, 0x69, 0x6e, 0x73, 0x69, 0x63, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x5f, 0x70, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x50, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x70, + 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, + 0x78, 0x12, 0x1c, 0x0a, 0x0a, 0x66, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x78, 0x5f, 0x70, 0x78, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x66, 0x6f, 0x63, 0x61, 0x6c, 0x58, 0x50, 0x78, 0x12, + 0x1c, 0x0a, 0x0a, 0x66, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x79, 0x5f, 0x70, 0x78, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x08, 0x66, 0x6f, 0x63, 0x61, 0x6c, 0x59, 0x50, 0x78, 0x12, 0x1e, 0x0a, + 0x0b, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x78, 0x5f, 0x70, 0x78, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x09, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x58, 0x50, 0x78, 0x12, 0x1e, 0x0a, + 0x0b, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x79, 0x5f, 0x70, 0x78, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x09, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x59, 0x50, 0x78, 0x22, 0x4c, 0x0a, + 0x14, 0x44, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x52, + 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x32, 0x8f, 0x05, 0x0a, 0x0d, + 0x43, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01, + 0x0a, 0x08, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, + 0x72, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x69, 0x61, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x33, 0x12, 0x31, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x12, 0xaa, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x12, 0x2e, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, + 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x12, 0xa9, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, + 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x42, 0x43, 0x0a, + 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2e, 0x76, 0x31, 0x5a, 0x23, 0x67, + 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_camera_v1_camera_proto_rawDescOnce sync.Once + file_component_camera_v1_camera_proto_rawDescData = file_component_camera_v1_camera_proto_rawDesc +) + +func file_component_camera_v1_camera_proto_rawDescGZIP() []byte { + file_component_camera_v1_camera_proto_rawDescOnce.Do(func() { + file_component_camera_v1_camera_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_camera_v1_camera_proto_rawDescData) + }) + return file_component_camera_v1_camera_proto_rawDescData +} + +var file_component_camera_v1_camera_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_component_camera_v1_camera_proto_goTypes = []interface{}{ + (*GetImageRequest)(nil), // 0: viam.component.camera.v1.GetImageRequest + (*GetImageResponse)(nil), // 1: viam.component.camera.v1.GetImageResponse + (*RenderFrameRequest)(nil), // 2: viam.component.camera.v1.RenderFrameRequest + (*GetPointCloudRequest)(nil), // 3: viam.component.camera.v1.GetPointCloudRequest + (*GetPointCloudResponse)(nil), // 4: viam.component.camera.v1.GetPointCloudResponse + (*GetPropertiesRequest)(nil), // 5: viam.component.camera.v1.GetPropertiesRequest + (*GetPropertiesResponse)(nil), // 6: viam.component.camera.v1.GetPropertiesResponse + (*Webcams)(nil), // 7: viam.component.camera.v1.Webcams + (*Webcam)(nil), // 8: viam.component.camera.v1.Webcam + (*Property)(nil), // 9: viam.component.camera.v1.Property + (*Video)(nil), // 10: viam.component.camera.v1.Video + (*IntrinsicParameters)(nil), // 11: viam.component.camera.v1.IntrinsicParameters + (*DistortionParameters)(nil), // 12: viam.component.camera.v1.DistortionParameters + (*httpbody.HttpBody)(nil), // 13: google.api.HttpBody +} +var file_component_camera_v1_camera_proto_depIdxs = []int32{ + 11, // 0: viam.component.camera.v1.GetPropertiesResponse.intrinsic_parameters:type_name -> viam.component.camera.v1.IntrinsicParameters + 12, // 1: viam.component.camera.v1.GetPropertiesResponse.distortion_parameters:type_name -> viam.component.camera.v1.DistortionParameters + 8, // 2: viam.component.camera.v1.Webcams.webcams:type_name -> viam.component.camera.v1.Webcam + 9, // 3: viam.component.camera.v1.Webcam.properties:type_name -> viam.component.camera.v1.Property + 10, // 4: viam.component.camera.v1.Property.video:type_name -> viam.component.camera.v1.Video + 0, // 5: viam.component.camera.v1.CameraService.GetImage:input_type -> viam.component.camera.v1.GetImageRequest + 2, // 6: viam.component.camera.v1.CameraService.RenderFrame:input_type -> viam.component.camera.v1.RenderFrameRequest + 3, // 7: viam.component.camera.v1.CameraService.GetPointCloud:input_type -> viam.component.camera.v1.GetPointCloudRequest + 5, // 8: viam.component.camera.v1.CameraService.GetProperties:input_type -> viam.component.camera.v1.GetPropertiesRequest + 1, // 9: viam.component.camera.v1.CameraService.GetImage:output_type -> viam.component.camera.v1.GetImageResponse + 13, // 10: viam.component.camera.v1.CameraService.RenderFrame:output_type -> google.api.HttpBody + 4, // 11: viam.component.camera.v1.CameraService.GetPointCloud:output_type -> viam.component.camera.v1.GetPointCloudResponse + 6, // 12: viam.component.camera.v1.CameraService.GetProperties:output_type -> viam.component.camera.v1.GetPropertiesResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_component_camera_v1_camera_proto_init() } +func file_component_camera_v1_camera_proto_init() { + if File_component_camera_v1_camera_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_camera_v1_camera_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetImageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetImageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenderFrameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPointCloudRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPointCloudResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPropertiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPropertiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Webcams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Webcam); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Property); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Video); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IntrinsicParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_camera_v1_camera_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DistortionParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_camera_v1_camera_proto_rawDesc, + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_camera_v1_camera_proto_goTypes, + DependencyIndexes: file_component_camera_v1_camera_proto_depIdxs, + MessageInfos: file_component_camera_v1_camera_proto_msgTypes, + }.Build() + File_component_camera_v1_camera_proto = out.File + file_component_camera_v1_camera_proto_rawDesc = nil + file_component_camera_v1_camera_proto_goTypes = nil + file_component_camera_v1_camera_proto_depIdxs = nil +} diff --git a/component/camera/v1/camera.pb.gw.go b/component/camera/v1/camera.pb.gw.go new file mode 100644 index 000000000..ed4b551f5 --- /dev/null +++ b/component/camera/v1/camera.pb.gw.go @@ -0,0 +1,544 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/camera/v1/camera.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_CameraService_GetImage_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_CameraService_GetImage_0(ctx context.Context, marshaler runtime.Marshaler, client CameraServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetImageRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CameraService_GetImage_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetImage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CameraService_GetImage_0(ctx context.Context, marshaler runtime.Marshaler, server CameraServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetImageRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CameraService_GetImage_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetImage(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_CameraService_RenderFrame_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_CameraService_RenderFrame_0(ctx context.Context, marshaler runtime.Marshaler, client CameraServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RenderFrameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CameraService_RenderFrame_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RenderFrame(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CameraService_RenderFrame_0(ctx context.Context, marshaler runtime.Marshaler, server CameraServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RenderFrameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CameraService_RenderFrame_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RenderFrame(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_CameraService_GetPointCloud_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_CameraService_GetPointCloud_0(ctx context.Context, marshaler runtime.Marshaler, client CameraServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPointCloudRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CameraService_GetPointCloud_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetPointCloud(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CameraService_GetPointCloud_0(ctx context.Context, marshaler runtime.Marshaler, server CameraServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPointCloudRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CameraService_GetPointCloud_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetPointCloud(ctx, &protoReq) + return msg, metadata, err + +} + +func request_CameraService_GetProperties_0(ctx context.Context, marshaler runtime.Marshaler, client CameraServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPropertiesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetProperties(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CameraService_GetProperties_0(ctx context.Context, marshaler runtime.Marshaler, server CameraServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPropertiesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetProperties(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterCameraServiceHandlerServer registers the http handlers for service CameraService to "mux". +// UnaryRPC :call CameraServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCameraServiceHandlerFromEndpoint instead. +func RegisterCameraServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CameraServiceServer) error { + + mux.Handle("GET", pattern_CameraService_GetImage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/GetImage", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/image")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CameraService_GetImage_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_GetImage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CameraService_RenderFrame_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/RenderFrame", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/render_frame")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CameraService_RenderFrame_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_RenderFrame_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CameraService_GetPointCloud_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/GetPointCloud", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/point_cloud")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CameraService_GetPointCloud_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_GetPointCloud_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CameraService_GetProperties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/GetProperties", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/properties")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CameraService_GetProperties_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_GetProperties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterCameraServiceHandlerFromEndpoint is same as RegisterCameraServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterCameraServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterCameraServiceHandler(ctx, mux, conn) +} + +// RegisterCameraServiceHandler registers the http handlers for service CameraService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterCameraServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterCameraServiceHandlerClient(ctx, mux, NewCameraServiceClient(conn)) +} + +// RegisterCameraServiceHandlerClient registers the http handlers for service CameraService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CameraServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CameraServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "CameraServiceClient" to call the correct interceptors. +func RegisterCameraServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CameraServiceClient) error { + + mux.Handle("GET", pattern_CameraService_GetImage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/GetImage", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/image")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CameraService_GetImage_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_GetImage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CameraService_RenderFrame_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/RenderFrame", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/render_frame")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CameraService_RenderFrame_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_RenderFrame_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CameraService_GetPointCloud_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/GetPointCloud", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/point_cloud")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CameraService_GetPointCloud_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_GetPointCloud_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CameraService_GetProperties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.camera.v1.CameraService/GetProperties", runtime.WithHTTPPathPattern("/viam/api/v1/component/camera/{name}/properties")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CameraService_GetProperties_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CameraService_GetProperties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_CameraService_GetImage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "camera", "name", "image"}, "")) + + pattern_CameraService_RenderFrame_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "camera", "name", "render_frame"}, "")) + + pattern_CameraService_GetPointCloud_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "camera", "name", "point_cloud"}, "")) + + pattern_CameraService_GetProperties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "camera", "name", "properties"}, "")) +) + +var ( + forward_CameraService_GetImage_0 = runtime.ForwardResponseMessage + + forward_CameraService_RenderFrame_0 = runtime.ForwardResponseMessage + + forward_CameraService_GetPointCloud_0 = runtime.ForwardResponseMessage + + forward_CameraService_GetProperties_0 = runtime.ForwardResponseMessage +) diff --git a/component/camera/v1/camera_grpc.pb.go b/component/camera/v1/camera_grpc.pb.go new file mode 100644 index 000000000..2f9cbcc9b --- /dev/null +++ b/component/camera/v1/camera_grpc.pb.go @@ -0,0 +1,224 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + httpbody "google.golang.org/genproto/googleapis/api/httpbody" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// CameraServiceClient is the client API for CameraService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CameraServiceClient interface { + // GetImage returns a frame from a camera of the underlying robot. A specific MIME type + // can be requested but may not necessarily be the same one returned. + GetImage(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*GetImageResponse, error) + // RenderFrame renders a frame from a camera of the underlying robot to an HTTP response. A specific MIME type + // can be requested but may not necessarily be the same one returned. + RenderFrame(ctx context.Context, in *RenderFrameRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) + // GetPointCloud returns a point cloud from a camera of the underlying robot. A specific MIME type + // can be requested but may not necessarily be the same one returned. + GetPointCloud(ctx context.Context, in *GetPointCloudRequest, opts ...grpc.CallOption) (*GetPointCloudResponse, error) + // GetProperties returns the camera intrinsic parameters and camera distortion parameters from a camera of the underlying robot, if available. + GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) +} + +type cameraServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCameraServiceClient(cc grpc.ClientConnInterface) CameraServiceClient { + return &cameraServiceClient{cc} +} + +func (c *cameraServiceClient) GetImage(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*GetImageResponse, error) { + out := new(GetImageResponse) + err := c.cc.Invoke(ctx, "/viam.component.camera.v1.CameraService/GetImage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cameraServiceClient) RenderFrame(ctx context.Context, in *RenderFrameRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) { + out := new(httpbody.HttpBody) + err := c.cc.Invoke(ctx, "/viam.component.camera.v1.CameraService/RenderFrame", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cameraServiceClient) GetPointCloud(ctx context.Context, in *GetPointCloudRequest, opts ...grpc.CallOption) (*GetPointCloudResponse, error) { + out := new(GetPointCloudResponse) + err := c.cc.Invoke(ctx, "/viam.component.camera.v1.CameraService/GetPointCloud", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cameraServiceClient) GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) { + out := new(GetPropertiesResponse) + err := c.cc.Invoke(ctx, "/viam.component.camera.v1.CameraService/GetProperties", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CameraServiceServer is the server API for CameraService service. +// All implementations must embed UnimplementedCameraServiceServer +// for forward compatibility +type CameraServiceServer interface { + // GetImage returns a frame from a camera of the underlying robot. A specific MIME type + // can be requested but may not necessarily be the same one returned. + GetImage(context.Context, *GetImageRequest) (*GetImageResponse, error) + // RenderFrame renders a frame from a camera of the underlying robot to an HTTP response. A specific MIME type + // can be requested but may not necessarily be the same one returned. + RenderFrame(context.Context, *RenderFrameRequest) (*httpbody.HttpBody, error) + // GetPointCloud returns a point cloud from a camera of the underlying robot. A specific MIME type + // can be requested but may not necessarily be the same one returned. + GetPointCloud(context.Context, *GetPointCloudRequest) (*GetPointCloudResponse, error) + // GetProperties returns the camera intrinsic parameters and camera distortion parameters from a camera of the underlying robot, if available. + GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) + mustEmbedUnimplementedCameraServiceServer() +} + +// UnimplementedCameraServiceServer must be embedded to have forward compatible implementations. +type UnimplementedCameraServiceServer struct { +} + +func (UnimplementedCameraServiceServer) GetImage(context.Context, *GetImageRequest) (*GetImageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetImage not implemented") +} +func (UnimplementedCameraServiceServer) RenderFrame(context.Context, *RenderFrameRequest) (*httpbody.HttpBody, error) { + return nil, status.Errorf(codes.Unimplemented, "method RenderFrame not implemented") +} +func (UnimplementedCameraServiceServer) GetPointCloud(context.Context, *GetPointCloudRequest) (*GetPointCloudResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPointCloud not implemented") +} +func (UnimplementedCameraServiceServer) GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProperties not implemented") +} +func (UnimplementedCameraServiceServer) mustEmbedUnimplementedCameraServiceServer() {} + +// UnsafeCameraServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CameraServiceServer will +// result in compilation errors. +type UnsafeCameraServiceServer interface { + mustEmbedUnimplementedCameraServiceServer() +} + +func RegisterCameraServiceServer(s grpc.ServiceRegistrar, srv CameraServiceServer) { + s.RegisterService(&CameraService_ServiceDesc, srv) +} + +func _CameraService_GetImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetImageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CameraServiceServer).GetImage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.camera.v1.CameraService/GetImage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CameraServiceServer).GetImage(ctx, req.(*GetImageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CameraService_RenderFrame_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RenderFrameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CameraServiceServer).RenderFrame(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.camera.v1.CameraService/RenderFrame", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CameraServiceServer).RenderFrame(ctx, req.(*RenderFrameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CameraService_GetPointCloud_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPointCloudRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CameraServiceServer).GetPointCloud(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.camera.v1.CameraService/GetPointCloud", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CameraServiceServer).GetPointCloud(ctx, req.(*GetPointCloudRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CameraService_GetProperties_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPropertiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CameraServiceServer).GetProperties(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.camera.v1.CameraService/GetProperties", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CameraServiceServer).GetProperties(ctx, req.(*GetPropertiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CameraService_ServiceDesc is the grpc.ServiceDesc for CameraService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CameraService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.camera.v1.CameraService", + HandlerType: (*CameraServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetImage", + Handler: _CameraService_GetImage_Handler, + }, + { + MethodName: "RenderFrame", + Handler: _CameraService_RenderFrame_Handler, + }, + { + MethodName: "GetPointCloud", + Handler: _CameraService_GetPointCloud_Handler, + }, + { + MethodName: "GetProperties", + Handler: _CameraService_GetProperties_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/camera/v1/camera.proto", +} diff --git a/component/gantry/v1/gantry.pb.go b/component/gantry/v1/gantry.pb.go new file mode 100644 index 000000000..396fd1400 --- /dev/null +++ b/component/gantry/v1/gantry.pb.go @@ -0,0 +1,787 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/gantry/v1/gantry.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetPositionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GetPositionRequest) Reset() { + *x = GetPositionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionRequest) ProtoMessage() {} + +func (x *GetPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionRequest.ProtoReflect.Descriptor instead. +func (*GetPositionRequest) Descriptor() ([]byte, []int) { + return file_component_gantry_v1_gantry_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPositionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetPositionRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GetPositionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PositionsMm []float64 `protobuf:"fixed64,1,rep,packed,name=positions_mm,json=positionsMm,proto3" json:"positions_mm,omitempty"` +} + +func (x *GetPositionResponse) Reset() { + *x = GetPositionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionResponse) ProtoMessage() {} + +func (x *GetPositionResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionResponse.ProtoReflect.Descriptor instead. +func (*GetPositionResponse) Descriptor() ([]byte, []int) { + return file_component_gantry_v1_gantry_proto_rawDescGZIP(), []int{1} +} + +func (x *GetPositionResponse) GetPositionsMm() []float64 { + if x != nil { + return x.PositionsMm + } + return nil +} + +type MoveToPositionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + PositionsMm []float64 `protobuf:"fixed64,2,rep,packed,name=positions_mm,json=positionsMm,proto3" json:"positions_mm,omitempty"` + WorldState *v1.WorldState `protobuf:"bytes,3,opt,name=world_state,json=worldState,proto3,oneof" json:"world_state,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *MoveToPositionRequest) Reset() { + *x = MoveToPositionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveToPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveToPositionRequest) ProtoMessage() {} + +func (x *MoveToPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveToPositionRequest.ProtoReflect.Descriptor instead. +func (*MoveToPositionRequest) Descriptor() ([]byte, []int) { + return file_component_gantry_v1_gantry_proto_rawDescGZIP(), []int{2} +} + +func (x *MoveToPositionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MoveToPositionRequest) GetPositionsMm() []float64 { + if x != nil { + return x.PositionsMm + } + return nil +} + +func (x *MoveToPositionRequest) GetWorldState() *v1.WorldState { + if x != nil { + return x.WorldState + } + return nil +} + +func (x *MoveToPositionRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type MoveToPositionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MoveToPositionResponse) Reset() { + *x = MoveToPositionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveToPositionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveToPositionResponse) ProtoMessage() {} + +func (x *MoveToPositionResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveToPositionResponse.ProtoReflect.Descriptor instead. +func (*MoveToPositionResponse) Descriptor() ([]byte, []int) { + return file_component_gantry_v1_gantry_proto_rawDescGZIP(), []int{3} +} + +type GetLengthsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GetLengthsRequest) Reset() { + *x = GetLengthsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLengthsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLengthsRequest) ProtoMessage() {} + +func (x *GetLengthsRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLengthsRequest.ProtoReflect.Descriptor instead. +func (*GetLengthsRequest) Descriptor() ([]byte, []int) { + return file_component_gantry_v1_gantry_proto_rawDescGZIP(), []int{4} +} + +func (x *GetLengthsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetLengthsRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GetLengthsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LengthsMm []float64 `protobuf:"fixed64,1,rep,packed,name=lengths_mm,json=lengthsMm,proto3" json:"lengths_mm,omitempty"` +} + +func (x *GetLengthsResponse) Reset() { + *x = GetLengthsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLengthsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLengthsResponse) ProtoMessage() {} + +func (x *GetLengthsResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLengthsResponse.ProtoReflect.Descriptor instead. +func (*GetLengthsResponse) Descriptor() ([]byte, []int) { + return file_component_gantry_v1_gantry_proto_rawDescGZIP(), []int{5} +} + +func (x *GetLengthsResponse) GetLengthsMm() []float64 { + if x != nil { + return x.LengthsMm + } + return nil +} + +type StopRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a gantry + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *StopRequest) Reset() { + *x = StopRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopRequest) ProtoMessage() {} + +func (x *StopRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopRequest.ProtoReflect.Descriptor instead. +func (*StopRequest) Descriptor() ([]byte, []int) { + return file_component_gantry_v1_gantry_proto_rawDescGZIP(), []int{6} +} + +func (x *StopRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StopRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type StopResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StopResponse) Reset() { + *x = StopResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopResponse) ProtoMessage() {} + +func (x *StopResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopResponse.ProtoReflect.Descriptor instead. +func (*StopResponse) Descriptor() ([]byte, []int) { + return file_component_gantry_v1_gantry_proto_rawDescGZIP(), []int{7} +} + +type Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PositionsMm []float64 `protobuf:"fixed64,1,rep,packed,name=positions_mm,json=positionsMm,proto3" json:"positions_mm,omitempty"` + LengthsMm []float64 `protobuf:"fixed64,2,rep,packed,name=lengths_mm,json=lengthsMm,proto3" json:"lengths_mm,omitempty"` + IsMoving bool `protobuf:"varint,3,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"` +} + +func (x *Status) Reset() { + *x = Status{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_component_gantry_v1_gantry_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_component_gantry_v1_gantry_proto_rawDescGZIP(), []int{8} +} + +func (x *Status) GetPositionsMm() []float64 { + if x != nil { + return x.PositionsMm + } + return nil +} + +func (x *Status) GetLengthsMm() []float64 { + if x != nil { + return x.LengthsMm + } + return nil +} + +func (x *Status) GetIsMoving() bool { + if x != nil { + return x.IsMoving + } + return false +} + +var File_component_gantry_v1_gantry_proto protoreflect.FileDescriptor + +var file_component_gantry_v1_gantry_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x18, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x57, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x38, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6d, 0x6d, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x4d, 0x6d, 0x22, 0xcf, 0x01, 0x0a, 0x15, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6d, + 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x4d, 0x6d, 0x12, 0x40, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, + 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x56, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x33, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x5f, 0x6d, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x01, 0x52, 0x09, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x4d, 0x6d, 0x22, 0x50, 0x0a, 0x0b, + 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x0e, + 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6d, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0b, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x5f, 0x6d, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x52, + 0x09, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x4d, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, + 0x5f, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, + 0x73, 0x4d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x32, 0x8b, 0x05, 0x0a, 0x0d, 0x47, 0x61, 0x6e, 0x74, + 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x0b, 0x47, 0x65, + 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, + 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xaa, 0x01, + 0x0a, 0x0e, 0x4d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, + 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x30, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, + 0x65, 0x54, 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x1a, 0x2d, 0x2f, 0x76, 0x69, + 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x9d, 0x01, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, + 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x04, 0x53, + 0x74, 0x6f, 0x70, 0x12, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x29, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x42, 0x43, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x61, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2f, 0x67, 0x61, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_component_gantry_v1_gantry_proto_rawDescOnce sync.Once + file_component_gantry_v1_gantry_proto_rawDescData = file_component_gantry_v1_gantry_proto_rawDesc +) + +func file_component_gantry_v1_gantry_proto_rawDescGZIP() []byte { + file_component_gantry_v1_gantry_proto_rawDescOnce.Do(func() { + file_component_gantry_v1_gantry_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_gantry_v1_gantry_proto_rawDescData) + }) + return file_component_gantry_v1_gantry_proto_rawDescData +} + +var file_component_gantry_v1_gantry_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_component_gantry_v1_gantry_proto_goTypes = []interface{}{ + (*GetPositionRequest)(nil), // 0: viam.component.gantry.v1.GetPositionRequest + (*GetPositionResponse)(nil), // 1: viam.component.gantry.v1.GetPositionResponse + (*MoveToPositionRequest)(nil), // 2: viam.component.gantry.v1.MoveToPositionRequest + (*MoveToPositionResponse)(nil), // 3: viam.component.gantry.v1.MoveToPositionResponse + (*GetLengthsRequest)(nil), // 4: viam.component.gantry.v1.GetLengthsRequest + (*GetLengthsResponse)(nil), // 5: viam.component.gantry.v1.GetLengthsResponse + (*StopRequest)(nil), // 6: viam.component.gantry.v1.StopRequest + (*StopResponse)(nil), // 7: viam.component.gantry.v1.StopResponse + (*Status)(nil), // 8: viam.component.gantry.v1.Status + (*structpb.Struct)(nil), // 9: google.protobuf.Struct + (*v1.WorldState)(nil), // 10: viam.common.v1.WorldState +} +var file_component_gantry_v1_gantry_proto_depIdxs = []int32{ + 9, // 0: viam.component.gantry.v1.GetPositionRequest.extra:type_name -> google.protobuf.Struct + 10, // 1: viam.component.gantry.v1.MoveToPositionRequest.world_state:type_name -> viam.common.v1.WorldState + 9, // 2: viam.component.gantry.v1.MoveToPositionRequest.extra:type_name -> google.protobuf.Struct + 9, // 3: viam.component.gantry.v1.GetLengthsRequest.extra:type_name -> google.protobuf.Struct + 9, // 4: viam.component.gantry.v1.StopRequest.extra:type_name -> google.protobuf.Struct + 0, // 5: viam.component.gantry.v1.GantryService.GetPosition:input_type -> viam.component.gantry.v1.GetPositionRequest + 2, // 6: viam.component.gantry.v1.GantryService.MoveToPosition:input_type -> viam.component.gantry.v1.MoveToPositionRequest + 4, // 7: viam.component.gantry.v1.GantryService.GetLengths:input_type -> viam.component.gantry.v1.GetLengthsRequest + 6, // 8: viam.component.gantry.v1.GantryService.Stop:input_type -> viam.component.gantry.v1.StopRequest + 1, // 9: viam.component.gantry.v1.GantryService.GetPosition:output_type -> viam.component.gantry.v1.GetPositionResponse + 3, // 10: viam.component.gantry.v1.GantryService.MoveToPosition:output_type -> viam.component.gantry.v1.MoveToPositionResponse + 5, // 11: viam.component.gantry.v1.GantryService.GetLengths:output_type -> viam.component.gantry.v1.GetLengthsResponse + 7, // 12: viam.component.gantry.v1.GantryService.Stop:output_type -> viam.component.gantry.v1.StopResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_component_gantry_v1_gantry_proto_init() } +func file_component_gantry_v1_gantry_proto_init() { + if File_component_gantry_v1_gantry_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_gantry_v1_gantry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gantry_v1_gantry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gantry_v1_gantry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveToPositionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gantry_v1_gantry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveToPositionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gantry_v1_gantry_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLengthsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gantry_v1_gantry_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLengthsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gantry_v1_gantry_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gantry_v1_gantry_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gantry_v1_gantry_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_component_gantry_v1_gantry_proto_msgTypes[2].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_gantry_v1_gantry_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_gantry_v1_gantry_proto_goTypes, + DependencyIndexes: file_component_gantry_v1_gantry_proto_depIdxs, + MessageInfos: file_component_gantry_v1_gantry_proto_msgTypes, + }.Build() + File_component_gantry_v1_gantry_proto = out.File + file_component_gantry_v1_gantry_proto_rawDesc = nil + file_component_gantry_v1_gantry_proto_goTypes = nil + file_component_gantry_v1_gantry_proto_depIdxs = nil +} diff --git a/component/gantry/v1/gantry.pb.gw.go b/component/gantry/v1/gantry.pb.gw.go new file mode 100644 index 000000000..a7e7bc367 --- /dev/null +++ b/component/gantry/v1/gantry.pb.gw.go @@ -0,0 +1,562 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/gantry/v1/gantry.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_GantryService_GetPosition_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_GantryService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, client GantryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GantryService_GetPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GantryService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, server GantryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GantryService_GetPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetPosition(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_GantryService_MoveToPosition_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_GantryService_MoveToPosition_0(ctx context.Context, marshaler runtime.Marshaler, client GantryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveToPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GantryService_MoveToPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MoveToPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GantryService_MoveToPosition_0(ctx context.Context, marshaler runtime.Marshaler, server GantryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveToPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GantryService_MoveToPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MoveToPosition(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_GantryService_GetLengths_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_GantryService_GetLengths_0(ctx context.Context, marshaler runtime.Marshaler, client GantryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLengthsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GantryService_GetLengths_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetLengths(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GantryService_GetLengths_0(ctx context.Context, marshaler runtime.Marshaler, server GantryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLengthsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GantryService_GetLengths_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetLengths(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_GantryService_Stop_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_GantryService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, client GantryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GantryService_Stop_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Stop(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GantryService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, server GantryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GantryService_Stop_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Stop(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterGantryServiceHandlerServer registers the http handlers for service GantryService to "mux". +// UnaryRPC :call GantryServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGantryServiceHandlerFromEndpoint instead. +func RegisterGantryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GantryServiceServer) error { + + mux.Handle("GET", pattern_GantryService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GantryService_GetPosition_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_GantryService_MoveToPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/MoveToPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GantryService_MoveToPosition_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_MoveToPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GantryService_GetLengths_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/GetLengths", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/lengths")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GantryService_GetLengths_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_GetLengths_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_GantryService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GantryService_Stop_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterGantryServiceHandlerFromEndpoint is same as RegisterGantryServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterGantryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterGantryServiceHandler(ctx, mux, conn) +} + +// RegisterGantryServiceHandler registers the http handlers for service GantryService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterGantryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterGantryServiceHandlerClient(ctx, mux, NewGantryServiceClient(conn)) +} + +// RegisterGantryServiceHandlerClient registers the http handlers for service GantryService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GantryServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GantryServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "GantryServiceClient" to call the correct interceptors. +func RegisterGantryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GantryServiceClient) error { + + mux.Handle("GET", pattern_GantryService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GantryService_GetPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_GantryService_MoveToPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/MoveToPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GantryService_MoveToPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_MoveToPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GantryService_GetLengths_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/GetLengths", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/lengths")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GantryService_GetLengths_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_GetLengths_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_GantryService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.gantry.v1.GantryService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/gantry/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GantryService_Stop_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GantryService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_GantryService_GetPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gantry", "name", "position"}, "")) + + pattern_GantryService_MoveToPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gantry", "name", "position"}, "")) + + pattern_GantryService_GetLengths_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gantry", "name", "lengths"}, "")) + + pattern_GantryService_Stop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gantry", "name", "stop"}, "")) +) + +var ( + forward_GantryService_GetPosition_0 = runtime.ForwardResponseMessage + + forward_GantryService_MoveToPosition_0 = runtime.ForwardResponseMessage + + forward_GantryService_GetLengths_0 = runtime.ForwardResponseMessage + + forward_GantryService_Stop_0 = runtime.ForwardResponseMessage +) diff --git a/component/gantry/v1/gantry_grpc.pb.go b/component/gantry/v1/gantry_grpc.pb.go new file mode 100644 index 000000000..6f2d1768f --- /dev/null +++ b/component/gantry/v1/gantry_grpc.pb.go @@ -0,0 +1,217 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// GantryServiceClient is the client API for GantryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GantryServiceClient interface { + // GetPosition gets the current position of a gantry of the underlying robot. + GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) + // MoveToPosition moves a gantry of the underlying robot to the requested position. + MoveToPosition(ctx context.Context, in *MoveToPositionRequest, opts ...grpc.CallOption) (*MoveToPositionResponse, error) + // GetLengths gets the lengths of a gantry of the underlying robot. + GetLengths(ctx context.Context, in *GetLengthsRequest, opts ...grpc.CallOption) (*GetLengthsResponse, error) + // Stop stops a robot's gantry + Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) +} + +type gantryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGantryServiceClient(cc grpc.ClientConnInterface) GantryServiceClient { + return &gantryServiceClient{cc} +} + +func (c *gantryServiceClient) GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) { + out := new(GetPositionResponse) + err := c.cc.Invoke(ctx, "/viam.component.gantry.v1.GantryService/GetPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gantryServiceClient) MoveToPosition(ctx context.Context, in *MoveToPositionRequest, opts ...grpc.CallOption) (*MoveToPositionResponse, error) { + out := new(MoveToPositionResponse) + err := c.cc.Invoke(ctx, "/viam.component.gantry.v1.GantryService/MoveToPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gantryServiceClient) GetLengths(ctx context.Context, in *GetLengthsRequest, opts ...grpc.CallOption) (*GetLengthsResponse, error) { + out := new(GetLengthsResponse) + err := c.cc.Invoke(ctx, "/viam.component.gantry.v1.GantryService/GetLengths", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gantryServiceClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { + out := new(StopResponse) + err := c.cc.Invoke(ctx, "/viam.component.gantry.v1.GantryService/Stop", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GantryServiceServer is the server API for GantryService service. +// All implementations must embed UnimplementedGantryServiceServer +// for forward compatibility +type GantryServiceServer interface { + // GetPosition gets the current position of a gantry of the underlying robot. + GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) + // MoveToPosition moves a gantry of the underlying robot to the requested position. + MoveToPosition(context.Context, *MoveToPositionRequest) (*MoveToPositionResponse, error) + // GetLengths gets the lengths of a gantry of the underlying robot. + GetLengths(context.Context, *GetLengthsRequest) (*GetLengthsResponse, error) + // Stop stops a robot's gantry + Stop(context.Context, *StopRequest) (*StopResponse, error) + mustEmbedUnimplementedGantryServiceServer() +} + +// UnimplementedGantryServiceServer must be embedded to have forward compatible implementations. +type UnimplementedGantryServiceServer struct { +} + +func (UnimplementedGantryServiceServer) GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPosition not implemented") +} +func (UnimplementedGantryServiceServer) MoveToPosition(context.Context, *MoveToPositionRequest) (*MoveToPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveToPosition not implemented") +} +func (UnimplementedGantryServiceServer) GetLengths(context.Context, *GetLengthsRequest) (*GetLengthsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLengths not implemented") +} +func (UnimplementedGantryServiceServer) Stop(context.Context, *StopRequest) (*StopResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (UnimplementedGantryServiceServer) mustEmbedUnimplementedGantryServiceServer() {} + +// UnsafeGantryServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GantryServiceServer will +// result in compilation errors. +type UnsafeGantryServiceServer interface { + mustEmbedUnimplementedGantryServiceServer() +} + +func RegisterGantryServiceServer(s grpc.ServiceRegistrar, srv GantryServiceServer) { + s.RegisterService(&GantryService_ServiceDesc, srv) +} + +func _GantryService_GetPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GantryServiceServer).GetPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.gantry.v1.GantryService/GetPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GantryServiceServer).GetPosition(ctx, req.(*GetPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GantryService_MoveToPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveToPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GantryServiceServer).MoveToPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.gantry.v1.GantryService/MoveToPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GantryServiceServer).MoveToPosition(ctx, req.(*MoveToPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GantryService_GetLengths_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLengthsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GantryServiceServer).GetLengths(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.gantry.v1.GantryService/GetLengths", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GantryServiceServer).GetLengths(ctx, req.(*GetLengthsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GantryService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GantryServiceServer).Stop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.gantry.v1.GantryService/Stop", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GantryServiceServer).Stop(ctx, req.(*StopRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GantryService_ServiceDesc is the grpc.ServiceDesc for GantryService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GantryService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.gantry.v1.GantryService", + HandlerType: (*GantryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPosition", + Handler: _GantryService_GetPosition_Handler, + }, + { + MethodName: "MoveToPosition", + Handler: _GantryService_MoveToPosition_Handler, + }, + { + MethodName: "GetLengths", + Handler: _GantryService_GetLengths_Handler, + }, + { + MethodName: "Stop", + Handler: _GantryService_Stop_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/gantry/v1/gantry.proto", +} diff --git a/component/generic/v1/generic.pb.go b/component/generic/v1/generic.pb.go new file mode 100644 index 000000000..4a78fac31 --- /dev/null +++ b/component/generic/v1/generic.pb.go @@ -0,0 +1,246 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/generic/v1/generic.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DoCommandRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Command *structpb.Struct `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"` +} + +func (x *DoCommandRequest) Reset() { + *x = DoCommandRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_generic_v1_generic_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoCommandRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoCommandRequest) ProtoMessage() {} + +func (x *DoCommandRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_generic_v1_generic_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoCommandRequest.ProtoReflect.Descriptor instead. +func (*DoCommandRequest) Descriptor() ([]byte, []int) { + return file_component_generic_v1_generic_proto_rawDescGZIP(), []int{0} +} + +func (x *DoCommandRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DoCommandRequest) GetCommand() *structpb.Struct { + if x != nil { + return x.Command + } + return nil +} + +type DoCommandResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *structpb.Struct `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *DoCommandResponse) Reset() { + *x = DoCommandResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_generic_v1_generic_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoCommandResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoCommandResponse) ProtoMessage() {} + +func (x *DoCommandResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_generic_v1_generic_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoCommandResponse.ProtoReflect.Descriptor instead. +func (*DoCommandResponse) Descriptor() ([]byte, []int) { + return file_component_generic_v1_generic_proto_rawDescGZIP(), []int{1} +} + +func (x *DoCommandResponse) GetResult() *structpb.Struct { + if x != nil { + return x.Result + } + return nil +} + +var File_component_generic_v1_generic_proto protoreflect.FileDescriptor + +var file_component_generic_v1_generic_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x10, 0x44, + 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x44, 0x0a, 0x11, 0x44, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0xb3, 0x01, 0x0a, + 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0xa0, 0x01, 0x0a, 0x09, 0x44, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x2b, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, + 0x22, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x42, 0x45, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x2e, 0x76, 0x31, 0x5a, 0x24, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_component_generic_v1_generic_proto_rawDescOnce sync.Once + file_component_generic_v1_generic_proto_rawDescData = file_component_generic_v1_generic_proto_rawDesc +) + +func file_component_generic_v1_generic_proto_rawDescGZIP() []byte { + file_component_generic_v1_generic_proto_rawDescOnce.Do(func() { + file_component_generic_v1_generic_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_generic_v1_generic_proto_rawDescData) + }) + return file_component_generic_v1_generic_proto_rawDescData +} + +var file_component_generic_v1_generic_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_component_generic_v1_generic_proto_goTypes = []interface{}{ + (*DoCommandRequest)(nil), // 0: viam.component.generic.v1.DoCommandRequest + (*DoCommandResponse)(nil), // 1: viam.component.generic.v1.DoCommandResponse + (*structpb.Struct)(nil), // 2: google.protobuf.Struct +} +var file_component_generic_v1_generic_proto_depIdxs = []int32{ + 2, // 0: viam.component.generic.v1.DoCommandRequest.command:type_name -> google.protobuf.Struct + 2, // 1: viam.component.generic.v1.DoCommandResponse.result:type_name -> google.protobuf.Struct + 0, // 2: viam.component.generic.v1.GenericService.DoCommand:input_type -> viam.component.generic.v1.DoCommandRequest + 1, // 3: viam.component.generic.v1.GenericService.DoCommand:output_type -> viam.component.generic.v1.DoCommandResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_component_generic_v1_generic_proto_init() } +func file_component_generic_v1_generic_proto_init() { + if File_component_generic_v1_generic_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_generic_v1_generic_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoCommandRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_generic_v1_generic_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoCommandResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_generic_v1_generic_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_generic_v1_generic_proto_goTypes, + DependencyIndexes: file_component_generic_v1_generic_proto_depIdxs, + MessageInfos: file_component_generic_v1_generic_proto_msgTypes, + }.Build() + File_component_generic_v1_generic_proto = out.File + file_component_generic_v1_generic_proto_rawDesc = nil + file_component_generic_v1_generic_proto_goTypes = nil + file_component_generic_v1_generic_proto_depIdxs = nil +} diff --git a/component/generic/v1/generic.pb.gw.go b/component/generic/v1/generic.pb.gw.go new file mode 100644 index 000000000..fd08acaca --- /dev/null +++ b/component/generic/v1/generic.pb.gw.go @@ -0,0 +1,205 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/generic/v1/generic.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_GenericService_DoCommand_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_GenericService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client GenericServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DoCommandRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GenericService_DoCommand_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DoCommand(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GenericService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server GenericServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DoCommandRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_GenericService_DoCommand_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DoCommand(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterGenericServiceHandlerServer registers the http handlers for service GenericService to "mux". +// UnaryRPC :call GenericServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGenericServiceHandlerFromEndpoint instead. +func RegisterGenericServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GenericServiceServer) error { + + mux.Handle("POST", pattern_GenericService_DoCommand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.generic.v1.GenericService/DoCommand", runtime.WithHTTPPathPattern("/viam/api/v1/component/generic/{name}/do_command")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GenericService_DoCommand_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GenericService_DoCommand_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterGenericServiceHandlerFromEndpoint is same as RegisterGenericServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterGenericServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterGenericServiceHandler(ctx, mux, conn) +} + +// RegisterGenericServiceHandler registers the http handlers for service GenericService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterGenericServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterGenericServiceHandlerClient(ctx, mux, NewGenericServiceClient(conn)) +} + +// RegisterGenericServiceHandlerClient registers the http handlers for service GenericService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GenericServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GenericServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "GenericServiceClient" to call the correct interceptors. +func RegisterGenericServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GenericServiceClient) error { + + mux.Handle("POST", pattern_GenericService_DoCommand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.generic.v1.GenericService/DoCommand", runtime.WithHTTPPathPattern("/viam/api/v1/component/generic/{name}/do_command")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GenericService_DoCommand_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GenericService_DoCommand_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_GenericService_DoCommand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "generic", "name", "do_command"}, "")) +) + +var ( + forward_GenericService_DoCommand_0 = runtime.ForwardResponseMessage +) diff --git a/component/generic/v1/generic_grpc.pb.go b/component/generic/v1/generic_grpc.pb.go new file mode 100644 index 000000000..f19671d79 --- /dev/null +++ b/component/generic/v1/generic_grpc.pb.go @@ -0,0 +1,103 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// GenericServiceClient is the client API for GenericService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GenericServiceClient interface { + // DoCommand sends/recieves arbitrary commands + DoCommand(ctx context.Context, in *DoCommandRequest, opts ...grpc.CallOption) (*DoCommandResponse, error) +} + +type genericServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGenericServiceClient(cc grpc.ClientConnInterface) GenericServiceClient { + return &genericServiceClient{cc} +} + +func (c *genericServiceClient) DoCommand(ctx context.Context, in *DoCommandRequest, opts ...grpc.CallOption) (*DoCommandResponse, error) { + out := new(DoCommandResponse) + err := c.cc.Invoke(ctx, "/viam.component.generic.v1.GenericService/DoCommand", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GenericServiceServer is the server API for GenericService service. +// All implementations must embed UnimplementedGenericServiceServer +// for forward compatibility +type GenericServiceServer interface { + // DoCommand sends/recieves arbitrary commands + DoCommand(context.Context, *DoCommandRequest) (*DoCommandResponse, error) + mustEmbedUnimplementedGenericServiceServer() +} + +// UnimplementedGenericServiceServer must be embedded to have forward compatible implementations. +type UnimplementedGenericServiceServer struct { +} + +func (UnimplementedGenericServiceServer) DoCommand(context.Context, *DoCommandRequest) (*DoCommandResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DoCommand not implemented") +} +func (UnimplementedGenericServiceServer) mustEmbedUnimplementedGenericServiceServer() {} + +// UnsafeGenericServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GenericServiceServer will +// result in compilation errors. +type UnsafeGenericServiceServer interface { + mustEmbedUnimplementedGenericServiceServer() +} + +func RegisterGenericServiceServer(s grpc.ServiceRegistrar, srv GenericServiceServer) { + s.RegisterService(&GenericService_ServiceDesc, srv) +} + +func _GenericService_DoCommand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DoCommandRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenericServiceServer).DoCommand(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.generic.v1.GenericService/DoCommand", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenericServiceServer).DoCommand(ctx, req.(*DoCommandRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GenericService_ServiceDesc is the grpc.ServiceDesc for GenericService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GenericService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.generic.v1.GenericService", + HandlerType: (*GenericServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DoCommand", + Handler: _GenericService_DoCommand_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/generic/v1/generic.proto", +} diff --git a/component/gripper/v1/gripper.pb.go b/component/gripper/v1/gripper.pb.go new file mode 100644 index 000000000..38f2c255e --- /dev/null +++ b/component/gripper/v1/gripper.pb.go @@ -0,0 +1,476 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/gripper/v1/gripper.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type OpenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *OpenRequest) Reset() { + *x = OpenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenRequest) ProtoMessage() {} + +func (x *OpenRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenRequest.ProtoReflect.Descriptor instead. +func (*OpenRequest) Descriptor() ([]byte, []int) { + return file_component_gripper_v1_gripper_proto_rawDescGZIP(), []int{0} +} + +func (x *OpenRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type OpenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OpenResponse) Reset() { + *x = OpenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenResponse) ProtoMessage() {} + +func (x *OpenResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OpenResponse.ProtoReflect.Descriptor instead. +func (*OpenResponse) Descriptor() ([]byte, []int) { + return file_component_gripper_v1_gripper_proto_rawDescGZIP(), []int{1} +} + +type GrabRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GrabRequest) Reset() { + *x = GrabRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrabRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrabRequest) ProtoMessage() {} + +func (x *GrabRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrabRequest.ProtoReflect.Descriptor instead. +func (*GrabRequest) Descriptor() ([]byte, []int) { + return file_component_gripper_v1_gripper_proto_rawDescGZIP(), []int{2} +} + +func (x *GrabRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GrabResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *GrabResponse) Reset() { + *x = GrabResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrabResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrabResponse) ProtoMessage() {} + +func (x *GrabResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrabResponse.ProtoReflect.Descriptor instead. +func (*GrabResponse) Descriptor() ([]byte, []int) { + return file_component_gripper_v1_gripper_proto_rawDescGZIP(), []int{3} +} + +func (x *GrabResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type StopRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a gripper + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *StopRequest) Reset() { + *x = StopRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopRequest) ProtoMessage() {} + +func (x *StopRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopRequest.ProtoReflect.Descriptor instead. +func (*StopRequest) Descriptor() ([]byte, []int) { + return file_component_gripper_v1_gripper_proto_rawDescGZIP(), []int{4} +} + +func (x *StopRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type StopResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StopResponse) Reset() { + *x = StopResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopResponse) ProtoMessage() {} + +func (x *StopResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_gripper_v1_gripper_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopResponse.ProtoReflect.Descriptor instead. +func (*StopResponse) Descriptor() ([]byte, []int) { + return file_component_gripper_v1_gripper_proto_rawDescGZIP(), []int{5} +} + +var File_component_gripper_v1_gripper_proto protoreflect.FileDescriptor + +var file_component_gripper_v1_gripper_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, 0x70, + 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x21, 0x0a, + 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x0e, 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x21, 0x0a, 0x0b, 0x47, 0x72, 0x61, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x47, 0x72, 0x61, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x21, 0x0a, + 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0xba, 0x03, 0x0a, 0x0e, 0x47, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x04, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x26, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, + 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x1a, 0x2a, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, + 0x69, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6f, 0x70, 0x65, + 0x6e, 0x12, 0x8b, 0x01, 0x0a, 0x04, 0x47, 0x72, 0x61, 0x62, 0x12, 0x26, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, + 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x61, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2c, 0x1a, 0x2a, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, 0x70, + 0x70, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x72, 0x61, 0x62, 0x12, + 0x8b, 0x01, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x26, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2c, 0x22, 0x2a, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, + 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x42, 0x45, 0x0a, + 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2e, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x24, + 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x69, 0x70, 0x70, 0x65, + 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_gripper_v1_gripper_proto_rawDescOnce sync.Once + file_component_gripper_v1_gripper_proto_rawDescData = file_component_gripper_v1_gripper_proto_rawDesc +) + +func file_component_gripper_v1_gripper_proto_rawDescGZIP() []byte { + file_component_gripper_v1_gripper_proto_rawDescOnce.Do(func() { + file_component_gripper_v1_gripper_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_gripper_v1_gripper_proto_rawDescData) + }) + return file_component_gripper_v1_gripper_proto_rawDescData +} + +var file_component_gripper_v1_gripper_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_component_gripper_v1_gripper_proto_goTypes = []interface{}{ + (*OpenRequest)(nil), // 0: viam.component.gripper.v1.OpenRequest + (*OpenResponse)(nil), // 1: viam.component.gripper.v1.OpenResponse + (*GrabRequest)(nil), // 2: viam.component.gripper.v1.GrabRequest + (*GrabResponse)(nil), // 3: viam.component.gripper.v1.GrabResponse + (*StopRequest)(nil), // 4: viam.component.gripper.v1.StopRequest + (*StopResponse)(nil), // 5: viam.component.gripper.v1.StopResponse +} +var file_component_gripper_v1_gripper_proto_depIdxs = []int32{ + 0, // 0: viam.component.gripper.v1.GripperService.Open:input_type -> viam.component.gripper.v1.OpenRequest + 2, // 1: viam.component.gripper.v1.GripperService.Grab:input_type -> viam.component.gripper.v1.GrabRequest + 4, // 2: viam.component.gripper.v1.GripperService.Stop:input_type -> viam.component.gripper.v1.StopRequest + 1, // 3: viam.component.gripper.v1.GripperService.Open:output_type -> viam.component.gripper.v1.OpenResponse + 3, // 4: viam.component.gripper.v1.GripperService.Grab:output_type -> viam.component.gripper.v1.GrabResponse + 5, // 5: viam.component.gripper.v1.GripperService.Stop:output_type -> viam.component.gripper.v1.StopResponse + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_component_gripper_v1_gripper_proto_init() } +func file_component_gripper_v1_gripper_proto_init() { + if File_component_gripper_v1_gripper_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_gripper_v1_gripper_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gripper_v1_gripper_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gripper_v1_gripper_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrabRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gripper_v1_gripper_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrabResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gripper_v1_gripper_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_gripper_v1_gripper_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_gripper_v1_gripper_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_gripper_v1_gripper_proto_goTypes, + DependencyIndexes: file_component_gripper_v1_gripper_proto_depIdxs, + MessageInfos: file_component_gripper_v1_gripper_proto_msgTypes, + }.Build() + File_component_gripper_v1_gripper_proto = out.File + file_component_gripper_v1_gripper_proto_rawDesc = nil + file_component_gripper_v1_gripper_proto_goTypes = nil + file_component_gripper_v1_gripper_proto_depIdxs = nil +} diff --git a/component/gripper/v1/gripper.pb.gw.go b/component/gripper/v1/gripper.pb.gw.go new file mode 100644 index 000000000..66c9c5ab9 --- /dev/null +++ b/component/gripper/v1/gripper.pb.gw.go @@ -0,0 +1,389 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/gripper/v1/gripper.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_GripperService_Open_0(ctx context.Context, marshaler runtime.Marshaler, client GripperServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OpenRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.Open(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GripperService_Open_0(ctx context.Context, marshaler runtime.Marshaler, server GripperServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq OpenRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.Open(ctx, &protoReq) + return msg, metadata, err + +} + +func request_GripperService_Grab_0(ctx context.Context, marshaler runtime.Marshaler, client GripperServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GrabRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.Grab(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GripperService_Grab_0(ctx context.Context, marshaler runtime.Marshaler, server GripperServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GrabRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.Grab(ctx, &protoReq) + return msg, metadata, err + +} + +func request_GripperService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, client GripperServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.Stop(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GripperService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, server GripperServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.Stop(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterGripperServiceHandlerServer registers the http handlers for service GripperService to "mux". +// UnaryRPC :call GripperServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGripperServiceHandlerFromEndpoint instead. +func RegisterGripperServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GripperServiceServer) error { + + mux.Handle("PUT", pattern_GripperService_Open_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.gripper.v1.GripperService/Open", runtime.WithHTTPPathPattern("/viam/api/v1/component/gripper/{name}/open")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GripperService_Open_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GripperService_Open_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_GripperService_Grab_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.gripper.v1.GripperService/Grab", runtime.WithHTTPPathPattern("/viam/api/v1/component/gripper/{name}/grab")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GripperService_Grab_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GripperService_Grab_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_GripperService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.gripper.v1.GripperService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/gripper/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GripperService_Stop_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GripperService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterGripperServiceHandlerFromEndpoint is same as RegisterGripperServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterGripperServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterGripperServiceHandler(ctx, mux, conn) +} + +// RegisterGripperServiceHandler registers the http handlers for service GripperService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterGripperServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterGripperServiceHandlerClient(ctx, mux, NewGripperServiceClient(conn)) +} + +// RegisterGripperServiceHandlerClient registers the http handlers for service GripperService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GripperServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GripperServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "GripperServiceClient" to call the correct interceptors. +func RegisterGripperServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GripperServiceClient) error { + + mux.Handle("PUT", pattern_GripperService_Open_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.gripper.v1.GripperService/Open", runtime.WithHTTPPathPattern("/viam/api/v1/component/gripper/{name}/open")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GripperService_Open_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GripperService_Open_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_GripperService_Grab_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.gripper.v1.GripperService/Grab", runtime.WithHTTPPathPattern("/viam/api/v1/component/gripper/{name}/grab")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GripperService_Grab_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GripperService_Grab_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_GripperService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.gripper.v1.GripperService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/gripper/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GripperService_Stop_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GripperService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_GripperService_Open_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gripper", "name", "open"}, "")) + + pattern_GripperService_Grab_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gripper", "name", "grab"}, "")) + + pattern_GripperService_Stop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "gripper", "name", "stop"}, "")) +) + +var ( + forward_GripperService_Open_0 = runtime.ForwardResponseMessage + + forward_GripperService_Grab_0 = runtime.ForwardResponseMessage + + forward_GripperService_Stop_0 = runtime.ForwardResponseMessage +) diff --git a/component/gripper/v1/gripper_grpc.pb.go b/component/gripper/v1/gripper_grpc.pb.go new file mode 100644 index 000000000..779fe3e5d --- /dev/null +++ b/component/gripper/v1/gripper_grpc.pb.go @@ -0,0 +1,179 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// GripperServiceClient is the client API for GripperService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GripperServiceClient interface { + // Open opens a gripper of the underlying robot. + Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*OpenResponse, error) + // Grab requests a gripper of the underlying robot to grab. + Grab(ctx context.Context, in *GrabRequest, opts ...grpc.CallOption) (*GrabResponse, error) + // Stop stops a robot's gripper + Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) +} + +type gripperServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGripperServiceClient(cc grpc.ClientConnInterface) GripperServiceClient { + return &gripperServiceClient{cc} +} + +func (c *gripperServiceClient) Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*OpenResponse, error) { + out := new(OpenResponse) + err := c.cc.Invoke(ctx, "/viam.component.gripper.v1.GripperService/Open", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gripperServiceClient) Grab(ctx context.Context, in *GrabRequest, opts ...grpc.CallOption) (*GrabResponse, error) { + out := new(GrabResponse) + err := c.cc.Invoke(ctx, "/viam.component.gripper.v1.GripperService/Grab", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gripperServiceClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { + out := new(StopResponse) + err := c.cc.Invoke(ctx, "/viam.component.gripper.v1.GripperService/Stop", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GripperServiceServer is the server API for GripperService service. +// All implementations must embed UnimplementedGripperServiceServer +// for forward compatibility +type GripperServiceServer interface { + // Open opens a gripper of the underlying robot. + Open(context.Context, *OpenRequest) (*OpenResponse, error) + // Grab requests a gripper of the underlying robot to grab. + Grab(context.Context, *GrabRequest) (*GrabResponse, error) + // Stop stops a robot's gripper + Stop(context.Context, *StopRequest) (*StopResponse, error) + mustEmbedUnimplementedGripperServiceServer() +} + +// UnimplementedGripperServiceServer must be embedded to have forward compatible implementations. +type UnimplementedGripperServiceServer struct { +} + +func (UnimplementedGripperServiceServer) Open(context.Context, *OpenRequest) (*OpenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Open not implemented") +} +func (UnimplementedGripperServiceServer) Grab(context.Context, *GrabRequest) (*GrabResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Grab not implemented") +} +func (UnimplementedGripperServiceServer) Stop(context.Context, *StopRequest) (*StopResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (UnimplementedGripperServiceServer) mustEmbedUnimplementedGripperServiceServer() {} + +// UnsafeGripperServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GripperServiceServer will +// result in compilation errors. +type UnsafeGripperServiceServer interface { + mustEmbedUnimplementedGripperServiceServer() +} + +func RegisterGripperServiceServer(s grpc.ServiceRegistrar, srv GripperServiceServer) { + s.RegisterService(&GripperService_ServiceDesc, srv) +} + +func _GripperService_Open_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OpenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GripperServiceServer).Open(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.gripper.v1.GripperService/Open", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GripperServiceServer).Open(ctx, req.(*OpenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GripperService_Grab_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GrabRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GripperServiceServer).Grab(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.gripper.v1.GripperService/Grab", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GripperServiceServer).Grab(ctx, req.(*GrabRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GripperService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GripperServiceServer).Stop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.gripper.v1.GripperService/Stop", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GripperServiceServer).Stop(ctx, req.(*StopRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GripperService_ServiceDesc is the grpc.ServiceDesc for GripperService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GripperService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.gripper.v1.GripperService", + HandlerType: (*GripperServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Open", + Handler: _GripperService_Open_Handler, + }, + { + MethodName: "Grab", + Handler: _GripperService_Grab_Handler, + }, + { + MethodName: "Stop", + Handler: _GripperService_Stop_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/gripper/v1/gripper.proto", +} diff --git a/component/inputcontroller/v1/input_controller.pb.go b/component/inputcontroller/v1/input_controller.pb.go new file mode 100644 index 000000000..e2f4499bb --- /dev/null +++ b/component/inputcontroller/v1/input_controller.pb.go @@ -0,0 +1,942 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/inputcontroller/v1/input_controller.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetControlsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an input controller + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` +} + +func (x *GetControlsRequest) Reset() { + *x = GetControlsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetControlsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetControlsRequest) ProtoMessage() {} + +func (x *GetControlsRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetControlsRequest.ProtoReflect.Descriptor instead. +func (*GetControlsRequest) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{0} +} + +func (x *GetControlsRequest) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +type GetControlsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Returns a list of all the controls (buttons and axes) that are + // available to a given Input Controller + Controls []string `protobuf:"bytes,1,rep,name=controls,proto3" json:"controls,omitempty"` +} + +func (x *GetControlsResponse) Reset() { + *x = GetControlsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetControlsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetControlsResponse) ProtoMessage() {} + +func (x *GetControlsResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetControlsResponse.ProtoReflect.Descriptor instead. +func (*GetControlsResponse) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{1} +} + +func (x *GetControlsResponse) GetControls() []string { + if x != nil { + return x.Controls + } + return nil +} + +type GetEventsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an input controller + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` +} + +func (x *GetEventsRequest) Reset() { + *x = GetEventsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEventsRequest) ProtoMessage() {} + +func (x *GetEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEventsRequest.ProtoReflect.Descriptor instead. +func (*GetEventsRequest) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{2} +} + +func (x *GetEventsRequest) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +type GetEventsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Returns a list of the most recent event for each control on a given InputController. Effectively provides the current "state" of all + // buttons/axes on a given input controller + Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` +} + +func (x *GetEventsResponse) Reset() { + *x = GetEventsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEventsResponse) ProtoMessage() {} + +func (x *GetEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEventsResponse.ProtoReflect.Descriptor instead. +func (*GetEventsResponse) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{3} +} + +func (x *GetEventsResponse) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +type TriggerEventRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an input controller + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Digitally assert a given event + Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *TriggerEventRequest) Reset() { + *x = TriggerEventRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TriggerEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerEventRequest) ProtoMessage() {} + +func (x *TriggerEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TriggerEventRequest.ProtoReflect.Descriptor instead. +func (*TriggerEventRequest) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{4} +} + +func (x *TriggerEventRequest) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *TriggerEventRequest) GetEvent() *Event { + if x != nil { + return x.Event + } + return nil +} + +type TriggerEventResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TriggerEventResponse) Reset() { + *x = TriggerEventResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TriggerEventResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerEventResponse) ProtoMessage() {} + +func (x *TriggerEventResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TriggerEventResponse.ProtoReflect.Descriptor instead. +func (*TriggerEventResponse) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{5} +} + +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Timestamp of event + Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + // An event type (eg: ButtonPress, ButtonRelease) + Event string `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` + // A control, can be a button (eg: ButtonSouth) or an axis (eg: AbsoluteX) + Control string `protobuf:"bytes,3,opt,name=control,proto3" json:"control,omitempty"` + // 0 or 1 for buttons, -1.0 to +1.0 for axes + Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{6} +} + +func (x *Event) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *Event) GetEvent() string { + if x != nil { + return x.Event + } + return "" +} + +func (x *Event) GetControl() string { + if x != nil { + return x.Control + } + return "" +} + +func (x *Event) GetValue() float64 { + if x != nil { + return x.Value + } + return 0 +} + +type StreamEventsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of an input controller + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // A list of Events + Events []*StreamEventsRequest_Events `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` +} + +func (x *StreamEventsRequest) Reset() { + *x = StreamEventsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamEventsRequest) ProtoMessage() {} + +func (x *StreamEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamEventsRequest.ProtoReflect.Descriptor instead. +func (*StreamEventsRequest) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{7} +} + +func (x *StreamEventsRequest) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *StreamEventsRequest) GetEvents() []*StreamEventsRequest_Events { + if x != nil { + return x.Events + } + return nil +} + +type StreamEventsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Event for a controller + Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *StreamEventsResponse) Reset() { + *x = StreamEventsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamEventsResponse) ProtoMessage() {} + +func (x *StreamEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamEventsResponse.ProtoReflect.Descriptor instead. +func (*StreamEventsResponse) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{8} +} + +func (x *StreamEventsResponse) GetEvent() *Event { + if x != nil { + return x.Event + } + return nil +} + +type Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` +} + +func (x *Status) Reset() { + *x = Status{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{9} +} + +func (x *Status) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +type StreamEventsRequest_Events struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a control (button or axis) + Control string `protobuf:"bytes,1,opt,name=control,proto3" json:"control,omitempty"` + // Specify which event types to recieve events for + // To Do (FA): Right now this can be an empty list, but we should error in this case as opening a stream with no messages is expensive + Events []string `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` + // Specify which event types to stop recieving events for + // This can be an empty list + CancelledEvents []string `protobuf:"bytes,3,rep,name=cancelled_events,json=cancelledEvents,proto3" json:"cancelled_events,omitempty"` +} + +func (x *StreamEventsRequest_Events) Reset() { + *x = StreamEventsRequest_Events{} + if protoimpl.UnsafeEnabled { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamEventsRequest_Events) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamEventsRequest_Events) ProtoMessage() {} + +func (x *StreamEventsRequest_Events) ProtoReflect() protoreflect.Message { + mi := &file_component_inputcontroller_v1_input_controller_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamEventsRequest_Events.ProtoReflect.Descriptor instead. +func (*StreamEventsRequest_Events) Descriptor() ([]byte, []int) { + return file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *StreamEventsRequest_Events) GetControl() string { + if x != nil { + return x.Control + } + return "" +} + +func (x *StreamEventsRequest_Events) GetEvents() []string { + if x != nil { + return x.Events + } + return nil +} + +func (x *StreamEventsRequest_Events) GetCancelledEvents() []string { + if x != nil { + return x.CancelledEvents + } + return nil +} + +var File_component_inputcontroller_v1_input_controller_proto protoreflect.FileDescriptor + +var file_component_inputcontroller_v1_input_controller_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x31, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, + 0x22, 0x32, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x55, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x75, 0x0a, 0x13, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x0a, 0x05, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, + 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf3, 0x01, 0x0a, 0x13, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x12, 0x55, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x65, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, + 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, + 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0x56, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x40, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x32, 0x85, 0x06, 0x0a, 0x16, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb8, + 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x12, 0x35, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x7d, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x12, 0xb0, 0x01, 0x0a, 0x09, 0x47, 0x65, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x7d, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0xc1, 0x01, 0x0a, + 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x7d, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, + 0x12, 0xb8, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x36, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x7d, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x55, 0x0a, 0x25, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x2c, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_inputcontroller_v1_input_controller_proto_rawDescOnce sync.Once + file_component_inputcontroller_v1_input_controller_proto_rawDescData = file_component_inputcontroller_v1_input_controller_proto_rawDesc +) + +func file_component_inputcontroller_v1_input_controller_proto_rawDescGZIP() []byte { + file_component_inputcontroller_v1_input_controller_proto_rawDescOnce.Do(func() { + file_component_inputcontroller_v1_input_controller_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_inputcontroller_v1_input_controller_proto_rawDescData) + }) + return file_component_inputcontroller_v1_input_controller_proto_rawDescData +} + +var file_component_inputcontroller_v1_input_controller_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_component_inputcontroller_v1_input_controller_proto_goTypes = []interface{}{ + (*GetControlsRequest)(nil), // 0: viam.component.inputcontroller.v1.GetControlsRequest + (*GetControlsResponse)(nil), // 1: viam.component.inputcontroller.v1.GetControlsResponse + (*GetEventsRequest)(nil), // 2: viam.component.inputcontroller.v1.GetEventsRequest + (*GetEventsResponse)(nil), // 3: viam.component.inputcontroller.v1.GetEventsResponse + (*TriggerEventRequest)(nil), // 4: viam.component.inputcontroller.v1.TriggerEventRequest + (*TriggerEventResponse)(nil), // 5: viam.component.inputcontroller.v1.TriggerEventResponse + (*Event)(nil), // 6: viam.component.inputcontroller.v1.Event + (*StreamEventsRequest)(nil), // 7: viam.component.inputcontroller.v1.StreamEventsRequest + (*StreamEventsResponse)(nil), // 8: viam.component.inputcontroller.v1.StreamEventsResponse + (*Status)(nil), // 9: viam.component.inputcontroller.v1.Status + (*StreamEventsRequest_Events)(nil), // 10: viam.component.inputcontroller.v1.StreamEventsRequest.Events + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp +} +var file_component_inputcontroller_v1_input_controller_proto_depIdxs = []int32{ + 6, // 0: viam.component.inputcontroller.v1.GetEventsResponse.events:type_name -> viam.component.inputcontroller.v1.Event + 6, // 1: viam.component.inputcontroller.v1.TriggerEventRequest.event:type_name -> viam.component.inputcontroller.v1.Event + 11, // 2: viam.component.inputcontroller.v1.Event.time:type_name -> google.protobuf.Timestamp + 10, // 3: viam.component.inputcontroller.v1.StreamEventsRequest.events:type_name -> viam.component.inputcontroller.v1.StreamEventsRequest.Events + 6, // 4: viam.component.inputcontroller.v1.StreamEventsResponse.event:type_name -> viam.component.inputcontroller.v1.Event + 6, // 5: viam.component.inputcontroller.v1.Status.events:type_name -> viam.component.inputcontroller.v1.Event + 0, // 6: viam.component.inputcontroller.v1.InputControllerService.GetControls:input_type -> viam.component.inputcontroller.v1.GetControlsRequest + 2, // 7: viam.component.inputcontroller.v1.InputControllerService.GetEvents:input_type -> viam.component.inputcontroller.v1.GetEventsRequest + 7, // 8: viam.component.inputcontroller.v1.InputControllerService.StreamEvents:input_type -> viam.component.inputcontroller.v1.StreamEventsRequest + 4, // 9: viam.component.inputcontroller.v1.InputControllerService.TriggerEvent:input_type -> viam.component.inputcontroller.v1.TriggerEventRequest + 1, // 10: viam.component.inputcontroller.v1.InputControllerService.GetControls:output_type -> viam.component.inputcontroller.v1.GetControlsResponse + 3, // 11: viam.component.inputcontroller.v1.InputControllerService.GetEvents:output_type -> viam.component.inputcontroller.v1.GetEventsResponse + 8, // 12: viam.component.inputcontroller.v1.InputControllerService.StreamEvents:output_type -> viam.component.inputcontroller.v1.StreamEventsResponse + 5, // 13: viam.component.inputcontroller.v1.InputControllerService.TriggerEvent:output_type -> viam.component.inputcontroller.v1.TriggerEventResponse + 10, // [10:14] is the sub-list for method output_type + 6, // [6:10] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_component_inputcontroller_v1_input_controller_proto_init() } +func file_component_inputcontroller_v1_input_controller_proto_init() { + if File_component_inputcontroller_v1_input_controller_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_inputcontroller_v1_input_controller_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetControlsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetControlsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEventsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEventsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TriggerEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TriggerEventResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamEventsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamEventsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_inputcontroller_v1_input_controller_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamEventsRequest_Events); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_inputcontroller_v1_input_controller_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_inputcontroller_v1_input_controller_proto_goTypes, + DependencyIndexes: file_component_inputcontroller_v1_input_controller_proto_depIdxs, + MessageInfos: file_component_inputcontroller_v1_input_controller_proto_msgTypes, + }.Build() + File_component_inputcontroller_v1_input_controller_proto = out.File + file_component_inputcontroller_v1_input_controller_proto_rawDesc = nil + file_component_inputcontroller_v1_input_controller_proto_goTypes = nil + file_component_inputcontroller_v1_input_controller_proto_depIdxs = nil +} diff --git a/component/inputcontroller/v1/input_controller.pb.gw.go b/component/inputcontroller/v1/input_controller.pb.gw.go new file mode 100644 index 000000000..27e85c743 --- /dev/null +++ b/component/inputcontroller/v1/input_controller.pb.gw.go @@ -0,0 +1,484 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/inputcontroller/v1/input_controller.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_InputControllerService_GetControls_0(ctx context.Context, marshaler runtime.Marshaler, client InputControllerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetControlsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["controller"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "controller") + } + + protoReq.Controller, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "controller", err) + } + + msg, err := client.GetControls(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_InputControllerService_GetControls_0(ctx context.Context, marshaler runtime.Marshaler, server InputControllerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetControlsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["controller"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "controller") + } + + protoReq.Controller, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "controller", err) + } + + msg, err := server.GetControls(ctx, &protoReq) + return msg, metadata, err + +} + +func request_InputControllerService_GetEvents_0(ctx context.Context, marshaler runtime.Marshaler, client InputControllerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetEventsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["controller"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "controller") + } + + protoReq.Controller, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "controller", err) + } + + msg, err := client.GetEvents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_InputControllerService_GetEvents_0(ctx context.Context, marshaler runtime.Marshaler, server InputControllerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetEventsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["controller"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "controller") + } + + protoReq.Controller, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "controller", err) + } + + msg, err := server.GetEvents(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_InputControllerService_StreamEvents_0 = &utilities.DoubleArray{Encoding: map[string]int{"controller": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_InputControllerService_StreamEvents_0(ctx context.Context, marshaler runtime.Marshaler, client InputControllerServiceClient, req *http.Request, pathParams map[string]string) (InputControllerService_StreamEventsClient, runtime.ServerMetadata, error) { + var protoReq StreamEventsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["controller"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "controller") + } + + protoReq.Controller, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "controller", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InputControllerService_StreamEvents_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.StreamEvents(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +var ( + filter_InputControllerService_TriggerEvent_0 = &utilities.DoubleArray{Encoding: map[string]int{"controller": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_InputControllerService_TriggerEvent_0(ctx context.Context, marshaler runtime.Marshaler, client InputControllerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TriggerEventRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["controller"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "controller") + } + + protoReq.Controller, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "controller", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InputControllerService_TriggerEvent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TriggerEvent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_InputControllerService_TriggerEvent_0(ctx context.Context, marshaler runtime.Marshaler, server InputControllerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TriggerEventRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["controller"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "controller") + } + + protoReq.Controller, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "controller", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InputControllerService_TriggerEvent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TriggerEvent(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterInputControllerServiceHandlerServer registers the http handlers for service InputControllerService to "mux". +// UnaryRPC :call InputControllerServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInputControllerServiceHandlerFromEndpoint instead. +func RegisterInputControllerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InputControllerServiceServer) error { + + mux.Handle("GET", pattern_InputControllerService_GetControls_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.inputcontroller.v1.InputControllerService/GetControls", runtime.WithHTTPPathPattern("/viam/api/v1/component/input/{controller}/controls")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_InputControllerService_GetControls_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_InputControllerService_GetControls_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_InputControllerService_GetEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.inputcontroller.v1.InputControllerService/GetEvents", runtime.WithHTTPPathPattern("/viam/api/v1/component/input/{controller}/events")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_InputControllerService_GetEvents_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_InputControllerService_GetEvents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_InputControllerService_StreamEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("POST", pattern_InputControllerService_TriggerEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.inputcontroller.v1.InputControllerService/TriggerEvent", runtime.WithHTTPPathPattern("/viam/api/v1/component/input/{controller}/event")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_InputControllerService_TriggerEvent_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_InputControllerService_TriggerEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterInputControllerServiceHandlerFromEndpoint is same as RegisterInputControllerServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterInputControllerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterInputControllerServiceHandler(ctx, mux, conn) +} + +// RegisterInputControllerServiceHandler registers the http handlers for service InputControllerService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterInputControllerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterInputControllerServiceHandlerClient(ctx, mux, NewInputControllerServiceClient(conn)) +} + +// RegisterInputControllerServiceHandlerClient registers the http handlers for service InputControllerService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InputControllerServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InputControllerServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "InputControllerServiceClient" to call the correct interceptors. +func RegisterInputControllerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InputControllerServiceClient) error { + + mux.Handle("GET", pattern_InputControllerService_GetControls_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.inputcontroller.v1.InputControllerService/GetControls", runtime.WithHTTPPathPattern("/viam/api/v1/component/input/{controller}/controls")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_InputControllerService_GetControls_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_InputControllerService_GetControls_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_InputControllerService_GetEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.inputcontroller.v1.InputControllerService/GetEvents", runtime.WithHTTPPathPattern("/viam/api/v1/component/input/{controller}/events")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_InputControllerService_GetEvents_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_InputControllerService_GetEvents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_InputControllerService_StreamEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.inputcontroller.v1.InputControllerService/StreamEvents", runtime.WithHTTPPathPattern("/viam/api/v1/component/input/{controller}/event_stream")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_InputControllerService_StreamEvents_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_InputControllerService_StreamEvents_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_InputControllerService_TriggerEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.inputcontroller.v1.InputControllerService/TriggerEvent", runtime.WithHTTPPathPattern("/viam/api/v1/component/input/{controller}/event")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_InputControllerService_TriggerEvent_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_InputControllerService_TriggerEvent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_InputControllerService_GetControls_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "input", "controller", "controls"}, "")) + + pattern_InputControllerService_GetEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "input", "controller", "events"}, "")) + + pattern_InputControllerService_StreamEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "input", "controller", "event_stream"}, "")) + + pattern_InputControllerService_TriggerEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "input", "controller", "event"}, "")) +) + +var ( + forward_InputControllerService_GetControls_0 = runtime.ForwardResponseMessage + + forward_InputControllerService_GetEvents_0 = runtime.ForwardResponseMessage + + forward_InputControllerService_StreamEvents_0 = runtime.ForwardResponseStream + + forward_InputControllerService_TriggerEvent_0 = runtime.ForwardResponseMessage +) diff --git a/component/inputcontroller/v1/input_controller_grpc.pb.go b/component/inputcontroller/v1/input_controller_grpc.pb.go new file mode 100644 index 000000000..6453d2fae --- /dev/null +++ b/component/inputcontroller/v1/input_controller_grpc.pb.go @@ -0,0 +1,248 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// InputControllerServiceClient is the client API for InputControllerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type InputControllerServiceClient interface { + // GetControls returns a list of GetControls provided by the Controller + GetControls(ctx context.Context, in *GetControlsRequest, opts ...grpc.CallOption) (*GetControlsResponse, error) + // GetEvents returns a list of events representing the last event on each control of a give Input Controller + GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) + // StreamEvents starts a stream of InputControllerEvents for the given controls (buttons/axes) on a robot's input controller + StreamEvents(ctx context.Context, in *StreamEventsRequest, opts ...grpc.CallOption) (InputControllerService_StreamEventsClient, error) + // TriggerEvent, where supported, injects an InputControllerEvent into an input controller to (virtually) generate events + // like button presses or axis movements + TriggerEvent(ctx context.Context, in *TriggerEventRequest, opts ...grpc.CallOption) (*TriggerEventResponse, error) +} + +type inputControllerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewInputControllerServiceClient(cc grpc.ClientConnInterface) InputControllerServiceClient { + return &inputControllerServiceClient{cc} +} + +func (c *inputControllerServiceClient) GetControls(ctx context.Context, in *GetControlsRequest, opts ...grpc.CallOption) (*GetControlsResponse, error) { + out := new(GetControlsResponse) + err := c.cc.Invoke(ctx, "/viam.component.inputcontroller.v1.InputControllerService/GetControls", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *inputControllerServiceClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) { + out := new(GetEventsResponse) + err := c.cc.Invoke(ctx, "/viam.component.inputcontroller.v1.InputControllerService/GetEvents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *inputControllerServiceClient) StreamEvents(ctx context.Context, in *StreamEventsRequest, opts ...grpc.CallOption) (InputControllerService_StreamEventsClient, error) { + stream, err := c.cc.NewStream(ctx, &InputControllerService_ServiceDesc.Streams[0], "/viam.component.inputcontroller.v1.InputControllerService/StreamEvents", opts...) + if err != nil { + return nil, err + } + x := &inputControllerServiceStreamEventsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type InputControllerService_StreamEventsClient interface { + Recv() (*StreamEventsResponse, error) + grpc.ClientStream +} + +type inputControllerServiceStreamEventsClient struct { + grpc.ClientStream +} + +func (x *inputControllerServiceStreamEventsClient) Recv() (*StreamEventsResponse, error) { + m := new(StreamEventsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *inputControllerServiceClient) TriggerEvent(ctx context.Context, in *TriggerEventRequest, opts ...grpc.CallOption) (*TriggerEventResponse, error) { + out := new(TriggerEventResponse) + err := c.cc.Invoke(ctx, "/viam.component.inputcontroller.v1.InputControllerService/TriggerEvent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// InputControllerServiceServer is the server API for InputControllerService service. +// All implementations must embed UnimplementedInputControllerServiceServer +// for forward compatibility +type InputControllerServiceServer interface { + // GetControls returns a list of GetControls provided by the Controller + GetControls(context.Context, *GetControlsRequest) (*GetControlsResponse, error) + // GetEvents returns a list of events representing the last event on each control of a give Input Controller + GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error) + // StreamEvents starts a stream of InputControllerEvents for the given controls (buttons/axes) on a robot's input controller + StreamEvents(*StreamEventsRequest, InputControllerService_StreamEventsServer) error + // TriggerEvent, where supported, injects an InputControllerEvent into an input controller to (virtually) generate events + // like button presses or axis movements + TriggerEvent(context.Context, *TriggerEventRequest) (*TriggerEventResponse, error) + mustEmbedUnimplementedInputControllerServiceServer() +} + +// UnimplementedInputControllerServiceServer must be embedded to have forward compatible implementations. +type UnimplementedInputControllerServiceServer struct { +} + +func (UnimplementedInputControllerServiceServer) GetControls(context.Context, *GetControlsRequest) (*GetControlsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetControls not implemented") +} +func (UnimplementedInputControllerServiceServer) GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEvents not implemented") +} +func (UnimplementedInputControllerServiceServer) StreamEvents(*StreamEventsRequest, InputControllerService_StreamEventsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamEvents not implemented") +} +func (UnimplementedInputControllerServiceServer) TriggerEvent(context.Context, *TriggerEventRequest) (*TriggerEventResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TriggerEvent not implemented") +} +func (UnimplementedInputControllerServiceServer) mustEmbedUnimplementedInputControllerServiceServer() { +} + +// UnsafeInputControllerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to InputControllerServiceServer will +// result in compilation errors. +type UnsafeInputControllerServiceServer interface { + mustEmbedUnimplementedInputControllerServiceServer() +} + +func RegisterInputControllerServiceServer(s grpc.ServiceRegistrar, srv InputControllerServiceServer) { + s.RegisterService(&InputControllerService_ServiceDesc, srv) +} + +func _InputControllerService_GetControls_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetControlsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InputControllerServiceServer).GetControls(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.inputcontroller.v1.InputControllerService/GetControls", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InputControllerServiceServer).GetControls(ctx, req.(*GetControlsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InputControllerService_GetEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEventsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InputControllerServiceServer).GetEvents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.inputcontroller.v1.InputControllerService/GetEvents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InputControllerServiceServer).GetEvents(ctx, req.(*GetEventsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _InputControllerService_StreamEvents_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamEventsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(InputControllerServiceServer).StreamEvents(m, &inputControllerServiceStreamEventsServer{stream}) +} + +type InputControllerService_StreamEventsServer interface { + Send(*StreamEventsResponse) error + grpc.ServerStream +} + +type inputControllerServiceStreamEventsServer struct { + grpc.ServerStream +} + +func (x *inputControllerServiceStreamEventsServer) Send(m *StreamEventsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _InputControllerService_TriggerEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TriggerEventRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InputControllerServiceServer).TriggerEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.inputcontroller.v1.InputControllerService/TriggerEvent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InputControllerServiceServer).TriggerEvent(ctx, req.(*TriggerEventRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// InputControllerService_ServiceDesc is the grpc.ServiceDesc for InputControllerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var InputControllerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.inputcontroller.v1.InputControllerService", + HandlerType: (*InputControllerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetControls", + Handler: _InputControllerService_GetControls_Handler, + }, + { + MethodName: "GetEvents", + Handler: _InputControllerService_GetEvents_Handler, + }, + { + MethodName: "TriggerEvent", + Handler: _InputControllerService_TriggerEvent_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamEvents", + Handler: _InputControllerService_StreamEvents_Handler, + ServerStreams: true, + }, + }, + Metadata: "component/inputcontroller/v1/input_controller.proto", +} diff --git a/component/motor/v1/motor.pb.go b/component/motor/v1/motor.pb.go new file mode 100644 index 000000000..c02e7be14 --- /dev/null +++ b/component/motor/v1/motor.pb.go @@ -0,0 +1,1413 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/motor/v1/motor.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SetPowerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a motor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Percentage of motor's power, between -1 and 1 + PowerPct float64 `protobuf:"fixed64,2,opt,name=power_pct,json=powerPct,proto3" json:"power_pct,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *SetPowerRequest) Reset() { + *x = SetPowerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPowerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPowerRequest) ProtoMessage() {} + +func (x *SetPowerRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPowerRequest.ProtoReflect.Descriptor instead. +func (*SetPowerRequest) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{0} +} + +func (x *SetPowerRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetPowerRequest) GetPowerPct() float64 { + if x != nil { + return x.PowerPct + } + return 0 +} + +func (x *SetPowerRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type SetPowerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetPowerResponse) Reset() { + *x = SetPowerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetPowerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPowerResponse) ProtoMessage() {} + +func (x *SetPowerResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPowerResponse.ProtoReflect.Descriptor instead. +func (*SetPowerResponse) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{1} +} + +type GoForRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a motor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Speed of motor travel in rotations per minute + Rpm float64 `protobuf:"fixed64,2,opt,name=rpm,proto3" json:"rpm,omitempty"` + // Number of revolutions relative to motor's start position + Revolutions float64 `protobuf:"fixed64,3,opt,name=revolutions,proto3" json:"revolutions,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GoForRequest) Reset() { + *x = GoForRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoForRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoForRequest) ProtoMessage() {} + +func (x *GoForRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoForRequest.ProtoReflect.Descriptor instead. +func (*GoForRequest) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{2} +} + +func (x *GoForRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GoForRequest) GetRpm() float64 { + if x != nil { + return x.Rpm + } + return 0 +} + +func (x *GoForRequest) GetRevolutions() float64 { + if x != nil { + return x.Revolutions + } + return 0 +} + +func (x *GoForRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GoForResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GoForResponse) Reset() { + *x = GoForResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoForResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoForResponse) ProtoMessage() {} + +func (x *GoForResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoForResponse.ProtoReflect.Descriptor instead. +func (*GoForResponse) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{3} +} + +type GoToRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a motor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Speed of motor travel in rotations per minute + Rpm float64 `protobuf:"fixed64,2,opt,name=rpm,proto3" json:"rpm,omitempty"` + // Number of revolutions relative to motor's home home/zero + PositionRevolutions float64 `protobuf:"fixed64,3,opt,name=position_revolutions,json=positionRevolutions,proto3" json:"position_revolutions,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GoToRequest) Reset() { + *x = GoToRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoToRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoToRequest) ProtoMessage() {} + +func (x *GoToRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoToRequest.ProtoReflect.Descriptor instead. +func (*GoToRequest) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{4} +} + +func (x *GoToRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GoToRequest) GetRpm() float64 { + if x != nil { + return x.Rpm + } + return 0 +} + +func (x *GoToRequest) GetPositionRevolutions() float64 { + if x != nil { + return x.PositionRevolutions + } + return 0 +} + +func (x *GoToRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GoToResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GoToResponse) Reset() { + *x = GoToResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoToResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoToResponse) ProtoMessage() {} + +func (x *GoToResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoToResponse.ProtoReflect.Descriptor instead. +func (*GoToResponse) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{5} +} + +type ResetZeroPositionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a motor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Motor position + Offset float64 `protobuf:"fixed64,2,opt,name=offset,proto3" json:"offset,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *ResetZeroPositionRequest) Reset() { + *x = ResetZeroPositionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResetZeroPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResetZeroPositionRequest) ProtoMessage() {} + +func (x *ResetZeroPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResetZeroPositionRequest.ProtoReflect.Descriptor instead. +func (*ResetZeroPositionRequest) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{6} +} + +func (x *ResetZeroPositionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ResetZeroPositionRequest) GetOffset() float64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ResetZeroPositionRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type ResetZeroPositionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResetZeroPositionResponse) Reset() { + *x = ResetZeroPositionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResetZeroPositionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResetZeroPositionResponse) ProtoMessage() {} + +func (x *ResetZeroPositionResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResetZeroPositionResponse.ProtoReflect.Descriptor instead. +func (*ResetZeroPositionResponse) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{7} +} + +type GetPositionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a motor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GetPositionRequest) Reset() { + *x = GetPositionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionRequest) ProtoMessage() {} + +func (x *GetPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionRequest.ProtoReflect.Descriptor instead. +func (*GetPositionRequest) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{8} +} + +func (x *GetPositionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetPositionRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GetPositionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current position of the motor relative to its home + Position float64 `protobuf:"fixed64,1,opt,name=position,proto3" json:"position,omitempty"` +} + +func (x *GetPositionResponse) Reset() { + *x = GetPositionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionResponse) ProtoMessage() {} + +func (x *GetPositionResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionResponse.ProtoReflect.Descriptor instead. +func (*GetPositionResponse) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{9} +} + +func (x *GetPositionResponse) GetPosition() float64 { + if x != nil { + return x.Position + } + return 0 +} + +type StopRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a motor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *StopRequest) Reset() { + *x = StopRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopRequest) ProtoMessage() {} + +func (x *StopRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopRequest.ProtoReflect.Descriptor instead. +func (*StopRequest) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{10} +} + +func (x *StopRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StopRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type StopResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StopResponse) Reset() { + *x = StopResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopResponse) ProtoMessage() {} + +func (x *StopResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopResponse.ProtoReflect.Descriptor instead. +func (*StopResponse) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{11} +} + +type IsPoweredRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a motor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *IsPoweredRequest) Reset() { + *x = IsPoweredRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsPoweredRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsPoweredRequest) ProtoMessage() {} + +func (x *IsPoweredRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsPoweredRequest.ProtoReflect.Descriptor instead. +func (*IsPoweredRequest) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{12} +} + +func (x *IsPoweredRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *IsPoweredRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type IsPoweredResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Returns true if the motor is on + IsOn bool `protobuf:"varint,1,opt,name=is_on,json=isOn,proto3" json:"is_on,omitempty"` +} + +func (x *IsPoweredResponse) Reset() { + *x = IsPoweredResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsPoweredResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsPoweredResponse) ProtoMessage() {} + +func (x *IsPoweredResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsPoweredResponse.ProtoReflect.Descriptor instead. +func (*IsPoweredResponse) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{13} +} + +func (x *IsPoweredResponse) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +type GetPropertiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a motor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GetPropertiesRequest) Reset() { + *x = GetPropertiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPropertiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPropertiesRequest) ProtoMessage() {} + +func (x *GetPropertiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPropertiesRequest.ProtoReflect.Descriptor instead. +func (*GetPropertiesRequest) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{14} +} + +func (x *GetPropertiesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetPropertiesRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GetPropertiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Returns true if the motor supports reporting its position + PositionReporting bool `protobuf:"varint,1,opt,name=position_reporting,json=positionReporting,proto3" json:"position_reporting,omitempty"` +} + +func (x *GetPropertiesResponse) Reset() { + *x = GetPropertiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPropertiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPropertiesResponse) ProtoMessage() {} + +func (x *GetPropertiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPropertiesResponse.ProtoReflect.Descriptor instead. +func (*GetPropertiesResponse) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{15} +} + +func (x *GetPropertiesResponse) GetPositionReporting() bool { + if x != nil { + return x.PositionReporting + } + return false +} + +type Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Returns true if the motor is powered + IsPowered bool `protobuf:"varint,1,opt,name=is_powered,json=isPowered,proto3" json:"is_powered,omitempty"` + // Returns true if the motor has position support + PositionReporting bool `protobuf:"varint,2,opt,name=position_reporting,json=positionReporting,proto3" json:"position_reporting,omitempty"` + // Returns current position of the motor relative to its home + Position float64 `protobuf:"fixed64,3,opt,name=position,proto3" json:"position,omitempty"` + // Returns true if the motor is moving + IsMoving bool `protobuf:"varint,4,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"` +} + +func (x *Status) Reset() { + *x = Status{} + if protoimpl.UnsafeEnabled { + mi := &file_component_motor_v1_motor_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_component_motor_v1_motor_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_component_motor_v1_motor_proto_rawDescGZIP(), []int{16} +} + +func (x *Status) GetIsPowered() bool { + if x != nil { + return x.IsPowered + } + return false +} + +func (x *Status) GetPositionReporting() bool { + if x != nil { + return x.PositionReporting + } + return false +} + +func (x *Status) GetPosition() float64 { + if x != nil { + return x.Position + } + return 0 +} + +func (x *Status) GetIsMoving() bool { + if x != nil { + return x.IsMoving + } + return false +} + +var File_component_motor_v1_motor_proto protoreflect.FileDescriptor + +var file_component_motor_v1_motor_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, + 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x17, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x71, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x08, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x50, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x50, + 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x85, 0x01, 0x0a, + 0x0c, 0x47, 0x6f, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x70, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, + 0x72, 0x70, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x22, 0x0f, 0x0a, 0x0d, 0x47, 0x6f, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0b, 0x47, 0x6f, 0x54, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x70, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x72, 0x70, 0x6d, 0x12, 0x31, 0x0a, 0x14, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x13, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x76, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, + 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x0e, 0x0a, + 0x0c, 0x47, 0x6f, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x0a, + 0x18, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5a, 0x65, 0x72, 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5a, 0x65, 0x72, + 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x57, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x31, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, + 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, + 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x55, 0x0a, 0x10, 0x49, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, + 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x28, 0x0a, 0x11, 0x49, 0x73, 0x50, 0x6f, 0x77, 0x65, + 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x69, + 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, + 0x22, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x46, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x22, 0x8f, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x65, 0x64, 0x12, 0x2d, 0x0a, + 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6d, + 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4d, + 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x32, 0xd2, 0x09, 0x0a, 0x0c, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x50, 0x6f, + 0x77, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, + 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, + 0x1a, 0x29, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x8a, 0x01, 0x0a, 0x05, + 0x47, 0x6f, 0x46, 0x6f, 0x72, 0x12, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x6f, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x1a, 0x2a, 0x2f, 0x76, + 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x6f, 0x72, 0x12, 0x86, 0x01, 0x0a, 0x04, 0x47, 0x6f, 0x54, + 0x6f, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x54, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x6f, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x1a, 0x29, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, + 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x67, 0x6f, 0x5f, 0x74, + 0x6f, 0x12, 0xac, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5a, 0x65, 0x72, 0x6f, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5a, 0x65, 0x72, 0x6f, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5a, 0x65, 0x72, 0x6f, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x1a, 0x28, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, + 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7a, 0x65, 0x72, 0x6f, + 0x12, 0x9e, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, + 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, + 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0xa4, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x04, 0x53, 0x74, 0x6f, + 0x70, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x1a, 0x28, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, + 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, 0x74, 0x6f, 0x70, + 0x12, 0x97, 0x01, 0x0a, 0x09, 0x49, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x65, 0x64, 0x12, 0x29, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, + 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, + 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, + 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x65, 0x64, 0x42, 0x41, 0x0a, 0x1b, 0x63, 0x6f, + 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2e, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_motor_v1_motor_proto_rawDescOnce sync.Once + file_component_motor_v1_motor_proto_rawDescData = file_component_motor_v1_motor_proto_rawDesc +) + +func file_component_motor_v1_motor_proto_rawDescGZIP() []byte { + file_component_motor_v1_motor_proto_rawDescOnce.Do(func() { + file_component_motor_v1_motor_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_motor_v1_motor_proto_rawDescData) + }) + return file_component_motor_v1_motor_proto_rawDescData +} + +var file_component_motor_v1_motor_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_component_motor_v1_motor_proto_goTypes = []interface{}{ + (*SetPowerRequest)(nil), // 0: viam.component.motor.v1.SetPowerRequest + (*SetPowerResponse)(nil), // 1: viam.component.motor.v1.SetPowerResponse + (*GoForRequest)(nil), // 2: viam.component.motor.v1.GoForRequest + (*GoForResponse)(nil), // 3: viam.component.motor.v1.GoForResponse + (*GoToRequest)(nil), // 4: viam.component.motor.v1.GoToRequest + (*GoToResponse)(nil), // 5: viam.component.motor.v1.GoToResponse + (*ResetZeroPositionRequest)(nil), // 6: viam.component.motor.v1.ResetZeroPositionRequest + (*ResetZeroPositionResponse)(nil), // 7: viam.component.motor.v1.ResetZeroPositionResponse + (*GetPositionRequest)(nil), // 8: viam.component.motor.v1.GetPositionRequest + (*GetPositionResponse)(nil), // 9: viam.component.motor.v1.GetPositionResponse + (*StopRequest)(nil), // 10: viam.component.motor.v1.StopRequest + (*StopResponse)(nil), // 11: viam.component.motor.v1.StopResponse + (*IsPoweredRequest)(nil), // 12: viam.component.motor.v1.IsPoweredRequest + (*IsPoweredResponse)(nil), // 13: viam.component.motor.v1.IsPoweredResponse + (*GetPropertiesRequest)(nil), // 14: viam.component.motor.v1.GetPropertiesRequest + (*GetPropertiesResponse)(nil), // 15: viam.component.motor.v1.GetPropertiesResponse + (*Status)(nil), // 16: viam.component.motor.v1.Status + (*structpb.Struct)(nil), // 17: google.protobuf.Struct +} +var file_component_motor_v1_motor_proto_depIdxs = []int32{ + 17, // 0: viam.component.motor.v1.SetPowerRequest.extra:type_name -> google.protobuf.Struct + 17, // 1: viam.component.motor.v1.GoForRequest.extra:type_name -> google.protobuf.Struct + 17, // 2: viam.component.motor.v1.GoToRequest.extra:type_name -> google.protobuf.Struct + 17, // 3: viam.component.motor.v1.ResetZeroPositionRequest.extra:type_name -> google.protobuf.Struct + 17, // 4: viam.component.motor.v1.GetPositionRequest.extra:type_name -> google.protobuf.Struct + 17, // 5: viam.component.motor.v1.StopRequest.extra:type_name -> google.protobuf.Struct + 17, // 6: viam.component.motor.v1.IsPoweredRequest.extra:type_name -> google.protobuf.Struct + 17, // 7: viam.component.motor.v1.GetPropertiesRequest.extra:type_name -> google.protobuf.Struct + 0, // 8: viam.component.motor.v1.MotorService.SetPower:input_type -> viam.component.motor.v1.SetPowerRequest + 2, // 9: viam.component.motor.v1.MotorService.GoFor:input_type -> viam.component.motor.v1.GoForRequest + 4, // 10: viam.component.motor.v1.MotorService.GoTo:input_type -> viam.component.motor.v1.GoToRequest + 6, // 11: viam.component.motor.v1.MotorService.ResetZeroPosition:input_type -> viam.component.motor.v1.ResetZeroPositionRequest + 8, // 12: viam.component.motor.v1.MotorService.GetPosition:input_type -> viam.component.motor.v1.GetPositionRequest + 14, // 13: viam.component.motor.v1.MotorService.GetProperties:input_type -> viam.component.motor.v1.GetPropertiesRequest + 10, // 14: viam.component.motor.v1.MotorService.Stop:input_type -> viam.component.motor.v1.StopRequest + 12, // 15: viam.component.motor.v1.MotorService.IsPowered:input_type -> viam.component.motor.v1.IsPoweredRequest + 1, // 16: viam.component.motor.v1.MotorService.SetPower:output_type -> viam.component.motor.v1.SetPowerResponse + 3, // 17: viam.component.motor.v1.MotorService.GoFor:output_type -> viam.component.motor.v1.GoForResponse + 5, // 18: viam.component.motor.v1.MotorService.GoTo:output_type -> viam.component.motor.v1.GoToResponse + 7, // 19: viam.component.motor.v1.MotorService.ResetZeroPosition:output_type -> viam.component.motor.v1.ResetZeroPositionResponse + 9, // 20: viam.component.motor.v1.MotorService.GetPosition:output_type -> viam.component.motor.v1.GetPositionResponse + 15, // 21: viam.component.motor.v1.MotorService.GetProperties:output_type -> viam.component.motor.v1.GetPropertiesResponse + 11, // 22: viam.component.motor.v1.MotorService.Stop:output_type -> viam.component.motor.v1.StopResponse + 13, // 23: viam.component.motor.v1.MotorService.IsPowered:output_type -> viam.component.motor.v1.IsPoweredResponse + 16, // [16:24] is the sub-list for method output_type + 8, // [8:16] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_component_motor_v1_motor_proto_init() } +func file_component_motor_v1_motor_proto_init() { + if File_component_motor_v1_motor_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_motor_v1_motor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPowerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetPowerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoForRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoForResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoToRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoToResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResetZeroPositionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResetZeroPositionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsPoweredRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsPoweredResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPropertiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPropertiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_motor_v1_motor_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_motor_v1_motor_proto_rawDesc, + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_motor_v1_motor_proto_goTypes, + DependencyIndexes: file_component_motor_v1_motor_proto_depIdxs, + MessageInfos: file_component_motor_v1_motor_proto_msgTypes, + }.Build() + File_component_motor_v1_motor_proto = out.File + file_component_motor_v1_motor_proto_rawDesc = nil + file_component_motor_v1_motor_proto_goTypes = nil + file_component_motor_v1_motor_proto_depIdxs = nil +} diff --git a/component/motor/v1/motor.pb.gw.go b/component/motor/v1/motor.pb.gw.go new file mode 100644 index 000000000..c75ec3b27 --- /dev/null +++ b/component/motor/v1/motor.pb.gw.go @@ -0,0 +1,1038 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/motor/v1/motor.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_MotorService_SetPower_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotorService_SetPower_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetPowerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_SetPower_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetPower(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotorService_SetPower_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetPowerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_SetPower_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetPower(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MotorService_GoFor_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotorService_GoFor_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GoForRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_GoFor_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GoFor(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotorService_GoFor_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GoForRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_GoFor_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GoFor(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MotorService_GoTo_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotorService_GoTo_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GoToRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_GoTo_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GoTo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotorService_GoTo_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GoToRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_GoTo_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GoTo(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MotorService_ResetZeroPosition_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotorService_ResetZeroPosition_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResetZeroPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_ResetZeroPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ResetZeroPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotorService_ResetZeroPosition_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResetZeroPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_ResetZeroPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ResetZeroPosition(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MotorService_GetPosition_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotorService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_GetPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotorService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_GetPosition_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetPosition(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MotorService_GetProperties_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotorService_GetProperties_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPropertiesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_GetProperties_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetProperties(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotorService_GetProperties_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPropertiesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_GetProperties_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetProperties(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MotorService_Stop_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotorService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_Stop_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Stop(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotorService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_Stop_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Stop(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MotorService_IsPowered_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotorService_IsPowered_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IsPoweredRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_IsPowered_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.IsPowered(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotorService_IsPowered_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IsPoweredRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotorService_IsPowered_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.IsPowered(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMotorServiceHandlerServer registers the http handlers for service MotorService to "mux". +// UnaryRPC :call MotorServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMotorServiceHandlerFromEndpoint instead. +func RegisterMotorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MotorServiceServer) error { + + mux.Handle("PUT", pattern_MotorService_SetPower_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/SetPower", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/power")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotorService_SetPower_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_SetPower_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_MotorService_GoFor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GoFor", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/go_for")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotorService_GoFor_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GoFor_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_MotorService_GoTo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GoTo", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/go_to")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotorService_GoTo_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GoTo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_MotorService_ResetZeroPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/ResetZeroPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/zero")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotorService_ResetZeroPosition_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_ResetZeroPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MotorService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotorService_GetPosition_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MotorService_GetProperties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GetProperties", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/features")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotorService_GetProperties_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GetProperties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_MotorService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotorService_Stop_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MotorService_IsPowered_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/IsPowered", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/powered")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotorService_IsPowered_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_IsPowered_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMotorServiceHandlerFromEndpoint is same as RegisterMotorServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMotorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMotorServiceHandler(ctx, mux, conn) +} + +// RegisterMotorServiceHandler registers the http handlers for service MotorService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMotorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMotorServiceHandlerClient(ctx, mux, NewMotorServiceClient(conn)) +} + +// RegisterMotorServiceHandlerClient registers the http handlers for service MotorService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MotorServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MotorServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MotorServiceClient" to call the correct interceptors. +func RegisterMotorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MotorServiceClient) error { + + mux.Handle("PUT", pattern_MotorService_SetPower_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/SetPower", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/power")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotorService_SetPower_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_SetPower_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_MotorService_GoFor_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GoFor", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/go_for")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotorService_GoFor_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GoFor_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_MotorService_GoTo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GoTo", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/go_to")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotorService_GoTo_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GoTo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_MotorService_ResetZeroPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/ResetZeroPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/zero")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotorService_ResetZeroPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_ResetZeroPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MotorService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotorService_GetPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MotorService_GetProperties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/GetProperties", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/features")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotorService_GetProperties_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_GetProperties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_MotorService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotorService_Stop_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MotorService_IsPowered_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.motor.v1.MotorService/IsPowered", runtime.WithHTTPPathPattern("/viam/api/v1/component/motor/{name}/powered")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotorService_IsPowered_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotorService_IsPowered_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_MotorService_SetPower_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "power"}, "")) + + pattern_MotorService_GoFor_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "go_for"}, "")) + + pattern_MotorService_GoTo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "go_to"}, "")) + + pattern_MotorService_ResetZeroPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "zero"}, "")) + + pattern_MotorService_GetPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "position"}, "")) + + pattern_MotorService_GetProperties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "features"}, "")) + + pattern_MotorService_Stop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "stop"}, "")) + + pattern_MotorService_IsPowered_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "motor", "name", "powered"}, "")) +) + +var ( + forward_MotorService_SetPower_0 = runtime.ForwardResponseMessage + + forward_MotorService_GoFor_0 = runtime.ForwardResponseMessage + + forward_MotorService_GoTo_0 = runtime.ForwardResponseMessage + + forward_MotorService_ResetZeroPosition_0 = runtime.ForwardResponseMessage + + forward_MotorService_GetPosition_0 = runtime.ForwardResponseMessage + + forward_MotorService_GetProperties_0 = runtime.ForwardResponseMessage + + forward_MotorService_Stop_0 = runtime.ForwardResponseMessage + + forward_MotorService_IsPowered_0 = runtime.ForwardResponseMessage +) diff --git a/component/motor/v1/motor_grpc.pb.go b/component/motor/v1/motor_grpc.pb.go new file mode 100644 index 000000000..6ff49177b --- /dev/null +++ b/component/motor/v1/motor_grpc.pb.go @@ -0,0 +1,389 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// MotorServiceClient is the client API for MotorService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MotorServiceClient interface { + // SetPower sets the percentage of the motor's total power that should be employed + // expressed a value between -1 and 1 where negative values indicate a backwards + // direction and positive values a forward direction + SetPower(ctx context.Context, in *SetPowerRequest, opts ...grpc.CallOption) (*SetPowerResponse, error) + // GoFor instructs the motor to turn at a specified speed, which is expressed in RPM, + // for a specified number of rotations relative to its starting position + // This method will return an error if position reporting is not supported + // If revolutions is 0, this will run the motor at rpm indefinitely + // If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in. + GoFor(ctx context.Context, in *GoForRequest, opts ...grpc.CallOption) (*GoForResponse, error) + // GoTo requests the robot's motor to move to a specific position that + // is relative to its home position at a specified speed which is expressed in RPM + // This method will return an error if position reporting is not supported + GoTo(ctx context.Context, in *GoToRequest, opts ...grpc.CallOption) (*GoToResponse, error) + // ResetZeroPosition sets the current position of the motor as the new zero position + // This method will return an error if position reporting is not supported + ResetZeroPosition(ctx context.Context, in *ResetZeroPositionRequest, opts ...grpc.CallOption) (*ResetZeroPositionResponse, error) + // Position reports the position of the robot's motor relative to its zero position + // This method will return an error if position reporting is not supported + GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) + // GetProperties returns a message of booleans indicating which optional features the robot's motor supports + GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) + Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) + // IsPowered returns true if the robot's motor off + // To Do (FA): This will be deprecated + IsPowered(ctx context.Context, in *IsPoweredRequest, opts ...grpc.CallOption) (*IsPoweredResponse, error) +} + +type motorServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMotorServiceClient(cc grpc.ClientConnInterface) MotorServiceClient { + return &motorServiceClient{cc} +} + +func (c *motorServiceClient) SetPower(ctx context.Context, in *SetPowerRequest, opts ...grpc.CallOption) (*SetPowerResponse, error) { + out := new(SetPowerResponse) + err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/SetPower", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *motorServiceClient) GoFor(ctx context.Context, in *GoForRequest, opts ...grpc.CallOption) (*GoForResponse, error) { + out := new(GoForResponse) + err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/GoFor", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *motorServiceClient) GoTo(ctx context.Context, in *GoToRequest, opts ...grpc.CallOption) (*GoToResponse, error) { + out := new(GoToResponse) + err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/GoTo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *motorServiceClient) ResetZeroPosition(ctx context.Context, in *ResetZeroPositionRequest, opts ...grpc.CallOption) (*ResetZeroPositionResponse, error) { + out := new(ResetZeroPositionResponse) + err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/ResetZeroPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *motorServiceClient) GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) { + out := new(GetPositionResponse) + err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/GetPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *motorServiceClient) GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) { + out := new(GetPropertiesResponse) + err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/GetProperties", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *motorServiceClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { + out := new(StopResponse) + err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/Stop", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *motorServiceClient) IsPowered(ctx context.Context, in *IsPoweredRequest, opts ...grpc.CallOption) (*IsPoweredResponse, error) { + out := new(IsPoweredResponse) + err := c.cc.Invoke(ctx, "/viam.component.motor.v1.MotorService/IsPowered", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MotorServiceServer is the server API for MotorService service. +// All implementations must embed UnimplementedMotorServiceServer +// for forward compatibility +type MotorServiceServer interface { + // SetPower sets the percentage of the motor's total power that should be employed + // expressed a value between -1 and 1 where negative values indicate a backwards + // direction and positive values a forward direction + SetPower(context.Context, *SetPowerRequest) (*SetPowerResponse, error) + // GoFor instructs the motor to turn at a specified speed, which is expressed in RPM, + // for a specified number of rotations relative to its starting position + // This method will return an error if position reporting is not supported + // If revolutions is 0, this will run the motor at rpm indefinitely + // If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in. + GoFor(context.Context, *GoForRequest) (*GoForResponse, error) + // GoTo requests the robot's motor to move to a specific position that + // is relative to its home position at a specified speed which is expressed in RPM + // This method will return an error if position reporting is not supported + GoTo(context.Context, *GoToRequest) (*GoToResponse, error) + // ResetZeroPosition sets the current position of the motor as the new zero position + // This method will return an error if position reporting is not supported + ResetZeroPosition(context.Context, *ResetZeroPositionRequest) (*ResetZeroPositionResponse, error) + // Position reports the position of the robot's motor relative to its zero position + // This method will return an error if position reporting is not supported + GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) + // GetProperties returns a message of booleans indicating which optional features the robot's motor supports + GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) + Stop(context.Context, *StopRequest) (*StopResponse, error) + // IsPowered returns true if the robot's motor off + // To Do (FA): This will be deprecated + IsPowered(context.Context, *IsPoweredRequest) (*IsPoweredResponse, error) + mustEmbedUnimplementedMotorServiceServer() +} + +// UnimplementedMotorServiceServer must be embedded to have forward compatible implementations. +type UnimplementedMotorServiceServer struct { +} + +func (UnimplementedMotorServiceServer) SetPower(context.Context, *SetPowerRequest) (*SetPowerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetPower not implemented") +} +func (UnimplementedMotorServiceServer) GoFor(context.Context, *GoForRequest) (*GoForResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GoFor not implemented") +} +func (UnimplementedMotorServiceServer) GoTo(context.Context, *GoToRequest) (*GoToResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GoTo not implemented") +} +func (UnimplementedMotorServiceServer) ResetZeroPosition(context.Context, *ResetZeroPositionRequest) (*ResetZeroPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResetZeroPosition not implemented") +} +func (UnimplementedMotorServiceServer) GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPosition not implemented") +} +func (UnimplementedMotorServiceServer) GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProperties not implemented") +} +func (UnimplementedMotorServiceServer) Stop(context.Context, *StopRequest) (*StopResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (UnimplementedMotorServiceServer) IsPowered(context.Context, *IsPoweredRequest) (*IsPoweredResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsPowered not implemented") +} +func (UnimplementedMotorServiceServer) mustEmbedUnimplementedMotorServiceServer() {} + +// UnsafeMotorServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MotorServiceServer will +// result in compilation errors. +type UnsafeMotorServiceServer interface { + mustEmbedUnimplementedMotorServiceServer() +} + +func RegisterMotorServiceServer(s grpc.ServiceRegistrar, srv MotorServiceServer) { + s.RegisterService(&MotorService_ServiceDesc, srv) +} + +func _MotorService_SetPower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPowerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotorServiceServer).SetPower(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.motor.v1.MotorService/SetPower", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotorServiceServer).SetPower(ctx, req.(*SetPowerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MotorService_GoFor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GoForRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotorServiceServer).GoFor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.motor.v1.MotorService/GoFor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotorServiceServer).GoFor(ctx, req.(*GoForRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MotorService_GoTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GoToRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotorServiceServer).GoTo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.motor.v1.MotorService/GoTo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotorServiceServer).GoTo(ctx, req.(*GoToRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MotorService_ResetZeroPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResetZeroPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotorServiceServer).ResetZeroPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.motor.v1.MotorService/ResetZeroPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotorServiceServer).ResetZeroPosition(ctx, req.(*ResetZeroPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MotorService_GetPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotorServiceServer).GetPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.motor.v1.MotorService/GetPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotorServiceServer).GetPosition(ctx, req.(*GetPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MotorService_GetProperties_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPropertiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotorServiceServer).GetProperties(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.motor.v1.MotorService/GetProperties", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotorServiceServer).GetProperties(ctx, req.(*GetPropertiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MotorService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotorServiceServer).Stop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.motor.v1.MotorService/Stop", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotorServiceServer).Stop(ctx, req.(*StopRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MotorService_IsPowered_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsPoweredRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotorServiceServer).IsPowered(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.motor.v1.MotorService/IsPowered", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotorServiceServer).IsPowered(ctx, req.(*IsPoweredRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MotorService_ServiceDesc is the grpc.ServiceDesc for MotorService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MotorService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.motor.v1.MotorService", + HandlerType: (*MotorServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SetPower", + Handler: _MotorService_SetPower_Handler, + }, + { + MethodName: "GoFor", + Handler: _MotorService_GoFor_Handler, + }, + { + MethodName: "GoTo", + Handler: _MotorService_GoTo_Handler, + }, + { + MethodName: "ResetZeroPosition", + Handler: _MotorService_ResetZeroPosition_Handler, + }, + { + MethodName: "GetPosition", + Handler: _MotorService_GetPosition_Handler, + }, + { + MethodName: "GetProperties", + Handler: _MotorService_GetProperties_Handler, + }, + { + MethodName: "Stop", + Handler: _MotorService_Stop_Handler, + }, + { + MethodName: "IsPowered", + Handler: _MotorService_IsPowered_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/motor/v1/motor.proto", +} diff --git a/component/movementsensor/v1/movementsensor.pb.go b/component/movementsensor/v1/movementsensor.pb.go new file mode 100644 index 000000000..e554acffa --- /dev/null +++ b/component/movementsensor/v1/movementsensor.pb.go @@ -0,0 +1,1176 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/movementsensor/v1/movementsensor.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetLinearVelocityRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a movement sensor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetLinearVelocityRequest) Reset() { + *x = GetLinearVelocityRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLinearVelocityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLinearVelocityRequest) ProtoMessage() {} + +func (x *GetLinearVelocityRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLinearVelocityRequest.ProtoReflect.Descriptor instead. +func (*GetLinearVelocityRequest) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{0} +} + +func (x *GetLinearVelocityRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetLinearVelocityResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // linear velocity contains velocity in mm/s across x/y/z axes + LinearVelocity *v1.Vector3 `protobuf:"bytes,1,opt,name=linear_velocity,json=linearVelocity,proto3" json:"linear_velocity,omitempty"` +} + +func (x *GetLinearVelocityResponse) Reset() { + *x = GetLinearVelocityResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLinearVelocityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLinearVelocityResponse) ProtoMessage() {} + +func (x *GetLinearVelocityResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLinearVelocityResponse.ProtoReflect.Descriptor instead. +func (*GetLinearVelocityResponse) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{1} +} + +func (x *GetLinearVelocityResponse) GetLinearVelocity() *v1.Vector3 { + if x != nil { + return x.LinearVelocity + } + return nil +} + +type GetAngularVelocityRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a movement sensor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAngularVelocityRequest) Reset() { + *x = GetAngularVelocityRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAngularVelocityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAngularVelocityRequest) ProtoMessage() {} + +func (x *GetAngularVelocityRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAngularVelocityRequest.ProtoReflect.Descriptor instead. +func (*GetAngularVelocityRequest) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{2} +} + +func (x *GetAngularVelocityRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetAngularVelocityResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // angular velocity contains velocity in degrees/s across x/y/z axes + AngularVelocity *v1.Vector3 `protobuf:"bytes,1,opt,name=angular_velocity,json=angularVelocity,proto3" json:"angular_velocity,omitempty"` +} + +func (x *GetAngularVelocityResponse) Reset() { + *x = GetAngularVelocityResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAngularVelocityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAngularVelocityResponse) ProtoMessage() {} + +func (x *GetAngularVelocityResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAngularVelocityResponse.ProtoReflect.Descriptor instead. +func (*GetAngularVelocityResponse) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{3} +} + +func (x *GetAngularVelocityResponse) GetAngularVelocity() *v1.Vector3 { + if x != nil { + return x.AngularVelocity + } + return nil +} + +type GetCompassHeadingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a movement sensor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetCompassHeadingRequest) Reset() { + *x = GetCompassHeadingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCompassHeadingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCompassHeadingRequest) ProtoMessage() {} + +func (x *GetCompassHeadingRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCompassHeadingRequest.ProtoReflect.Descriptor instead. +func (*GetCompassHeadingRequest) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{4} +} + +func (x *GetCompassHeadingRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetCompassHeadingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A number from 0-359 where + // 0 is North, 90 is East, 180 is South, and 270 is West + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *GetCompassHeadingResponse) Reset() { + *x = GetCompassHeadingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCompassHeadingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCompassHeadingResponse) ProtoMessage() {} + +func (x *GetCompassHeadingResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCompassHeadingResponse.ProtoReflect.Descriptor instead. +func (*GetCompassHeadingResponse) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{5} +} + +func (x *GetCompassHeadingResponse) GetValue() float64 { + if x != nil { + return x.Value + } + return 0 +} + +type GetOrientationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a movement sensor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetOrientationRequest) Reset() { + *x = GetOrientationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOrientationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrientationRequest) ProtoMessage() {} + +func (x *GetOrientationRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOrientationRequest.ProtoReflect.Descriptor instead. +func (*GetOrientationRequest) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{6} +} + +func (x *GetOrientationRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetOrientationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Orientation *v1.Orientation `protobuf:"bytes,1,opt,name=orientation,proto3" json:"orientation,omitempty"` +} + +func (x *GetOrientationResponse) Reset() { + *x = GetOrientationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOrientationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrientationResponse) ProtoMessage() {} + +func (x *GetOrientationResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOrientationResponse.ProtoReflect.Descriptor instead. +func (*GetOrientationResponse) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{7} +} + +func (x *GetOrientationResponse) GetOrientation() *v1.Orientation { + if x != nil { + return x.Orientation + } + return nil +} + +type GetPositionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a movement sensor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPositionRequest) Reset() { + *x = GetPositionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionRequest) ProtoMessage() {} + +func (x *GetPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionRequest.ProtoReflect.Descriptor instead. +func (*GetPositionRequest) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{8} +} + +func (x *GetPositionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetPositionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Coordinate *v1.GeoPoint `protobuf:"bytes,1,opt,name=coordinate,proto3" json:"coordinate,omitempty"` + AltitudeMm float32 `protobuf:"fixed32,2,opt,name=altitude_mm,json=altitudeMm,proto3" json:"altitude_mm,omitempty"` +} + +func (x *GetPositionResponse) Reset() { + *x = GetPositionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionResponse) ProtoMessage() {} + +func (x *GetPositionResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionResponse.ProtoReflect.Descriptor instead. +func (*GetPositionResponse) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{9} +} + +func (x *GetPositionResponse) GetCoordinate() *v1.GeoPoint { + if x != nil { + return x.Coordinate + } + return nil +} + +func (x *GetPositionResponse) GetAltitudeMm() float32 { + if x != nil { + return x.AltitudeMm + } + return 0 +} + +type GetPropertiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a movement sensor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPropertiesRequest) Reset() { + *x = GetPropertiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPropertiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPropertiesRequest) ProtoMessage() {} + +func (x *GetPropertiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPropertiesRequest.ProtoReflect.Descriptor instead. +func (*GetPropertiesRequest) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{10} +} + +func (x *GetPropertiesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetPropertiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LinearVelocitySupported bool `protobuf:"varint,1,opt,name=linear_velocity_supported,json=linearVelocitySupported,proto3" json:"linear_velocity_supported,omitempty"` + AngularVelocitySupported bool `protobuf:"varint,2,opt,name=angular_velocity_supported,json=angularVelocitySupported,proto3" json:"angular_velocity_supported,omitempty"` + OrientationSupported bool `protobuf:"varint,3,opt,name=orientation_supported,json=orientationSupported,proto3" json:"orientation_supported,omitempty"` + PositionSupported bool `protobuf:"varint,4,opt,name=position_supported,json=positionSupported,proto3" json:"position_supported,omitempty"` + CompassHeadingSupported bool `protobuf:"varint,5,opt,name=compass_heading_supported,json=compassHeadingSupported,proto3" json:"compass_heading_supported,omitempty"` +} + +func (x *GetPropertiesResponse) Reset() { + *x = GetPropertiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPropertiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPropertiesResponse) ProtoMessage() {} + +func (x *GetPropertiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPropertiesResponse.ProtoReflect.Descriptor instead. +func (*GetPropertiesResponse) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{11} +} + +func (x *GetPropertiesResponse) GetLinearVelocitySupported() bool { + if x != nil { + return x.LinearVelocitySupported + } + return false +} + +func (x *GetPropertiesResponse) GetAngularVelocitySupported() bool { + if x != nil { + return x.AngularVelocitySupported + } + return false +} + +func (x *GetPropertiesResponse) GetOrientationSupported() bool { + if x != nil { + return x.OrientationSupported + } + return false +} + +func (x *GetPropertiesResponse) GetPositionSupported() bool { + if x != nil { + return x.PositionSupported + } + return false +} + +func (x *GetPropertiesResponse) GetCompassHeadingSupported() bool { + if x != nil { + return x.CompassHeadingSupported + } + return false +} + +type GetAccuracyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a movement sensor + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAccuracyRequest) Reset() { + *x = GetAccuracyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccuracyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccuracyRequest) ProtoMessage() {} + +func (x *GetAccuracyRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccuracyRequest.ProtoReflect.Descriptor instead. +func (*GetAccuracyRequest) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{12} +} + +func (x *GetAccuracyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetAccuracyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccuracyMm map[string]float32 `protobuf:"bytes,1,rep,name=accuracy_mm,json=accuracyMm,proto3" json:"accuracy_mm,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` +} + +func (x *GetAccuracyResponse) Reset() { + *x = GetAccuracyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccuracyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccuracyResponse) ProtoMessage() {} + +func (x *GetAccuracyResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_movementsensor_v1_movementsensor_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccuracyResponse.ProtoReflect.Descriptor instead. +func (*GetAccuracyResponse) Descriptor() ([]byte, []int) { + return file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP(), []int{13} +} + +func (x *GetAccuracyResponse) GetAccuracyMm() map[string]float32 { + if x != nil { + return x.AccuracyMm + } + return nil +} + +var File_component_movementsensor_v1_movementsensor_proto protoreflect.FileDescriptor + +var file_component_movementsensor_v1_movementsensor_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, + 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x20, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x18, 0x47, 0x65, + 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5d, 0x0a, 0x19, 0x47, 0x65, + 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x6c, 0x69, 0x6e, 0x65, 0x61, + 0x72, 0x5f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x52, 0x0e, 0x6c, 0x69, 0x6e, 0x65, 0x61, + 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x22, 0x2f, 0x0a, 0x19, 0x47, 0x65, 0x74, + 0x41, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x1a, 0x47, 0x65, + 0x74, 0x41, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x61, 0x6e, 0x67, 0x75, + 0x6c, 0x61, 0x72, 0x5f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x33, 0x52, 0x0f, 0x61, 0x6e, 0x67, + 0x75, 0x6c, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x22, 0x2e, 0x0a, 0x18, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x19, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x2b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x57, 0x0a, 0x16, + 0x47, 0x65, 0x74, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x69, + 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x70, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6f, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x5f, 0x6d, 0x6d, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x4d, + 0x6d, 0x22, 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb1, 0x02, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x69, 0x6e, 0x65, 0x61, + 0x72, 0x5f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x6c, 0x69, 0x6e, 0x65, + 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x5f, 0x76, + 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, + 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x12, 0x33, 0x0a, 0x15, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x14, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x11, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x13, + 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x5f, + 0x6d, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x4d, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0a, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x4d, 0x6d, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, + 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x4d, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x9e, 0x0b, 0x0a, 0x15, 0x4d, + 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0xd2, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x65, + 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x6e, + 0x65, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, 0x69, + 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, + 0x5f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x12, 0xd6, 0x01, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x41, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, + 0x12, 0x3b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x56, 0x65, + 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, + 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x56, 0x65, 0x6c, 0x6f, 0x63, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x5f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, + 0x74, 0x79, 0x12, 0xd2, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x73, + 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x3a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, + 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x61, + 0x73, 0x73, 0x48, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, 0x69, 0x61, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2f, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x73, 0x73, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x12, 0xc5, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4f, + 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, + 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, + 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0xb9, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x34, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xc1, 0x01, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x36, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, + 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, + 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, + 0xb9, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x12, + 0x34, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x75, + 0x72, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x6f, 0x76, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x42, 0x53, 0x0a, 0x24, 0x63, + 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x5a, 0x2b, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x6d, + 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_movementsensor_v1_movementsensor_proto_rawDescOnce sync.Once + file_component_movementsensor_v1_movementsensor_proto_rawDescData = file_component_movementsensor_v1_movementsensor_proto_rawDesc +) + +func file_component_movementsensor_v1_movementsensor_proto_rawDescGZIP() []byte { + file_component_movementsensor_v1_movementsensor_proto_rawDescOnce.Do(func() { + file_component_movementsensor_v1_movementsensor_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_movementsensor_v1_movementsensor_proto_rawDescData) + }) + return file_component_movementsensor_v1_movementsensor_proto_rawDescData +} + +var file_component_movementsensor_v1_movementsensor_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_component_movementsensor_v1_movementsensor_proto_goTypes = []interface{}{ + (*GetLinearVelocityRequest)(nil), // 0: viam.component.movementsensor.v1.GetLinearVelocityRequest + (*GetLinearVelocityResponse)(nil), // 1: viam.component.movementsensor.v1.GetLinearVelocityResponse + (*GetAngularVelocityRequest)(nil), // 2: viam.component.movementsensor.v1.GetAngularVelocityRequest + (*GetAngularVelocityResponse)(nil), // 3: viam.component.movementsensor.v1.GetAngularVelocityResponse + (*GetCompassHeadingRequest)(nil), // 4: viam.component.movementsensor.v1.GetCompassHeadingRequest + (*GetCompassHeadingResponse)(nil), // 5: viam.component.movementsensor.v1.GetCompassHeadingResponse + (*GetOrientationRequest)(nil), // 6: viam.component.movementsensor.v1.GetOrientationRequest + (*GetOrientationResponse)(nil), // 7: viam.component.movementsensor.v1.GetOrientationResponse + (*GetPositionRequest)(nil), // 8: viam.component.movementsensor.v1.GetPositionRequest + (*GetPositionResponse)(nil), // 9: viam.component.movementsensor.v1.GetPositionResponse + (*GetPropertiesRequest)(nil), // 10: viam.component.movementsensor.v1.GetPropertiesRequest + (*GetPropertiesResponse)(nil), // 11: viam.component.movementsensor.v1.GetPropertiesResponse + (*GetAccuracyRequest)(nil), // 12: viam.component.movementsensor.v1.GetAccuracyRequest + (*GetAccuracyResponse)(nil), // 13: viam.component.movementsensor.v1.GetAccuracyResponse + nil, // 14: viam.component.movementsensor.v1.GetAccuracyResponse.AccuracyMmEntry + (*v1.Vector3)(nil), // 15: viam.common.v1.Vector3 + (*v1.Orientation)(nil), // 16: viam.common.v1.Orientation + (*v1.GeoPoint)(nil), // 17: viam.common.v1.GeoPoint +} +var file_component_movementsensor_v1_movementsensor_proto_depIdxs = []int32{ + 15, // 0: viam.component.movementsensor.v1.GetLinearVelocityResponse.linear_velocity:type_name -> viam.common.v1.Vector3 + 15, // 1: viam.component.movementsensor.v1.GetAngularVelocityResponse.angular_velocity:type_name -> viam.common.v1.Vector3 + 16, // 2: viam.component.movementsensor.v1.GetOrientationResponse.orientation:type_name -> viam.common.v1.Orientation + 17, // 3: viam.component.movementsensor.v1.GetPositionResponse.coordinate:type_name -> viam.common.v1.GeoPoint + 14, // 4: viam.component.movementsensor.v1.GetAccuracyResponse.accuracy_mm:type_name -> viam.component.movementsensor.v1.GetAccuracyResponse.AccuracyMmEntry + 0, // 5: viam.component.movementsensor.v1.MovementSensorService.GetLinearVelocity:input_type -> viam.component.movementsensor.v1.GetLinearVelocityRequest + 2, // 6: viam.component.movementsensor.v1.MovementSensorService.GetAngularVelocity:input_type -> viam.component.movementsensor.v1.GetAngularVelocityRequest + 4, // 7: viam.component.movementsensor.v1.MovementSensorService.GetCompassHeading:input_type -> viam.component.movementsensor.v1.GetCompassHeadingRequest + 6, // 8: viam.component.movementsensor.v1.MovementSensorService.GetOrientation:input_type -> viam.component.movementsensor.v1.GetOrientationRequest + 8, // 9: viam.component.movementsensor.v1.MovementSensorService.GetPosition:input_type -> viam.component.movementsensor.v1.GetPositionRequest + 10, // 10: viam.component.movementsensor.v1.MovementSensorService.GetProperties:input_type -> viam.component.movementsensor.v1.GetPropertiesRequest + 12, // 11: viam.component.movementsensor.v1.MovementSensorService.GetAccuracy:input_type -> viam.component.movementsensor.v1.GetAccuracyRequest + 1, // 12: viam.component.movementsensor.v1.MovementSensorService.GetLinearVelocity:output_type -> viam.component.movementsensor.v1.GetLinearVelocityResponse + 3, // 13: viam.component.movementsensor.v1.MovementSensorService.GetAngularVelocity:output_type -> viam.component.movementsensor.v1.GetAngularVelocityResponse + 5, // 14: viam.component.movementsensor.v1.MovementSensorService.GetCompassHeading:output_type -> viam.component.movementsensor.v1.GetCompassHeadingResponse + 7, // 15: viam.component.movementsensor.v1.MovementSensorService.GetOrientation:output_type -> viam.component.movementsensor.v1.GetOrientationResponse + 9, // 16: viam.component.movementsensor.v1.MovementSensorService.GetPosition:output_type -> viam.component.movementsensor.v1.GetPositionResponse + 11, // 17: viam.component.movementsensor.v1.MovementSensorService.GetProperties:output_type -> viam.component.movementsensor.v1.GetPropertiesResponse + 13, // 18: viam.component.movementsensor.v1.MovementSensorService.GetAccuracy:output_type -> viam.component.movementsensor.v1.GetAccuracyResponse + 12, // [12:19] is the sub-list for method output_type + 5, // [5:12] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_component_movementsensor_v1_movementsensor_proto_init() } +func file_component_movementsensor_v1_movementsensor_proto_init() { + if File_component_movementsensor_v1_movementsensor_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_movementsensor_v1_movementsensor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLinearVelocityRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLinearVelocityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAngularVelocityRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAngularVelocityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCompassHeadingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCompassHeadingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrientationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrientationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPropertiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPropertiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccuracyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_movementsensor_v1_movementsensor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccuracyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_movementsensor_v1_movementsensor_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_movementsensor_v1_movementsensor_proto_goTypes, + DependencyIndexes: file_component_movementsensor_v1_movementsensor_proto_depIdxs, + MessageInfos: file_component_movementsensor_v1_movementsensor_proto_msgTypes, + }.Build() + File_component_movementsensor_v1_movementsensor_proto = out.File + file_component_movementsensor_v1_movementsensor_proto_rawDesc = nil + file_component_movementsensor_v1_movementsensor_proto_goTypes = nil + file_component_movementsensor_v1_movementsensor_proto_depIdxs = nil +} diff --git a/component/movementsensor/v1/movementsensor.pb.gw.go b/component/movementsensor/v1/movementsensor.pb.gw.go new file mode 100644 index 000000000..9cda965c7 --- /dev/null +++ b/component/movementsensor/v1/movementsensor.pb.gw.go @@ -0,0 +1,793 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/movementsensor/v1/movementsensor.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_MovementSensorService_GetLinearVelocity_0(ctx context.Context, marshaler runtime.Marshaler, client MovementSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLinearVelocityRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetLinearVelocity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MovementSensorService_GetLinearVelocity_0(ctx context.Context, marshaler runtime.Marshaler, server MovementSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLinearVelocityRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetLinearVelocity(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MovementSensorService_GetAngularVelocity_0(ctx context.Context, marshaler runtime.Marshaler, client MovementSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAngularVelocityRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetAngularVelocity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MovementSensorService_GetAngularVelocity_0(ctx context.Context, marshaler runtime.Marshaler, server MovementSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAngularVelocityRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetAngularVelocity(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MovementSensorService_GetCompassHeading_0(ctx context.Context, marshaler runtime.Marshaler, client MovementSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCompassHeadingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetCompassHeading(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MovementSensorService_GetCompassHeading_0(ctx context.Context, marshaler runtime.Marshaler, server MovementSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCompassHeadingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetCompassHeading(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MovementSensorService_GetOrientation_0(ctx context.Context, marshaler runtime.Marshaler, client MovementSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetOrientationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetOrientation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MovementSensorService_GetOrientation_0(ctx context.Context, marshaler runtime.Marshaler, server MovementSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetOrientationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetOrientation(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MovementSensorService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, client MovementSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MovementSensorService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, server MovementSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetPosition(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MovementSensorService_GetProperties_0(ctx context.Context, marshaler runtime.Marshaler, client MovementSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPropertiesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetProperties(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MovementSensorService_GetProperties_0(ctx context.Context, marshaler runtime.Marshaler, server MovementSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPropertiesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetProperties(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MovementSensorService_GetAccuracy_0(ctx context.Context, marshaler runtime.Marshaler, client MovementSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccuracyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetAccuracy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MovementSensorService_GetAccuracy_0(ctx context.Context, marshaler runtime.Marshaler, server MovementSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccuracyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetAccuracy(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMovementSensorServiceHandlerServer registers the http handlers for service MovementSensorService to "mux". +// UnaryRPC :call MovementSensorServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMovementSensorServiceHandlerFromEndpoint instead. +func RegisterMovementSensorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MovementSensorServiceServer) error { + + mux.Handle("GET", pattern_MovementSensorService_GetLinearVelocity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetLinearVelocity", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/linear_velocity")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MovementSensorService_GetLinearVelocity_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetLinearVelocity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetAngularVelocity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetAngularVelocity", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/angular_velocity")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MovementSensorService_GetAngularVelocity_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetAngularVelocity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetCompassHeading_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetCompassHeading", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/compass_heading")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MovementSensorService_GetCompassHeading_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetCompassHeading_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetOrientation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetOrientation", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/orientation")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MovementSensorService_GetOrientation_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetOrientation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MovementSensorService_GetPosition_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetProperties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetProperties", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/properties")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MovementSensorService_GetProperties_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetProperties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetAccuracy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetAccuracy", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/accuracy")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MovementSensorService_GetAccuracy_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetAccuracy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMovementSensorServiceHandlerFromEndpoint is same as RegisterMovementSensorServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMovementSensorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMovementSensorServiceHandler(ctx, mux, conn) +} + +// RegisterMovementSensorServiceHandler registers the http handlers for service MovementSensorService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMovementSensorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMovementSensorServiceHandlerClient(ctx, mux, NewMovementSensorServiceClient(conn)) +} + +// RegisterMovementSensorServiceHandlerClient registers the http handlers for service MovementSensorService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MovementSensorServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MovementSensorServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MovementSensorServiceClient" to call the correct interceptors. +func RegisterMovementSensorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MovementSensorServiceClient) error { + + mux.Handle("GET", pattern_MovementSensorService_GetLinearVelocity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetLinearVelocity", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/linear_velocity")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MovementSensorService_GetLinearVelocity_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetLinearVelocity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetAngularVelocity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetAngularVelocity", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/angular_velocity")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MovementSensorService_GetAngularVelocity_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetAngularVelocity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetCompassHeading_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetCompassHeading", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/compass_heading")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MovementSensorService_GetCompassHeading_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetCompassHeading_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetOrientation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetOrientation", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/orientation")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MovementSensorService_GetOrientation_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetOrientation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MovementSensorService_GetPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetProperties_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetProperties", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/properties")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MovementSensorService_GetProperties_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetProperties_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MovementSensorService_GetAccuracy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.movementsensor.v1.MovementSensorService/GetAccuracy", runtime.WithHTTPPathPattern("/viam/api/v1/component/movementsensor/{name}/accuracy")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MovementSensorService_GetAccuracy_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MovementSensorService_GetAccuracy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_MovementSensorService_GetLinearVelocity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "linear_velocity"}, "")) + + pattern_MovementSensorService_GetAngularVelocity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "angular_velocity"}, "")) + + pattern_MovementSensorService_GetCompassHeading_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "compass_heading"}, "")) + + pattern_MovementSensorService_GetOrientation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "orientation"}, "")) + + pattern_MovementSensorService_GetPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "position"}, "")) + + pattern_MovementSensorService_GetProperties_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "properties"}, "")) + + pattern_MovementSensorService_GetAccuracy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "movementsensor", "name", "accuracy"}, "")) +) + +var ( + forward_MovementSensorService_GetLinearVelocity_0 = runtime.ForwardResponseMessage + + forward_MovementSensorService_GetAngularVelocity_0 = runtime.ForwardResponseMessage + + forward_MovementSensorService_GetCompassHeading_0 = runtime.ForwardResponseMessage + + forward_MovementSensorService_GetOrientation_0 = runtime.ForwardResponseMessage + + forward_MovementSensorService_GetPosition_0 = runtime.ForwardResponseMessage + + forward_MovementSensorService_GetProperties_0 = runtime.ForwardResponseMessage + + forward_MovementSensorService_GetAccuracy_0 = runtime.ForwardResponseMessage +) diff --git a/component/movementsensor/v1/movementsensor_grpc.pb.go b/component/movementsensor/v1/movementsensor_grpc.pb.go new file mode 100644 index 000000000..9891906ed --- /dev/null +++ b/component/movementsensor/v1/movementsensor_grpc.pb.go @@ -0,0 +1,317 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// MovementSensorServiceClient is the client API for MovementSensorService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MovementSensorServiceClient interface { + GetLinearVelocity(ctx context.Context, in *GetLinearVelocityRequest, opts ...grpc.CallOption) (*GetLinearVelocityResponse, error) + GetAngularVelocity(ctx context.Context, in *GetAngularVelocityRequest, opts ...grpc.CallOption) (*GetAngularVelocityResponse, error) + GetCompassHeading(ctx context.Context, in *GetCompassHeadingRequest, opts ...grpc.CallOption) (*GetCompassHeadingResponse, error) + GetOrientation(ctx context.Context, in *GetOrientationRequest, opts ...grpc.CallOption) (*GetOrientationResponse, error) + GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) + GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) + GetAccuracy(ctx context.Context, in *GetAccuracyRequest, opts ...grpc.CallOption) (*GetAccuracyResponse, error) +} + +type movementSensorServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMovementSensorServiceClient(cc grpc.ClientConnInterface) MovementSensorServiceClient { + return &movementSensorServiceClient{cc} +} + +func (c *movementSensorServiceClient) GetLinearVelocity(ctx context.Context, in *GetLinearVelocityRequest, opts ...grpc.CallOption) (*GetLinearVelocityResponse, error) { + out := new(GetLinearVelocityResponse) + err := c.cc.Invoke(ctx, "/viam.component.movementsensor.v1.MovementSensorService/GetLinearVelocity", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *movementSensorServiceClient) GetAngularVelocity(ctx context.Context, in *GetAngularVelocityRequest, opts ...grpc.CallOption) (*GetAngularVelocityResponse, error) { + out := new(GetAngularVelocityResponse) + err := c.cc.Invoke(ctx, "/viam.component.movementsensor.v1.MovementSensorService/GetAngularVelocity", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *movementSensorServiceClient) GetCompassHeading(ctx context.Context, in *GetCompassHeadingRequest, opts ...grpc.CallOption) (*GetCompassHeadingResponse, error) { + out := new(GetCompassHeadingResponse) + err := c.cc.Invoke(ctx, "/viam.component.movementsensor.v1.MovementSensorService/GetCompassHeading", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *movementSensorServiceClient) GetOrientation(ctx context.Context, in *GetOrientationRequest, opts ...grpc.CallOption) (*GetOrientationResponse, error) { + out := new(GetOrientationResponse) + err := c.cc.Invoke(ctx, "/viam.component.movementsensor.v1.MovementSensorService/GetOrientation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *movementSensorServiceClient) GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) { + out := new(GetPositionResponse) + err := c.cc.Invoke(ctx, "/viam.component.movementsensor.v1.MovementSensorService/GetPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *movementSensorServiceClient) GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error) { + out := new(GetPropertiesResponse) + err := c.cc.Invoke(ctx, "/viam.component.movementsensor.v1.MovementSensorService/GetProperties", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *movementSensorServiceClient) GetAccuracy(ctx context.Context, in *GetAccuracyRequest, opts ...grpc.CallOption) (*GetAccuracyResponse, error) { + out := new(GetAccuracyResponse) + err := c.cc.Invoke(ctx, "/viam.component.movementsensor.v1.MovementSensorService/GetAccuracy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MovementSensorServiceServer is the server API for MovementSensorService service. +// All implementations must embed UnimplementedMovementSensorServiceServer +// for forward compatibility +type MovementSensorServiceServer interface { + GetLinearVelocity(context.Context, *GetLinearVelocityRequest) (*GetLinearVelocityResponse, error) + GetAngularVelocity(context.Context, *GetAngularVelocityRequest) (*GetAngularVelocityResponse, error) + GetCompassHeading(context.Context, *GetCompassHeadingRequest) (*GetCompassHeadingResponse, error) + GetOrientation(context.Context, *GetOrientationRequest) (*GetOrientationResponse, error) + GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) + GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) + GetAccuracy(context.Context, *GetAccuracyRequest) (*GetAccuracyResponse, error) + mustEmbedUnimplementedMovementSensorServiceServer() +} + +// UnimplementedMovementSensorServiceServer must be embedded to have forward compatible implementations. +type UnimplementedMovementSensorServiceServer struct { +} + +func (UnimplementedMovementSensorServiceServer) GetLinearVelocity(context.Context, *GetLinearVelocityRequest) (*GetLinearVelocityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLinearVelocity not implemented") +} +func (UnimplementedMovementSensorServiceServer) GetAngularVelocity(context.Context, *GetAngularVelocityRequest) (*GetAngularVelocityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAngularVelocity not implemented") +} +func (UnimplementedMovementSensorServiceServer) GetCompassHeading(context.Context, *GetCompassHeadingRequest) (*GetCompassHeadingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCompassHeading not implemented") +} +func (UnimplementedMovementSensorServiceServer) GetOrientation(context.Context, *GetOrientationRequest) (*GetOrientationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOrientation not implemented") +} +func (UnimplementedMovementSensorServiceServer) GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPosition not implemented") +} +func (UnimplementedMovementSensorServiceServer) GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProperties not implemented") +} +func (UnimplementedMovementSensorServiceServer) GetAccuracy(context.Context, *GetAccuracyRequest) (*GetAccuracyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccuracy not implemented") +} +func (UnimplementedMovementSensorServiceServer) mustEmbedUnimplementedMovementSensorServiceServer() {} + +// UnsafeMovementSensorServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MovementSensorServiceServer will +// result in compilation errors. +type UnsafeMovementSensorServiceServer interface { + mustEmbedUnimplementedMovementSensorServiceServer() +} + +func RegisterMovementSensorServiceServer(s grpc.ServiceRegistrar, srv MovementSensorServiceServer) { + s.RegisterService(&MovementSensorService_ServiceDesc, srv) +} + +func _MovementSensorService_GetLinearVelocity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLinearVelocityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MovementSensorServiceServer).GetLinearVelocity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.movementsensor.v1.MovementSensorService/GetLinearVelocity", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MovementSensorServiceServer).GetLinearVelocity(ctx, req.(*GetLinearVelocityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MovementSensorService_GetAngularVelocity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAngularVelocityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MovementSensorServiceServer).GetAngularVelocity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.movementsensor.v1.MovementSensorService/GetAngularVelocity", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MovementSensorServiceServer).GetAngularVelocity(ctx, req.(*GetAngularVelocityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MovementSensorService_GetCompassHeading_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCompassHeadingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MovementSensorServiceServer).GetCompassHeading(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.movementsensor.v1.MovementSensorService/GetCompassHeading", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MovementSensorServiceServer).GetCompassHeading(ctx, req.(*GetCompassHeadingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MovementSensorService_GetOrientation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOrientationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MovementSensorServiceServer).GetOrientation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.movementsensor.v1.MovementSensorService/GetOrientation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MovementSensorServiceServer).GetOrientation(ctx, req.(*GetOrientationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MovementSensorService_GetPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MovementSensorServiceServer).GetPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.movementsensor.v1.MovementSensorService/GetPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MovementSensorServiceServer).GetPosition(ctx, req.(*GetPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MovementSensorService_GetProperties_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPropertiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MovementSensorServiceServer).GetProperties(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.movementsensor.v1.MovementSensorService/GetProperties", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MovementSensorServiceServer).GetProperties(ctx, req.(*GetPropertiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MovementSensorService_GetAccuracy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccuracyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MovementSensorServiceServer).GetAccuracy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.movementsensor.v1.MovementSensorService/GetAccuracy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MovementSensorServiceServer).GetAccuracy(ctx, req.(*GetAccuracyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MovementSensorService_ServiceDesc is the grpc.ServiceDesc for MovementSensorService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MovementSensorService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.movementsensor.v1.MovementSensorService", + HandlerType: (*MovementSensorServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetLinearVelocity", + Handler: _MovementSensorService_GetLinearVelocity_Handler, + }, + { + MethodName: "GetAngularVelocity", + Handler: _MovementSensorService_GetAngularVelocity_Handler, + }, + { + MethodName: "GetCompassHeading", + Handler: _MovementSensorService_GetCompassHeading_Handler, + }, + { + MethodName: "GetOrientation", + Handler: _MovementSensorService_GetOrientation_Handler, + }, + { + MethodName: "GetPosition", + Handler: _MovementSensorService_GetPosition_Handler, + }, + { + MethodName: "GetProperties", + Handler: _MovementSensorService_GetProperties_Handler, + }, + { + MethodName: "GetAccuracy", + Handler: _MovementSensorService_GetAccuracy_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/movementsensor/v1/movementsensor.proto", +} diff --git a/component/posetracker/v1/pose_tracker.pb.go b/component/posetracker/v1/pose_tracker.pb.go new file mode 100644 index 000000000..407a0225d --- /dev/null +++ b/component/posetracker/v1/pose_tracker.pb.go @@ -0,0 +1,259 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/posetracker/v1/pose_tracker.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetPosesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the pose tracker + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Names of the bodies whose poses are being requested. In the event + // this parameter is not supplied or is an empty list, all available + // poses are returned + BodyNames []string `protobuf:"bytes,2,rep,name=body_names,json=bodyNames,proto3" json:"body_names,omitempty"` +} + +func (x *GetPosesRequest) Reset() { + *x = GetPosesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_posetracker_v1_pose_tracker_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPosesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPosesRequest) ProtoMessage() {} + +func (x *GetPosesRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_posetracker_v1_pose_tracker_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPosesRequest.ProtoReflect.Descriptor instead. +func (*GetPosesRequest) Descriptor() ([]byte, []int) { + return file_component_posetracker_v1_pose_tracker_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPosesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetPosesRequest) GetBodyNames() []string { + if x != nil { + return x.BodyNames + } + return nil +} + +type GetPosesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Mapping of each body name to the pose representing the center of the body. + BodyPoses map[string]*v1.PoseInFrame `protobuf:"bytes,1,rep,name=body_poses,json=bodyPoses,proto3" json:"body_poses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetPosesResponse) Reset() { + *x = GetPosesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_posetracker_v1_pose_tracker_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPosesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPosesResponse) ProtoMessage() {} + +func (x *GetPosesResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_posetracker_v1_pose_tracker_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPosesResponse.ProtoReflect.Descriptor instead. +func (*GetPosesResponse) Descriptor() ([]byte, []int) { + return file_component_posetracker_v1_pose_tracker_proto_rawDescGZIP(), []int{1} +} + +func (x *GetPosesResponse) GetBodyPoses() map[string]*v1.PoseInFrame { + if x != nil { + return x.BodyPoses + } + return nil +} + +var File_component_posetracker_v1_pose_tracker_proto protoreflect.FileDescriptor + +var file_component_posetracker_v1_pose_tracker_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6f, 0x73, 0x65, + 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x73, 0x65, 0x5f, + 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x6f, + 0x73, 0x65, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x44, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x64, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x6f, 0x64, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x50, 0x6f, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, + 0x0a, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x70, 0x6f, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x73, 0x65, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x6f, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x50, 0x6f, 0x73, 0x65, 0x73, 0x1a, 0x59, 0x0a, 0x0e, + 0x42, 0x6f, 0x64, 0x79, 0x50, 0x6f, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xbc, 0x01, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x65, + 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa5, + 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x73, + 0x65, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x6f, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x6f, 0x73, + 0x65, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x6f, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6f, 0x73, + 0x65, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x70, 0x6f, 0x73, 0x65, 0x73, 0x42, 0x35, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x5a, + 0x1c, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_posetracker_v1_pose_tracker_proto_rawDescOnce sync.Once + file_component_posetracker_v1_pose_tracker_proto_rawDescData = file_component_posetracker_v1_pose_tracker_proto_rawDesc +) + +func file_component_posetracker_v1_pose_tracker_proto_rawDescGZIP() []byte { + file_component_posetracker_v1_pose_tracker_proto_rawDescOnce.Do(func() { + file_component_posetracker_v1_pose_tracker_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_posetracker_v1_pose_tracker_proto_rawDescData) + }) + return file_component_posetracker_v1_pose_tracker_proto_rawDescData +} + +var file_component_posetracker_v1_pose_tracker_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_component_posetracker_v1_pose_tracker_proto_goTypes = []interface{}{ + (*GetPosesRequest)(nil), // 0: viam.component.posetracker.v1.GetPosesRequest + (*GetPosesResponse)(nil), // 1: viam.component.posetracker.v1.GetPosesResponse + nil, // 2: viam.component.posetracker.v1.GetPosesResponse.BodyPosesEntry + (*v1.PoseInFrame)(nil), // 3: viam.common.v1.PoseInFrame +} +var file_component_posetracker_v1_pose_tracker_proto_depIdxs = []int32{ + 2, // 0: viam.component.posetracker.v1.GetPosesResponse.body_poses:type_name -> viam.component.posetracker.v1.GetPosesResponse.BodyPosesEntry + 3, // 1: viam.component.posetracker.v1.GetPosesResponse.BodyPosesEntry.value:type_name -> viam.common.v1.PoseInFrame + 0, // 2: viam.component.posetracker.v1.PoseTrackerService.GetPoses:input_type -> viam.component.posetracker.v1.GetPosesRequest + 1, // 3: viam.component.posetracker.v1.PoseTrackerService.GetPoses:output_type -> viam.component.posetracker.v1.GetPosesResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_component_posetracker_v1_pose_tracker_proto_init() } +func file_component_posetracker_v1_pose_tracker_proto_init() { + if File_component_posetracker_v1_pose_tracker_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_posetracker_v1_pose_tracker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPosesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_posetracker_v1_pose_tracker_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPosesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_posetracker_v1_pose_tracker_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_posetracker_v1_pose_tracker_proto_goTypes, + DependencyIndexes: file_component_posetracker_v1_pose_tracker_proto_depIdxs, + MessageInfos: file_component_posetracker_v1_pose_tracker_proto_msgTypes, + }.Build() + File_component_posetracker_v1_pose_tracker_proto = out.File + file_component_posetracker_v1_pose_tracker_proto_rawDesc = nil + file_component_posetracker_v1_pose_tracker_proto_goTypes = nil + file_component_posetracker_v1_pose_tracker_proto_depIdxs = nil +} diff --git a/component/posetracker/v1/pose_tracker.pb.gw.go b/component/posetracker/v1/pose_tracker.pb.gw.go new file mode 100644 index 000000000..0a133f1ce --- /dev/null +++ b/component/posetracker/v1/pose_tracker.pb.gw.go @@ -0,0 +1,205 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/posetracker/v1/pose_tracker.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_PoseTrackerService_GetPoses_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_PoseTrackerService_GetPoses_0(ctx context.Context, marshaler runtime.Marshaler, client PoseTrackerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPosesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PoseTrackerService_GetPoses_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetPoses(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PoseTrackerService_GetPoses_0(ctx context.Context, marshaler runtime.Marshaler, server PoseTrackerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPosesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PoseTrackerService_GetPoses_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetPoses(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterPoseTrackerServiceHandlerServer registers the http handlers for service PoseTrackerService to "mux". +// UnaryRPC :call PoseTrackerServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPoseTrackerServiceHandlerFromEndpoint instead. +func RegisterPoseTrackerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PoseTrackerServiceServer) error { + + mux.Handle("GET", pattern_PoseTrackerService_GetPoses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.posetracker.v1.PoseTrackerService/GetPoses", runtime.WithHTTPPathPattern("/viam/api/v1/component/pose_tracker/{name}/poses")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PoseTrackerService_GetPoses_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PoseTrackerService_GetPoses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterPoseTrackerServiceHandlerFromEndpoint is same as RegisterPoseTrackerServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPoseTrackerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterPoseTrackerServiceHandler(ctx, mux, conn) +} + +// RegisterPoseTrackerServiceHandler registers the http handlers for service PoseTrackerService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPoseTrackerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPoseTrackerServiceHandlerClient(ctx, mux, NewPoseTrackerServiceClient(conn)) +} + +// RegisterPoseTrackerServiceHandlerClient registers the http handlers for service PoseTrackerService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PoseTrackerServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PoseTrackerServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PoseTrackerServiceClient" to call the correct interceptors. +func RegisterPoseTrackerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PoseTrackerServiceClient) error { + + mux.Handle("GET", pattern_PoseTrackerService_GetPoses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.posetracker.v1.PoseTrackerService/GetPoses", runtime.WithHTTPPathPattern("/viam/api/v1/component/pose_tracker/{name}/poses")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PoseTrackerService_GetPoses_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PoseTrackerService_GetPoses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_PoseTrackerService_GetPoses_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "pose_tracker", "name", "poses"}, "")) +) + +var ( + forward_PoseTrackerService_GetPoses_0 = runtime.ForwardResponseMessage +) diff --git a/component/posetracker/v1/pose_tracker_grpc.pb.go b/component/posetracker/v1/pose_tracker_grpc.pb.go new file mode 100644 index 000000000..5152167e6 --- /dev/null +++ b/component/posetracker/v1/pose_tracker_grpc.pb.go @@ -0,0 +1,103 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// PoseTrackerServiceClient is the client API for PoseTrackerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PoseTrackerServiceClient interface { + // GetPoses returns the current pose of each body tracked by the pose tracker + GetPoses(ctx context.Context, in *GetPosesRequest, opts ...grpc.CallOption) (*GetPosesResponse, error) +} + +type poseTrackerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPoseTrackerServiceClient(cc grpc.ClientConnInterface) PoseTrackerServiceClient { + return &poseTrackerServiceClient{cc} +} + +func (c *poseTrackerServiceClient) GetPoses(ctx context.Context, in *GetPosesRequest, opts ...grpc.CallOption) (*GetPosesResponse, error) { + out := new(GetPosesResponse) + err := c.cc.Invoke(ctx, "/viam.component.posetracker.v1.PoseTrackerService/GetPoses", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PoseTrackerServiceServer is the server API for PoseTrackerService service. +// All implementations must embed UnimplementedPoseTrackerServiceServer +// for forward compatibility +type PoseTrackerServiceServer interface { + // GetPoses returns the current pose of each body tracked by the pose tracker + GetPoses(context.Context, *GetPosesRequest) (*GetPosesResponse, error) + mustEmbedUnimplementedPoseTrackerServiceServer() +} + +// UnimplementedPoseTrackerServiceServer must be embedded to have forward compatible implementations. +type UnimplementedPoseTrackerServiceServer struct { +} + +func (UnimplementedPoseTrackerServiceServer) GetPoses(context.Context, *GetPosesRequest) (*GetPosesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPoses not implemented") +} +func (UnimplementedPoseTrackerServiceServer) mustEmbedUnimplementedPoseTrackerServiceServer() {} + +// UnsafePoseTrackerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PoseTrackerServiceServer will +// result in compilation errors. +type UnsafePoseTrackerServiceServer interface { + mustEmbedUnimplementedPoseTrackerServiceServer() +} + +func RegisterPoseTrackerServiceServer(s grpc.ServiceRegistrar, srv PoseTrackerServiceServer) { + s.RegisterService(&PoseTrackerService_ServiceDesc, srv) +} + +func _PoseTrackerService_GetPoses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPosesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PoseTrackerServiceServer).GetPoses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.posetracker.v1.PoseTrackerService/GetPoses", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PoseTrackerServiceServer).GetPoses(ctx, req.(*GetPosesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PoseTrackerService_ServiceDesc is the grpc.ServiceDesc for PoseTrackerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PoseTrackerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.posetracker.v1.PoseTrackerService", + HandlerType: (*PoseTrackerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPoses", + Handler: _PoseTrackerService_GetPoses_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/posetracker/v1/pose_tracker.proto", +} diff --git a/component/sensor/v1/sensor.pb.go b/component/sensor/v1/sensor.pb.go new file mode 100644 index 000000000..1d2babb0c --- /dev/null +++ b/component/sensor/v1/sensor.pb.go @@ -0,0 +1,243 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/sensor/v1/sensor.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetReadingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetReadingsRequest) Reset() { + *x = GetReadingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_sensor_v1_sensor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReadingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReadingsRequest) ProtoMessage() {} + +func (x *GetReadingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_sensor_v1_sensor_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReadingsRequest.ProtoReflect.Descriptor instead. +func (*GetReadingsRequest) Descriptor() ([]byte, []int) { + return file_component_sensor_v1_sensor_proto_rawDescGZIP(), []int{0} +} + +func (x *GetReadingsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetReadingsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Readings map[string]*structpb.Value `protobuf:"bytes,1,rep,name=readings,proto3" json:"readings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetReadingsResponse) Reset() { + *x = GetReadingsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_sensor_v1_sensor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReadingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReadingsResponse) ProtoMessage() {} + +func (x *GetReadingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_sensor_v1_sensor_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReadingsResponse.ProtoReflect.Descriptor instead. +func (*GetReadingsResponse) Descriptor() ([]byte, []int) { + return file_component_sensor_v1_sensor_proto_rawDescGZIP(), []int{1} +} + +func (x *GetReadingsResponse) GetReadings() map[string]*structpb.Value { + if x != nil { + return x.Readings + } + return nil +} + +var File_component_sensor_v1_sensor_proto protoreflect.FileDescriptor + +var file_component_sensor_v1_sensor_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x18, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x72, 0x65, + 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, + 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x69, + 0x6e, 0x67, 0x73, 0x1a, 0x53, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xb3, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x6e, + 0x73, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, + 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x43, + 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x23, + 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_sensor_v1_sensor_proto_rawDescOnce sync.Once + file_component_sensor_v1_sensor_proto_rawDescData = file_component_sensor_v1_sensor_proto_rawDesc +) + +func file_component_sensor_v1_sensor_proto_rawDescGZIP() []byte { + file_component_sensor_v1_sensor_proto_rawDescOnce.Do(func() { + file_component_sensor_v1_sensor_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_sensor_v1_sensor_proto_rawDescData) + }) + return file_component_sensor_v1_sensor_proto_rawDescData +} + +var file_component_sensor_v1_sensor_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_component_sensor_v1_sensor_proto_goTypes = []interface{}{ + (*GetReadingsRequest)(nil), // 0: viam.component.sensor.v1.GetReadingsRequest + (*GetReadingsResponse)(nil), // 1: viam.component.sensor.v1.GetReadingsResponse + nil, // 2: viam.component.sensor.v1.GetReadingsResponse.ReadingsEntry + (*structpb.Value)(nil), // 3: google.protobuf.Value +} +var file_component_sensor_v1_sensor_proto_depIdxs = []int32{ + 2, // 0: viam.component.sensor.v1.GetReadingsResponse.readings:type_name -> viam.component.sensor.v1.GetReadingsResponse.ReadingsEntry + 3, // 1: viam.component.sensor.v1.GetReadingsResponse.ReadingsEntry.value:type_name -> google.protobuf.Value + 0, // 2: viam.component.sensor.v1.SensorService.GetReadings:input_type -> viam.component.sensor.v1.GetReadingsRequest + 1, // 3: viam.component.sensor.v1.SensorService.GetReadings:output_type -> viam.component.sensor.v1.GetReadingsResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_component_sensor_v1_sensor_proto_init() } +func file_component_sensor_v1_sensor_proto_init() { + if File_component_sensor_v1_sensor_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_sensor_v1_sensor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReadingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_sensor_v1_sensor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReadingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_sensor_v1_sensor_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_sensor_v1_sensor_proto_goTypes, + DependencyIndexes: file_component_sensor_v1_sensor_proto_depIdxs, + MessageInfos: file_component_sensor_v1_sensor_proto_msgTypes, + }.Build() + File_component_sensor_v1_sensor_proto = out.File + file_component_sensor_v1_sensor_proto_rawDesc = nil + file_component_sensor_v1_sensor_proto_goTypes = nil + file_component_sensor_v1_sensor_proto_depIdxs = nil +} diff --git a/component/sensor/v1/sensor.pb.gw.go b/component/sensor/v1/sensor.pb.gw.go new file mode 100644 index 000000000..4ad8c42aa --- /dev/null +++ b/component/sensor/v1/sensor.pb.gw.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/sensor/v1/sensor.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_SensorService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, client SensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetReadingsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetReadings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SensorService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, server SensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetReadingsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetReadings(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterSensorServiceHandlerServer registers the http handlers for service SensorService to "mux". +// UnaryRPC :call SensorServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSensorServiceHandlerFromEndpoint instead. +func RegisterSensorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SensorServiceServer) error { + + mux.Handle("GET", pattern_SensorService_GetReadings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.sensor.v1.SensorService/GetReadings", runtime.WithHTTPPathPattern("/viam/api/v1/component/sensor/{name}/readings")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SensorService_GetReadings_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorService_GetReadings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterSensorServiceHandlerFromEndpoint is same as RegisterSensorServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterSensorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterSensorServiceHandler(ctx, mux, conn) +} + +// RegisterSensorServiceHandler registers the http handlers for service SensorService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterSensorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSensorServiceHandlerClient(ctx, mux, NewSensorServiceClient(conn)) +} + +// RegisterSensorServiceHandlerClient registers the http handlers for service SensorService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SensorServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SensorServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "SensorServiceClient" to call the correct interceptors. +func RegisterSensorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SensorServiceClient) error { + + mux.Handle("GET", pattern_SensorService_GetReadings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.sensor.v1.SensorService/GetReadings", runtime.WithHTTPPathPattern("/viam/api/v1/component/sensor/{name}/readings")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SensorService_GetReadings_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorService_GetReadings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_SensorService_GetReadings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "sensor", "name", "readings"}, "")) +) + +var ( + forward_SensorService_GetReadings_0 = runtime.ForwardResponseMessage +) diff --git a/component/sensor/v1/sensor_grpc.pb.go b/component/sensor/v1/sensor_grpc.pb.go new file mode 100644 index 000000000..eea6a4743 --- /dev/null +++ b/component/sensor/v1/sensor_grpc.pb.go @@ -0,0 +1,103 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SensorServiceClient is the client API for SensorService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SensorServiceClient interface { + // GetReadings returns the readings of a sensor of the underlying robot. + GetReadings(ctx context.Context, in *GetReadingsRequest, opts ...grpc.CallOption) (*GetReadingsResponse, error) +} + +type sensorServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSensorServiceClient(cc grpc.ClientConnInterface) SensorServiceClient { + return &sensorServiceClient{cc} +} + +func (c *sensorServiceClient) GetReadings(ctx context.Context, in *GetReadingsRequest, opts ...grpc.CallOption) (*GetReadingsResponse, error) { + out := new(GetReadingsResponse) + err := c.cc.Invoke(ctx, "/viam.component.sensor.v1.SensorService/GetReadings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SensorServiceServer is the server API for SensorService service. +// All implementations must embed UnimplementedSensorServiceServer +// for forward compatibility +type SensorServiceServer interface { + // GetReadings returns the readings of a sensor of the underlying robot. + GetReadings(context.Context, *GetReadingsRequest) (*GetReadingsResponse, error) + mustEmbedUnimplementedSensorServiceServer() +} + +// UnimplementedSensorServiceServer must be embedded to have forward compatible implementations. +type UnimplementedSensorServiceServer struct { +} + +func (UnimplementedSensorServiceServer) GetReadings(context.Context, *GetReadingsRequest) (*GetReadingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetReadings not implemented") +} +func (UnimplementedSensorServiceServer) mustEmbedUnimplementedSensorServiceServer() {} + +// UnsafeSensorServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SensorServiceServer will +// result in compilation errors. +type UnsafeSensorServiceServer interface { + mustEmbedUnimplementedSensorServiceServer() +} + +func RegisterSensorServiceServer(s grpc.ServiceRegistrar, srv SensorServiceServer) { + s.RegisterService(&SensorService_ServiceDesc, srv) +} + +func _SensorService_GetReadings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReadingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SensorServiceServer).GetReadings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.sensor.v1.SensorService/GetReadings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SensorServiceServer).GetReadings(ctx, req.(*GetReadingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SensorService_ServiceDesc is the grpc.ServiceDesc for SensorService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SensorService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.sensor.v1.SensorService", + HandlerType: (*SensorServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetReadings", + Handler: _SensorService_GetReadings_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/sensor/v1/sensor.proto", +} diff --git a/component/servo/v1/servo.pb.go b/component/servo/v1/servo.pb.go new file mode 100644 index 000000000..3057e5fc2 --- /dev/null +++ b/component/servo/v1/servo.pb.go @@ -0,0 +1,564 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: component/servo/v1/servo.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MoveRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the name of the servo, as registered + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // the degrees by which to rotate the servo. Accepted values are between 0 and 180 + AngleDeg uint32 `protobuf:"varint,2,opt,name=angle_deg,json=angleDeg,proto3" json:"angle_deg,omitempty"` +} + +func (x *MoveRequest) Reset() { + *x = MoveRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_servo_v1_servo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveRequest) ProtoMessage() {} + +func (x *MoveRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_servo_v1_servo_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveRequest.ProtoReflect.Descriptor instead. +func (*MoveRequest) Descriptor() ([]byte, []int) { + return file_component_servo_v1_servo_proto_rawDescGZIP(), []int{0} +} + +func (x *MoveRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MoveRequest) GetAngleDeg() uint32 { + if x != nil { + return x.AngleDeg + } + return 0 +} + +type MoveResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MoveResponse) Reset() { + *x = MoveResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_servo_v1_servo_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveResponse) ProtoMessage() {} + +func (x *MoveResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_servo_v1_servo_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveResponse.ProtoReflect.Descriptor instead. +func (*MoveResponse) Descriptor() ([]byte, []int) { + return file_component_servo_v1_servo_proto_rawDescGZIP(), []int{1} +} + +type GetPositionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the name of the servo, as registered + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPositionRequest) Reset() { + *x = GetPositionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_servo_v1_servo_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionRequest) ProtoMessage() {} + +func (x *GetPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_servo_v1_servo_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionRequest.ProtoReflect.Descriptor instead. +func (*GetPositionRequest) Descriptor() ([]byte, []int) { + return file_component_servo_v1_servo_proto_rawDescGZIP(), []int{2} +} + +func (x *GetPositionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetPositionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the degrees from neutral by which the servo is currently rotated. Values are between 0 and 180 + PositionDeg uint32 `protobuf:"varint,1,opt,name=position_deg,json=positionDeg,proto3" json:"position_deg,omitempty"` +} + +func (x *GetPositionResponse) Reset() { + *x = GetPositionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_servo_v1_servo_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionResponse) ProtoMessage() {} + +func (x *GetPositionResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_servo_v1_servo_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionResponse.ProtoReflect.Descriptor instead. +func (*GetPositionResponse) Descriptor() ([]byte, []int) { + return file_component_servo_v1_servo_proto_rawDescGZIP(), []int{3} +} + +func (x *GetPositionResponse) GetPositionDeg() uint32 { + if x != nil { + return x.PositionDeg + } + return 0 +} + +type StopRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of a servo + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *StopRequest) Reset() { + *x = StopRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_component_servo_v1_servo_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopRequest) ProtoMessage() {} + +func (x *StopRequest) ProtoReflect() protoreflect.Message { + mi := &file_component_servo_v1_servo_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopRequest.ProtoReflect.Descriptor instead. +func (*StopRequest) Descriptor() ([]byte, []int) { + return file_component_servo_v1_servo_proto_rawDescGZIP(), []int{4} +} + +func (x *StopRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type StopResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StopResponse) Reset() { + *x = StopResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_component_servo_v1_servo_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopResponse) ProtoMessage() {} + +func (x *StopResponse) ProtoReflect() protoreflect.Message { + mi := &file_component_servo_v1_servo_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopResponse.ProtoReflect.Descriptor instead. +func (*StopResponse) Descriptor() ([]byte, []int) { + return file_component_servo_v1_servo_proto_rawDescGZIP(), []int{5} +} + +type Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PositionDeg uint32 `protobuf:"varint,1,opt,name=position_deg,json=positionDeg,proto3" json:"position_deg,omitempty"` + IsMoving bool `protobuf:"varint,2,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"` +} + +func (x *Status) Reset() { + *x = Status{} + if protoimpl.UnsafeEnabled { + mi := &file_component_servo_v1_servo_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_component_servo_v1_servo_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_component_servo_v1_servo_proto_rawDescGZIP(), []int{6} +} + +func (x *Status) GetPositionDeg() uint32 { + if x != nil { + return x.PositionDeg + } + return 0 +} + +func (x *Status) GetIsMoving() bool { + if x != nil { + return x.IsMoving + } + return false +} + +var File_component_servo_v1_servo_proto protoreflect.FileDescriptor + +var file_component_servo_v1_servo_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x17, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0b, 0x4d, 0x6f, 0x76, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6e, + 0x67, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, + 0x6e, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x67, 0x22, 0x0e, 0x0a, 0x0c, 0x4d, 0x6f, 0x76, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x38, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x67, 0x22, 0x21, 0x0a, 0x0b, 0x53, + 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0e, + 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x69, + 0x73, 0x5f, 0x6d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x69, 0x73, 0x4d, 0x6f, 0x76, 0x69, 0x6e, 0x67, 0x32, 0xbf, 0x03, 0x0a, 0x0c, 0x53, 0x65, 0x72, + 0x76, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x04, 0x4d, 0x6f, + 0x76, 0x65, 0x12, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x1a, 0x28, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x6f, 0x76, + 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x6f, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x85, 0x01, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x24, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, + 0x22, 0x28, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x42, 0x41, 0x0a, 0x1b, 0x63, 0x6f, + 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_component_servo_v1_servo_proto_rawDescOnce sync.Once + file_component_servo_v1_servo_proto_rawDescData = file_component_servo_v1_servo_proto_rawDesc +) + +func file_component_servo_v1_servo_proto_rawDescGZIP() []byte { + file_component_servo_v1_servo_proto_rawDescOnce.Do(func() { + file_component_servo_v1_servo_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_servo_v1_servo_proto_rawDescData) + }) + return file_component_servo_v1_servo_proto_rawDescData +} + +var file_component_servo_v1_servo_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_component_servo_v1_servo_proto_goTypes = []interface{}{ + (*MoveRequest)(nil), // 0: viam.component.servo.v1.MoveRequest + (*MoveResponse)(nil), // 1: viam.component.servo.v1.MoveResponse + (*GetPositionRequest)(nil), // 2: viam.component.servo.v1.GetPositionRequest + (*GetPositionResponse)(nil), // 3: viam.component.servo.v1.GetPositionResponse + (*StopRequest)(nil), // 4: viam.component.servo.v1.StopRequest + (*StopResponse)(nil), // 5: viam.component.servo.v1.StopResponse + (*Status)(nil), // 6: viam.component.servo.v1.Status +} +var file_component_servo_v1_servo_proto_depIdxs = []int32{ + 0, // 0: viam.component.servo.v1.ServoService.Move:input_type -> viam.component.servo.v1.MoveRequest + 2, // 1: viam.component.servo.v1.ServoService.GetPosition:input_type -> viam.component.servo.v1.GetPositionRequest + 4, // 2: viam.component.servo.v1.ServoService.Stop:input_type -> viam.component.servo.v1.StopRequest + 1, // 3: viam.component.servo.v1.ServoService.Move:output_type -> viam.component.servo.v1.MoveResponse + 3, // 4: viam.component.servo.v1.ServoService.GetPosition:output_type -> viam.component.servo.v1.GetPositionResponse + 5, // 5: viam.component.servo.v1.ServoService.Stop:output_type -> viam.component.servo.v1.StopResponse + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_component_servo_v1_servo_proto_init() } +func file_component_servo_v1_servo_proto_init() { + if File_component_servo_v1_servo_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_component_servo_v1_servo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_servo_v1_servo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_servo_v1_servo_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_servo_v1_servo_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_servo_v1_servo_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_servo_v1_servo_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_component_servo_v1_servo_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_component_servo_v1_servo_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_component_servo_v1_servo_proto_goTypes, + DependencyIndexes: file_component_servo_v1_servo_proto_depIdxs, + MessageInfos: file_component_servo_v1_servo_proto_msgTypes, + }.Build() + File_component_servo_v1_servo_proto = out.File + file_component_servo_v1_servo_proto_rawDesc = nil + file_component_servo_v1_servo_proto_goTypes = nil + file_component_servo_v1_servo_proto_depIdxs = nil +} diff --git a/component/servo/v1/servo.pb.gw.go b/component/servo/v1/servo.pb.gw.go new file mode 100644 index 000000000..810fdc687 --- /dev/null +++ b/component/servo/v1/servo.pb.gw.go @@ -0,0 +1,407 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: component/servo/v1/servo.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_ServoService_Move_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ServoService_Move_0(ctx context.Context, marshaler runtime.Marshaler, client ServoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServoService_Move_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Move(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ServoService_Move_0(ctx context.Context, marshaler runtime.Marshaler, server ServoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServoService_Move_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Move(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ServoService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, client ServoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ServoService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, server ServoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetPosition(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ServoService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, client ServoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.Stop(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ServoService_Stop_0(ctx context.Context, marshaler runtime.Marshaler, server ServoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.Stop(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterServoServiceHandlerServer registers the http handlers for service ServoService to "mux". +// UnaryRPC :call ServoServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServoServiceHandlerFromEndpoint instead. +func RegisterServoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServoServiceServer) error { + + mux.Handle("PUT", pattern_ServoService_Move_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.servo.v1.ServoService/Move", runtime.WithHTTPPathPattern("/viam/api/v1/component/servo/{name}/move")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServoService_Move_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServoService_Move_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ServoService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.servo.v1.ServoService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/servo/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServoService_GetPosition_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServoService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ServoService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.component.servo.v1.ServoService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/servo/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServoService_Stop_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServoService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterServoServiceHandlerFromEndpoint is same as RegisterServoServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterServoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterServoServiceHandler(ctx, mux, conn) +} + +// RegisterServoServiceHandler registers the http handlers for service ServoService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterServoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterServoServiceHandlerClient(ctx, mux, NewServoServiceClient(conn)) +} + +// RegisterServoServiceHandlerClient registers the http handlers for service ServoService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServoServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServoServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ServoServiceClient" to call the correct interceptors. +func RegisterServoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServoServiceClient) error { + + mux.Handle("PUT", pattern_ServoService_Move_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.servo.v1.ServoService/Move", runtime.WithHTTPPathPattern("/viam/api/v1/component/servo/{name}/move")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServoService_Move_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServoService_Move_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ServoService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.servo.v1.ServoService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/component/servo/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServoService_GetPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServoService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ServoService_Stop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.component.servo.v1.ServoService/Stop", runtime.WithHTTPPathPattern("/viam/api/v1/component/servo/{name}/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServoService_Stop_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServoService_Stop_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ServoService_Move_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "servo", "name", "move"}, "")) + + pattern_ServoService_GetPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "servo", "name", "position"}, "")) + + pattern_ServoService_Stop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "component", "servo", "name", "stop"}, "")) +) + +var ( + forward_ServoService_Move_0 = runtime.ForwardResponseMessage + + forward_ServoService_GetPosition_0 = runtime.ForwardResponseMessage + + forward_ServoService_Stop_0 = runtime.ForwardResponseMessage +) diff --git a/component/servo/v1/servo_grpc.pb.go b/component/servo/v1/servo_grpc.pb.go new file mode 100644 index 000000000..4e8608290 --- /dev/null +++ b/component/servo/v1/servo_grpc.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// ServoServiceClient is the client API for ServoService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ServoServiceClient interface { + // Move requests the servo of the underlying robot to move. + // This will block until done or a new operation cancels this one + Move(ctx context.Context, in *MoveRequest, opts ...grpc.CallOption) (*MoveResponse, error) + // GetPosition returns the current set angle (degrees) of the servo of the underlying robot. + GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) + // Stop stops a robot's servo + Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) +} + +type servoServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewServoServiceClient(cc grpc.ClientConnInterface) ServoServiceClient { + return &servoServiceClient{cc} +} + +func (c *servoServiceClient) Move(ctx context.Context, in *MoveRequest, opts ...grpc.CallOption) (*MoveResponse, error) { + out := new(MoveResponse) + err := c.cc.Invoke(ctx, "/viam.component.servo.v1.ServoService/Move", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *servoServiceClient) GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) { + out := new(GetPositionResponse) + err := c.cc.Invoke(ctx, "/viam.component.servo.v1.ServoService/GetPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *servoServiceClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { + out := new(StopResponse) + err := c.cc.Invoke(ctx, "/viam.component.servo.v1.ServoService/Stop", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ServoServiceServer is the server API for ServoService service. +// All implementations must embed UnimplementedServoServiceServer +// for forward compatibility +type ServoServiceServer interface { + // Move requests the servo of the underlying robot to move. + // This will block until done or a new operation cancels this one + Move(context.Context, *MoveRequest) (*MoveResponse, error) + // GetPosition returns the current set angle (degrees) of the servo of the underlying robot. + GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) + // Stop stops a robot's servo + Stop(context.Context, *StopRequest) (*StopResponse, error) + mustEmbedUnimplementedServoServiceServer() +} + +// UnimplementedServoServiceServer must be embedded to have forward compatible implementations. +type UnimplementedServoServiceServer struct { +} + +func (UnimplementedServoServiceServer) Move(context.Context, *MoveRequest) (*MoveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Move not implemented") +} +func (UnimplementedServoServiceServer) GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPosition not implemented") +} +func (UnimplementedServoServiceServer) Stop(context.Context, *StopRequest) (*StopResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") +} +func (UnimplementedServoServiceServer) mustEmbedUnimplementedServoServiceServer() {} + +// UnsafeServoServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ServoServiceServer will +// result in compilation errors. +type UnsafeServoServiceServer interface { + mustEmbedUnimplementedServoServiceServer() +} + +func RegisterServoServiceServer(s grpc.ServiceRegistrar, srv ServoServiceServer) { + s.RegisterService(&ServoService_ServiceDesc, srv) +} + +func _ServoService_Move_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServoServiceServer).Move(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.servo.v1.ServoService/Move", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServoServiceServer).Move(ctx, req.(*MoveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServoService_GetPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServoServiceServer).GetPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.servo.v1.ServoService/GetPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServoServiceServer).GetPosition(ctx, req.(*GetPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServoService_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServoServiceServer).Stop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.component.servo.v1.ServoService/Stop", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServoServiceServer).Stop(ctx, req.(*StopRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ServoService_ServiceDesc is the grpc.ServiceDesc for ServoService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ServoService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.component.servo.v1.ServoService", + HandlerType: (*ServoServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Move", + Handler: _ServoService_Move_Handler, + }, + { + MethodName: "GetPosition", + Handler: _ServoService_GetPosition_Handler, + }, + { + MethodName: "Stop", + Handler: _ServoService_Stop_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "component/servo/v1/servo.proto", +} diff --git a/gen/js/app/data/v1/data_grpc_web_pb.js b/gen/js/app/data/v1/data_grpc_web_pb.js new file mode 100644 index 000000000..22518f79c --- /dev/null +++ b/gen/js/app/data/v1/data_grpc_web_pb.js @@ -0,0 +1,140 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.app.data.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.app = {}; +proto.viam.app.data = {}; +proto.viam.app.data.v1 = require('./data_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.data.v1.DataServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.data.v1.DataServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.data.v1.QueryRequest, + * !proto.viam.app.data.v1.QueryResponse>} + */ +const methodDescriptor_DataService_Query = new grpc.web.MethodDescriptor( + '/viam.app.data.v1.DataService/Query', + grpc.web.MethodType.UNARY, + proto.viam.app.data.v1.QueryRequest, + proto.viam.app.data.v1.QueryResponse, + /** + * @param {!proto.viam.app.data.v1.QueryRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.data.v1.QueryResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.data.v1.QueryRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.data.v1.QueryResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.data.v1.DataServiceClient.prototype.query = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.data.v1.DataService/Query', + request, + metadata || {}, + methodDescriptor_DataService_Query, + callback); +}; + + +/** + * @param {!proto.viam.app.data.v1.QueryRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.data.v1.DataServicePromiseClient.prototype.query = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.data.v1.DataService/Query', + request, + metadata || {}, + methodDescriptor_DataService_Query); +}; + + +module.exports = proto.viam.app.data.v1; + diff --git a/gen/js/app/data/v1/data_pb.d.ts b/gen/js/app/data/v1/data_pb.d.ts new file mode 100644 index 000000000..fc00f9ae9 --- /dev/null +++ b/gen/js/app/data/v1/data_pb.d.ts @@ -0,0 +1,389 @@ +// package: viam.app.data.v1 +// file: app/data/v1/data.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class QueryRequest extends jspb.Message { + hasFilters(): boolean; + clearFilters(): void; + getFilters(): Filters | undefined; + setFilters(value?: Filters): void; + + getType(): DataTypeMap[keyof DataTypeMap]; + setType(value: DataTypeMap[keyof DataTypeMap]): void; + + getSkip(): number; + setSkip(value: number): void; + + getLimit(): number; + setLimit(value: number): void; + + getCountOnly(): boolean; + setCountOnly(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryRequest.AsObject; + static toObject(includeInstance: boolean, msg: QueryRequest): QueryRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryRequest; + static deserializeBinaryFromReader(message: QueryRequest, reader: jspb.BinaryReader): QueryRequest; +} + +export namespace QueryRequest { + export type AsObject = { + filters?: Filters.AsObject, + type: DataTypeMap[keyof DataTypeMap], + skip: number, + limit: number, + countOnly: boolean, + } +} + +export class Filters extends jspb.Message { + getComponentName(): string; + setComponentName(value: string): void; + + getComponentType(): string; + setComponentType(value: string): void; + + getComponentModel(): string; + setComponentModel(value: string): void; + + getMethod(): string; + setMethod(value: string): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value: string, index?: number): string; + + getRobotName(): string; + setRobotName(value: string): void; + + getRobotId(): string; + setRobotId(value: string): void; + + getPartName(): string; + setPartName(value: string): void; + + getPartId(): string; + setPartId(value: string): void; + + getLocationId(): string; + setLocationId(value: string): void; + + getOrgId(): string; + setOrgId(value: string): void; + + hasInterval(): boolean; + clearInterval(): void; + getInterval(): CaptureInterval | undefined; + setInterval(value?: CaptureInterval): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Filters.AsObject; + static toObject(includeInstance: boolean, msg: Filters): Filters.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Filters, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Filters; + static deserializeBinaryFromReader(message: Filters, reader: jspb.BinaryReader): Filters; +} + +export namespace Filters { + export type AsObject = { + componentName: string, + componentType: string, + componentModel: string, + method: string, + tagsList: Array, + robotName: string, + robotId: string, + partName: string, + partId: string, + locationId: string, + orgId: string, + interval?: CaptureInterval.AsObject, + } +} + +export class CaptureInterval extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): google_protobuf_timestamp_pb.Timestamp | undefined; + setStart(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined; + setEnd(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CaptureInterval.AsObject; + static toObject(includeInstance: boolean, msg: CaptureInterval): CaptureInterval.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CaptureInterval, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CaptureInterval; + static deserializeBinaryFromReader(message: CaptureInterval, reader: jspb.BinaryReader): CaptureInterval; +} + +export namespace CaptureInterval { + export type AsObject = { + start?: google_protobuf_timestamp_pb.Timestamp.AsObject, + end?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class QueryResponse extends jspb.Message { + clearTabularList(): void; + getTabularList(): Array; + setTabularList(value: Array): void; + addTabular(value?: TabularMetadata, index?: number): TabularMetadata; + + clearBinaryList(): void; + getBinaryList(): Array; + setBinaryList(value: Array): void; + addBinary(value?: BinaryMetadata, index?: number): BinaryMetadata; + + clearFileList(): void; + getFileList(): Array; + setFileList(value: Array): void; + addFile(value?: FileMetadata, index?: number): FileMetadata; + + getTabularCount(): number; + setTabularCount(value: number): void; + + getBinaryCount(): number; + setBinaryCount(value: number): void; + + getFileCount(): number; + setFileCount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QueryResponse.AsObject; + static toObject(includeInstance: boolean, msg: QueryResponse): QueryResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QueryResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QueryResponse; + static deserializeBinaryFromReader(message: QueryResponse, reader: jspb.BinaryReader): QueryResponse; +} + +export namespace QueryResponse { + export type AsObject = { + tabularList: Array, + binaryList: Array, + fileList: Array, + tabularCount: number, + binaryCount: number, + fileCount: number, + } +} + +export class TabularMetadata extends jspb.Message { + getId(): string; + setId(value: string): void; + + getRobotName(): string; + setRobotName(value: string): void; + + getRobotId(): string; + setRobotId(value: string): void; + + getPartName(): string; + setPartName(value: string): void; + + getPartId(): string; + setPartId(value: string): void; + + getComponentName(): string; + setComponentName(value: string): void; + + getComponentType(): string; + setComponentType(value: string): void; + + getComponentModel(): string; + setComponentModel(value: string): void; + + getMethod(): string; + setMethod(value: string): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value: string, index?: number): string; + + hasInterval(): boolean; + clearInterval(): void; + getInterval(): CaptureInterval | undefined; + setInterval(value?: CaptureInterval): void; + + getFileSizeBytes(): number; + setFileSizeBytes(value: number): void; + + getNumReadings(): number; + setNumReadings(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TabularMetadata.AsObject; + static toObject(includeInstance: boolean, msg: TabularMetadata): TabularMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TabularMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TabularMetadata; + static deserializeBinaryFromReader(message: TabularMetadata, reader: jspb.BinaryReader): TabularMetadata; +} + +export namespace TabularMetadata { + export type AsObject = { + id: string, + robotName: string, + robotId: string, + partName: string, + partId: string, + componentName: string, + componentType: string, + componentModel: string, + method: string, + tagsList: Array, + interval?: CaptureInterval.AsObject, + fileSizeBytes: number, + numReadings: number, + } +} + +export class BinaryMetadata extends jspb.Message { + getId(): string; + setId(value: string): void; + + getRobotName(): string; + setRobotName(value: string): void; + + getRobotId(): string; + setRobotId(value: string): void; + + getPartName(): string; + setPartName(value: string): void; + + getPartId(): string; + setPartId(value: string): void; + + getComponentName(): string; + setComponentName(value: string): void; + + getComponentType(): string; + setComponentType(value: string): void; + + getComponentModel(): string; + setComponentModel(value: string): void; + + getMethod(): string; + setMethod(value: string): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value: string, index?: number): string; + + hasInterval(): boolean; + clearInterval(): void; + getInterval(): CaptureInterval | undefined; + setInterval(value?: CaptureInterval): void; + + getFileSizeBytes(): number; + setFileSizeBytes(value: number): void; + + getFileId(): string; + setFileId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BinaryMetadata.AsObject; + static toObject(includeInstance: boolean, msg: BinaryMetadata): BinaryMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BinaryMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BinaryMetadata; + static deserializeBinaryFromReader(message: BinaryMetadata, reader: jspb.BinaryReader): BinaryMetadata; +} + +export namespace BinaryMetadata { + export type AsObject = { + id: string, + robotName: string, + robotId: string, + partName: string, + partId: string, + componentName: string, + componentType: string, + componentModel: string, + method: string, + tagsList: Array, + interval?: CaptureInterval.AsObject, + fileSizeBytes: number, + fileId: string, + } +} + +export class FileMetadata extends jspb.Message { + getId(): string; + setId(value: string): void; + + getRobotName(): string; + setRobotName(value: string): void; + + getRobotId(): string; + setRobotId(value: string): void; + + getPartName(): string; + setPartName(value: string): void; + + getPartId(): string; + setPartId(value: string): void; + + hasSyncTime(): boolean; + clearSyncTime(): void; + getSyncTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setSyncTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getFileSizeBytes(): number; + setFileSizeBytes(value: number): void; + + getFileId(): string; + setFileId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileMetadata.AsObject; + static toObject(includeInstance: boolean, msg: FileMetadata): FileMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileMetadata; + static deserializeBinaryFromReader(message: FileMetadata, reader: jspb.BinaryReader): FileMetadata; +} + +export namespace FileMetadata { + export type AsObject = { + id: string, + robotName: string, + robotId: string, + partName: string, + partId: string, + syncTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + fileSizeBytes: number, + fileId: string, + } +} + +export interface DataTypeMap { + DATA_TYPE_UNSPECIFIED: 0; + DATA_TYPE_BINARY_SENSOR: 1; + DATA_TYPE_TABULAR_SENSOR: 2; + DATA_TYPE_FILE: 3; +} + +export const DataType: DataTypeMap; + diff --git a/gen/js/app/data/v1/data_pb.js b/gen/js/app/data/v1/data_pb.js new file mode 100644 index 000000000..ced610539 --- /dev/null +++ b/gen/js/app/data/v1/data_pb.js @@ -0,0 +1,2956 @@ +// source: app/data/v1/data.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.viam.app.data.v1.BinaryMetadata', null, global); +goog.exportSymbol('proto.viam.app.data.v1.CaptureInterval', null, global); +goog.exportSymbol('proto.viam.app.data.v1.DataType', null, global); +goog.exportSymbol('proto.viam.app.data.v1.FileMetadata', null, global); +goog.exportSymbol('proto.viam.app.data.v1.Filters', null, global); +goog.exportSymbol('proto.viam.app.data.v1.QueryRequest', null, global); +goog.exportSymbol('proto.viam.app.data.v1.QueryResponse', null, global); +goog.exportSymbol('proto.viam.app.data.v1.TabularMetadata', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.data.v1.QueryRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.data.v1.QueryRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.data.v1.QueryRequest.displayName = 'proto.viam.app.data.v1.QueryRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.data.v1.Filters = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.data.v1.Filters.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.data.v1.Filters, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.data.v1.Filters.displayName = 'proto.viam.app.data.v1.Filters'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.data.v1.CaptureInterval = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.data.v1.CaptureInterval, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.data.v1.CaptureInterval.displayName = 'proto.viam.app.data.v1.CaptureInterval'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.data.v1.QueryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.data.v1.QueryResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.data.v1.QueryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.data.v1.QueryResponse.displayName = 'proto.viam.app.data.v1.QueryResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.data.v1.TabularMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.data.v1.TabularMetadata.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.data.v1.TabularMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.data.v1.TabularMetadata.displayName = 'proto.viam.app.data.v1.TabularMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.data.v1.BinaryMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.data.v1.BinaryMetadata.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.data.v1.BinaryMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.data.v1.BinaryMetadata.displayName = 'proto.viam.app.data.v1.BinaryMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.data.v1.FileMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.data.v1.FileMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.data.v1.FileMetadata.displayName = 'proto.viam.app.data.v1.FileMetadata'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.data.v1.QueryRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.data.v1.QueryRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.data.v1.QueryRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.QueryRequest.toObject = function(includeInstance, msg) { + var f, obj = { + filters: (f = msg.getFilters()) && proto.viam.app.data.v1.Filters.toObject(includeInstance, f), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + skip: jspb.Message.getFieldWithDefault(msg, 3, 0), + limit: jspb.Message.getFieldWithDefault(msg, 4, 0), + countOnly: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.data.v1.QueryRequest} + */ +proto.viam.app.data.v1.QueryRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.data.v1.QueryRequest; + return proto.viam.app.data.v1.QueryRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.data.v1.QueryRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.data.v1.QueryRequest} + */ +proto.viam.app.data.v1.QueryRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.data.v1.Filters; + reader.readMessage(value,proto.viam.app.data.v1.Filters.deserializeBinaryFromReader); + msg.setFilters(value); + break; + case 2: + var value = /** @type {!proto.viam.app.data.v1.DataType} */ (reader.readEnum()); + msg.setType(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setSkip(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLimit(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCountOnly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.data.v1.QueryRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.data.v1.QueryRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.data.v1.QueryRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.QueryRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFilters(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.data.v1.Filters.serializeBinaryToWriter + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getSkip(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getCountOnly(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional Filters filters = 1; + * @return {?proto.viam.app.data.v1.Filters} + */ +proto.viam.app.data.v1.QueryRequest.prototype.getFilters = function() { + return /** @type{?proto.viam.app.data.v1.Filters} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.data.v1.Filters, 1)); +}; + + +/** + * @param {?proto.viam.app.data.v1.Filters|undefined} value + * @return {!proto.viam.app.data.v1.QueryRequest} returns this +*/ +proto.viam.app.data.v1.QueryRequest.prototype.setFilters = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.data.v1.QueryRequest} returns this + */ +proto.viam.app.data.v1.QueryRequest.prototype.clearFilters = function() { + return this.setFilters(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.data.v1.QueryRequest.prototype.hasFilters = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional DataType type = 2; + * @return {!proto.viam.app.data.v1.DataType} + */ +proto.viam.app.data.v1.QueryRequest.prototype.getType = function() { + return /** @type {!proto.viam.app.data.v1.DataType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.viam.app.data.v1.DataType} value + * @return {!proto.viam.app.data.v1.QueryRequest} returns this + */ +proto.viam.app.data.v1.QueryRequest.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional int32 skip = 3; + * @return {number} + */ +proto.viam.app.data.v1.QueryRequest.prototype.getSkip = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.data.v1.QueryRequest} returns this + */ +proto.viam.app.data.v1.QueryRequest.prototype.setSkip = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 limit = 4; + * @return {number} + */ +proto.viam.app.data.v1.QueryRequest.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.data.v1.QueryRequest} returns this + */ +proto.viam.app.data.v1.QueryRequest.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool count_only = 5; + * @return {boolean} + */ +proto.viam.app.data.v1.QueryRequest.prototype.getCountOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.data.v1.QueryRequest} returns this + */ +proto.viam.app.data.v1.QueryRequest.prototype.setCountOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.data.v1.Filters.repeatedFields_ = [5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.data.v1.Filters.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.data.v1.Filters.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.data.v1.Filters} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.Filters.toObject = function(includeInstance, msg) { + var f, obj = { + componentName: jspb.Message.getFieldWithDefault(msg, 1, ""), + componentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + componentModel: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + robotName: jspb.Message.getFieldWithDefault(msg, 6, ""), + robotId: jspb.Message.getFieldWithDefault(msg, 7, ""), + partName: jspb.Message.getFieldWithDefault(msg, 8, ""), + partId: jspb.Message.getFieldWithDefault(msg, 9, ""), + locationId: jspb.Message.getFieldWithDefault(msg, 10, ""), + orgId: jspb.Message.getFieldWithDefault(msg, 11, ""), + interval: (f = msg.getInterval()) && proto.viam.app.data.v1.CaptureInterval.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.data.v1.Filters} + */ +proto.viam.app.data.v1.Filters.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.data.v1.Filters; + return proto.viam.app.data.v1.Filters.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.data.v1.Filters} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.data.v1.Filters} + */ +proto.viam.app.data.v1.Filters.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentModel(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMethod(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addTags(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotName(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotId(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setPartName(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setOrgId(value); + break; + case 12: + var value = new proto.viam.app.data.v1.CaptureInterval; + reader.readMessage(value,proto.viam.app.data.v1.CaptureInterval.deserializeBinaryFromReader); + msg.setInterval(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.data.v1.Filters.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.data.v1.Filters.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.data.v1.Filters} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.Filters.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getComponentName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getComponentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getComponentModel(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = message.getRobotName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getRobotId(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getPartName(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getOrgId(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getInterval(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.viam.app.data.v1.CaptureInterval.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string component_name = 1; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getComponentName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setComponentName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string component_type = 2; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getComponentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setComponentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string component_model = 3; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getComponentModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setComponentModel = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string method = 4; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated string tags = 5; + * @return {!Array} + */ +proto.viam.app.data.v1.Filters.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional string robot_name = 6; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getRobotName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setRobotName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string robot_id = 7; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getRobotId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setRobotId = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string part_name = 8; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getPartName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setPartName = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string part_id = 9; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string location_id = 10; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional string org_id = 11; + * @return {string} + */ +proto.viam.app.data.v1.Filters.prototype.getOrgId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.setOrgId = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * optional CaptureInterval interval = 12; + * @return {?proto.viam.app.data.v1.CaptureInterval} + */ +proto.viam.app.data.v1.Filters.prototype.getInterval = function() { + return /** @type{?proto.viam.app.data.v1.CaptureInterval} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.data.v1.CaptureInterval, 12)); +}; + + +/** + * @param {?proto.viam.app.data.v1.CaptureInterval|undefined} value + * @return {!proto.viam.app.data.v1.Filters} returns this +*/ +proto.viam.app.data.v1.Filters.prototype.setInterval = function(value) { + return jspb.Message.setWrapperField(this, 12, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.data.v1.Filters} returns this + */ +proto.viam.app.data.v1.Filters.prototype.clearInterval = function() { + return this.setInterval(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.data.v1.Filters.prototype.hasInterval = function() { + return jspb.Message.getField(this, 12) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.data.v1.CaptureInterval.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.data.v1.CaptureInterval.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.data.v1.CaptureInterval} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.CaptureInterval.toObject = function(includeInstance, msg) { + var f, obj = { + start: (f = msg.getStart()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + end: (f = msg.getEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.data.v1.CaptureInterval} + */ +proto.viam.app.data.v1.CaptureInterval.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.data.v1.CaptureInterval; + return proto.viam.app.data.v1.CaptureInterval.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.data.v1.CaptureInterval} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.data.v1.CaptureInterval} + */ +proto.viam.app.data.v1.CaptureInterval.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStart(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.data.v1.CaptureInterval.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.data.v1.CaptureInterval.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.data.v1.CaptureInterval} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.CaptureInterval.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStart(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEnd(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp start = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.data.v1.CaptureInterval.prototype.getStart = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.data.v1.CaptureInterval} returns this +*/ +proto.viam.app.data.v1.CaptureInterval.prototype.setStart = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.data.v1.CaptureInterval} returns this + */ +proto.viam.app.data.v1.CaptureInterval.prototype.clearStart = function() { + return this.setStart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.data.v1.CaptureInterval.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp end = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.data.v1.CaptureInterval.prototype.getEnd = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.data.v1.CaptureInterval} returns this +*/ +proto.viam.app.data.v1.CaptureInterval.prototype.setEnd = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.data.v1.CaptureInterval} returns this + */ +proto.viam.app.data.v1.CaptureInterval.prototype.clearEnd = function() { + return this.setEnd(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.data.v1.CaptureInterval.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.data.v1.QueryResponse.repeatedFields_ = [1,2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.data.v1.QueryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.data.v1.QueryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.data.v1.QueryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.QueryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tabularList: jspb.Message.toObjectList(msg.getTabularList(), + proto.viam.app.data.v1.TabularMetadata.toObject, includeInstance), + binaryList: jspb.Message.toObjectList(msg.getBinaryList(), + proto.viam.app.data.v1.BinaryMetadata.toObject, includeInstance), + fileList: jspb.Message.toObjectList(msg.getFileList(), + proto.viam.app.data.v1.FileMetadata.toObject, includeInstance), + tabularCount: jspb.Message.getFieldWithDefault(msg, 4, 0), + binaryCount: jspb.Message.getFieldWithDefault(msg, 5, 0), + fileCount: jspb.Message.getFieldWithDefault(msg, 6, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.data.v1.QueryResponse} + */ +proto.viam.app.data.v1.QueryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.data.v1.QueryResponse; + return proto.viam.app.data.v1.QueryResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.data.v1.QueryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.data.v1.QueryResponse} + */ +proto.viam.app.data.v1.QueryResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.data.v1.TabularMetadata; + reader.readMessage(value,proto.viam.app.data.v1.TabularMetadata.deserializeBinaryFromReader); + msg.addTabular(value); + break; + case 2: + var value = new proto.viam.app.data.v1.BinaryMetadata; + reader.readMessage(value,proto.viam.app.data.v1.BinaryMetadata.deserializeBinaryFromReader); + msg.addBinary(value); + break; + case 3: + var value = new proto.viam.app.data.v1.FileMetadata; + reader.readMessage(value,proto.viam.app.data.v1.FileMetadata.deserializeBinaryFromReader); + msg.addFile(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTabularCount(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBinaryCount(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFileCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.data.v1.QueryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.data.v1.QueryResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.data.v1.QueryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.QueryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTabularList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.app.data.v1.TabularMetadata.serializeBinaryToWriter + ); + } + f = message.getBinaryList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.viam.app.data.v1.BinaryMetadata.serializeBinaryToWriter + ); + } + f = message.getFileList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.viam.app.data.v1.FileMetadata.serializeBinaryToWriter + ); + } + f = message.getTabularCount(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getBinaryCount(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getFileCount(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } +}; + + +/** + * repeated TabularMetadata tabular = 1; + * @return {!Array} + */ +proto.viam.app.data.v1.QueryResponse.prototype.getTabularList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.data.v1.TabularMetadata, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.data.v1.QueryResponse} returns this +*/ +proto.viam.app.data.v1.QueryResponse.prototype.setTabularList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.app.data.v1.TabularMetadata=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.data.v1.TabularMetadata} + */ +proto.viam.app.data.v1.QueryResponse.prototype.addTabular = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.app.data.v1.TabularMetadata, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.data.v1.QueryResponse} returns this + */ +proto.viam.app.data.v1.QueryResponse.prototype.clearTabularList = function() { + return this.setTabularList([]); +}; + + +/** + * repeated BinaryMetadata binary = 2; + * @return {!Array} + */ +proto.viam.app.data.v1.QueryResponse.prototype.getBinaryList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.data.v1.BinaryMetadata, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.data.v1.QueryResponse} returns this +*/ +proto.viam.app.data.v1.QueryResponse.prototype.setBinaryList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.viam.app.data.v1.BinaryMetadata=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.data.v1.BinaryMetadata} + */ +proto.viam.app.data.v1.QueryResponse.prototype.addBinary = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.viam.app.data.v1.BinaryMetadata, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.data.v1.QueryResponse} returns this + */ +proto.viam.app.data.v1.QueryResponse.prototype.clearBinaryList = function() { + return this.setBinaryList([]); +}; + + +/** + * repeated FileMetadata file = 3; + * @return {!Array} + */ +proto.viam.app.data.v1.QueryResponse.prototype.getFileList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.data.v1.FileMetadata, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.data.v1.QueryResponse} returns this +*/ +proto.viam.app.data.v1.QueryResponse.prototype.setFileList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.viam.app.data.v1.FileMetadata=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.data.v1.FileMetadata} + */ +proto.viam.app.data.v1.QueryResponse.prototype.addFile = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.viam.app.data.v1.FileMetadata, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.data.v1.QueryResponse} returns this + */ +proto.viam.app.data.v1.QueryResponse.prototype.clearFileList = function() { + return this.setFileList([]); +}; + + +/** + * optional int32 tabular_count = 4; + * @return {number} + */ +proto.viam.app.data.v1.QueryResponse.prototype.getTabularCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.data.v1.QueryResponse} returns this + */ +proto.viam.app.data.v1.QueryResponse.prototype.setTabularCount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 binary_count = 5; + * @return {number} + */ +proto.viam.app.data.v1.QueryResponse.prototype.getBinaryCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.data.v1.QueryResponse} returns this + */ +proto.viam.app.data.v1.QueryResponse.prototype.setBinaryCount = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 file_count = 6; + * @return {number} + */ +proto.viam.app.data.v1.QueryResponse.prototype.getFileCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.data.v1.QueryResponse} returns this + */ +proto.viam.app.data.v1.QueryResponse.prototype.setFileCount = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.data.v1.TabularMetadata.repeatedFields_ = [10]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.data.v1.TabularMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.data.v1.TabularMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.TabularMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + robotName: jspb.Message.getFieldWithDefault(msg, 2, ""), + robotId: jspb.Message.getFieldWithDefault(msg, 3, ""), + partName: jspb.Message.getFieldWithDefault(msg, 4, ""), + partId: jspb.Message.getFieldWithDefault(msg, 5, ""), + componentName: jspb.Message.getFieldWithDefault(msg, 6, ""), + componentType: jspb.Message.getFieldWithDefault(msg, 7, ""), + componentModel: jspb.Message.getFieldWithDefault(msg, 8, ""), + method: jspb.Message.getFieldWithDefault(msg, 9, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + interval: (f = msg.getInterval()) && proto.viam.app.data.v1.CaptureInterval.toObject(includeInstance, f), + fileSizeBytes: jspb.Message.getFieldWithDefault(msg, 12, 0), + numReadings: jspb.Message.getFieldWithDefault(msg, 13, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.data.v1.TabularMetadata} + */ +proto.viam.app.data.v1.TabularMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.data.v1.TabularMetadata; + return proto.viam.app.data.v1.TabularMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.data.v1.TabularMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.data.v1.TabularMetadata} + */ +proto.viam.app.data.v1.TabularMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPartName(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentName(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentType(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentModel(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setMethod(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addTags(value); + break; + case 11: + var value = new proto.viam.app.data.v1.CaptureInterval; + reader.readMessage(value,proto.viam.app.data.v1.CaptureInterval.deserializeBinaryFromReader); + msg.setInterval(value); + break; + case 12: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFileSizeBytes(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumReadings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.data.v1.TabularMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.data.v1.TabularMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.TabularMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRobotName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRobotId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPartName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getComponentName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getComponentType(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getComponentModel(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } + f = message.getInterval(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.viam.app.data.v1.CaptureInterval.serializeBinaryToWriter + ); + } + f = message.getFileSizeBytes(); + if (f !== 0) { + writer.writeInt32( + 12, + f + ); + } + f = message.getNumReadings(); + if (f !== 0) { + writer.writeInt32( + 13, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string robot_name = 2; + * @return {string} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getRobotName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setRobotName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string robot_id = 3; + * @return {string} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getRobotId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setRobotId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string part_name = 4; + * @return {string} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getPartName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setPartName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string part_id = 5; + * @return {string} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string component_name = 6; + * @return {string} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getComponentName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setComponentName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string component_type = 7; + * @return {string} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getComponentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setComponentType = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string component_model = 8; + * @return {string} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getComponentModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setComponentModel = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string method = 9; + * @return {string} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * repeated string tags = 10; + * @return {!Array} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional CaptureInterval interval = 11; + * @return {?proto.viam.app.data.v1.CaptureInterval} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getInterval = function() { + return /** @type{?proto.viam.app.data.v1.CaptureInterval} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.data.v1.CaptureInterval, 11)); +}; + + +/** + * @param {?proto.viam.app.data.v1.CaptureInterval|undefined} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this +*/ +proto.viam.app.data.v1.TabularMetadata.prototype.setInterval = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.clearInterval = function() { + return this.setInterval(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.hasInterval = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional int32 file_size_bytes = 12; + * @return {number} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getFileSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setFileSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional int32 num_readings = 13; + * @return {number} + */ +proto.viam.app.data.v1.TabularMetadata.prototype.getNumReadings = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.data.v1.TabularMetadata} returns this + */ +proto.viam.app.data.v1.TabularMetadata.prototype.setNumReadings = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.data.v1.BinaryMetadata.repeatedFields_ = [10]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.data.v1.BinaryMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.data.v1.BinaryMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.BinaryMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + robotName: jspb.Message.getFieldWithDefault(msg, 2, ""), + robotId: jspb.Message.getFieldWithDefault(msg, 3, ""), + partName: jspb.Message.getFieldWithDefault(msg, 4, ""), + partId: jspb.Message.getFieldWithDefault(msg, 5, ""), + componentName: jspb.Message.getFieldWithDefault(msg, 6, ""), + componentType: jspb.Message.getFieldWithDefault(msg, 7, ""), + componentModel: jspb.Message.getFieldWithDefault(msg, 8, ""), + method: jspb.Message.getFieldWithDefault(msg, 9, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + interval: (f = msg.getInterval()) && proto.viam.app.data.v1.CaptureInterval.toObject(includeInstance, f), + fileSizeBytes: jspb.Message.getFieldWithDefault(msg, 12, 0), + fileId: jspb.Message.getFieldWithDefault(msg, 13, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.data.v1.BinaryMetadata} + */ +proto.viam.app.data.v1.BinaryMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.data.v1.BinaryMetadata; + return proto.viam.app.data.v1.BinaryMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.data.v1.BinaryMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.data.v1.BinaryMetadata} + */ +proto.viam.app.data.v1.BinaryMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPartName(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentName(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentType(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentModel(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setMethod(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addTags(value); + break; + case 11: + var value = new proto.viam.app.data.v1.CaptureInterval; + reader.readMessage(value,proto.viam.app.data.v1.CaptureInterval.deserializeBinaryFromReader); + msg.setInterval(value); + break; + case 12: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFileSizeBytes(value); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setFileId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.data.v1.BinaryMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.data.v1.BinaryMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.BinaryMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRobotName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRobotId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPartName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getComponentName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getComponentType(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getComponentModel(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } + f = message.getInterval(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.viam.app.data.v1.CaptureInterval.serializeBinaryToWriter + ); + } + f = message.getFileSizeBytes(); + if (f !== 0) { + writer.writeInt32( + 12, + f + ); + } + f = message.getFileId(); + if (f.length > 0) { + writer.writeString( + 13, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string robot_name = 2; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getRobotName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setRobotName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string robot_id = 3; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getRobotId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setRobotId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string part_name = 4; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getPartName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setPartName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string part_id = 5; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string component_name = 6; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getComponentName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setComponentName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string component_type = 7; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getComponentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setComponentType = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string component_model = 8; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getComponentModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setComponentModel = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string method = 9; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * repeated string tags = 10; + * @return {!Array} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional CaptureInterval interval = 11; + * @return {?proto.viam.app.data.v1.CaptureInterval} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getInterval = function() { + return /** @type{?proto.viam.app.data.v1.CaptureInterval} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.data.v1.CaptureInterval, 11)); +}; + + +/** + * @param {?proto.viam.app.data.v1.CaptureInterval|undefined} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this +*/ +proto.viam.app.data.v1.BinaryMetadata.prototype.setInterval = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.clearInterval = function() { + return this.setInterval(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.hasInterval = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional int32 file_size_bytes = 12; + * @return {number} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getFileSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setFileSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional string file_id = 13; + * @return {string} + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.getFileId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.BinaryMetadata} returns this + */ +proto.viam.app.data.v1.BinaryMetadata.prototype.setFileId = function(value) { + return jspb.Message.setProto3StringField(this, 13, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.data.v1.FileMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.data.v1.FileMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.data.v1.FileMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.FileMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + robotName: jspb.Message.getFieldWithDefault(msg, 2, ""), + robotId: jspb.Message.getFieldWithDefault(msg, 3, ""), + partName: jspb.Message.getFieldWithDefault(msg, 4, ""), + partId: jspb.Message.getFieldWithDefault(msg, 5, ""), + syncTime: (f = msg.getSyncTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + fileSizeBytes: jspb.Message.getFieldWithDefault(msg, 7, 0), + fileId: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.data.v1.FileMetadata} + */ +proto.viam.app.data.v1.FileMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.data.v1.FileMetadata; + return proto.viam.app.data.v1.FileMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.data.v1.FileMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.data.v1.FileMetadata} + */ +proto.viam.app.data.v1.FileMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPartName(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setSyncTime(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFileSizeBytes(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setFileId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.data.v1.FileMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.data.v1.FileMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.data.v1.FileMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.data.v1.FileMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRobotName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRobotId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPartName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSyncTime(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getFileSizeBytes(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getFileId(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.data.v1.FileMetadata.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.FileMetadata} returns this + */ +proto.viam.app.data.v1.FileMetadata.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string robot_name = 2; + * @return {string} + */ +proto.viam.app.data.v1.FileMetadata.prototype.getRobotName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.FileMetadata} returns this + */ +proto.viam.app.data.v1.FileMetadata.prototype.setRobotName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string robot_id = 3; + * @return {string} + */ +proto.viam.app.data.v1.FileMetadata.prototype.getRobotId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.FileMetadata} returns this + */ +proto.viam.app.data.v1.FileMetadata.prototype.setRobotId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string part_name = 4; + * @return {string} + */ +proto.viam.app.data.v1.FileMetadata.prototype.getPartName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.FileMetadata} returns this + */ +proto.viam.app.data.v1.FileMetadata.prototype.setPartName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string part_id = 5; + * @return {string} + */ +proto.viam.app.data.v1.FileMetadata.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.FileMetadata} returns this + */ +proto.viam.app.data.v1.FileMetadata.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Timestamp sync_time = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.data.v1.FileMetadata.prototype.getSyncTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.data.v1.FileMetadata} returns this +*/ +proto.viam.app.data.v1.FileMetadata.prototype.setSyncTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.data.v1.FileMetadata} returns this + */ +proto.viam.app.data.v1.FileMetadata.prototype.clearSyncTime = function() { + return this.setSyncTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.data.v1.FileMetadata.prototype.hasSyncTime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional int32 file_size_bytes = 7; + * @return {number} + */ +proto.viam.app.data.v1.FileMetadata.prototype.getFileSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.data.v1.FileMetadata} returns this + */ +proto.viam.app.data.v1.FileMetadata.prototype.setFileSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional string file_id = 8; + * @return {string} + */ +proto.viam.app.data.v1.FileMetadata.prototype.getFileId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.data.v1.FileMetadata} returns this + */ +proto.viam.app.data.v1.FileMetadata.prototype.setFileId = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * @enum {number} + */ +proto.viam.app.data.v1.DataType = { + DATA_TYPE_UNSPECIFIED: 0, + DATA_TYPE_BINARY_SENSOR: 1, + DATA_TYPE_TABULAR_SENSOR: 2, + DATA_TYPE_FILE: 3 +}; + +goog.object.extend(exports, proto.viam.app.data.v1); diff --git a/gen/js/app/data/v1/data_pb_service.d.ts b/gen/js/app/data/v1/data_pb_service.d.ts new file mode 100644 index 000000000..a90a20381 --- /dev/null +++ b/gen/js/app/data/v1/data_pb_service.d.ts @@ -0,0 +1,63 @@ +// package: viam.app.data.v1 +// file: app/data/v1/data.proto + +import * as app_data_v1_data_pb from "../../../app/data/v1/data_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type DataServiceQuery = { + readonly methodName: string; + readonly service: typeof DataService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_data_v1_data_pb.QueryRequest; + readonly responseType: typeof app_data_v1_data_pb.QueryResponse; +}; + +export class DataService { + static readonly serviceName: string; + static readonly Query: DataServiceQuery; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class DataServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + query( + requestMessage: app_data_v1_data_pb.QueryRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_data_v1_data_pb.QueryResponse|null) => void + ): UnaryResponse; + query( + requestMessage: app_data_v1_data_pb.QueryRequest, + callback: (error: ServiceError|null, responseMessage: app_data_v1_data_pb.QueryResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/app/data/v1/data_pb_service.js b/gen/js/app/data/v1/data_pb_service.js new file mode 100644 index 000000000..a2c30ba3c --- /dev/null +++ b/gen/js/app/data/v1/data_pb_service.js @@ -0,0 +1,61 @@ +// package: viam.app.data.v1 +// file: app/data/v1/data.proto + +var app_data_v1_data_pb = require("../../../app/data/v1/data_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var DataService = (function () { + function DataService() {} + DataService.serviceName = "viam.app.data.v1.DataService"; + return DataService; +}()); + +DataService.Query = { + methodName: "Query", + service: DataService, + requestStream: false, + responseStream: false, + requestType: app_data_v1_data_pb.QueryRequest, + responseType: app_data_v1_data_pb.QueryResponse +}; + +exports.DataService = DataService; + +function DataServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +DataServiceClient.prototype.query = function query(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(DataService.Query, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.DataServiceClient = DataServiceClient; + diff --git a/gen/js/app/datasync/v1/data_sync_grpc_web_pb.js b/gen/js/app/datasync/v1/data_sync_grpc_web_pb.js new file mode 100644 index 000000000..44e2d081c --- /dev/null +++ b/gen/js/app/datasync/v1/data_sync_grpc_web_pb.js @@ -0,0 +1,85 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.app.datasync.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') + +var tagger_v1_tagger_pb = require('../../../tagger/v1/tagger_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.app = {}; +proto.viam.app.datasync = {}; +proto.viam.app.datasync.v1 = require('./data_sync_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.datasync.v1.DataSyncServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.datasync.v1.DataSyncServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +module.exports = proto.viam.app.datasync.v1; + diff --git a/gen/js/app/datasync/v1/data_sync_pb.d.ts b/gen/js/app/datasync/v1/data_sync_pb.d.ts new file mode 100644 index 000000000..97c9875a1 --- /dev/null +++ b/gen/js/app/datasync/v1/data_sync_pb.d.ts @@ -0,0 +1,536 @@ +// package: viam.app.datasync.v1 +// file: app/datasync/v1/data_sync.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as tagger_v1_tagger_pb from "../../../tagger/v1/tagger_pb"; + +export class SensorMetadata extends jspb.Message { + hasTimeRequested(): boolean; + clearTimeRequested(): void; + getTimeRequested(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimeRequested(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasTimeReceived(): boolean; + clearTimeReceived(): void; + getTimeReceived(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimeReceived(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SensorMetadata.AsObject; + static toObject(includeInstance: boolean, msg: SensorMetadata): SensorMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SensorMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SensorMetadata; + static deserializeBinaryFromReader(message: SensorMetadata, reader: jspb.BinaryReader): SensorMetadata; +} + +export namespace SensorMetadata { + export type AsObject = { + timeRequested?: google_protobuf_timestamp_pb.Timestamp.AsObject, + timeReceived?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class SensorData extends jspb.Message { + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): SensorMetadata | undefined; + setMetadata(value?: SensorMetadata): void; + + hasStruct(): boolean; + clearStruct(): void; + getStruct(): google_protobuf_struct_pb.Struct | undefined; + setStruct(value?: google_protobuf_struct_pb.Struct): void; + + hasBinary(): boolean; + clearBinary(): void; + getBinary(): Uint8Array | string; + getBinary_asU8(): Uint8Array; + getBinary_asB64(): string; + setBinary(value: Uint8Array | string): void; + + getDataCase(): SensorData.DataCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SensorData.AsObject; + static toObject(includeInstance: boolean, msg: SensorData): SensorData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SensorData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SensorData; + static deserializeBinaryFromReader(message: SensorData, reader: jspb.BinaryReader): SensorData; +} + +export namespace SensorData { + export type AsObject = { + metadata?: SensorMetadata.AsObject, + struct?: google_protobuf_struct_pb.Struct.AsObject, + binary: Uint8Array | string, + } + + export enum DataCase { + DATA_NOT_SET = 0, + STRUCT = 2, + BINARY = 3, + } +} + +export class FileData extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileData.AsObject; + static toObject(includeInstance: boolean, msg: FileData): FileData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileData; + static deserializeBinaryFromReader(message: FileData, reader: jspb.BinaryReader): FileData; +} + +export namespace FileData { + export type AsObject = { + data: Uint8Array | string, + } +} + +export class UploadMetadata extends jspb.Message { + getPartId(): string; + setPartId(value: string): void; + + getComponentType(): string; + setComponentType(value: string): void; + + getComponentName(): string; + setComponentName(value: string): void; + + getComponentModel(): string; + setComponentModel(value: string): void; + + getMethodName(): string; + setMethodName(value: string): void; + + getType(): DataTypeMap[keyof DataTypeMap]; + setType(value: DataTypeMap[keyof DataTypeMap]): void; + + getFileName(): string; + setFileName(value: string): void; + + getMethodParametersMap(): jspb.Map; + clearMethodParametersMap(): void; + getFileExtension(): string; + setFileExtension(value: string): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value: string, index?: number): string; + + getSessionId(): string; + setSessionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadMetadata.AsObject; + static toObject(includeInstance: boolean, msg: UploadMetadata): UploadMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadMetadata; + static deserializeBinaryFromReader(message: UploadMetadata, reader: jspb.BinaryReader): UploadMetadata; +} + +export namespace UploadMetadata { + export type AsObject = { + partId: string, + componentType: string, + componentName: string, + componentModel: string, + methodName: string, + type: DataTypeMap[keyof DataTypeMap], + fileName: string, + methodParametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + fileExtension: string, + tagsList: Array, + sessionId: string, + } +} + +export class UploadRequest extends jspb.Message { + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): UploadMetadata | undefined; + setMetadata(value?: UploadMetadata): void; + + hasSensorContents(): boolean; + clearSensorContents(): void; + getSensorContents(): SensorData | undefined; + setSensorContents(value?: SensorData): void; + + hasFileContents(): boolean; + clearFileContents(): void; + getFileContents(): FileData | undefined; + setFileContents(value?: FileData): void; + + getUploadPacketCase(): UploadRequest.UploadPacketCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadRequest.AsObject; + static toObject(includeInstance: boolean, msg: UploadRequest): UploadRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadRequest; + static deserializeBinaryFromReader(message: UploadRequest, reader: jspb.BinaryReader): UploadRequest; +} + +export namespace UploadRequest { + export type AsObject = { + metadata?: UploadMetadata.AsObject, + sensorContents?: SensorData.AsObject, + fileContents?: FileData.AsObject, + } + + export enum UploadPacketCase { + UPLOAD_PACKET_NOT_SET = 0, + METADATA = 1, + SENSOR_CONTENTS = 2, + FILE_CONTENTS = 3, + } +} + +export class UploadResponse extends jspb.Message { + getRequestsWritten(): number; + setRequestsWritten(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadResponse.AsObject; + static toObject(includeInstance: boolean, msg: UploadResponse): UploadResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadResponse; + static deserializeBinaryFromReader(message: UploadResponse, reader: jspb.BinaryReader): UploadResponse; +} + +export namespace UploadResponse { + export type AsObject = { + requestsWritten: number, + } +} + +export class CaptureInterval extends jspb.Message { + hasStart(): boolean; + clearStart(): void; + getStart(): google_protobuf_timestamp_pb.Timestamp | undefined; + setStart(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined; + setEnd(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CaptureInterval.AsObject; + static toObject(includeInstance: boolean, msg: CaptureInterval): CaptureInterval.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CaptureInterval, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CaptureInterval; + static deserializeBinaryFromReader(message: CaptureInterval, reader: jspb.BinaryReader): CaptureInterval; +} + +export namespace CaptureInterval { + export type AsObject = { + start?: google_protobuf_timestamp_pb.Timestamp.AsObject, + end?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class DataCaptureMetadata extends jspb.Message { + getComponentType(): string; + setComponentType(value: string): void; + + getComponentName(): string; + setComponentName(value: string): void; + + getComponentModel(): string; + setComponentModel(value: string): void; + + getMethodName(): string; + setMethodName(value: string): void; + + getType(): DataTypeMap[keyof DataTypeMap]; + setType(value: DataTypeMap[keyof DataTypeMap]): void; + + getMethodParametersMap(): jspb.Map; + clearMethodParametersMap(): void; + getFileExtension(): string; + setFileExtension(value: string): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value: string, index?: number): string; + + getSessionId(): string; + setSessionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DataCaptureMetadata.AsObject; + static toObject(includeInstance: boolean, msg: DataCaptureMetadata): DataCaptureMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DataCaptureMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DataCaptureMetadata; + static deserializeBinaryFromReader(message: DataCaptureMetadata, reader: jspb.BinaryReader): DataCaptureMetadata; +} + +export namespace DataCaptureMetadata { + export type AsObject = { + componentType: string, + componentName: string, + componentModel: string, + methodName: string, + type: DataTypeMap[keyof DataTypeMap], + methodParametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + fileExtension: string, + tagsList: Array, + sessionId: string, + } +} + +export class TabularCapture extends jspb.Message { + hasInterval(): boolean; + clearInterval(): void; + getInterval(): CaptureInterval | undefined; + setInterval(value?: CaptureInterval): void; + + getOrgId(): string; + setOrgId(value: string): void; + + getRobotId(): string; + setRobotId(value: string): void; + + getPartId(): string; + setPartId(value: string): void; + + getLocationId(): string; + setLocationId(value: string): void; + + getComponentName(): string; + setComponentName(value: string): void; + + getComponentType(): string; + setComponentType(value: string): void; + + getComponentModel(): string; + setComponentModel(value: string): void; + + getMethodName(): string; + setMethodName(value: string): void; + + getBlobPath(): string; + setBlobPath(value: string): void; + + clearColumnNamesList(): void; + getColumnNamesList(): Array; + setColumnNamesList(value: Array): void; + addColumnNames(value: string, index?: number): string; + + getMethodParametersMap(): jspb.Map; + clearMethodParametersMap(): void; + getFileId(): string; + setFileId(value: string): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value: string, index?: number): string; + + getMessageCount(): number; + setMessageCount(value: number): void; + + getFileSizeBytes(): number; + setFileSizeBytes(value: number): void; + + getSessionId(): string; + setSessionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TabularCapture.AsObject; + static toObject(includeInstance: boolean, msg: TabularCapture): TabularCapture.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TabularCapture, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TabularCapture; + static deserializeBinaryFromReader(message: TabularCapture, reader: jspb.BinaryReader): TabularCapture; +} + +export namespace TabularCapture { + export type AsObject = { + interval?: CaptureInterval.AsObject, + orgId: string, + robotId: string, + partId: string, + locationId: string, + componentName: string, + componentType: string, + componentModel: string, + methodName: string, + blobPath: string, + columnNamesList: Array, + methodParametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + fileId: string, + tagsList: Array, + messageCount: number, + fileSizeBytes: number, + sessionId: string, + } +} + +export class BinaryCapture extends jspb.Message { + hasInterval(): boolean; + clearInterval(): void; + getInterval(): CaptureInterval | undefined; + setInterval(value?: CaptureInterval): void; + + getOrgId(): string; + setOrgId(value: string): void; + + getRobotId(): string; + setRobotId(value: string): void; + + getPartId(): string; + setPartId(value: string): void; + + getLocationId(): string; + setLocationId(value: string): void; + + getComponentName(): string; + setComponentName(value: string): void; + + getComponentType(): string; + setComponentType(value: string): void; + + getComponentModel(): string; + setComponentModel(value: string): void; + + getMethodName(): string; + setMethodName(value: string): void; + + getBlobPath(): string; + setBlobPath(value: string): void; + + getMethodParametersMap(): jspb.Map; + clearMethodParametersMap(): void; + getFileId(): string; + setFileId(value: string): void; + + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): void; + addTags(value: string, index?: number): string; + + getFileSizeBytes(): number; + setFileSizeBytes(value: number): void; + + getSessionId(): string; + setSessionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BinaryCapture.AsObject; + static toObject(includeInstance: boolean, msg: BinaryCapture): BinaryCapture.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BinaryCapture, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BinaryCapture; + static deserializeBinaryFromReader(message: BinaryCapture, reader: jspb.BinaryReader): BinaryCapture; +} + +export namespace BinaryCapture { + export type AsObject = { + interval?: CaptureInterval.AsObject, + orgId: string, + robotId: string, + partId: string, + locationId: string, + componentName: string, + componentType: string, + componentModel: string, + methodName: string, + blobPath: string, + methodParametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + fileId: string, + tagsList: Array, + fileSizeBytes: number, + sessionId: string, + } +} + +export class UserFile extends jspb.Message { + hasSyncTime(): boolean; + clearSyncTime(): void; + getSyncTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setSyncTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getOrgId(): string; + setOrgId(value: string): void; + + getRobotId(): string; + setRobotId(value: string): void; + + getPartId(): string; + setPartId(value: string): void; + + getLocationId(): string; + setLocationId(value: string): void; + + getBlobPath(): string; + setBlobPath(value: string): void; + + getMethodParametersMap(): jspb.Map; + clearMethodParametersMap(): void; + getFileId(): string; + setFileId(value: string): void; + + getFileSizeBytes(): number; + setFileSizeBytes(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UserFile.AsObject; + static toObject(includeInstance: boolean, msg: UserFile): UserFile.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UserFile, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UserFile; + static deserializeBinaryFromReader(message: UserFile, reader: jspb.BinaryReader): UserFile; +} + +export namespace UserFile { + export type AsObject = { + syncTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + orgId: string, + robotId: string, + partId: string, + locationId: string, + blobPath: string, + methodParametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + fileId: string, + fileSizeBytes: number, + } +} + +export interface DataTypeMap { + DATA_TYPE_UNSPECIFIED: 0; + DATA_TYPE_BINARY_SENSOR: 1; + DATA_TYPE_TABULAR_SENSOR: 2; + DATA_TYPE_FILE: 3; +} + +export const DataType: DataTypeMap; + diff --git a/gen/js/app/datasync/v1/data_sync_pb.js b/gen/js/app/datasync/v1/data_sync_pb.js new file mode 100644 index 000000000..f1734ec9d --- /dev/null +++ b/gen/js/app/datasync/v1/data_sync_pb.js @@ -0,0 +1,4080 @@ +// source: app/datasync/v1/data_sync.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var tagger_v1_tagger_pb = require('../../../tagger/v1/tagger_pb.js'); +goog.object.extend(proto, tagger_v1_tagger_pb); +goog.exportSymbol('proto.viam.app.datasync.v1.BinaryCapture', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.CaptureInterval', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.DataCaptureMetadata', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.DataType', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.FileData', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.SensorData', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.SensorData.DataCase', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.SensorMetadata', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.TabularCapture', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.UploadMetadata', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.UploadRequest', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.UploadRequest.UploadPacketCase', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.UploadResponse', null, global); +goog.exportSymbol('proto.viam.app.datasync.v1.UserFile', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.SensorMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.datasync.v1.SensorMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.SensorMetadata.displayName = 'proto.viam.app.datasync.v1.SensorMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.SensorData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.viam.app.datasync.v1.SensorData.oneofGroups_); +}; +goog.inherits(proto.viam.app.datasync.v1.SensorData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.SensorData.displayName = 'proto.viam.app.datasync.v1.SensorData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.FileData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.datasync.v1.FileData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.FileData.displayName = 'proto.viam.app.datasync.v1.FileData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.UploadMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.datasync.v1.UploadMetadata.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.datasync.v1.UploadMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.UploadMetadata.displayName = 'proto.viam.app.datasync.v1.UploadMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.UploadRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.viam.app.datasync.v1.UploadRequest.oneofGroups_); +}; +goog.inherits(proto.viam.app.datasync.v1.UploadRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.UploadRequest.displayName = 'proto.viam.app.datasync.v1.UploadRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.UploadResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.datasync.v1.UploadResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.UploadResponse.displayName = 'proto.viam.app.datasync.v1.UploadResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.CaptureInterval = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.datasync.v1.CaptureInterval, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.CaptureInterval.displayName = 'proto.viam.app.datasync.v1.CaptureInterval'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.DataCaptureMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.datasync.v1.DataCaptureMetadata.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.datasync.v1.DataCaptureMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.DataCaptureMetadata.displayName = 'proto.viam.app.datasync.v1.DataCaptureMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.TabularCapture = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.datasync.v1.TabularCapture.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.datasync.v1.TabularCapture, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.TabularCapture.displayName = 'proto.viam.app.datasync.v1.TabularCapture'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.BinaryCapture = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.datasync.v1.BinaryCapture.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.datasync.v1.BinaryCapture, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.BinaryCapture.displayName = 'proto.viam.app.datasync.v1.BinaryCapture'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.datasync.v1.UserFile = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.datasync.v1.UserFile, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.datasync.v1.UserFile.displayName = 'proto.viam.app.datasync.v1.UserFile'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.SensorMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.SensorMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.SensorMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.SensorMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + timeRequested: (f = msg.getTimeRequested()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + timeReceived: (f = msg.getTimeReceived()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.SensorMetadata} + */ +proto.viam.app.datasync.v1.SensorMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.SensorMetadata; + return proto.viam.app.datasync.v1.SensorMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.SensorMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.SensorMetadata} + */ +proto.viam.app.datasync.v1.SensorMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimeRequested(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimeReceived(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.SensorMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.SensorMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.SensorMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.SensorMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimeRequested(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTimeReceived(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp time_requested = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.datasync.v1.SensorMetadata.prototype.getTimeRequested = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.datasync.v1.SensorMetadata} returns this +*/ +proto.viam.app.datasync.v1.SensorMetadata.prototype.setTimeRequested = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.SensorMetadata} returns this + */ +proto.viam.app.datasync.v1.SensorMetadata.prototype.clearTimeRequested = function() { + return this.setTimeRequested(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.SensorMetadata.prototype.hasTimeRequested = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp time_received = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.datasync.v1.SensorMetadata.prototype.getTimeReceived = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.datasync.v1.SensorMetadata} returns this +*/ +proto.viam.app.datasync.v1.SensorMetadata.prototype.setTimeReceived = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.SensorMetadata} returns this + */ +proto.viam.app.datasync.v1.SensorMetadata.prototype.clearTimeReceived = function() { + return this.setTimeReceived(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.SensorMetadata.prototype.hasTimeReceived = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.viam.app.datasync.v1.SensorData.oneofGroups_ = [[2,3]]; + +/** + * @enum {number} + */ +proto.viam.app.datasync.v1.SensorData.DataCase = { + DATA_NOT_SET: 0, + STRUCT: 2, + BINARY: 3 +}; + +/** + * @return {proto.viam.app.datasync.v1.SensorData.DataCase} + */ +proto.viam.app.datasync.v1.SensorData.prototype.getDataCase = function() { + return /** @type {proto.viam.app.datasync.v1.SensorData.DataCase} */(jspb.Message.computeOneofCase(this, proto.viam.app.datasync.v1.SensorData.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.SensorData.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.SensorData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.SensorData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.SensorData.toObject = function(includeInstance, msg) { + var f, obj = { + metadata: (f = msg.getMetadata()) && proto.viam.app.datasync.v1.SensorMetadata.toObject(includeInstance, f), + struct: (f = msg.getStruct()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + binary: msg.getBinary_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.SensorData} + */ +proto.viam.app.datasync.v1.SensorData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.SensorData; + return proto.viam.app.datasync.v1.SensorData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.SensorData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.SensorData} + */ +proto.viam.app.datasync.v1.SensorData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.datasync.v1.SensorMetadata; + reader.readMessage(value,proto.viam.app.datasync.v1.SensorMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + case 2: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setStruct(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBinary(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.SensorData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.SensorData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.SensorData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.SensorData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.datasync.v1.SensorMetadata.serializeBinaryToWriter + ); + } + f = message.getStruct(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional SensorMetadata metadata = 1; + * @return {?proto.viam.app.datasync.v1.SensorMetadata} + */ +proto.viam.app.datasync.v1.SensorData.prototype.getMetadata = function() { + return /** @type{?proto.viam.app.datasync.v1.SensorMetadata} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.datasync.v1.SensorMetadata, 1)); +}; + + +/** + * @param {?proto.viam.app.datasync.v1.SensorMetadata|undefined} value + * @return {!proto.viam.app.datasync.v1.SensorData} returns this +*/ +proto.viam.app.datasync.v1.SensorData.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.SensorData} returns this + */ +proto.viam.app.datasync.v1.SensorData.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.SensorData.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Struct struct = 2; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.datasync.v1.SensorData.prototype.getStruct = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.datasync.v1.SensorData} returns this +*/ +proto.viam.app.datasync.v1.SensorData.prototype.setStruct = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.viam.app.datasync.v1.SensorData.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.SensorData} returns this + */ +proto.viam.app.datasync.v1.SensorData.prototype.clearStruct = function() { + return this.setStruct(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.SensorData.prototype.hasStruct = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes binary = 3; + * @return {string} + */ +proto.viam.app.datasync.v1.SensorData.prototype.getBinary = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes binary = 3; + * This is a type-conversion wrapper around `getBinary()` + * @return {string} + */ +proto.viam.app.datasync.v1.SensorData.prototype.getBinary_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBinary())); +}; + + +/** + * optional bytes binary = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBinary()` + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.SensorData.prototype.getBinary_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBinary())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.app.datasync.v1.SensorData} returns this + */ +proto.viam.app.datasync.v1.SensorData.prototype.setBinary = function(value) { + return jspb.Message.setOneofField(this, 3, proto.viam.app.datasync.v1.SensorData.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.viam.app.datasync.v1.SensorData} returns this + */ +proto.viam.app.datasync.v1.SensorData.prototype.clearBinary = function() { + return jspb.Message.setOneofField(this, 3, proto.viam.app.datasync.v1.SensorData.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.SensorData.prototype.hasBinary = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.FileData.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.FileData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.FileData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.FileData.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.FileData} + */ +proto.viam.app.datasync.v1.FileData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.FileData; + return proto.viam.app.datasync.v1.FileData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.FileData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.FileData} + */ +proto.viam.app.datasync.v1.FileData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.FileData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.FileData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.FileData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.FileData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {string} + */ +proto.viam.app.datasync.v1.FileData.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.viam.app.datasync.v1.FileData.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.FileData.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.app.datasync.v1.FileData} returns this + */ +proto.viam.app.datasync.v1.FileData.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.datasync.v1.UploadMetadata.repeatedFields_ = [10]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.UploadMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.UploadMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.UploadMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + partId: jspb.Message.getFieldWithDefault(msg, 1, ""), + componentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + componentName: jspb.Message.getFieldWithDefault(msg, 3, ""), + componentModel: jspb.Message.getFieldWithDefault(msg, 4, ""), + methodName: jspb.Message.getFieldWithDefault(msg, 5, ""), + type: jspb.Message.getFieldWithDefault(msg, 6, 0), + fileName: jspb.Message.getFieldWithDefault(msg, 7, ""), + methodParametersMap: (f = msg.getMethodParametersMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + fileExtension: jspb.Message.getFieldWithDefault(msg, 9, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + sessionId: jspb.Message.getFieldWithDefault(msg, 11, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.UploadMetadata} + */ +proto.viam.app.datasync.v1.UploadMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.UploadMetadata; + return proto.viam.app.datasync.v1.UploadMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.UploadMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.UploadMetadata} + */ +proto.viam.app.datasync.v1.UploadMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentModel(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setMethodName(value); + break; + case 6: + var value = /** @type {!proto.viam.app.datasync.v1.DataType} */ (reader.readEnum()); + msg.setType(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setFileName(value); + break; + case 8: + var value = msg.getMethodParametersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setFileExtension(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addTags(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.UploadMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.UploadMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.UploadMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getComponentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getComponentName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getComponentModel(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getMethodName(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 6, + f + ); + } + f = message.getFileName(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getMethodParametersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getFileExtension(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } + f = message.getSessionId(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } +}; + + +/** + * optional string part_id = 1; + * @return {string} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string component_type = 2; + * @return {string} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getComponentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setComponentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string component_name = 3; + * @return {string} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getComponentName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setComponentName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string component_model = 4; + * @return {string} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getComponentModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setComponentModel = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string method_name = 5; + * @return {string} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getMethodName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setMethodName = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional DataType type = 6; + * @return {!proto.viam.app.datasync.v1.DataType} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getType = function() { + return /** @type {!proto.viam.app.datasync.v1.DataType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.viam.app.datasync.v1.DataType} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 6, value); +}; + + +/** + * optional string file_name = 7; + * @return {string} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getFileName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setFileName = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * map method_parameters = 8; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getMethodParametersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 8, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.clearMethodParametersMap = function() { + this.getMethodParametersMap().clear(); + return this;}; + + +/** + * optional string file_extension = 9; + * @return {string} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getFileExtension = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setFileExtension = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * repeated string tags = 10; + * @return {!Array} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional string session_id = 11; + * @return {string} + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.getSessionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UploadMetadata} returns this + */ +proto.viam.app.datasync.v1.UploadMetadata.prototype.setSessionId = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.viam.app.datasync.v1.UploadRequest.oneofGroups_ = [[1,2,3]]; + +/** + * @enum {number} + */ +proto.viam.app.datasync.v1.UploadRequest.UploadPacketCase = { + UPLOAD_PACKET_NOT_SET: 0, + METADATA: 1, + SENSOR_CONTENTS: 2, + FILE_CONTENTS: 3 +}; + +/** + * @return {proto.viam.app.datasync.v1.UploadRequest.UploadPacketCase} + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.getUploadPacketCase = function() { + return /** @type {proto.viam.app.datasync.v1.UploadRequest.UploadPacketCase} */(jspb.Message.computeOneofCase(this, proto.viam.app.datasync.v1.UploadRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.UploadRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.UploadRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.UploadRequest.toObject = function(includeInstance, msg) { + var f, obj = { + metadata: (f = msg.getMetadata()) && proto.viam.app.datasync.v1.UploadMetadata.toObject(includeInstance, f), + sensorContents: (f = msg.getSensorContents()) && proto.viam.app.datasync.v1.SensorData.toObject(includeInstance, f), + fileContents: (f = msg.getFileContents()) && proto.viam.app.datasync.v1.FileData.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.UploadRequest} + */ +proto.viam.app.datasync.v1.UploadRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.UploadRequest; + return proto.viam.app.datasync.v1.UploadRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.UploadRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.UploadRequest} + */ +proto.viam.app.datasync.v1.UploadRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.datasync.v1.UploadMetadata; + reader.readMessage(value,proto.viam.app.datasync.v1.UploadMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + case 2: + var value = new proto.viam.app.datasync.v1.SensorData; + reader.readMessage(value,proto.viam.app.datasync.v1.SensorData.deserializeBinaryFromReader); + msg.setSensorContents(value); + break; + case 3: + var value = new proto.viam.app.datasync.v1.FileData; + reader.readMessage(value,proto.viam.app.datasync.v1.FileData.deserializeBinaryFromReader); + msg.setFileContents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.UploadRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.UploadRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.UploadRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.datasync.v1.UploadMetadata.serializeBinaryToWriter + ); + } + f = message.getSensorContents(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.app.datasync.v1.SensorData.serializeBinaryToWriter + ); + } + f = message.getFileContents(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.viam.app.datasync.v1.FileData.serializeBinaryToWriter + ); + } +}; + + +/** + * optional UploadMetadata metadata = 1; + * @return {?proto.viam.app.datasync.v1.UploadMetadata} + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.getMetadata = function() { + return /** @type{?proto.viam.app.datasync.v1.UploadMetadata} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.datasync.v1.UploadMetadata, 1)); +}; + + +/** + * @param {?proto.viam.app.datasync.v1.UploadMetadata|undefined} value + * @return {!proto.viam.app.datasync.v1.UploadRequest} returns this +*/ +proto.viam.app.datasync.v1.UploadRequest.prototype.setMetadata = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.viam.app.datasync.v1.UploadRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.UploadRequest} returns this + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SensorData sensor_contents = 2; + * @return {?proto.viam.app.datasync.v1.SensorData} + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.getSensorContents = function() { + return /** @type{?proto.viam.app.datasync.v1.SensorData} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.datasync.v1.SensorData, 2)); +}; + + +/** + * @param {?proto.viam.app.datasync.v1.SensorData|undefined} value + * @return {!proto.viam.app.datasync.v1.UploadRequest} returns this +*/ +proto.viam.app.datasync.v1.UploadRequest.prototype.setSensorContents = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.viam.app.datasync.v1.UploadRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.UploadRequest} returns this + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.clearSensorContents = function() { + return this.setSensorContents(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.hasSensorContents = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional FileData file_contents = 3; + * @return {?proto.viam.app.datasync.v1.FileData} + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.getFileContents = function() { + return /** @type{?proto.viam.app.datasync.v1.FileData} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.datasync.v1.FileData, 3)); +}; + + +/** + * @param {?proto.viam.app.datasync.v1.FileData|undefined} value + * @return {!proto.viam.app.datasync.v1.UploadRequest} returns this +*/ +proto.viam.app.datasync.v1.UploadRequest.prototype.setFileContents = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.viam.app.datasync.v1.UploadRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.UploadRequest} returns this + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.clearFileContents = function() { + return this.setFileContents(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.UploadRequest.prototype.hasFileContents = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.UploadResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.UploadResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.UploadResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.UploadResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestsWritten: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.UploadResponse} + */ +proto.viam.app.datasync.v1.UploadResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.UploadResponse; + return proto.viam.app.datasync.v1.UploadResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.UploadResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.UploadResponse} + */ +proto.viam.app.datasync.v1.UploadResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRequestsWritten(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.UploadResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.UploadResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.UploadResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.UploadResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsWritten(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 requests_written = 1; + * @return {number} + */ +proto.viam.app.datasync.v1.UploadResponse.prototype.getRequestsWritten = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.datasync.v1.UploadResponse} returns this + */ +proto.viam.app.datasync.v1.UploadResponse.prototype.setRequestsWritten = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.CaptureInterval.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.CaptureInterval.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.CaptureInterval} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.CaptureInterval.toObject = function(includeInstance, msg) { + var f, obj = { + start: (f = msg.getStart()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + end: (f = msg.getEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.CaptureInterval} + */ +proto.viam.app.datasync.v1.CaptureInterval.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.CaptureInterval; + return proto.viam.app.datasync.v1.CaptureInterval.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.CaptureInterval} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.CaptureInterval} + */ +proto.viam.app.datasync.v1.CaptureInterval.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStart(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.CaptureInterval.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.CaptureInterval.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.CaptureInterval} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.CaptureInterval.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStart(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEnd(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp start = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.datasync.v1.CaptureInterval.prototype.getStart = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.datasync.v1.CaptureInterval} returns this +*/ +proto.viam.app.datasync.v1.CaptureInterval.prototype.setStart = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.CaptureInterval} returns this + */ +proto.viam.app.datasync.v1.CaptureInterval.prototype.clearStart = function() { + return this.setStart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.CaptureInterval.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp end = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.datasync.v1.CaptureInterval.prototype.getEnd = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.datasync.v1.CaptureInterval} returns this +*/ +proto.viam.app.datasync.v1.CaptureInterval.prototype.setEnd = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.CaptureInterval} returns this + */ +proto.viam.app.datasync.v1.CaptureInterval.prototype.clearEnd = function() { + return this.setEnd(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.CaptureInterval.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.repeatedFields_ = [8]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.DataCaptureMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.DataCaptureMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + componentType: jspb.Message.getFieldWithDefault(msg, 1, ""), + componentName: jspb.Message.getFieldWithDefault(msg, 2, ""), + componentModel: jspb.Message.getFieldWithDefault(msg, 3, ""), + methodName: jspb.Message.getFieldWithDefault(msg, 4, ""), + type: jspb.Message.getFieldWithDefault(msg, 5, 0), + methodParametersMap: (f = msg.getMethodParametersMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + fileExtension: jspb.Message.getFieldWithDefault(msg, 7, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, + sessionId: jspb.Message.getFieldWithDefault(msg, 9, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.DataCaptureMetadata; + return proto.viam.app.datasync.v1.DataCaptureMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.DataCaptureMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentModel(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMethodName(value); + break; + case 5: + var value = /** @type {!proto.viam.app.datasync.v1.DataType} */ (reader.readEnum()); + msg.setType(value); + break; + case 6: + var value = msg.getMethodParametersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setFileExtension(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.addTags(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.DataCaptureMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.DataCaptureMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getComponentType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getComponentName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getComponentModel(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMethodName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getMethodParametersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getFileExtension(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 8, + f + ); + } + f = message.getSessionId(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional string component_type = 1; + * @return {string} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.getComponentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.setComponentType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string component_name = 2; + * @return {string} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.getComponentName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.setComponentName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string component_model = 3; + * @return {string} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.getComponentModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.setComponentModel = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string method_name = 4; + * @return {string} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.getMethodName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.setMethodName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional DataType type = 5; + * @return {!proto.viam.app.datasync.v1.DataType} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.getType = function() { + return /** @type {!proto.viam.app.datasync.v1.DataType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.viam.app.datasync.v1.DataType} value + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + +/** + * map method_parameters = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.getMethodParametersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.clearMethodParametersMap = function() { + this.getMethodParametersMap().clear(); + return this;}; + + +/** + * optional string file_extension = 7; + * @return {string} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.getFileExtension = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.setFileExtension = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated string tags = 8; + * @return {!Array} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional string session_id = 9; + * @return {string} + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.getSessionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.DataCaptureMetadata} returns this + */ +proto.viam.app.datasync.v1.DataCaptureMetadata.prototype.setSessionId = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.datasync.v1.TabularCapture.repeatedFields_ = [11,14]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.TabularCapture.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.TabularCapture} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.TabularCapture.toObject = function(includeInstance, msg) { + var f, obj = { + interval: (f = msg.getInterval()) && proto.viam.app.datasync.v1.CaptureInterval.toObject(includeInstance, f), + orgId: jspb.Message.getFieldWithDefault(msg, 2, ""), + robotId: jspb.Message.getFieldWithDefault(msg, 3, ""), + partId: jspb.Message.getFieldWithDefault(msg, 4, ""), + locationId: jspb.Message.getFieldWithDefault(msg, 5, ""), + componentName: jspb.Message.getFieldWithDefault(msg, 6, ""), + componentType: jspb.Message.getFieldWithDefault(msg, 7, ""), + componentModel: jspb.Message.getFieldWithDefault(msg, 8, ""), + methodName: jspb.Message.getFieldWithDefault(msg, 9, ""), + blobPath: jspb.Message.getFieldWithDefault(msg, 10, ""), + columnNamesList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, + methodParametersMap: (f = msg.getMethodParametersMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + fileId: jspb.Message.getFieldWithDefault(msg, 13, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 14)) == null ? undefined : f, + messageCount: jspb.Message.getFieldWithDefault(msg, 15, 0), + fileSizeBytes: jspb.Message.getFieldWithDefault(msg, 16, 0), + sessionId: jspb.Message.getFieldWithDefault(msg, 17, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.TabularCapture} + */ +proto.viam.app.datasync.v1.TabularCapture.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.TabularCapture; + return proto.viam.app.datasync.v1.TabularCapture.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.TabularCapture} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.TabularCapture} + */ +proto.viam.app.datasync.v1.TabularCapture.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.datasync.v1.CaptureInterval; + reader.readMessage(value,proto.viam.app.datasync.v1.CaptureInterval.deserializeBinaryFromReader); + msg.setInterval(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOrgId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentName(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentType(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentModel(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setMethodName(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setBlobPath(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.addColumnNames(value); + break; + case 12: + var value = msg.getMethodParametersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setFileId(value); + break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.addTags(value); + break; + case 15: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMessageCount(value); + break; + case 16: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFileSizeBytes(value); + break; + case 17: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.TabularCapture.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.TabularCapture} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.TabularCapture.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInterval(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.datasync.v1.CaptureInterval.serializeBinaryToWriter + ); + } + f = message.getOrgId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRobotId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getComponentName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getComponentType(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getComponentModel(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getMethodName(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getBlobPath(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getColumnNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 11, + f + ); + } + f = message.getMethodParametersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(12, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getFileId(); + if (f.length > 0) { + writer.writeString( + 13, + f + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 14, + f + ); + } + f = message.getMessageCount(); + if (f !== 0) { + writer.writeInt32( + 15, + f + ); + } + f = message.getFileSizeBytes(); + if (f !== 0) { + writer.writeInt64( + 16, + f + ); + } + f = message.getSessionId(); + if (f.length > 0) { + writer.writeString( + 17, + f + ); + } +}; + + +/** + * optional CaptureInterval interval = 1; + * @return {?proto.viam.app.datasync.v1.CaptureInterval} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getInterval = function() { + return /** @type{?proto.viam.app.datasync.v1.CaptureInterval} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.datasync.v1.CaptureInterval, 1)); +}; + + +/** + * @param {?proto.viam.app.datasync.v1.CaptureInterval|undefined} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this +*/ +proto.viam.app.datasync.v1.TabularCapture.prototype.setInterval = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.clearInterval = function() { + return this.setInterval(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.hasInterval = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string org_id = 2; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getOrgId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setOrgId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string robot_id = 3; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getRobotId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setRobotId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string part_id = 4; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string location_id = 5; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string component_name = 6; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getComponentName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setComponentName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string component_type = 7; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getComponentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setComponentType = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string component_model = 8; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getComponentModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setComponentModel = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string method_name = 9; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getMethodName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setMethodName = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string blob_path = 10; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getBlobPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setBlobPath = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * repeated string column_names = 11; + * @return {!Array} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getColumnNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setColumnNamesList = function(value) { + return jspb.Message.setField(this, 11, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.addColumnNames = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 11, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.clearColumnNamesList = function() { + return this.setColumnNamesList([]); +}; + + +/** + * map method_parameters = 12; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getMethodParametersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 12, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.clearMethodParametersMap = function() { + this.getMethodParametersMap().clear(); + return this;}; + + +/** + * optional string file_id = 13; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getFileId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setFileId = function(value) { + return jspb.Message.setProto3StringField(this, 13, value); +}; + + +/** + * repeated string tags = 14; + * @return {!Array} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 14)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 14, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 14, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional int32 message_count = 15; + * @return {number} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getMessageCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setMessageCount = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); +}; + + +/** + * optional int64 file_size_bytes = 16; + * @return {number} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getFileSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setFileSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); +}; + + +/** + * optional string session_id = 17; + * @return {string} + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.getSessionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.TabularCapture} returns this + */ +proto.viam.app.datasync.v1.TabularCapture.prototype.setSessionId = function(value) { + return jspb.Message.setProto3StringField(this, 17, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.datasync.v1.BinaryCapture.repeatedFields_ = [13]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.BinaryCapture.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.BinaryCapture} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.BinaryCapture.toObject = function(includeInstance, msg) { + var f, obj = { + interval: (f = msg.getInterval()) && proto.viam.app.datasync.v1.CaptureInterval.toObject(includeInstance, f), + orgId: jspb.Message.getFieldWithDefault(msg, 2, ""), + robotId: jspb.Message.getFieldWithDefault(msg, 3, ""), + partId: jspb.Message.getFieldWithDefault(msg, 4, ""), + locationId: jspb.Message.getFieldWithDefault(msg, 5, ""), + componentName: jspb.Message.getFieldWithDefault(msg, 6, ""), + componentType: jspb.Message.getFieldWithDefault(msg, 7, ""), + componentModel: jspb.Message.getFieldWithDefault(msg, 8, ""), + methodName: jspb.Message.getFieldWithDefault(msg, 9, ""), + blobPath: jspb.Message.getFieldWithDefault(msg, 10, ""), + methodParametersMap: (f = msg.getMethodParametersMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + fileId: jspb.Message.getFieldWithDefault(msg, 12, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 13)) == null ? undefined : f, + fileSizeBytes: jspb.Message.getFieldWithDefault(msg, 14, 0), + sessionId: jspb.Message.getFieldWithDefault(msg, 15, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.BinaryCapture} + */ +proto.viam.app.datasync.v1.BinaryCapture.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.BinaryCapture; + return proto.viam.app.datasync.v1.BinaryCapture.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.BinaryCapture} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.BinaryCapture} + */ +proto.viam.app.datasync.v1.BinaryCapture.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.datasync.v1.CaptureInterval; + reader.readMessage(value,proto.viam.app.datasync.v1.CaptureInterval.deserializeBinaryFromReader); + msg.setInterval(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOrgId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentName(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentType(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setComponentModel(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setMethodName(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setBlobPath(value); + break; + case 11: + var value = msg.getMethodParametersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setFileId(value); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.addTags(value); + break; + case 14: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFileSizeBytes(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.BinaryCapture.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.BinaryCapture} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.BinaryCapture.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInterval(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.datasync.v1.CaptureInterval.serializeBinaryToWriter + ); + } + f = message.getOrgId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRobotId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getComponentName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getComponentType(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getComponentModel(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getMethodName(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getBlobPath(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getMethodParametersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getFileId(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 13, + f + ); + } + f = message.getFileSizeBytes(); + if (f !== 0) { + writer.writeInt64( + 14, + f + ); + } + f = message.getSessionId(); + if (f.length > 0) { + writer.writeString( + 15, + f + ); + } +}; + + +/** + * optional CaptureInterval interval = 1; + * @return {?proto.viam.app.datasync.v1.CaptureInterval} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getInterval = function() { + return /** @type{?proto.viam.app.datasync.v1.CaptureInterval} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.datasync.v1.CaptureInterval, 1)); +}; + + +/** + * @param {?proto.viam.app.datasync.v1.CaptureInterval|undefined} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this +*/ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setInterval = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.clearInterval = function() { + return this.setInterval(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.hasInterval = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string org_id = 2; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getOrgId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setOrgId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string robot_id = 3; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getRobotId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setRobotId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string part_id = 4; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string location_id = 5; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string component_name = 6; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getComponentName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setComponentName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string component_type = 7; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getComponentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setComponentType = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string component_model = 8; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getComponentModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setComponentModel = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string method_name = 9; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getMethodName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setMethodName = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string blob_path = 10; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getBlobPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setBlobPath = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * map method_parameters = 11; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getMethodParametersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 11, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.clearMethodParametersMap = function() { + this.getMethodParametersMap().clear(); + return this;}; + + +/** + * optional string file_id = 12; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getFileId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setFileId = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * repeated string tags = 13; + * @return {!Array} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 13)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 13, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 13, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional int64 file_size_bytes = 14; + * @return {number} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getFileSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setFileSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); +}; + + +/** + * optional string session_id = 15; + * @return {string} + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.getSessionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.BinaryCapture} returns this + */ +proto.viam.app.datasync.v1.BinaryCapture.prototype.setSessionId = function(value) { + return jspb.Message.setProto3StringField(this, 15, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.datasync.v1.UserFile.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.datasync.v1.UserFile.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.datasync.v1.UserFile} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.UserFile.toObject = function(includeInstance, msg) { + var f, obj = { + syncTime: (f = msg.getSyncTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + orgId: jspb.Message.getFieldWithDefault(msg, 2, ""), + robotId: jspb.Message.getFieldWithDefault(msg, 3, ""), + partId: jspb.Message.getFieldWithDefault(msg, 4, ""), + locationId: jspb.Message.getFieldWithDefault(msg, 5, ""), + blobPath: jspb.Message.getFieldWithDefault(msg, 6, ""), + methodParametersMap: (f = msg.getMethodParametersMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + fileId: jspb.Message.getFieldWithDefault(msg, 8, ""), + fileSizeBytes: jspb.Message.getFieldWithDefault(msg, 9, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.datasync.v1.UserFile} + */ +proto.viam.app.datasync.v1.UserFile.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.datasync.v1.UserFile; + return proto.viam.app.datasync.v1.UserFile.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.datasync.v1.UserFile} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.datasync.v1.UserFile} + */ +proto.viam.app.datasync.v1.UserFile.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setSyncTime(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOrgId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotId(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setBlobPath(value); + break; + case 7: + var value = msg.getMethodParametersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setFileId(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFileSizeBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.datasync.v1.UserFile.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.datasync.v1.UserFile.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.datasync.v1.UserFile} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.datasync.v1.UserFile.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSyncTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getOrgId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRobotId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getBlobPath(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getMethodParametersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getFileId(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getFileSizeBytes(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp sync_time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.datasync.v1.UserFile.prototype.getSyncTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.datasync.v1.UserFile} returns this +*/ +proto.viam.app.datasync.v1.UserFile.prototype.setSyncTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.datasync.v1.UserFile} returns this + */ +proto.viam.app.datasync.v1.UserFile.prototype.clearSyncTime = function() { + return this.setSyncTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.datasync.v1.UserFile.prototype.hasSyncTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string org_id = 2; + * @return {string} + */ +proto.viam.app.datasync.v1.UserFile.prototype.getOrgId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UserFile} returns this + */ +proto.viam.app.datasync.v1.UserFile.prototype.setOrgId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string robot_id = 3; + * @return {string} + */ +proto.viam.app.datasync.v1.UserFile.prototype.getRobotId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UserFile} returns this + */ +proto.viam.app.datasync.v1.UserFile.prototype.setRobotId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string part_id = 4; + * @return {string} + */ +proto.viam.app.datasync.v1.UserFile.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UserFile} returns this + */ +proto.viam.app.datasync.v1.UserFile.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string location_id = 5; + * @return {string} + */ +proto.viam.app.datasync.v1.UserFile.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UserFile} returns this + */ +proto.viam.app.datasync.v1.UserFile.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string blob_path = 6; + * @return {string} + */ +proto.viam.app.datasync.v1.UserFile.prototype.getBlobPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UserFile} returns this + */ +proto.viam.app.datasync.v1.UserFile.prototype.setBlobPath = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * map method_parameters = 7; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.app.datasync.v1.UserFile.prototype.getMethodParametersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 7, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.app.datasync.v1.UserFile} returns this + */ +proto.viam.app.datasync.v1.UserFile.prototype.clearMethodParametersMap = function() { + this.getMethodParametersMap().clear(); + return this;}; + + +/** + * optional string file_id = 8; + * @return {string} + */ +proto.viam.app.datasync.v1.UserFile.prototype.getFileId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.datasync.v1.UserFile} returns this + */ +proto.viam.app.datasync.v1.UserFile.prototype.setFileId = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional int64 file_size_bytes = 9; + * @return {number} + */ +proto.viam.app.datasync.v1.UserFile.prototype.getFileSizeBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.datasync.v1.UserFile} returns this + */ +proto.viam.app.datasync.v1.UserFile.prototype.setFileSizeBytes = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * @enum {number} + */ +proto.viam.app.datasync.v1.DataType = { + DATA_TYPE_UNSPECIFIED: 0, + DATA_TYPE_BINARY_SENSOR: 1, + DATA_TYPE_TABULAR_SENSOR: 2, + DATA_TYPE_FILE: 3 +}; + +goog.object.extend(exports, proto.viam.app.datasync.v1); diff --git a/gen/js/app/datasync/v1/data_sync_pb_service.d.ts b/gen/js/app/datasync/v1/data_sync_pb_service.d.ts new file mode 100644 index 000000000..18d689dfa --- /dev/null +++ b/gen/js/app/datasync/v1/data_sync_pb_service.d.ts @@ -0,0 +1,55 @@ +// package: viam.app.datasync.v1 +// file: app/datasync/v1/data_sync.proto + +import * as app_datasync_v1_data_sync_pb from "../../../app/datasync/v1/data_sync_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type DataSyncServiceUpload = { + readonly methodName: string; + readonly service: typeof DataSyncService; + readonly requestStream: true; + readonly responseStream: true; + readonly requestType: typeof app_datasync_v1_data_sync_pb.UploadRequest; + readonly responseType: typeof app_datasync_v1_data_sync_pb.UploadResponse; +}; + +export class DataSyncService { + static readonly serviceName: string; + static readonly Upload: DataSyncServiceUpload; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class DataSyncServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + upload(metadata?: grpc.Metadata): BidirectionalStream; +} + diff --git a/gen/js/app/datasync/v1/data_sync_pb_service.js b/gen/js/app/datasync/v1/data_sync_pb_service.js new file mode 100644 index 000000000..89b0191fb --- /dev/null +++ b/gen/js/app/datasync/v1/data_sync_pb_service.js @@ -0,0 +1,75 @@ +// package: viam.app.datasync.v1 +// file: app/datasync/v1/data_sync.proto + +var app_datasync_v1_data_sync_pb = require("../../../app/datasync/v1/data_sync_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var DataSyncService = (function () { + function DataSyncService() {} + DataSyncService.serviceName = "viam.app.datasync.v1.DataSyncService"; + return DataSyncService; +}()); + +DataSyncService.Upload = { + methodName: "Upload", + service: DataSyncService, + requestStream: true, + responseStream: true, + requestType: app_datasync_v1_data_sync_pb.UploadRequest, + responseType: app_datasync_v1_data_sync_pb.UploadResponse +}; + +exports.DataSyncService = DataSyncService; + +function DataSyncServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +DataSyncServiceClient.prototype.upload = function upload(metadata) { + var listeners = { + data: [], + end: [], + status: [] + }; + var client = grpc.client(DataSyncService.Upload, { + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport + }); + client.onEnd(function (status, statusMessage, trailers) { + listeners.status.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners.end.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners = null; + }); + client.onMessage(function (message) { + listeners.data.forEach(function (handler) { + handler(message); + }) + }); + client.start(metadata); + return { + on: function (type, handler) { + listeners[type].push(handler); + return this; + }, + write: function (requestMessage) { + client.send(requestMessage); + return this; + }, + end: function () { + client.finishSend(); + }, + cancel: function () { + listeners = null; + client.close(); + } + }; +}; + +exports.DataSyncServiceClient = DataSyncServiceClient; + diff --git a/gen/js/app/model/v1/model_grpc_web_pb.js b/gen/js/app/model/v1/model_grpc_web_pb.js new file mode 100644 index 000000000..17c3af98b --- /dev/null +++ b/gen/js/app/model/v1/model_grpc_web_pb.js @@ -0,0 +1,201 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.app.model.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.app = {}; +proto.viam.app.model = {}; +proto.viam.app.model.v1 = require('./model_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.model.v1.ModelServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.model.v1.ModelServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.model.v1.DeleteRequest, + * !proto.viam.app.model.v1.DeleteResponse>} + */ +const methodDescriptor_ModelService_Delete = new grpc.web.MethodDescriptor( + '/viam.app.model.v1.ModelService/Delete', + grpc.web.MethodType.UNARY, + proto.viam.app.model.v1.DeleteRequest, + proto.viam.app.model.v1.DeleteResponse, + /** + * @param {!proto.viam.app.model.v1.DeleteRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.model.v1.DeleteResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.model.v1.DeleteRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.model.v1.DeleteResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.model.v1.ModelServiceClient.prototype.delete = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.model.v1.ModelService/Delete', + request, + metadata || {}, + methodDescriptor_ModelService_Delete, + callback); +}; + + +/** + * @param {!proto.viam.app.model.v1.DeleteRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.model.v1.ModelServicePromiseClient.prototype.delete = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.model.v1.ModelService/Delete', + request, + metadata || {}, + methodDescriptor_ModelService_Delete); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.model.v1.DeployRequest, + * !proto.viam.app.model.v1.DeployResponse>} + */ +const methodDescriptor_ModelService_Deploy = new grpc.web.MethodDescriptor( + '/viam.app.model.v1.ModelService/Deploy', + grpc.web.MethodType.UNARY, + proto.viam.app.model.v1.DeployRequest, + proto.viam.app.model.v1.DeployResponse, + /** + * @param {!proto.viam.app.model.v1.DeployRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.model.v1.DeployResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.model.v1.DeployRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.model.v1.DeployResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.model.v1.ModelServiceClient.prototype.deploy = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.model.v1.ModelService/Deploy', + request, + metadata || {}, + methodDescriptor_ModelService_Deploy, + callback); +}; + + +/** + * @param {!proto.viam.app.model.v1.DeployRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.model.v1.ModelServicePromiseClient.prototype.deploy = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.model.v1.ModelService/Deploy', + request, + metadata || {}, + methodDescriptor_ModelService_Deploy); +}; + + +module.exports = proto.viam.app.model.v1; + diff --git a/gen/js/app/model/v1/model_pb.d.ts b/gen/js/app/model/v1/model_pb.d.ts new file mode 100644 index 000000000..53e456536 --- /dev/null +++ b/gen/js/app/model/v1/model_pb.d.ts @@ -0,0 +1,297 @@ +// package: viam.app.model.v1 +// file: app/model/v1/model.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class FileData extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileData.AsObject; + static toObject(includeInstance: boolean, msg: FileData): FileData.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileData, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileData; + static deserializeBinaryFromReader(message: FileData, reader: jspb.BinaryReader): FileData; +} + +export namespace FileData { + export type AsObject = { + data: Uint8Array | string, + } +} + +export class UploadMetadata extends jspb.Message { + getOrgId(): string; + setOrgId(value: string): void; + + getModelName(): string; + setModelName(value: string): void; + + getAssociatedDataset(): string; + setAssociatedDataset(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadMetadata.AsObject; + static toObject(includeInstance: boolean, msg: UploadMetadata): UploadMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadMetadata; + static deserializeBinaryFromReader(message: UploadMetadata, reader: jspb.BinaryReader): UploadMetadata; +} + +export namespace UploadMetadata { + export type AsObject = { + orgId: string, + modelName: string, + associatedDataset: string, + } +} + +export class UploadRequest extends jspb.Message { + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): UploadMetadata | undefined; + setMetadata(value?: UploadMetadata): void; + + hasFileContents(): boolean; + clearFileContents(): void; + getFileContents(): FileData | undefined; + setFileContents(value?: FileData): void; + + getUploadPacketCase(): UploadRequest.UploadPacketCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadRequest.AsObject; + static toObject(includeInstance: boolean, msg: UploadRequest): UploadRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadRequest; + static deserializeBinaryFromReader(message: UploadRequest, reader: jspb.BinaryReader): UploadRequest; +} + +export namespace UploadRequest { + export type AsObject = { + metadata?: UploadMetadata.AsObject, + fileContents?: FileData.AsObject, + } + + export enum UploadPacketCase { + UPLOAD_PACKET_NOT_SET = 0, + METADATA = 1, + FILE_CONTENTS = 2, + } +} + +export class DeleteMetadata extends jspb.Message { + getOrgId(): string; + setOrgId(value: string): void; + + getModelName(): string; + setModelName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteMetadata.AsObject; + static toObject(includeInstance: boolean, msg: DeleteMetadata): DeleteMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteMetadata; + static deserializeBinaryFromReader(message: DeleteMetadata, reader: jspb.BinaryReader): DeleteMetadata; +} + +export namespace DeleteMetadata { + export type AsObject = { + orgId: string, + modelName: string, + } +} + +export class DeleteRequest extends jspb.Message { + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): DeleteMetadata | undefined; + setMetadata(value?: DeleteMetadata): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteRequest): DeleteRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteRequest; + static deserializeBinaryFromReader(message: DeleteRequest, reader: jspb.BinaryReader): DeleteRequest; +} + +export namespace DeleteRequest { + export type AsObject = { + metadata?: DeleteMetadata.AsObject, + } +} + +export class DeployMetadata extends jspb.Message { + getModelName(): string; + setModelName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeployMetadata.AsObject; + static toObject(includeInstance: boolean, msg: DeployMetadata): DeployMetadata.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeployMetadata, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeployMetadata; + static deserializeBinaryFromReader(message: DeployMetadata, reader: jspb.BinaryReader): DeployMetadata; +} + +export namespace DeployMetadata { + export type AsObject = { + modelName: string, + } +} + +export class DeployRequest extends jspb.Message { + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): DeployMetadata | undefined; + setMetadata(value?: DeployMetadata): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeployRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeployRequest): DeployRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeployRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeployRequest; + static deserializeBinaryFromReader(message: DeployRequest, reader: jspb.BinaryReader): DeployRequest; +} + +export namespace DeployRequest { + export type AsObject = { + metadata?: DeployMetadata.AsObject, + } +} + +export class UploadResponse extends jspb.Message { + getMessage(): string; + setMessage(value: string): void; + + getStatus(): StatusMap[keyof StatusMap]; + setStatus(value: StatusMap[keyof StatusMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadResponse.AsObject; + static toObject(includeInstance: boolean, msg: UploadResponse): UploadResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadResponse; + static deserializeBinaryFromReader(message: UploadResponse, reader: jspb.BinaryReader): UploadResponse; +} + +export namespace UploadResponse { + export type AsObject = { + message: string, + status: StatusMap[keyof StatusMap], + } +} + +export class DeleteResponse extends jspb.Message { + getMessage(): string; + setMessage(value: string): void; + + getStatus(): StatusMap[keyof StatusMap]; + setStatus(value: StatusMap[keyof StatusMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteResponse.AsObject; + static toObject(includeInstance: boolean, msg: DeleteResponse): DeleteResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteResponse; + static deserializeBinaryFromReader(message: DeleteResponse, reader: jspb.BinaryReader): DeleteResponse; +} + +export namespace DeleteResponse { + export type AsObject = { + message: string, + status: StatusMap[keyof StatusMap], + } +} + +export class DeployResponse extends jspb.Message { + getMessage(): string; + setMessage(value: string): void; + + getStatus(): StatusMap[keyof StatusMap]; + setStatus(value: StatusMap[keyof StatusMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeployResponse.AsObject; + static toObject(includeInstance: boolean, msg: DeployResponse): DeployResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeployResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeployResponse; + static deserializeBinaryFromReader(message: DeployResponse, reader: jspb.BinaryReader): DeployResponse; +} + +export namespace DeployResponse { + export type AsObject = { + message: string, + status: StatusMap[keyof StatusMap], + } +} + +export class SyncedModel extends jspb.Message { + getOrgId(): string; + setOrgId(value: string): void; + + getModelName(): string; + setModelName(value: string): void; + + getAssociatedDataset(): string; + setAssociatedDataset(value: string): void; + + getBlobPath(): string; + setBlobPath(value: string): void; + + hasSyncTime(): boolean; + clearSyncTime(): void; + getSyncTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setSyncTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncedModel.AsObject; + static toObject(includeInstance: boolean, msg: SyncedModel): SyncedModel.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncedModel, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncedModel; + static deserializeBinaryFromReader(message: SyncedModel, reader: jspb.BinaryReader): SyncedModel; +} + +export namespace SyncedModel { + export type AsObject = { + orgId: string, + modelName: string, + associatedDataset: string, + blobPath: string, + syncTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export interface StatusMap { + UNSPECIFIED: 0; + FAIL: 1; + OK: 2; +} + +export const Status: StatusMap; + diff --git a/gen/js/app/model/v1/model_pb.js b/gen/js/app/model/v1/model_pb.js new file mode 100644 index 000000000..5031a7b0f --- /dev/null +++ b/gen/js/app/model/v1/model_pb.js @@ -0,0 +1,2188 @@ +// source: app/model/v1/model.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.viam.app.model.v1.DeleteMetadata', null, global); +goog.exportSymbol('proto.viam.app.model.v1.DeleteRequest', null, global); +goog.exportSymbol('proto.viam.app.model.v1.DeleteResponse', null, global); +goog.exportSymbol('proto.viam.app.model.v1.DeployMetadata', null, global); +goog.exportSymbol('proto.viam.app.model.v1.DeployRequest', null, global); +goog.exportSymbol('proto.viam.app.model.v1.DeployResponse', null, global); +goog.exportSymbol('proto.viam.app.model.v1.FileData', null, global); +goog.exportSymbol('proto.viam.app.model.v1.Status', null, global); +goog.exportSymbol('proto.viam.app.model.v1.SyncedModel', null, global); +goog.exportSymbol('proto.viam.app.model.v1.UploadMetadata', null, global); +goog.exportSymbol('proto.viam.app.model.v1.UploadRequest', null, global); +goog.exportSymbol('proto.viam.app.model.v1.UploadRequest.UploadPacketCase', null, global); +goog.exportSymbol('proto.viam.app.model.v1.UploadResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.FileData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.FileData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.FileData.displayName = 'proto.viam.app.model.v1.FileData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.UploadMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.UploadMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.UploadMetadata.displayName = 'proto.viam.app.model.v1.UploadMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.UploadRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.viam.app.model.v1.UploadRequest.oneofGroups_); +}; +goog.inherits(proto.viam.app.model.v1.UploadRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.UploadRequest.displayName = 'proto.viam.app.model.v1.UploadRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.DeleteMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.DeleteMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.DeleteMetadata.displayName = 'proto.viam.app.model.v1.DeleteMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.DeleteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.DeleteRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.DeleteRequest.displayName = 'proto.viam.app.model.v1.DeleteRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.DeployMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.DeployMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.DeployMetadata.displayName = 'proto.viam.app.model.v1.DeployMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.DeployRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.DeployRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.DeployRequest.displayName = 'proto.viam.app.model.v1.DeployRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.UploadResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.UploadResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.UploadResponse.displayName = 'proto.viam.app.model.v1.UploadResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.DeleteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.DeleteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.DeleteResponse.displayName = 'proto.viam.app.model.v1.DeleteResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.DeployResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.DeployResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.DeployResponse.displayName = 'proto.viam.app.model.v1.DeployResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.model.v1.SyncedModel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.model.v1.SyncedModel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.model.v1.SyncedModel.displayName = 'proto.viam.app.model.v1.SyncedModel'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.FileData.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.FileData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.FileData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.FileData.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.FileData} + */ +proto.viam.app.model.v1.FileData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.FileData; + return proto.viam.app.model.v1.FileData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.FileData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.FileData} + */ +proto.viam.app.model.v1.FileData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.FileData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.FileData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.FileData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.FileData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {string} + */ +proto.viam.app.model.v1.FileData.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.viam.app.model.v1.FileData.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.FileData.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.app.model.v1.FileData} returns this + */ +proto.viam.app.model.v1.FileData.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.UploadMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.UploadMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.UploadMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.UploadMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + orgId: jspb.Message.getFieldWithDefault(msg, 1, ""), + modelName: jspb.Message.getFieldWithDefault(msg, 2, ""), + associatedDataset: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.UploadMetadata} + */ +proto.viam.app.model.v1.UploadMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.UploadMetadata; + return proto.viam.app.model.v1.UploadMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.UploadMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.UploadMetadata} + */ +proto.viam.app.model.v1.UploadMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOrgId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setModelName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAssociatedDataset(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.UploadMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.UploadMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.UploadMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.UploadMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOrgId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getModelName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAssociatedDataset(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string org_id = 1; + * @return {string} + */ +proto.viam.app.model.v1.UploadMetadata.prototype.getOrgId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.UploadMetadata} returns this + */ +proto.viam.app.model.v1.UploadMetadata.prototype.setOrgId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string model_name = 2; + * @return {string} + */ +proto.viam.app.model.v1.UploadMetadata.prototype.getModelName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.UploadMetadata} returns this + */ +proto.viam.app.model.v1.UploadMetadata.prototype.setModelName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string associated_dataset = 3; + * @return {string} + */ +proto.viam.app.model.v1.UploadMetadata.prototype.getAssociatedDataset = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.UploadMetadata} returns this + */ +proto.viam.app.model.v1.UploadMetadata.prototype.setAssociatedDataset = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.viam.app.model.v1.UploadRequest.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.viam.app.model.v1.UploadRequest.UploadPacketCase = { + UPLOAD_PACKET_NOT_SET: 0, + METADATA: 1, + FILE_CONTENTS: 2 +}; + +/** + * @return {proto.viam.app.model.v1.UploadRequest.UploadPacketCase} + */ +proto.viam.app.model.v1.UploadRequest.prototype.getUploadPacketCase = function() { + return /** @type {proto.viam.app.model.v1.UploadRequest.UploadPacketCase} */(jspb.Message.computeOneofCase(this, proto.viam.app.model.v1.UploadRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.UploadRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.UploadRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.UploadRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.UploadRequest.toObject = function(includeInstance, msg) { + var f, obj = { + metadata: (f = msg.getMetadata()) && proto.viam.app.model.v1.UploadMetadata.toObject(includeInstance, f), + fileContents: (f = msg.getFileContents()) && proto.viam.app.model.v1.FileData.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.UploadRequest} + */ +proto.viam.app.model.v1.UploadRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.UploadRequest; + return proto.viam.app.model.v1.UploadRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.UploadRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.UploadRequest} + */ +proto.viam.app.model.v1.UploadRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.model.v1.UploadMetadata; + reader.readMessage(value,proto.viam.app.model.v1.UploadMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + case 2: + var value = new proto.viam.app.model.v1.FileData; + reader.readMessage(value,proto.viam.app.model.v1.FileData.deserializeBinaryFromReader); + msg.setFileContents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.UploadRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.UploadRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.UploadRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.UploadRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.model.v1.UploadMetadata.serializeBinaryToWriter + ); + } + f = message.getFileContents(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.app.model.v1.FileData.serializeBinaryToWriter + ); + } +}; + + +/** + * optional UploadMetadata metadata = 1; + * @return {?proto.viam.app.model.v1.UploadMetadata} + */ +proto.viam.app.model.v1.UploadRequest.prototype.getMetadata = function() { + return /** @type{?proto.viam.app.model.v1.UploadMetadata} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.model.v1.UploadMetadata, 1)); +}; + + +/** + * @param {?proto.viam.app.model.v1.UploadMetadata|undefined} value + * @return {!proto.viam.app.model.v1.UploadRequest} returns this +*/ +proto.viam.app.model.v1.UploadRequest.prototype.setMetadata = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.viam.app.model.v1.UploadRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.model.v1.UploadRequest} returns this + */ +proto.viam.app.model.v1.UploadRequest.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.model.v1.UploadRequest.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional FileData file_contents = 2; + * @return {?proto.viam.app.model.v1.FileData} + */ +proto.viam.app.model.v1.UploadRequest.prototype.getFileContents = function() { + return /** @type{?proto.viam.app.model.v1.FileData} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.model.v1.FileData, 2)); +}; + + +/** + * @param {?proto.viam.app.model.v1.FileData|undefined} value + * @return {!proto.viam.app.model.v1.UploadRequest} returns this +*/ +proto.viam.app.model.v1.UploadRequest.prototype.setFileContents = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.viam.app.model.v1.UploadRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.model.v1.UploadRequest} returns this + */ +proto.viam.app.model.v1.UploadRequest.prototype.clearFileContents = function() { + return this.setFileContents(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.model.v1.UploadRequest.prototype.hasFileContents = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.DeleteMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.DeleteMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.DeleteMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeleteMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + orgId: jspb.Message.getFieldWithDefault(msg, 1, ""), + modelName: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.DeleteMetadata} + */ +proto.viam.app.model.v1.DeleteMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.DeleteMetadata; + return proto.viam.app.model.v1.DeleteMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.DeleteMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.DeleteMetadata} + */ +proto.viam.app.model.v1.DeleteMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOrgId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setModelName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.DeleteMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.DeleteMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.DeleteMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeleteMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOrgId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getModelName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string org_id = 1; + * @return {string} + */ +proto.viam.app.model.v1.DeleteMetadata.prototype.getOrgId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.DeleteMetadata} returns this + */ +proto.viam.app.model.v1.DeleteMetadata.prototype.setOrgId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string model_name = 2; + * @return {string} + */ +proto.viam.app.model.v1.DeleteMetadata.prototype.getModelName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.DeleteMetadata} returns this + */ +proto.viam.app.model.v1.DeleteMetadata.prototype.setModelName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.DeleteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.DeleteRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.DeleteRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeleteRequest.toObject = function(includeInstance, msg) { + var f, obj = { + metadata: (f = msg.getMetadata()) && proto.viam.app.model.v1.DeleteMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.DeleteRequest} + */ +proto.viam.app.model.v1.DeleteRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.DeleteRequest; + return proto.viam.app.model.v1.DeleteRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.DeleteRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.DeleteRequest} + */ +proto.viam.app.model.v1.DeleteRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.model.v1.DeleteMetadata; + reader.readMessage(value,proto.viam.app.model.v1.DeleteMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.DeleteRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.DeleteRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.DeleteRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeleteRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.model.v1.DeleteMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DeleteMetadata metadata = 1; + * @return {?proto.viam.app.model.v1.DeleteMetadata} + */ +proto.viam.app.model.v1.DeleteRequest.prototype.getMetadata = function() { + return /** @type{?proto.viam.app.model.v1.DeleteMetadata} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.model.v1.DeleteMetadata, 1)); +}; + + +/** + * @param {?proto.viam.app.model.v1.DeleteMetadata|undefined} value + * @return {!proto.viam.app.model.v1.DeleteRequest} returns this +*/ +proto.viam.app.model.v1.DeleteRequest.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.model.v1.DeleteRequest} returns this + */ +proto.viam.app.model.v1.DeleteRequest.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.model.v1.DeleteRequest.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.DeployMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.DeployMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.DeployMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeployMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + modelName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.DeployMetadata} + */ +proto.viam.app.model.v1.DeployMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.DeployMetadata; + return proto.viam.app.model.v1.DeployMetadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.DeployMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.DeployMetadata} + */ +proto.viam.app.model.v1.DeployMetadata.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setModelName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.DeployMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.DeployMetadata.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.DeployMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeployMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getModelName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string model_name = 1; + * @return {string} + */ +proto.viam.app.model.v1.DeployMetadata.prototype.getModelName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.DeployMetadata} returns this + */ +proto.viam.app.model.v1.DeployMetadata.prototype.setModelName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.DeployRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.DeployRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.DeployRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeployRequest.toObject = function(includeInstance, msg) { + var f, obj = { + metadata: (f = msg.getMetadata()) && proto.viam.app.model.v1.DeployMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.DeployRequest} + */ +proto.viam.app.model.v1.DeployRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.DeployRequest; + return proto.viam.app.model.v1.DeployRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.DeployRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.DeployRequest} + */ +proto.viam.app.model.v1.DeployRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.model.v1.DeployMetadata; + reader.readMessage(value,proto.viam.app.model.v1.DeployMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.DeployRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.DeployRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.DeployRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeployRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.model.v1.DeployMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DeployMetadata metadata = 1; + * @return {?proto.viam.app.model.v1.DeployMetadata} + */ +proto.viam.app.model.v1.DeployRequest.prototype.getMetadata = function() { + return /** @type{?proto.viam.app.model.v1.DeployMetadata} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.model.v1.DeployMetadata, 1)); +}; + + +/** + * @param {?proto.viam.app.model.v1.DeployMetadata|undefined} value + * @return {!proto.viam.app.model.v1.DeployRequest} returns this +*/ +proto.viam.app.model.v1.DeployRequest.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.model.v1.DeployRequest} returns this + */ +proto.viam.app.model.v1.DeployRequest.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.model.v1.DeployRequest.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.UploadResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.UploadResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.UploadResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.UploadResponse.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, ""), + status: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.UploadResponse} + */ +proto.viam.app.model.v1.UploadResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.UploadResponse; + return proto.viam.app.model.v1.UploadResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.UploadResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.UploadResponse} + */ +proto.viam.app.model.v1.UploadResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 2: + var value = /** @type {!proto.viam.app.model.v1.Status} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.UploadResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.UploadResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.UploadResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.UploadResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.viam.app.model.v1.UploadResponse.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.UploadResponse} returns this + */ +proto.viam.app.model.v1.UploadResponse.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Status status = 2; + * @return {!proto.viam.app.model.v1.Status} + */ +proto.viam.app.model.v1.UploadResponse.prototype.getStatus = function() { + return /** @type {!proto.viam.app.model.v1.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.viam.app.model.v1.Status} value + * @return {!proto.viam.app.model.v1.UploadResponse} returns this + */ +proto.viam.app.model.v1.UploadResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.DeleteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.DeleteResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.DeleteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeleteResponse.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, ""), + status: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.DeleteResponse} + */ +proto.viam.app.model.v1.DeleteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.DeleteResponse; + return proto.viam.app.model.v1.DeleteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.DeleteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.DeleteResponse} + */ +proto.viam.app.model.v1.DeleteResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 2: + var value = /** @type {!proto.viam.app.model.v1.Status} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.DeleteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.DeleteResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.DeleteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeleteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.viam.app.model.v1.DeleteResponse.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.DeleteResponse} returns this + */ +proto.viam.app.model.v1.DeleteResponse.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Status status = 2; + * @return {!proto.viam.app.model.v1.Status} + */ +proto.viam.app.model.v1.DeleteResponse.prototype.getStatus = function() { + return /** @type {!proto.viam.app.model.v1.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.viam.app.model.v1.Status} value + * @return {!proto.viam.app.model.v1.DeleteResponse} returns this + */ +proto.viam.app.model.v1.DeleteResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.DeployResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.DeployResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.DeployResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeployResponse.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, ""), + status: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.DeployResponse} + */ +proto.viam.app.model.v1.DeployResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.DeployResponse; + return proto.viam.app.model.v1.DeployResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.DeployResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.DeployResponse} + */ +proto.viam.app.model.v1.DeployResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 2: + var value = /** @type {!proto.viam.app.model.v1.Status} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.DeployResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.DeployResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.DeployResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.DeployResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.viam.app.model.v1.DeployResponse.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.DeployResponse} returns this + */ +proto.viam.app.model.v1.DeployResponse.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Status status = 2; + * @return {!proto.viam.app.model.v1.Status} + */ +proto.viam.app.model.v1.DeployResponse.prototype.getStatus = function() { + return /** @type {!proto.viam.app.model.v1.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.viam.app.model.v1.Status} value + * @return {!proto.viam.app.model.v1.DeployResponse} returns this + */ +proto.viam.app.model.v1.DeployResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.model.v1.SyncedModel.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.model.v1.SyncedModel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.model.v1.SyncedModel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.SyncedModel.toObject = function(includeInstance, msg) { + var f, obj = { + orgId: jspb.Message.getFieldWithDefault(msg, 1, ""), + modelName: jspb.Message.getFieldWithDefault(msg, 2, ""), + associatedDataset: jspb.Message.getFieldWithDefault(msg, 3, ""), + blobPath: jspb.Message.getFieldWithDefault(msg, 4, ""), + syncTime: (f = msg.getSyncTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.model.v1.SyncedModel} + */ +proto.viam.app.model.v1.SyncedModel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.model.v1.SyncedModel; + return proto.viam.app.model.v1.SyncedModel.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.model.v1.SyncedModel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.model.v1.SyncedModel} + */ +proto.viam.app.model.v1.SyncedModel.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOrgId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setModelName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAssociatedDataset(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBlobPath(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setSyncTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.model.v1.SyncedModel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.model.v1.SyncedModel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.model.v1.SyncedModel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.model.v1.SyncedModel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOrgId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getModelName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAssociatedDataset(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBlobPath(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSyncTime(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string org_id = 1; + * @return {string} + */ +proto.viam.app.model.v1.SyncedModel.prototype.getOrgId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.SyncedModel} returns this + */ +proto.viam.app.model.v1.SyncedModel.prototype.setOrgId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string model_name = 2; + * @return {string} + */ +proto.viam.app.model.v1.SyncedModel.prototype.getModelName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.SyncedModel} returns this + */ +proto.viam.app.model.v1.SyncedModel.prototype.setModelName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string associated_dataset = 3; + * @return {string} + */ +proto.viam.app.model.v1.SyncedModel.prototype.getAssociatedDataset = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.SyncedModel} returns this + */ +proto.viam.app.model.v1.SyncedModel.prototype.setAssociatedDataset = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string blob_path = 4; + * @return {string} + */ +proto.viam.app.model.v1.SyncedModel.prototype.getBlobPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.model.v1.SyncedModel} returns this + */ +proto.viam.app.model.v1.SyncedModel.prototype.setBlobPath = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp sync_time = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.model.v1.SyncedModel.prototype.getSyncTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.model.v1.SyncedModel} returns this +*/ +proto.viam.app.model.v1.SyncedModel.prototype.setSyncTime = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.model.v1.SyncedModel} returns this + */ +proto.viam.app.model.v1.SyncedModel.prototype.clearSyncTime = function() { + return this.setSyncTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.model.v1.SyncedModel.prototype.hasSyncTime = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * @enum {number} + */ +proto.viam.app.model.v1.Status = { + UNSPECIFIED: 0, + FAIL: 1, + OK: 2 +}; + +goog.object.extend(exports, proto.viam.app.model.v1); diff --git a/gen/js/app/model/v1/model_pb_service.d.ts b/gen/js/app/model/v1/model_pb_service.d.ts new file mode 100644 index 000000000..fd6002cee --- /dev/null +++ b/gen/js/app/model/v1/model_pb_service.d.ts @@ -0,0 +1,93 @@ +// package: viam.app.model.v1 +// file: app/model/v1/model.proto + +import * as app_model_v1_model_pb from "../../../app/model/v1/model_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type ModelServiceUpload = { + readonly methodName: string; + readonly service: typeof ModelService; + readonly requestStream: true; + readonly responseStream: false; + readonly requestType: typeof app_model_v1_model_pb.UploadRequest; + readonly responseType: typeof app_model_v1_model_pb.UploadResponse; +}; + +type ModelServiceDelete = { + readonly methodName: string; + readonly service: typeof ModelService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_model_v1_model_pb.DeleteRequest; + readonly responseType: typeof app_model_v1_model_pb.DeleteResponse; +}; + +type ModelServiceDeploy = { + readonly methodName: string; + readonly service: typeof ModelService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_model_v1_model_pb.DeployRequest; + readonly responseType: typeof app_model_v1_model_pb.DeployResponse; +}; + +export class ModelService { + static readonly serviceName: string; + static readonly Upload: ModelServiceUpload; + static readonly Delete: ModelServiceDelete; + static readonly Deploy: ModelServiceDeploy; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class ModelServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + upload(metadata?: grpc.Metadata): RequestStream; + delete( + requestMessage: app_model_v1_model_pb.DeleteRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_model_v1_model_pb.DeleteResponse|null) => void + ): UnaryResponse; + delete( + requestMessage: app_model_v1_model_pb.DeleteRequest, + callback: (error: ServiceError|null, responseMessage: app_model_v1_model_pb.DeleteResponse|null) => void + ): UnaryResponse; + deploy( + requestMessage: app_model_v1_model_pb.DeployRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_model_v1_model_pb.DeployResponse|null) => void + ): UnaryResponse; + deploy( + requestMessage: app_model_v1_model_pb.DeployRequest, + callback: (error: ServiceError|null, responseMessage: app_model_v1_model_pb.DeployResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/app/model/v1/model_pb_service.js b/gen/js/app/model/v1/model_pb_service.js new file mode 100644 index 000000000..eb475d571 --- /dev/null +++ b/gen/js/app/model/v1/model_pb_service.js @@ -0,0 +1,151 @@ +// package: viam.app.model.v1 +// file: app/model/v1/model.proto + +var app_model_v1_model_pb = require("../../../app/model/v1/model_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var ModelService = (function () { + function ModelService() {} + ModelService.serviceName = "viam.app.model.v1.ModelService"; + return ModelService; +}()); + +ModelService.Upload = { + methodName: "Upload", + service: ModelService, + requestStream: true, + responseStream: false, + requestType: app_model_v1_model_pb.UploadRequest, + responseType: app_model_v1_model_pb.UploadResponse +}; + +ModelService.Delete = { + methodName: "Delete", + service: ModelService, + requestStream: false, + responseStream: false, + requestType: app_model_v1_model_pb.DeleteRequest, + responseType: app_model_v1_model_pb.DeleteResponse +}; + +ModelService.Deploy = { + methodName: "Deploy", + service: ModelService, + requestStream: false, + responseStream: false, + requestType: app_model_v1_model_pb.DeployRequest, + responseType: app_model_v1_model_pb.DeployResponse +}; + +exports.ModelService = ModelService; + +function ModelServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +ModelServiceClient.prototype.upload = function upload(metadata) { + var listeners = { + end: [], + status: [] + }; + var client = grpc.client(ModelService.Upload, { + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport + }); + client.onEnd(function (status, statusMessage, trailers) { + listeners.status.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners.end.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners = null; + }); + return { + on: function (type, handler) { + listeners[type].push(handler); + return this; + }, + write: function (requestMessage) { + if (!client.started) { + client.start(metadata); + } + client.send(requestMessage); + return this; + }, + end: function () { + client.finishSend(); + }, + cancel: function () { + listeners = null; + client.close(); + } + }; +}; + +ModelServiceClient.prototype.delete = function pb_delete(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ModelService.Delete, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ModelServiceClient.prototype.deploy = function deploy(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ModelService.Deploy, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.ModelServiceClient = ModelServiceClient; + diff --git a/gen/js/app/v1/app_grpc_web_pb.js b/gen/js/app/v1/app_grpc_web_pb.js new file mode 100644 index 000000000..fc37ba131 --- /dev/null +++ b/gen/js/app/v1/app_grpc_web_pb.js @@ -0,0 +1,1114 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.app.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') + +var tagger_v1_tagger_pb = require('../../tagger/v1/tagger_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.app = {}; +proto.viam.app.v1 = require('./app_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.v1.AppServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.v1.AppServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.ListOrganizationsRequest, + * !proto.viam.app.v1.ListOrganizationsResponse>} + */ +const methodDescriptor_AppService_ListOrganizations = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/ListOrganizations', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.ListOrganizationsRequest, + proto.viam.app.v1.ListOrganizationsResponse, + /** + * @param {!proto.viam.app.v1.ListOrganizationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.ListOrganizationsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.ListOrganizationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.ListOrganizationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.listOrganizations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/ListOrganizations', + request, + metadata || {}, + methodDescriptor_AppService_ListOrganizations, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.ListOrganizationsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.listOrganizations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/ListOrganizations', + request, + metadata || {}, + methodDescriptor_AppService_ListOrganizations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.ListLocationsRequest, + * !proto.viam.app.v1.ListLocationsResponse>} + */ +const methodDescriptor_AppService_ListLocations = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/ListLocations', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.ListLocationsRequest, + proto.viam.app.v1.ListLocationsResponse, + /** + * @param {!proto.viam.app.v1.ListLocationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.ListLocationsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.ListLocationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.ListLocationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.listLocations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/ListLocations', + request, + metadata || {}, + methodDescriptor_AppService_ListLocations, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.ListLocationsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.listLocations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/ListLocations', + request, + metadata || {}, + methodDescriptor_AppService_ListLocations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.LocationAuthRequest, + * !proto.viam.app.v1.LocationAuthResponse>} + */ +const methodDescriptor_AppService_LocationAuth = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/LocationAuth', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.LocationAuthRequest, + proto.viam.app.v1.LocationAuthResponse, + /** + * @param {!proto.viam.app.v1.LocationAuthRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.LocationAuthResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.LocationAuthRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.LocationAuthResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.locationAuth = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/LocationAuth', + request, + metadata || {}, + methodDescriptor_AppService_LocationAuth, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.LocationAuthRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.locationAuth = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/LocationAuth', + request, + metadata || {}, + methodDescriptor_AppService_LocationAuth); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.GetRobotRequest, + * !proto.viam.app.v1.GetRobotResponse>} + */ +const methodDescriptor_AppService_GetRobot = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/GetRobot', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.GetRobotRequest, + proto.viam.app.v1.GetRobotResponse, + /** + * @param {!proto.viam.app.v1.GetRobotRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.GetRobotResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.GetRobotRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.GetRobotResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.getRobot = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobot', + request, + metadata || {}, + methodDescriptor_AppService_GetRobot, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.GetRobotRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.getRobot = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobot', + request, + metadata || {}, + methodDescriptor_AppService_GetRobot); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.GetRobotPartsRequest, + * !proto.viam.app.v1.GetRobotPartsResponse>} + */ +const methodDescriptor_AppService_GetRobotParts = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/GetRobotParts', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.GetRobotPartsRequest, + proto.viam.app.v1.GetRobotPartsResponse, + /** + * @param {!proto.viam.app.v1.GetRobotPartsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.GetRobotPartsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.GetRobotPartsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.GetRobotPartsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.getRobotParts = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobotParts', + request, + metadata || {}, + methodDescriptor_AppService_GetRobotParts, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.GetRobotPartsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.getRobotParts = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobotParts', + request, + metadata || {}, + methodDescriptor_AppService_GetRobotParts); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.GetRobotPartRequest, + * !proto.viam.app.v1.GetRobotPartResponse>} + */ +const methodDescriptor_AppService_GetRobotPart = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/GetRobotPart', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.GetRobotPartRequest, + proto.viam.app.v1.GetRobotPartResponse, + /** + * @param {!proto.viam.app.v1.GetRobotPartRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.GetRobotPartResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.GetRobotPartRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.GetRobotPartResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.getRobotPart = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobotPart', + request, + metadata || {}, + methodDescriptor_AppService_GetRobotPart, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.GetRobotPartRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.getRobotPart = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobotPart', + request, + metadata || {}, + methodDescriptor_AppService_GetRobotPart); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.GetRobotPartLogsRequest, + * !proto.viam.app.v1.GetRobotPartLogsResponse>} + */ +const methodDescriptor_AppService_GetRobotPartLogs = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/GetRobotPartLogs', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.GetRobotPartLogsRequest, + proto.viam.app.v1.GetRobotPartLogsResponse, + /** + * @param {!proto.viam.app.v1.GetRobotPartLogsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.GetRobotPartLogsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.GetRobotPartLogsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.GetRobotPartLogsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.getRobotPartLogs = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobotPartLogs', + request, + metadata || {}, + methodDescriptor_AppService_GetRobotPartLogs, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.GetRobotPartLogsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.getRobotPartLogs = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobotPartLogs', + request, + metadata || {}, + methodDescriptor_AppService_GetRobotPartLogs); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.TailRobotPartLogsRequest, + * !proto.viam.app.v1.TailRobotPartLogsResponse>} + */ +const methodDescriptor_AppService_TailRobotPartLogs = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/TailRobotPartLogs', + grpc.web.MethodType.SERVER_STREAMING, + proto.viam.app.v1.TailRobotPartLogsRequest, + proto.viam.app.v1.TailRobotPartLogsResponse, + /** + * @param {!proto.viam.app.v1.TailRobotPartLogsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.TailRobotPartLogsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.TailRobotPartLogsRequest} request The request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!grpc.web.ClientReadableStream} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.tailRobotPartLogs = + function(request, metadata) { + return this.client_.serverStreaming(this.hostname_ + + '/viam.app.v1.AppService/TailRobotPartLogs', + request, + metadata || {}, + methodDescriptor_AppService_TailRobotPartLogs); +}; + + +/** + * @param {!proto.viam.app.v1.TailRobotPartLogsRequest} request The request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!grpc.web.ClientReadableStream} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.tailRobotPartLogs = + function(request, metadata) { + return this.client_.serverStreaming(this.hostname_ + + '/viam.app.v1.AppService/TailRobotPartLogs', + request, + metadata || {}, + methodDescriptor_AppService_TailRobotPartLogs); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.GetRobotPartHistoryRequest, + * !proto.viam.app.v1.GetRobotPartHistoryResponse>} + */ +const methodDescriptor_AppService_GetRobotPartHistory = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/GetRobotPartHistory', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.GetRobotPartHistoryRequest, + proto.viam.app.v1.GetRobotPartHistoryResponse, + /** + * @param {!proto.viam.app.v1.GetRobotPartHistoryRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.GetRobotPartHistoryResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.GetRobotPartHistoryRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.GetRobotPartHistoryResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.getRobotPartHistory = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobotPartHistory', + request, + metadata || {}, + methodDescriptor_AppService_GetRobotPartHistory, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.GetRobotPartHistoryRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.getRobotPartHistory = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/GetRobotPartHistory', + request, + metadata || {}, + methodDescriptor_AppService_GetRobotPartHistory); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.UpdateRobotPartRequest, + * !proto.viam.app.v1.UpdateRobotPartResponse>} + */ +const methodDescriptor_AppService_UpdateRobotPart = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/UpdateRobotPart', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.UpdateRobotPartRequest, + proto.viam.app.v1.UpdateRobotPartResponse, + /** + * @param {!proto.viam.app.v1.UpdateRobotPartRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.UpdateRobotPartResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.UpdateRobotPartRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.UpdateRobotPartResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.updateRobotPart = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/UpdateRobotPart', + request, + metadata || {}, + methodDescriptor_AppService_UpdateRobotPart, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.UpdateRobotPartRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.updateRobotPart = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/UpdateRobotPart', + request, + metadata || {}, + methodDescriptor_AppService_UpdateRobotPart); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.NewRobotPartRequest, + * !proto.viam.app.v1.NewRobotPartResponse>} + */ +const methodDescriptor_AppService_NewRobotPart = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/NewRobotPart', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.NewRobotPartRequest, + proto.viam.app.v1.NewRobotPartResponse, + /** + * @param {!proto.viam.app.v1.NewRobotPartRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.NewRobotPartResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.NewRobotPartRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.NewRobotPartResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.newRobotPart = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/NewRobotPart', + request, + metadata || {}, + methodDescriptor_AppService_NewRobotPart, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.NewRobotPartRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.newRobotPart = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/NewRobotPart', + request, + metadata || {}, + methodDescriptor_AppService_NewRobotPart); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.DeleteRobotPartRequest, + * !proto.viam.app.v1.DeleteRobotPartResponse>} + */ +const methodDescriptor_AppService_DeleteRobotPart = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/DeleteRobotPart', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.DeleteRobotPartRequest, + proto.viam.app.v1.DeleteRobotPartResponse, + /** + * @param {!proto.viam.app.v1.DeleteRobotPartRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.DeleteRobotPartResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.DeleteRobotPartRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.DeleteRobotPartResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.deleteRobotPart = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/DeleteRobotPart', + request, + metadata || {}, + methodDescriptor_AppService_DeleteRobotPart, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.DeleteRobotPartRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.deleteRobotPart = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/DeleteRobotPart', + request, + metadata || {}, + methodDescriptor_AppService_DeleteRobotPart); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.MarkPartAsMainRequest, + * !proto.viam.app.v1.MarkPartAsMainResponse>} + */ +const methodDescriptor_AppService_MarkPartAsMain = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/MarkPartAsMain', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.MarkPartAsMainRequest, + proto.viam.app.v1.MarkPartAsMainResponse, + /** + * @param {!proto.viam.app.v1.MarkPartAsMainRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.MarkPartAsMainResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.MarkPartAsMainRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.MarkPartAsMainResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.markPartAsMain = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/MarkPartAsMain', + request, + metadata || {}, + methodDescriptor_AppService_MarkPartAsMain, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.MarkPartAsMainRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.markPartAsMain = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/MarkPartAsMain', + request, + metadata || {}, + methodDescriptor_AppService_MarkPartAsMain); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.FindRobotsRequest, + * !proto.viam.app.v1.FindRobotsResponse>} + */ +const methodDescriptor_AppService_FindRobots = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/FindRobots', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.FindRobotsRequest, + proto.viam.app.v1.FindRobotsResponse, + /** + * @param {!proto.viam.app.v1.FindRobotsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.FindRobotsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.FindRobotsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.FindRobotsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.findRobots = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/FindRobots', + request, + metadata || {}, + methodDescriptor_AppService_FindRobots, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.FindRobotsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.findRobots = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/FindRobots', + request, + metadata || {}, + methodDescriptor_AppService_FindRobots); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.NewRobotRequest, + * !proto.viam.app.v1.NewRobotResponse>} + */ +const methodDescriptor_AppService_NewRobot = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/NewRobot', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.NewRobotRequest, + proto.viam.app.v1.NewRobotResponse, + /** + * @param {!proto.viam.app.v1.NewRobotRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.NewRobotResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.NewRobotRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.NewRobotResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.newRobot = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/NewRobot', + request, + metadata || {}, + methodDescriptor_AppService_NewRobot, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.NewRobotRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.newRobot = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/NewRobot', + request, + metadata || {}, + methodDescriptor_AppService_NewRobot); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.UpdateRobotRequest, + * !proto.viam.app.v1.UpdateRobotResponse>} + */ +const methodDescriptor_AppService_UpdateRobot = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/UpdateRobot', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.UpdateRobotRequest, + proto.viam.app.v1.UpdateRobotResponse, + /** + * @param {!proto.viam.app.v1.UpdateRobotRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.UpdateRobotResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.UpdateRobotRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.UpdateRobotResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.updateRobot = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/UpdateRobot', + request, + metadata || {}, + methodDescriptor_AppService_UpdateRobot, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.UpdateRobotRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.updateRobot = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/UpdateRobot', + request, + metadata || {}, + methodDescriptor_AppService_UpdateRobot); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.DeleteRobotRequest, + * !proto.viam.app.v1.DeleteRobotResponse>} + */ +const methodDescriptor_AppService_DeleteRobot = new grpc.web.MethodDescriptor( + '/viam.app.v1.AppService/DeleteRobot', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.DeleteRobotRequest, + proto.viam.app.v1.DeleteRobotResponse, + /** + * @param {!proto.viam.app.v1.DeleteRobotRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.DeleteRobotResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.DeleteRobotRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.DeleteRobotResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.AppServiceClient.prototype.deleteRobot = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.AppService/DeleteRobot', + request, + metadata || {}, + methodDescriptor_AppService_DeleteRobot, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.DeleteRobotRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.AppServicePromiseClient.prototype.deleteRobot = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.AppService/DeleteRobot', + request, + metadata || {}, + methodDescriptor_AppService_DeleteRobot); +}; + + +module.exports = proto.viam.app.v1; + diff --git a/gen/js/app/v1/app_pb.d.ts b/gen/js/app/v1/app_pb.d.ts new file mode 100644 index 000000000..dc9ec6d80 --- /dev/null +++ b/gen/js/app/v1/app_pb.d.ts @@ -0,0 +1,1034 @@ +// package: viam.app.v1 +// file: app/v1/app.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; +import * as tagger_v1_tagger_pb from "../../tagger/v1/tagger_pb"; + +export class Robot extends jspb.Message { + getId(): string; + setId(value: string): void; + + getName(): string; + setName(value: string): void; + + getLocation(): string; + setLocation(value: string): void; + + hasLastAccess(): boolean; + clearLastAccess(): void; + getLastAccess(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastAccess(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Robot.AsObject; + static toObject(includeInstance: boolean, msg: Robot): Robot.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Robot, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Robot; + static deserializeBinaryFromReader(message: Robot, reader: jspb.BinaryReader): Robot; +} + +export namespace Robot { + export type AsObject = { + id: string, + name: string, + location: string, + lastAccess?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class RobotPart extends jspb.Message { + getId(): string; + setId(value: string): void; + + getName(): string; + setName(value: string): void; + + getDnsName(): string; + setDnsName(value: string): void; + + getSecret(): string; + setSecret(value: string): void; + + getRobot(): string; + setRobot(value: string): void; + + getLocationId(): string; + setLocationId(value: string): void; + + hasRobotConfig(): boolean; + clearRobotConfig(): void; + getRobotConfig(): google_protobuf_struct_pb.Struct | undefined; + setRobotConfig(value?: google_protobuf_struct_pb.Struct): void; + + hasLastAccess(): boolean; + clearLastAccess(): void; + getLastAccess(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastAccess(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasUserSuppliedInfo(): boolean; + clearUserSuppliedInfo(): void; + getUserSuppliedInfo(): google_protobuf_struct_pb.Struct | undefined; + setUserSuppliedInfo(value?: google_protobuf_struct_pb.Struct): void; + + getMainPart(): boolean; + setMainPart(value: boolean): void; + + getFqdn(): string; + setFqdn(value: string): void; + + getLocalFqdn(): string; + setLocalFqdn(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RobotPart.AsObject; + static toObject(includeInstance: boolean, msg: RobotPart): RobotPart.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RobotPart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RobotPart; + static deserializeBinaryFromReader(message: RobotPart, reader: jspb.BinaryReader): RobotPart; +} + +export namespace RobotPart { + export type AsObject = { + id: string, + name: string, + dnsName: string, + secret: string, + robot: string, + locationId: string, + robotConfig?: google_protobuf_struct_pb.Struct.AsObject, + lastAccess?: google_protobuf_timestamp_pb.Timestamp.AsObject, + userSuppliedInfo?: google_protobuf_struct_pb.Struct.AsObject, + mainPart: boolean, + fqdn: string, + localFqdn: string, + } +} + +export class RobotPartHistoryEntry extends jspb.Message { + getPart(): string; + setPart(value: string): void; + + getRobot(): string; + setRobot(value: string): void; + + hasWhen(): boolean; + clearWhen(): void; + getWhen(): google_protobuf_timestamp_pb.Timestamp | undefined; + setWhen(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasOld(): boolean; + clearOld(): void; + getOld(): RobotPart | undefined; + setOld(value?: RobotPart): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RobotPartHistoryEntry.AsObject; + static toObject(includeInstance: boolean, msg: RobotPartHistoryEntry): RobotPartHistoryEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RobotPartHistoryEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RobotPartHistoryEntry; + static deserializeBinaryFromReader(message: RobotPartHistoryEntry, reader: jspb.BinaryReader): RobotPartHistoryEntry; +} + +export namespace RobotPartHistoryEntry { + export type AsObject = { + part: string, + robot: string, + when?: google_protobuf_timestamp_pb.Timestamp.AsObject, + old?: RobotPart.AsObject, + } +} + +export class ListOrganizationsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListOrganizationsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListOrganizationsRequest): ListOrganizationsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListOrganizationsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListOrganizationsRequest; + static deserializeBinaryFromReader(message: ListOrganizationsRequest, reader: jspb.BinaryReader): ListOrganizationsRequest; +} + +export namespace ListOrganizationsRequest { + export type AsObject = { + } +} + +export class Organization extends jspb.Message { + getId(): string; + setId(value: string): void; + + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Organization.AsObject; + static toObject(includeInstance: boolean, msg: Organization): Organization.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Organization, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Organization; + static deserializeBinaryFromReader(message: Organization, reader: jspb.BinaryReader): Organization; +} + +export namespace Organization { + export type AsObject = { + id: string, + name: string, + } +} + +export class ListOrganizationsResponse extends jspb.Message { + clearOrganizationsList(): void; + getOrganizationsList(): Array; + setOrganizationsList(value: Array): void; + addOrganizations(value?: Organization, index?: number): Organization; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListOrganizationsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListOrganizationsResponse): ListOrganizationsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListOrganizationsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListOrganizationsResponse; + static deserializeBinaryFromReader(message: ListOrganizationsResponse, reader: jspb.BinaryReader): ListOrganizationsResponse; +} + +export namespace ListOrganizationsResponse { + export type AsObject = { + organizationsList: Array, + } +} + +export class Location extends jspb.Message { + getId(): string; + setId(value: string): void; + + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Location.AsObject; + static toObject(includeInstance: boolean, msg: Location): Location.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Location; + static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; +} + +export namespace Location { + export type AsObject = { + id: string, + name: string, + } +} + +export class ListLocationsRequest extends jspb.Message { + getOrganizationId(): string; + setOrganizationId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListLocationsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListLocationsRequest): ListLocationsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListLocationsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListLocationsRequest; + static deserializeBinaryFromReader(message: ListLocationsRequest, reader: jspb.BinaryReader): ListLocationsRequest; +} + +export namespace ListLocationsRequest { + export type AsObject = { + organizationId: string, + } +} + +export class ListLocationsResponse extends jspb.Message { + clearLocationsList(): void; + getLocationsList(): Array; + setLocationsList(value: Array): void; + addLocations(value?: Location, index?: number): Location; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListLocationsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListLocationsResponse): ListLocationsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListLocationsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListLocationsResponse; + static deserializeBinaryFromReader(message: ListLocationsResponse, reader: jspb.BinaryReader): ListLocationsResponse; +} + +export namespace ListLocationsResponse { + export type AsObject = { + locationsList: Array, + } +} + +export class LocationAuth extends jspb.Message { + getSecret(): string; + setSecret(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LocationAuth.AsObject; + static toObject(includeInstance: boolean, msg: LocationAuth): LocationAuth.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LocationAuth, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LocationAuth; + static deserializeBinaryFromReader(message: LocationAuth, reader: jspb.BinaryReader): LocationAuth; +} + +export namespace LocationAuth { + export type AsObject = { + secret: string, + } +} + +export class LocationAuthRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LocationAuthRequest.AsObject; + static toObject(includeInstance: boolean, msg: LocationAuthRequest): LocationAuthRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LocationAuthRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LocationAuthRequest; + static deserializeBinaryFromReader(message: LocationAuthRequest, reader: jspb.BinaryReader): LocationAuthRequest; +} + +export namespace LocationAuthRequest { + export type AsObject = { + locationId: string, + } +} + +export class LocationAuthResponse extends jspb.Message { + hasAuth(): boolean; + clearAuth(): void; + getAuth(): LocationAuth | undefined; + setAuth(value?: LocationAuth): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LocationAuthResponse.AsObject; + static toObject(includeInstance: boolean, msg: LocationAuthResponse): LocationAuthResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LocationAuthResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LocationAuthResponse; + static deserializeBinaryFromReader(message: LocationAuthResponse, reader: jspb.BinaryReader): LocationAuthResponse; +} + +export namespace LocationAuthResponse { + export type AsObject = { + auth?: LocationAuth.AsObject, + } +} + +export class GetRobotRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotRequest): GetRobotRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotRequest; + static deserializeBinaryFromReader(message: GetRobotRequest, reader: jspb.BinaryReader): GetRobotRequest; +} + +export namespace GetRobotRequest { + export type AsObject = { + id: string, + } +} + +export class GetRobotResponse extends jspb.Message { + hasRobot(): boolean; + clearRobot(): void; + getRobot(): Robot | undefined; + setRobot(value?: Robot): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotResponse): GetRobotResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotResponse; + static deserializeBinaryFromReader(message: GetRobotResponse, reader: jspb.BinaryReader): GetRobotResponse; +} + +export namespace GetRobotResponse { + export type AsObject = { + robot?: Robot.AsObject, + } +} + +export class GetRobotPartsRequest extends jspb.Message { + getRobotId(): string; + setRobotId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotPartsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotPartsRequest): GetRobotPartsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotPartsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotPartsRequest; + static deserializeBinaryFromReader(message: GetRobotPartsRequest, reader: jspb.BinaryReader): GetRobotPartsRequest; +} + +export namespace GetRobotPartsRequest { + export type AsObject = { + robotId: string, + } +} + +export class GetRobotPartsResponse extends jspb.Message { + clearPartsList(): void; + getPartsList(): Array; + setPartsList(value: Array): void; + addParts(value?: RobotPart, index?: number): RobotPart; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotPartsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotPartsResponse): GetRobotPartsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotPartsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotPartsResponse; + static deserializeBinaryFromReader(message: GetRobotPartsResponse, reader: jspb.BinaryReader): GetRobotPartsResponse; +} + +export namespace GetRobotPartsResponse { + export type AsObject = { + partsList: Array, + } +} + +export class GetRobotPartRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotPartRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotPartRequest): GetRobotPartRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotPartRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotPartRequest; + static deserializeBinaryFromReader(message: GetRobotPartRequest, reader: jspb.BinaryReader): GetRobotPartRequest; +} + +export namespace GetRobotPartRequest { + export type AsObject = { + id: string, + } +} + +export class GetRobotPartResponse extends jspb.Message { + hasPart(): boolean; + clearPart(): void; + getPart(): RobotPart | undefined; + setPart(value?: RobotPart): void; + + getConfigJson(): string; + setConfigJson(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotPartResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotPartResponse): GetRobotPartResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotPartResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotPartResponse; + static deserializeBinaryFromReader(message: GetRobotPartResponse, reader: jspb.BinaryReader): GetRobotPartResponse; +} + +export namespace GetRobotPartResponse { + export type AsObject = { + part?: RobotPart.AsObject, + configJson: string, + } +} + +export class GetRobotPartLogsRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + getErrorsOnly(): boolean; + setErrorsOnly(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotPartLogsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotPartLogsRequest): GetRobotPartLogsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotPartLogsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotPartLogsRequest; + static deserializeBinaryFromReader(message: GetRobotPartLogsRequest, reader: jspb.BinaryReader): GetRobotPartLogsRequest; +} + +export namespace GetRobotPartLogsRequest { + export type AsObject = { + id: string, + errorsOnly: boolean, + } +} + +export class LogEntry extends jspb.Message { + getHost(): string; + setHost(value: string): void; + + getLevel(): string; + setLevel(value: string): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getLoggerName(): string; + setLoggerName(value: string): void; + + getMessage(): string; + setMessage(value: string): void; + + hasCaller(): boolean; + clearCaller(): void; + getCaller(): google_protobuf_struct_pb.Struct | undefined; + setCaller(value?: google_protobuf_struct_pb.Struct): void; + + getStack(): string; + setStack(value: string): void; + + clearFieldsList(): void; + getFieldsList(): Array; + setFieldsList(value: Array): void; + addFields(value?: google_protobuf_struct_pb.Struct, index?: number): google_protobuf_struct_pb.Struct; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogEntry.AsObject; + static toObject(includeInstance: boolean, msg: LogEntry): LogEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LogEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogEntry; + static deserializeBinaryFromReader(message: LogEntry, reader: jspb.BinaryReader): LogEntry; +} + +export namespace LogEntry { + export type AsObject = { + host: string, + level: string, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + loggerName: string, + message: string, + caller?: google_protobuf_struct_pb.Struct.AsObject, + stack: string, + fieldsList: Array, + } +} + +export class GetRobotPartLogsResponse extends jspb.Message { + clearLogsList(): void; + getLogsList(): Array; + setLogsList(value: Array): void; + addLogs(value?: LogEntry, index?: number): LogEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotPartLogsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotPartLogsResponse): GetRobotPartLogsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotPartLogsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotPartLogsResponse; + static deserializeBinaryFromReader(message: GetRobotPartLogsResponse, reader: jspb.BinaryReader): GetRobotPartLogsResponse; +} + +export namespace GetRobotPartLogsResponse { + export type AsObject = { + logsList: Array, + } +} + +export class TailRobotPartLogsRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + getErrorsOnly(): boolean; + setErrorsOnly(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TailRobotPartLogsRequest.AsObject; + static toObject(includeInstance: boolean, msg: TailRobotPartLogsRequest): TailRobotPartLogsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TailRobotPartLogsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TailRobotPartLogsRequest; + static deserializeBinaryFromReader(message: TailRobotPartLogsRequest, reader: jspb.BinaryReader): TailRobotPartLogsRequest; +} + +export namespace TailRobotPartLogsRequest { + export type AsObject = { + id: string, + errorsOnly: boolean, + } +} + +export class TailRobotPartLogsResponse extends jspb.Message { + clearLogsList(): void; + getLogsList(): Array; + setLogsList(value: Array): void; + addLogs(value?: LogEntry, index?: number): LogEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TailRobotPartLogsResponse.AsObject; + static toObject(includeInstance: boolean, msg: TailRobotPartLogsResponse): TailRobotPartLogsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TailRobotPartLogsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TailRobotPartLogsResponse; + static deserializeBinaryFromReader(message: TailRobotPartLogsResponse, reader: jspb.BinaryReader): TailRobotPartLogsResponse; +} + +export namespace TailRobotPartLogsResponse { + export type AsObject = { + logsList: Array, + } +} + +export class GetRobotPartHistoryRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotPartHistoryRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotPartHistoryRequest): GetRobotPartHistoryRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotPartHistoryRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotPartHistoryRequest; + static deserializeBinaryFromReader(message: GetRobotPartHistoryRequest, reader: jspb.BinaryReader): GetRobotPartHistoryRequest; +} + +export namespace GetRobotPartHistoryRequest { + export type AsObject = { + id: string, + } +} + +export class GetRobotPartHistoryResponse extends jspb.Message { + clearHistoryList(): void; + getHistoryList(): Array; + setHistoryList(value: Array): void; + addHistory(value?: RobotPartHistoryEntry, index?: number): RobotPartHistoryEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRobotPartHistoryResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetRobotPartHistoryResponse): GetRobotPartHistoryResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRobotPartHistoryResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRobotPartHistoryResponse; + static deserializeBinaryFromReader(message: GetRobotPartHistoryResponse, reader: jspb.BinaryReader): GetRobotPartHistoryResponse; +} + +export namespace GetRobotPartHistoryResponse { + export type AsObject = { + historyList: Array, + } +} + +export class UpdateRobotPartRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + getName(): string; + setName(value: string): void; + + hasRobotConfig(): boolean; + clearRobotConfig(): void; + getRobotConfig(): google_protobuf_struct_pb.Struct | undefined; + setRobotConfig(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateRobotPartRequest.AsObject; + static toObject(includeInstance: boolean, msg: UpdateRobotPartRequest): UpdateRobotPartRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateRobotPartRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateRobotPartRequest; + static deserializeBinaryFromReader(message: UpdateRobotPartRequest, reader: jspb.BinaryReader): UpdateRobotPartRequest; +} + +export namespace UpdateRobotPartRequest { + export type AsObject = { + id: string, + name: string, + robotConfig?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class UpdateRobotPartResponse extends jspb.Message { + hasPart(): boolean; + clearPart(): void; + getPart(): RobotPart | undefined; + setPart(value?: RobotPart): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateRobotPartResponse.AsObject; + static toObject(includeInstance: boolean, msg: UpdateRobotPartResponse): UpdateRobotPartResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateRobotPartResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateRobotPartResponse; + static deserializeBinaryFromReader(message: UpdateRobotPartResponse, reader: jspb.BinaryReader): UpdateRobotPartResponse; +} + +export namespace UpdateRobotPartResponse { + export type AsObject = { + part?: RobotPart.AsObject, + } +} + +export class NewRobotPartRequest extends jspb.Message { + getRobotId(): string; + setRobotId(value: string): void; + + getPartName(): string; + setPartName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewRobotPartRequest.AsObject; + static toObject(includeInstance: boolean, msg: NewRobotPartRequest): NewRobotPartRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewRobotPartRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewRobotPartRequest; + static deserializeBinaryFromReader(message: NewRobotPartRequest, reader: jspb.BinaryReader): NewRobotPartRequest; +} + +export namespace NewRobotPartRequest { + export type AsObject = { + robotId: string, + partName: string, + } +} + +export class NewRobotPartResponse extends jspb.Message { + getPartId(): string; + setPartId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewRobotPartResponse.AsObject; + static toObject(includeInstance: boolean, msg: NewRobotPartResponse): NewRobotPartResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewRobotPartResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewRobotPartResponse; + static deserializeBinaryFromReader(message: NewRobotPartResponse, reader: jspb.BinaryReader): NewRobotPartResponse; +} + +export namespace NewRobotPartResponse { + export type AsObject = { + partId: string, + } +} + +export class DeleteRobotPartRequest extends jspb.Message { + getPartId(): string; + setPartId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteRobotPartRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteRobotPartRequest): DeleteRobotPartRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteRobotPartRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteRobotPartRequest; + static deserializeBinaryFromReader(message: DeleteRobotPartRequest, reader: jspb.BinaryReader): DeleteRobotPartRequest; +} + +export namespace DeleteRobotPartRequest { + export type AsObject = { + partId: string, + } +} + +export class DeleteRobotPartResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteRobotPartResponse.AsObject; + static toObject(includeInstance: boolean, msg: DeleteRobotPartResponse): DeleteRobotPartResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteRobotPartResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteRobotPartResponse; + static deserializeBinaryFromReader(message: DeleteRobotPartResponse, reader: jspb.BinaryReader): DeleteRobotPartResponse; +} + +export namespace DeleteRobotPartResponse { + export type AsObject = { + } +} + +export class Fragment extends jspb.Message { + getId(): string; + setId(value: string): void; + + getName(): string; + setName(value: string): void; + + hasFragment(): boolean; + clearFragment(): void; + getFragment(): google_protobuf_struct_pb.Struct | undefined; + setFragment(value?: google_protobuf_struct_pb.Struct): void; + + getOrganizationOwner(): string; + setOrganizationOwner(value: string): void; + + getPublic(): boolean; + setPublic(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Fragment.AsObject; + static toObject(includeInstance: boolean, msg: Fragment): Fragment.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Fragment, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Fragment; + static deserializeBinaryFromReader(message: Fragment, reader: jspb.BinaryReader): Fragment; +} + +export namespace Fragment { + export type AsObject = { + id: string, + name: string, + fragment?: google_protobuf_struct_pb.Struct.AsObject, + organizationOwner: string, + pb_public: boolean, + } +} + +export class FindRobotsRequest extends jspb.Message { + getLocationId(): string; + setLocationId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FindRobotsRequest.AsObject; + static toObject(includeInstance: boolean, msg: FindRobotsRequest): FindRobotsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FindRobotsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FindRobotsRequest; + static deserializeBinaryFromReader(message: FindRobotsRequest, reader: jspb.BinaryReader): FindRobotsRequest; +} + +export namespace FindRobotsRequest { + export type AsObject = { + locationId: string, + } +} + +export class FindRobotsResponse extends jspb.Message { + clearRobotsList(): void; + getRobotsList(): Array; + setRobotsList(value: Array): void; + addRobots(value?: Robot, index?: number): Robot; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FindRobotsResponse.AsObject; + static toObject(includeInstance: boolean, msg: FindRobotsResponse): FindRobotsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FindRobotsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FindRobotsResponse; + static deserializeBinaryFromReader(message: FindRobotsResponse, reader: jspb.BinaryReader): FindRobotsResponse; +} + +export namespace FindRobotsResponse { + export type AsObject = { + robotsList: Array, + } +} + +export class NewRobotRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getLocation(): string; + setLocation(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewRobotRequest.AsObject; + static toObject(includeInstance: boolean, msg: NewRobotRequest): NewRobotRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewRobotRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewRobotRequest; + static deserializeBinaryFromReader(message: NewRobotRequest, reader: jspb.BinaryReader): NewRobotRequest; +} + +export namespace NewRobotRequest { + export type AsObject = { + name: string, + location: string, + } +} + +export class NewRobotResponse extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewRobotResponse.AsObject; + static toObject(includeInstance: boolean, msg: NewRobotResponse): NewRobotResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NewRobotResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewRobotResponse; + static deserializeBinaryFromReader(message: NewRobotResponse, reader: jspb.BinaryReader): NewRobotResponse; +} + +export namespace NewRobotResponse { + export type AsObject = { + id: string, + } +} + +export class UpdateRobotRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + getName(): string; + setName(value: string): void; + + getLocation(): string; + setLocation(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateRobotRequest.AsObject; + static toObject(includeInstance: boolean, msg: UpdateRobotRequest): UpdateRobotRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateRobotRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateRobotRequest; + static deserializeBinaryFromReader(message: UpdateRobotRequest, reader: jspb.BinaryReader): UpdateRobotRequest; +} + +export namespace UpdateRobotRequest { + export type AsObject = { + id: string, + name: string, + location: string, + } +} + +export class UpdateRobotResponse extends jspb.Message { + hasRobot(): boolean; + clearRobot(): void; + getRobot(): Robot | undefined; + setRobot(value?: Robot): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateRobotResponse.AsObject; + static toObject(includeInstance: boolean, msg: UpdateRobotResponse): UpdateRobotResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateRobotResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateRobotResponse; + static deserializeBinaryFromReader(message: UpdateRobotResponse, reader: jspb.BinaryReader): UpdateRobotResponse; +} + +export namespace UpdateRobotResponse { + export type AsObject = { + robot?: Robot.AsObject, + } +} + +export class DeleteRobotRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteRobotRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteRobotRequest): DeleteRobotRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteRobotRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteRobotRequest; + static deserializeBinaryFromReader(message: DeleteRobotRequest, reader: jspb.BinaryReader): DeleteRobotRequest; +} + +export namespace DeleteRobotRequest { + export type AsObject = { + id: string, + } +} + +export class DeleteRobotResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteRobotResponse.AsObject; + static toObject(includeInstance: boolean, msg: DeleteRobotResponse): DeleteRobotResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteRobotResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteRobotResponse; + static deserializeBinaryFromReader(message: DeleteRobotResponse, reader: jspb.BinaryReader): DeleteRobotResponse; +} + +export namespace DeleteRobotResponse { + export type AsObject = { + } +} + +export class MarkPartAsMainRequest extends jspb.Message { + getPartId(): string; + setPartId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MarkPartAsMainRequest.AsObject; + static toObject(includeInstance: boolean, msg: MarkPartAsMainRequest): MarkPartAsMainRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MarkPartAsMainRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MarkPartAsMainRequest; + static deserializeBinaryFromReader(message: MarkPartAsMainRequest, reader: jspb.BinaryReader): MarkPartAsMainRequest; +} + +export namespace MarkPartAsMainRequest { + export type AsObject = { + partId: string, + } +} + +export class MarkPartAsMainResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MarkPartAsMainResponse.AsObject; + static toObject(includeInstance: boolean, msg: MarkPartAsMainResponse): MarkPartAsMainResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MarkPartAsMainResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MarkPartAsMainResponse; + static deserializeBinaryFromReader(message: MarkPartAsMainResponse, reader: jspb.BinaryReader): MarkPartAsMainResponse; +} + +export namespace MarkPartAsMainResponse { + export type AsObject = { + } +} + diff --git a/gen/js/app/v1/app_pb.js b/gen/js/app/v1/app_pb.js new file mode 100644 index 000000000..7d7a1984a --- /dev/null +++ b/gen/js/app/v1/app_pb.js @@ -0,0 +1,8017 @@ +// source: app/v1/app.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var tagger_v1_tagger_pb = require('../../tagger/v1/tagger_pb.js'); +goog.object.extend(proto, tagger_v1_tagger_pb); +goog.exportSymbol('proto.viam.app.v1.DeleteRobotPartRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.DeleteRobotPartResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.DeleteRobotRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.DeleteRobotResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.FindRobotsRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.FindRobotsResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.Fragment', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotPartHistoryRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotPartHistoryResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotPartLogsRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotPartLogsResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotPartRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotPartResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotPartsRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotPartsResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.GetRobotResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.ListLocationsRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.ListLocationsResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.ListOrganizationsRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.ListOrganizationsResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.Location', null, global); +goog.exportSymbol('proto.viam.app.v1.LocationAuth', null, global); +goog.exportSymbol('proto.viam.app.v1.LocationAuthRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.LocationAuthResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.LogEntry', null, global); +goog.exportSymbol('proto.viam.app.v1.MarkPartAsMainRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.MarkPartAsMainResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.NewRobotPartRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.NewRobotPartResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.NewRobotRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.NewRobotResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.Organization', null, global); +goog.exportSymbol('proto.viam.app.v1.Robot', null, global); +goog.exportSymbol('proto.viam.app.v1.RobotPart', null, global); +goog.exportSymbol('proto.viam.app.v1.RobotPartHistoryEntry', null, global); +goog.exportSymbol('proto.viam.app.v1.TailRobotPartLogsRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.TailRobotPartLogsResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.UpdateRobotPartRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.UpdateRobotPartResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.UpdateRobotRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.UpdateRobotResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Robot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Robot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Robot.displayName = 'proto.viam.app.v1.Robot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.RobotPart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.RobotPart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.RobotPart.displayName = 'proto.viam.app.v1.RobotPart'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.RobotPartHistoryEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.RobotPartHistoryEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.RobotPartHistoryEntry.displayName = 'proto.viam.app.v1.RobotPartHistoryEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ListOrganizationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.ListOrganizationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ListOrganizationsRequest.displayName = 'proto.viam.app.v1.ListOrganizationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Organization = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Organization, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Organization.displayName = 'proto.viam.app.v1.Organization'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ListOrganizationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.ListOrganizationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.ListOrganizationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ListOrganizationsResponse.displayName = 'proto.viam.app.v1.ListOrganizationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Location = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Location, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Location.displayName = 'proto.viam.app.v1.Location'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ListLocationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.ListLocationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ListLocationsRequest.displayName = 'proto.viam.app.v1.ListLocationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ListLocationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.ListLocationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.ListLocationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ListLocationsResponse.displayName = 'proto.viam.app.v1.ListLocationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.LocationAuth = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.LocationAuth, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.LocationAuth.displayName = 'proto.viam.app.v1.LocationAuth'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.LocationAuthRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.LocationAuthRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.LocationAuthRequest.displayName = 'proto.viam.app.v1.LocationAuthRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.LocationAuthResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.LocationAuthResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.LocationAuthResponse.displayName = 'proto.viam.app.v1.LocationAuthResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotRequest.displayName = 'proto.viam.app.v1.GetRobotRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotResponse.displayName = 'proto.viam.app.v1.GetRobotResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotPartsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotPartsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotPartsRequest.displayName = 'proto.viam.app.v1.GetRobotPartsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotPartsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.GetRobotPartsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotPartsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotPartsResponse.displayName = 'proto.viam.app.v1.GetRobotPartsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotPartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotPartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotPartRequest.displayName = 'proto.viam.app.v1.GetRobotPartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotPartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotPartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotPartResponse.displayName = 'proto.viam.app.v1.GetRobotPartResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotPartLogsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotPartLogsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotPartLogsRequest.displayName = 'proto.viam.app.v1.GetRobotPartLogsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.LogEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.LogEntry.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.LogEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.LogEntry.displayName = 'proto.viam.app.v1.LogEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotPartLogsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.GetRobotPartLogsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotPartLogsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotPartLogsResponse.displayName = 'proto.viam.app.v1.GetRobotPartLogsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.TailRobotPartLogsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.TailRobotPartLogsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.TailRobotPartLogsRequest.displayName = 'proto.viam.app.v1.TailRobotPartLogsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.TailRobotPartLogsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.TailRobotPartLogsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.TailRobotPartLogsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.TailRobotPartLogsResponse.displayName = 'proto.viam.app.v1.TailRobotPartLogsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotPartHistoryRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotPartHistoryRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotPartHistoryRequest.displayName = 'proto.viam.app.v1.GetRobotPartHistoryRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.GetRobotPartHistoryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.GetRobotPartHistoryResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.GetRobotPartHistoryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.GetRobotPartHistoryResponse.displayName = 'proto.viam.app.v1.GetRobotPartHistoryResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.UpdateRobotPartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.UpdateRobotPartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.UpdateRobotPartRequest.displayName = 'proto.viam.app.v1.UpdateRobotPartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.UpdateRobotPartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.UpdateRobotPartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.UpdateRobotPartResponse.displayName = 'proto.viam.app.v1.UpdateRobotPartResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.NewRobotPartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.NewRobotPartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.NewRobotPartRequest.displayName = 'proto.viam.app.v1.NewRobotPartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.NewRobotPartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.NewRobotPartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.NewRobotPartResponse.displayName = 'proto.viam.app.v1.NewRobotPartResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.DeleteRobotPartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.DeleteRobotPartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.DeleteRobotPartRequest.displayName = 'proto.viam.app.v1.DeleteRobotPartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.DeleteRobotPartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.DeleteRobotPartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.DeleteRobotPartResponse.displayName = 'proto.viam.app.v1.DeleteRobotPartResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Fragment = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Fragment, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Fragment.displayName = 'proto.viam.app.v1.Fragment'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.FindRobotsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.FindRobotsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.FindRobotsRequest.displayName = 'proto.viam.app.v1.FindRobotsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.FindRobotsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.FindRobotsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.FindRobotsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.FindRobotsResponse.displayName = 'proto.viam.app.v1.FindRobotsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.NewRobotRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.NewRobotRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.NewRobotRequest.displayName = 'proto.viam.app.v1.NewRobotRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.NewRobotResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.NewRobotResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.NewRobotResponse.displayName = 'proto.viam.app.v1.NewRobotResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.UpdateRobotRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.UpdateRobotRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.UpdateRobotRequest.displayName = 'proto.viam.app.v1.UpdateRobotRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.UpdateRobotResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.UpdateRobotResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.UpdateRobotResponse.displayName = 'proto.viam.app.v1.UpdateRobotResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.DeleteRobotRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.DeleteRobotRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.DeleteRobotRequest.displayName = 'proto.viam.app.v1.DeleteRobotRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.DeleteRobotResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.DeleteRobotResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.DeleteRobotResponse.displayName = 'proto.viam.app.v1.DeleteRobotResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.MarkPartAsMainRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.MarkPartAsMainRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.MarkPartAsMainRequest.displayName = 'proto.viam.app.v1.MarkPartAsMainRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.MarkPartAsMainResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.MarkPartAsMainResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.MarkPartAsMainResponse.displayName = 'proto.viam.app.v1.MarkPartAsMainResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Robot.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Robot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Robot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Robot.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + location: jspb.Message.getFieldWithDefault(msg, 3, ""), + lastAccess: (f = msg.getLastAccess()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Robot} + */ +proto.viam.app.v1.Robot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Robot; + return proto.viam.app.v1.Robot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Robot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Robot} + */ +proto.viam.app.v1.Robot.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastAccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Robot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Robot.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Robot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Robot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLastAccess(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.Robot.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Robot} returns this + */ +proto.viam.app.v1.Robot.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.viam.app.v1.Robot.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Robot} returns this + */ +proto.viam.app.v1.Robot.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string location = 3; + * @return {string} + */ +proto.viam.app.v1.Robot.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Robot} returns this + */ +proto.viam.app.v1.Robot.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp last_access = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.v1.Robot.prototype.getLastAccess = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.v1.Robot} returns this +*/ +proto.viam.app.v1.Robot.prototype.setLastAccess = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Robot} returns this + */ +proto.viam.app.v1.Robot.prototype.clearLastAccess = function() { + return this.setLastAccess(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Robot.prototype.hasLastAccess = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.RobotPart.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.RobotPart.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.RobotPart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RobotPart.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + dnsName: jspb.Message.getFieldWithDefault(msg, 10, ""), + secret: jspb.Message.getFieldWithDefault(msg, 3, ""), + robot: jspb.Message.getFieldWithDefault(msg, 4, ""), + locationId: jspb.Message.getFieldWithDefault(msg, 12, ""), + robotConfig: (f = msg.getRobotConfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + lastAccess: (f = msg.getLastAccess()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + userSuppliedInfo: (f = msg.getUserSuppliedInfo()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + mainPart: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + fqdn: jspb.Message.getFieldWithDefault(msg, 9, ""), + localFqdn: jspb.Message.getFieldWithDefault(msg, 11, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.RobotPart} + */ +proto.viam.app.v1.RobotPart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.RobotPart; + return proto.viam.app.v1.RobotPart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.RobotPart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.RobotPart} + */ +proto.viam.app.v1.RobotPart.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setDnsName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSecret(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setRobot(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + case 5: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setRobotConfig(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastAccess(value); + break; + case 7: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setUserSuppliedInfo(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMainPart(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setFqdn(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setLocalFqdn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.RobotPart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.RobotPart.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.RobotPart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RobotPart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDnsName(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getSecret(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getRobot(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getRobotConfig(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getLastAccess(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUserSuppliedInfo(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getMainPart(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getFqdn(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getLocalFqdn(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.RobotPart.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.viam.app.v1.RobotPart.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string dns_name = 10; + * @return {string} + */ +proto.viam.app.v1.RobotPart.prototype.getDnsName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.setDnsName = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional string secret = 3; + * @return {string} + */ +proto.viam.app.v1.RobotPart.prototype.getSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.setSecret = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string robot = 4; + * @return {string} + */ +proto.viam.app.v1.RobotPart.prototype.getRobot = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.setRobot = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string location_id = 12; + * @return {string} + */ +proto.viam.app.v1.RobotPart.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional google.protobuf.Struct robot_config = 5; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.v1.RobotPart.prototype.getRobotConfig = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.v1.RobotPart} returns this +*/ +proto.viam.app.v1.RobotPart.prototype.setRobotConfig = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.clearRobotConfig = function() { + return this.setRobotConfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RobotPart.prototype.hasRobotConfig = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp last_access = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.v1.RobotPart.prototype.getLastAccess = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.v1.RobotPart} returns this +*/ +proto.viam.app.v1.RobotPart.prototype.setLastAccess = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.clearLastAccess = function() { + return this.setLastAccess(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RobotPart.prototype.hasLastAccess = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional google.protobuf.Struct user_supplied_info = 7; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.v1.RobotPart.prototype.getUserSuppliedInfo = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 7)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.v1.RobotPart} returns this +*/ +proto.viam.app.v1.RobotPart.prototype.setUserSuppliedInfo = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.clearUserSuppliedInfo = function() { + return this.setUserSuppliedInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RobotPart.prototype.hasUserSuppliedInfo = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bool main_part = 8; + * @return {boolean} + */ +proto.viam.app.v1.RobotPart.prototype.getMainPart = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.setMainPart = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional string fqdn = 9; + * @return {string} + */ +proto.viam.app.v1.RobotPart.prototype.getFqdn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.setFqdn = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string local_fqdn = 11; + * @return {string} + */ +proto.viam.app.v1.RobotPart.prototype.getLocalFqdn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPart} returns this + */ +proto.viam.app.v1.RobotPart.prototype.setLocalFqdn = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.RobotPartHistoryEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.RobotPartHistoryEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RobotPartHistoryEntry.toObject = function(includeInstance, msg) { + var f, obj = { + part: jspb.Message.getFieldWithDefault(msg, 1, ""), + robot: jspb.Message.getFieldWithDefault(msg, 2, ""), + when: (f = msg.getWhen()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + old: (f = msg.getOld()) && proto.viam.app.v1.RobotPart.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.RobotPartHistoryEntry} + */ +proto.viam.app.v1.RobotPartHistoryEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.RobotPartHistoryEntry; + return proto.viam.app.v1.RobotPartHistoryEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.RobotPartHistoryEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.RobotPartHistoryEntry} + */ +proto.viam.app.v1.RobotPartHistoryEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPart(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRobot(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setWhen(value); + break; + case 4: + var value = new proto.viam.app.v1.RobotPart; + reader.readMessage(value,proto.viam.app.v1.RobotPart.deserializeBinaryFromReader); + msg.setOld(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.RobotPartHistoryEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.RobotPartHistoryEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RobotPartHistoryEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPart(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRobot(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWhen(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getOld(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.viam.app.v1.RobotPart.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string part = 1; + * @return {string} + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.getPart = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPartHistoryEntry} returns this + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.setPart = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string robot = 2; + * @return {string} + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.getRobot = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RobotPartHistoryEntry} returns this + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.setRobot = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp when = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.getWhen = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.v1.RobotPartHistoryEntry} returns this +*/ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.setWhen = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RobotPartHistoryEntry} returns this + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.clearWhen = function() { + return this.setWhen(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.hasWhen = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional RobotPart old = 4; + * @return {?proto.viam.app.v1.RobotPart} + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.getOld = function() { + return /** @type{?proto.viam.app.v1.RobotPart} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.RobotPart, 4)); +}; + + +/** + * @param {?proto.viam.app.v1.RobotPart|undefined} value + * @return {!proto.viam.app.v1.RobotPartHistoryEntry} returns this +*/ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.setOld = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RobotPartHistoryEntry} returns this + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.clearOld = function() { + return this.setOld(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RobotPartHistoryEntry.prototype.hasOld = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ListOrganizationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ListOrganizationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ListOrganizationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ListOrganizationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ListOrganizationsRequest} + */ +proto.viam.app.v1.ListOrganizationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ListOrganizationsRequest; + return proto.viam.app.v1.ListOrganizationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ListOrganizationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ListOrganizationsRequest} + */ +proto.viam.app.v1.ListOrganizationsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ListOrganizationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ListOrganizationsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ListOrganizationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ListOrganizationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Organization.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Organization.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Organization} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Organization.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Organization} + */ +proto.viam.app.v1.Organization.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Organization; + return proto.viam.app.v1.Organization.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Organization} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Organization} + */ +proto.viam.app.v1.Organization.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Organization.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Organization.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Organization} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Organization.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.Organization.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Organization} returns this + */ +proto.viam.app.v1.Organization.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.viam.app.v1.Organization.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Organization} returns this + */ +proto.viam.app.v1.Organization.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.ListOrganizationsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ListOrganizationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ListOrganizationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ListOrganizationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ListOrganizationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + organizationsList: jspb.Message.toObjectList(msg.getOrganizationsList(), + proto.viam.app.v1.Organization.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ListOrganizationsResponse} + */ +proto.viam.app.v1.ListOrganizationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ListOrganizationsResponse; + return proto.viam.app.v1.ListOrganizationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ListOrganizationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ListOrganizationsResponse} + */ +proto.viam.app.v1.ListOrganizationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.Organization; + reader.readMessage(value,proto.viam.app.v1.Organization.deserializeBinaryFromReader); + msg.addOrganizations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ListOrganizationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ListOrganizationsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ListOrganizationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ListOrganizationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOrganizationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.app.v1.Organization.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Organization organizations = 1; + * @return {!Array} + */ +proto.viam.app.v1.ListOrganizationsResponse.prototype.getOrganizationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.Organization, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.ListOrganizationsResponse} returns this +*/ +proto.viam.app.v1.ListOrganizationsResponse.prototype.setOrganizationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.app.v1.Organization=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.Organization} + */ +proto.viam.app.v1.ListOrganizationsResponse.prototype.addOrganizations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.app.v1.Organization, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.ListOrganizationsResponse} returns this + */ +proto.viam.app.v1.ListOrganizationsResponse.prototype.clearOrganizationsList = function() { + return this.setOrganizationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Location.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Location.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Location} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Location.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Location} + */ +proto.viam.app.v1.Location.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Location; + return proto.viam.app.v1.Location.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Location} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Location} + */ +proto.viam.app.v1.Location.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Location.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Location.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Location} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Location.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.Location.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Location} returns this + */ +proto.viam.app.v1.Location.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.viam.app.v1.Location.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Location} returns this + */ +proto.viam.app.v1.Location.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ListLocationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ListLocationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ListLocationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ListLocationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + organizationId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ListLocationsRequest} + */ +proto.viam.app.v1.ListLocationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ListLocationsRequest; + return proto.viam.app.v1.ListLocationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ListLocationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ListLocationsRequest} + */ +proto.viam.app.v1.ListLocationsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOrganizationId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ListLocationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ListLocationsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ListLocationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ListLocationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOrganizationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string organization_id = 1; + * @return {string} + */ +proto.viam.app.v1.ListLocationsRequest.prototype.getOrganizationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ListLocationsRequest} returns this + */ +proto.viam.app.v1.ListLocationsRequest.prototype.setOrganizationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.ListLocationsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ListLocationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ListLocationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ListLocationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ListLocationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + locationsList: jspb.Message.toObjectList(msg.getLocationsList(), + proto.viam.app.v1.Location.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ListLocationsResponse} + */ +proto.viam.app.v1.ListLocationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ListLocationsResponse; + return proto.viam.app.v1.ListLocationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ListLocationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ListLocationsResponse} + */ +proto.viam.app.v1.ListLocationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.Location; + reader.readMessage(value,proto.viam.app.v1.Location.deserializeBinaryFromReader); + msg.addLocations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ListLocationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ListLocationsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ListLocationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ListLocationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.app.v1.Location.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Location locations = 1; + * @return {!Array} + */ +proto.viam.app.v1.ListLocationsResponse.prototype.getLocationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.Location, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.ListLocationsResponse} returns this +*/ +proto.viam.app.v1.ListLocationsResponse.prototype.setLocationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.app.v1.Location=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.Location} + */ +proto.viam.app.v1.ListLocationsResponse.prototype.addLocations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.app.v1.Location, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.ListLocationsResponse} returns this + */ +proto.viam.app.v1.ListLocationsResponse.prototype.clearLocationsList = function() { + return this.setLocationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.LocationAuth.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.LocationAuth.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.LocationAuth} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LocationAuth.toObject = function(includeInstance, msg) { + var f, obj = { + secret: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.LocationAuth} + */ +proto.viam.app.v1.LocationAuth.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.LocationAuth; + return proto.viam.app.v1.LocationAuth.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.LocationAuth} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.LocationAuth} + */ +proto.viam.app.v1.LocationAuth.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSecret(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.LocationAuth.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.LocationAuth.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.LocationAuth} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LocationAuth.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecret(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string secret = 1; + * @return {string} + */ +proto.viam.app.v1.LocationAuth.prototype.getSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.LocationAuth} returns this + */ +proto.viam.app.v1.LocationAuth.prototype.setSecret = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.LocationAuthRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.LocationAuthRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.LocationAuthRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LocationAuthRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.LocationAuthRequest} + */ +proto.viam.app.v1.LocationAuthRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.LocationAuthRequest; + return proto.viam.app.v1.LocationAuthRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.LocationAuthRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.LocationAuthRequest} + */ +proto.viam.app.v1.LocationAuthRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.LocationAuthRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.LocationAuthRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.LocationAuthRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LocationAuthRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.viam.app.v1.LocationAuthRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.LocationAuthRequest} returns this + */ +proto.viam.app.v1.LocationAuthRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.LocationAuthResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.LocationAuthResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.LocationAuthResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LocationAuthResponse.toObject = function(includeInstance, msg) { + var f, obj = { + auth: (f = msg.getAuth()) && proto.viam.app.v1.LocationAuth.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.LocationAuthResponse} + */ +proto.viam.app.v1.LocationAuthResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.LocationAuthResponse; + return proto.viam.app.v1.LocationAuthResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.LocationAuthResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.LocationAuthResponse} + */ +proto.viam.app.v1.LocationAuthResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.LocationAuth; + reader.readMessage(value,proto.viam.app.v1.LocationAuth.deserializeBinaryFromReader); + msg.setAuth(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.LocationAuthResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.LocationAuthResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.LocationAuthResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LocationAuthResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuth(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.v1.LocationAuth.serializeBinaryToWriter + ); + } +}; + + +/** + * optional LocationAuth auth = 1; + * @return {?proto.viam.app.v1.LocationAuth} + */ +proto.viam.app.v1.LocationAuthResponse.prototype.getAuth = function() { + return /** @type{?proto.viam.app.v1.LocationAuth} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.LocationAuth, 1)); +}; + + +/** + * @param {?proto.viam.app.v1.LocationAuth|undefined} value + * @return {!proto.viam.app.v1.LocationAuthResponse} returns this +*/ +proto.viam.app.v1.LocationAuthResponse.prototype.setAuth = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.LocationAuthResponse} returns this + */ +proto.viam.app.v1.LocationAuthResponse.prototype.clearAuth = function() { + return this.setAuth(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.LocationAuthResponse.prototype.hasAuth = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotRequest} + */ +proto.viam.app.v1.GetRobotRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotRequest; + return proto.viam.app.v1.GetRobotRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotRequest} + */ +proto.viam.app.v1.GetRobotRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.GetRobotRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.GetRobotRequest} returns this + */ +proto.viam.app.v1.GetRobotRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotResponse.toObject = function(includeInstance, msg) { + var f, obj = { + robot: (f = msg.getRobot()) && proto.viam.app.v1.Robot.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotResponse} + */ +proto.viam.app.v1.GetRobotResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotResponse; + return proto.viam.app.v1.GetRobotResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotResponse} + */ +proto.viam.app.v1.GetRobotResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.Robot; + reader.readMessage(value,proto.viam.app.v1.Robot.deserializeBinaryFromReader); + msg.setRobot(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRobot(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.v1.Robot.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Robot robot = 1; + * @return {?proto.viam.app.v1.Robot} + */ +proto.viam.app.v1.GetRobotResponse.prototype.getRobot = function() { + return /** @type{?proto.viam.app.v1.Robot} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Robot, 1)); +}; + + +/** + * @param {?proto.viam.app.v1.Robot|undefined} value + * @return {!proto.viam.app.v1.GetRobotResponse} returns this +*/ +proto.viam.app.v1.GetRobotResponse.prototype.setRobot = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.GetRobotResponse} returns this + */ +proto.viam.app.v1.GetRobotResponse.prototype.clearRobot = function() { + return this.setRobot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.GetRobotResponse.prototype.hasRobot = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotPartsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotPartsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotPartsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + robotId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotPartsRequest} + */ +proto.viam.app.v1.GetRobotPartsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotPartsRequest; + return proto.viam.app.v1.GetRobotPartsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotPartsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotPartsRequest} + */ +proto.viam.app.v1.GetRobotPartsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotPartsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotPartsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotPartsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRobotId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string robot_id = 1; + * @return {string} + */ +proto.viam.app.v1.GetRobotPartsRequest.prototype.getRobotId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.GetRobotPartsRequest} returns this + */ +proto.viam.app.v1.GetRobotPartsRequest.prototype.setRobotId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.GetRobotPartsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotPartsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotPartsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotPartsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + partsList: jspb.Message.toObjectList(msg.getPartsList(), + proto.viam.app.v1.RobotPart.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotPartsResponse} + */ +proto.viam.app.v1.GetRobotPartsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotPartsResponse; + return proto.viam.app.v1.GetRobotPartsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotPartsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotPartsResponse} + */ +proto.viam.app.v1.GetRobotPartsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.RobotPart; + reader.readMessage(value,proto.viam.app.v1.RobotPart.deserializeBinaryFromReader); + msg.addParts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotPartsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotPartsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotPartsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPartsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.app.v1.RobotPart.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated RobotPart parts = 1; + * @return {!Array} + */ +proto.viam.app.v1.GetRobotPartsResponse.prototype.getPartsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.RobotPart, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.GetRobotPartsResponse} returns this +*/ +proto.viam.app.v1.GetRobotPartsResponse.prototype.setPartsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.app.v1.RobotPart=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.RobotPart} + */ +proto.viam.app.v1.GetRobotPartsResponse.prototype.addParts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.app.v1.RobotPart, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.GetRobotPartsResponse} returns this + */ +proto.viam.app.v1.GetRobotPartsResponse.prototype.clearPartsList = function() { + return this.setPartsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotPartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotPartRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotPartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotPartRequest} + */ +proto.viam.app.v1.GetRobotPartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotPartRequest; + return proto.viam.app.v1.GetRobotPartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotPartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotPartRequest} + */ +proto.viam.app.v1.GetRobotPartRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotPartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotPartRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotPartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.GetRobotPartRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.GetRobotPartRequest} returns this + */ +proto.viam.app.v1.GetRobotPartRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotPartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotPartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotPartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + part: (f = msg.getPart()) && proto.viam.app.v1.RobotPart.toObject(includeInstance, f), + configJson: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotPartResponse} + */ +proto.viam.app.v1.GetRobotPartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotPartResponse; + return proto.viam.app.v1.GetRobotPartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotPartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotPartResponse} + */ +proto.viam.app.v1.GetRobotPartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.RobotPart; + reader.readMessage(value,proto.viam.app.v1.RobotPart.deserializeBinaryFromReader); + msg.setPart(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConfigJson(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotPartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotPartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotPartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPart(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.v1.RobotPart.serializeBinaryToWriter + ); + } + f = message.getConfigJson(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional RobotPart part = 1; + * @return {?proto.viam.app.v1.RobotPart} + */ +proto.viam.app.v1.GetRobotPartResponse.prototype.getPart = function() { + return /** @type{?proto.viam.app.v1.RobotPart} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.RobotPart, 1)); +}; + + +/** + * @param {?proto.viam.app.v1.RobotPart|undefined} value + * @return {!proto.viam.app.v1.GetRobotPartResponse} returns this +*/ +proto.viam.app.v1.GetRobotPartResponse.prototype.setPart = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.GetRobotPartResponse} returns this + */ +proto.viam.app.v1.GetRobotPartResponse.prototype.clearPart = function() { + return this.setPart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.GetRobotPartResponse.prototype.hasPart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string config_json = 2; + * @return {string} + */ +proto.viam.app.v1.GetRobotPartResponse.prototype.getConfigJson = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.GetRobotPartResponse} returns this + */ +proto.viam.app.v1.GetRobotPartResponse.prototype.setConfigJson = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotPartLogsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotPartLogsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotPartLogsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartLogsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + errorsOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotPartLogsRequest} + */ +proto.viam.app.v1.GetRobotPartLogsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotPartLogsRequest; + return proto.viam.app.v1.GetRobotPartLogsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotPartLogsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotPartLogsRequest} + */ +proto.viam.app.v1.GetRobotPartLogsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setErrorsOnly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotPartLogsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotPartLogsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotPartLogsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartLogsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getErrorsOnly(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.GetRobotPartLogsRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.GetRobotPartLogsRequest} returns this + */ +proto.viam.app.v1.GetRobotPartLogsRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool errors_only = 2; + * @return {boolean} + */ +proto.viam.app.v1.GetRobotPartLogsRequest.prototype.getErrorsOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.GetRobotPartLogsRequest} returns this + */ +proto.viam.app.v1.GetRobotPartLogsRequest.prototype.setErrorsOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.LogEntry.repeatedFields_ = [8]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.LogEntry.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.LogEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.LogEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LogEntry.toObject = function(includeInstance, msg) { + var f, obj = { + host: jspb.Message.getFieldWithDefault(msg, 1, ""), + level: jspb.Message.getFieldWithDefault(msg, 2, ""), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + loggerName: jspb.Message.getFieldWithDefault(msg, 4, ""), + message: jspb.Message.getFieldWithDefault(msg, 5, ""), + caller: (f = msg.getCaller()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + stack: jspb.Message.getFieldWithDefault(msg, 7, ""), + fieldsList: jspb.Message.toObjectList(msg.getFieldsList(), + google_protobuf_struct_pb.Struct.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.LogEntry} + */ +proto.viam.app.v1.LogEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.LogEntry; + return proto.viam.app.v1.LogEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.LogEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.LogEntry} + */ +proto.viam.app.v1.LogEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHost(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLevel(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLoggerName(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 6: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setCaller(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setStack(value); + break; + case 8: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.addFields(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.LogEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.LogEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.LogEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LogEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLevel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLoggerName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCaller(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getStack(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getFieldsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string host = 1; + * @return {string} + */ +proto.viam.app.v1.LogEntry.prototype.getHost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.LogEntry} returns this + */ +proto.viam.app.v1.LogEntry.prototype.setHost = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string level = 2; + * @return {string} + */ +proto.viam.app.v1.LogEntry.prototype.getLevel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.LogEntry} returns this + */ +proto.viam.app.v1.LogEntry.prototype.setLevel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.app.v1.LogEntry.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.app.v1.LogEntry} returns this +*/ +proto.viam.app.v1.LogEntry.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.LogEntry} returns this + */ +proto.viam.app.v1.LogEntry.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.LogEntry.prototype.hasTime = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string logger_name = 4; + * @return {string} + */ +proto.viam.app.v1.LogEntry.prototype.getLoggerName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.LogEntry} returns this + */ +proto.viam.app.v1.LogEntry.prototype.setLoggerName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string message = 5; + * @return {string} + */ +proto.viam.app.v1.LogEntry.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.LogEntry} returns this + */ +proto.viam.app.v1.LogEntry.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Struct caller = 6; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.v1.LogEntry.prototype.getCaller = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.v1.LogEntry} returns this +*/ +proto.viam.app.v1.LogEntry.prototype.setCaller = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.LogEntry} returns this + */ +proto.viam.app.v1.LogEntry.prototype.clearCaller = function() { + return this.setCaller(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.LogEntry.prototype.hasCaller = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string stack = 7; + * @return {string} + */ +proto.viam.app.v1.LogEntry.prototype.getStack = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.LogEntry} returns this + */ +proto.viam.app.v1.LogEntry.prototype.setStack = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated google.protobuf.Struct fields = 8; + * @return {!Array} + */ +proto.viam.app.v1.LogEntry.prototype.getFieldsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_struct_pb.Struct, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.LogEntry} returns this +*/ +proto.viam.app.v1.LogEntry.prototype.setFieldsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.google.protobuf.Struct=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Struct} + */ +proto.viam.app.v1.LogEntry.prototype.addFields = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.Struct, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.LogEntry} returns this + */ +proto.viam.app.v1.LogEntry.prototype.clearFieldsList = function() { + return this.setFieldsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.GetRobotPartLogsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotPartLogsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotPartLogsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotPartLogsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartLogsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + logsList: jspb.Message.toObjectList(msg.getLogsList(), + proto.viam.app.v1.LogEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotPartLogsResponse} + */ +proto.viam.app.v1.GetRobotPartLogsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotPartLogsResponse; + return proto.viam.app.v1.GetRobotPartLogsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotPartLogsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotPartLogsResponse} + */ +proto.viam.app.v1.GetRobotPartLogsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.LogEntry; + reader.readMessage(value,proto.viam.app.v1.LogEntry.deserializeBinaryFromReader); + msg.addLogs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotPartLogsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotPartLogsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotPartLogsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartLogsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLogsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.app.v1.LogEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated LogEntry logs = 1; + * @return {!Array} + */ +proto.viam.app.v1.GetRobotPartLogsResponse.prototype.getLogsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.LogEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.GetRobotPartLogsResponse} returns this +*/ +proto.viam.app.v1.GetRobotPartLogsResponse.prototype.setLogsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.app.v1.LogEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.LogEntry} + */ +proto.viam.app.v1.GetRobotPartLogsResponse.prototype.addLogs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.app.v1.LogEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.GetRobotPartLogsResponse} returns this + */ +proto.viam.app.v1.GetRobotPartLogsResponse.prototype.clearLogsList = function() { + return this.setLogsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.TailRobotPartLogsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.TailRobotPartLogsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.TailRobotPartLogsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.TailRobotPartLogsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + errorsOnly: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.TailRobotPartLogsRequest} + */ +proto.viam.app.v1.TailRobotPartLogsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.TailRobotPartLogsRequest; + return proto.viam.app.v1.TailRobotPartLogsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.TailRobotPartLogsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.TailRobotPartLogsRequest} + */ +proto.viam.app.v1.TailRobotPartLogsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setErrorsOnly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.TailRobotPartLogsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.TailRobotPartLogsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.TailRobotPartLogsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.TailRobotPartLogsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getErrorsOnly(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.TailRobotPartLogsRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.TailRobotPartLogsRequest} returns this + */ +proto.viam.app.v1.TailRobotPartLogsRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool errors_only = 2; + * @return {boolean} + */ +proto.viam.app.v1.TailRobotPartLogsRequest.prototype.getErrorsOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.TailRobotPartLogsRequest} returns this + */ +proto.viam.app.v1.TailRobotPartLogsRequest.prototype.setErrorsOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.TailRobotPartLogsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.TailRobotPartLogsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.TailRobotPartLogsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.TailRobotPartLogsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.TailRobotPartLogsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + logsList: jspb.Message.toObjectList(msg.getLogsList(), + proto.viam.app.v1.LogEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.TailRobotPartLogsResponse} + */ +proto.viam.app.v1.TailRobotPartLogsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.TailRobotPartLogsResponse; + return proto.viam.app.v1.TailRobotPartLogsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.TailRobotPartLogsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.TailRobotPartLogsResponse} + */ +proto.viam.app.v1.TailRobotPartLogsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.LogEntry; + reader.readMessage(value,proto.viam.app.v1.LogEntry.deserializeBinaryFromReader); + msg.addLogs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.TailRobotPartLogsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.TailRobotPartLogsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.TailRobotPartLogsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.TailRobotPartLogsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLogsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.app.v1.LogEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated LogEntry logs = 1; + * @return {!Array} + */ +proto.viam.app.v1.TailRobotPartLogsResponse.prototype.getLogsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.LogEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.TailRobotPartLogsResponse} returns this +*/ +proto.viam.app.v1.TailRobotPartLogsResponse.prototype.setLogsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.app.v1.LogEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.LogEntry} + */ +proto.viam.app.v1.TailRobotPartLogsResponse.prototype.addLogs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.app.v1.LogEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.TailRobotPartLogsResponse} returns this + */ +proto.viam.app.v1.TailRobotPartLogsResponse.prototype.clearLogsList = function() { + return this.setLogsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotPartHistoryRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotPartHistoryRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotPartHistoryRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartHistoryRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotPartHistoryRequest} + */ +proto.viam.app.v1.GetRobotPartHistoryRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotPartHistoryRequest; + return proto.viam.app.v1.GetRobotPartHistoryRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotPartHistoryRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotPartHistoryRequest} + */ +proto.viam.app.v1.GetRobotPartHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotPartHistoryRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotPartHistoryRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotPartHistoryRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartHistoryRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.GetRobotPartHistoryRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.GetRobotPartHistoryRequest} returns this + */ +proto.viam.app.v1.GetRobotPartHistoryRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.GetRobotPartHistoryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.GetRobotPartHistoryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + historyList: jspb.Message.toObjectList(msg.getHistoryList(), + proto.viam.app.v1.RobotPartHistoryEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.GetRobotPartHistoryResponse} + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.GetRobotPartHistoryResponse; + return proto.viam.app.v1.GetRobotPartHistoryResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.GetRobotPartHistoryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.GetRobotPartHistoryResponse} + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.RobotPartHistoryEntry; + reader.readMessage(value,proto.viam.app.v1.RobotPartHistoryEntry.deserializeBinaryFromReader); + msg.addHistory(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.GetRobotPartHistoryResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.GetRobotPartHistoryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHistoryList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.app.v1.RobotPartHistoryEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated RobotPartHistoryEntry history = 1; + * @return {!Array} + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.prototype.getHistoryList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.RobotPartHistoryEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.GetRobotPartHistoryResponse} returns this +*/ +proto.viam.app.v1.GetRobotPartHistoryResponse.prototype.setHistoryList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.app.v1.RobotPartHistoryEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.RobotPartHistoryEntry} + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.prototype.addHistory = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.app.v1.RobotPartHistoryEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.GetRobotPartHistoryResponse} returns this + */ +proto.viam.app.v1.GetRobotPartHistoryResponse.prototype.clearHistoryList = function() { + return this.setHistoryList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.UpdateRobotPartRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.UpdateRobotPartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.UpdateRobotPartRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + robotConfig: (f = msg.getRobotConfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.UpdateRobotPartRequest} + */ +proto.viam.app.v1.UpdateRobotPartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.UpdateRobotPartRequest; + return proto.viam.app.v1.UpdateRobotPartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.UpdateRobotPartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.UpdateRobotPartRequest} + */ +proto.viam.app.v1.UpdateRobotPartRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setRobotConfig(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.UpdateRobotPartRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.UpdateRobotPartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.UpdateRobotPartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRobotConfig(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.UpdateRobotPartRequest} returns this + */ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.UpdateRobotPartRequest} returns this + */ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct robot_config = 3; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.getRobotConfig = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.v1.UpdateRobotPartRequest} returns this +*/ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.setRobotConfig = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.UpdateRobotPartRequest} returns this + */ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.clearRobotConfig = function() { + return this.setRobotConfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.UpdateRobotPartRequest.prototype.hasRobotConfig = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.UpdateRobotPartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.UpdateRobotPartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.UpdateRobotPartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.UpdateRobotPartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + part: (f = msg.getPart()) && proto.viam.app.v1.RobotPart.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.UpdateRobotPartResponse} + */ +proto.viam.app.v1.UpdateRobotPartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.UpdateRobotPartResponse; + return proto.viam.app.v1.UpdateRobotPartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.UpdateRobotPartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.UpdateRobotPartResponse} + */ +proto.viam.app.v1.UpdateRobotPartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.RobotPart; + reader.readMessage(value,proto.viam.app.v1.RobotPart.deserializeBinaryFromReader); + msg.setPart(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.UpdateRobotPartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.UpdateRobotPartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.UpdateRobotPartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.UpdateRobotPartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPart(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.v1.RobotPart.serializeBinaryToWriter + ); + } +}; + + +/** + * optional RobotPart part = 1; + * @return {?proto.viam.app.v1.RobotPart} + */ +proto.viam.app.v1.UpdateRobotPartResponse.prototype.getPart = function() { + return /** @type{?proto.viam.app.v1.RobotPart} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.RobotPart, 1)); +}; + + +/** + * @param {?proto.viam.app.v1.RobotPart|undefined} value + * @return {!proto.viam.app.v1.UpdateRobotPartResponse} returns this +*/ +proto.viam.app.v1.UpdateRobotPartResponse.prototype.setPart = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.UpdateRobotPartResponse} returns this + */ +proto.viam.app.v1.UpdateRobotPartResponse.prototype.clearPart = function() { + return this.setPart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.UpdateRobotPartResponse.prototype.hasPart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.NewRobotPartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.NewRobotPartRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.NewRobotPartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NewRobotPartRequest.toObject = function(includeInstance, msg) { + var f, obj = { + robotId: jspb.Message.getFieldWithDefault(msg, 1, ""), + partName: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.NewRobotPartRequest} + */ +proto.viam.app.v1.NewRobotPartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.NewRobotPartRequest; + return proto.viam.app.v1.NewRobotPartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.NewRobotPartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.NewRobotPartRequest} + */ +proto.viam.app.v1.NewRobotPartRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setRobotId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPartName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.NewRobotPartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.NewRobotPartRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.NewRobotPartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NewRobotPartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRobotId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPartName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string robot_id = 1; + * @return {string} + */ +proto.viam.app.v1.NewRobotPartRequest.prototype.getRobotId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NewRobotPartRequest} returns this + */ +proto.viam.app.v1.NewRobotPartRequest.prototype.setRobotId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string part_name = 2; + * @return {string} + */ +proto.viam.app.v1.NewRobotPartRequest.prototype.getPartName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NewRobotPartRequest} returns this + */ +proto.viam.app.v1.NewRobotPartRequest.prototype.setPartName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.NewRobotPartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.NewRobotPartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.NewRobotPartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NewRobotPartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + partId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.NewRobotPartResponse} + */ +proto.viam.app.v1.NewRobotPartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.NewRobotPartResponse; + return proto.viam.app.v1.NewRobotPartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.NewRobotPartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.NewRobotPartResponse} + */ +proto.viam.app.v1.NewRobotPartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.NewRobotPartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.NewRobotPartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.NewRobotPartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NewRobotPartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string part_id = 1; + * @return {string} + */ +proto.viam.app.v1.NewRobotPartResponse.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NewRobotPartResponse} returns this + */ +proto.viam.app.v1.NewRobotPartResponse.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.DeleteRobotPartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.DeleteRobotPartRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.DeleteRobotPartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.DeleteRobotPartRequest.toObject = function(includeInstance, msg) { + var f, obj = { + partId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.DeleteRobotPartRequest} + */ +proto.viam.app.v1.DeleteRobotPartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.DeleteRobotPartRequest; + return proto.viam.app.v1.DeleteRobotPartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.DeleteRobotPartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.DeleteRobotPartRequest} + */ +proto.viam.app.v1.DeleteRobotPartRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.DeleteRobotPartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.DeleteRobotPartRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.DeleteRobotPartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.DeleteRobotPartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string part_id = 1; + * @return {string} + */ +proto.viam.app.v1.DeleteRobotPartRequest.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.DeleteRobotPartRequest} returns this + */ +proto.viam.app.v1.DeleteRobotPartRequest.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.DeleteRobotPartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.DeleteRobotPartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.DeleteRobotPartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.DeleteRobotPartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.DeleteRobotPartResponse} + */ +proto.viam.app.v1.DeleteRobotPartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.DeleteRobotPartResponse; + return proto.viam.app.v1.DeleteRobotPartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.DeleteRobotPartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.DeleteRobotPartResponse} + */ +proto.viam.app.v1.DeleteRobotPartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.DeleteRobotPartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.DeleteRobotPartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.DeleteRobotPartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.DeleteRobotPartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Fragment.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Fragment.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Fragment} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Fragment.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + fragment: (f = msg.getFragment()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + organizationOwner: jspb.Message.getFieldWithDefault(msg, 4, ""), + pb_public: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Fragment} + */ +proto.viam.app.v1.Fragment.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Fragment; + return proto.viam.app.v1.Fragment.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Fragment} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Fragment} + */ +proto.viam.app.v1.Fragment.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setFragment(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOrganizationOwner(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPublic(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Fragment.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Fragment.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Fragment} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Fragment.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFragment(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getOrganizationOwner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getPublic(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.Fragment.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Fragment} returns this + */ +proto.viam.app.v1.Fragment.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.viam.app.v1.Fragment.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Fragment} returns this + */ +proto.viam.app.v1.Fragment.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct fragment = 3; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.v1.Fragment.prototype.getFragment = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.v1.Fragment} returns this +*/ +proto.viam.app.v1.Fragment.prototype.setFragment = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Fragment} returns this + */ +proto.viam.app.v1.Fragment.prototype.clearFragment = function() { + return this.setFragment(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Fragment.prototype.hasFragment = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string organization_owner = 4; + * @return {string} + */ +proto.viam.app.v1.Fragment.prototype.getOrganizationOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Fragment} returns this + */ +proto.viam.app.v1.Fragment.prototype.setOrganizationOwner = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool public = 5; + * @return {boolean} + */ +proto.viam.app.v1.Fragment.prototype.getPublic = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.Fragment} returns this + */ +proto.viam.app.v1.Fragment.prototype.setPublic = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.FindRobotsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.FindRobotsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.FindRobotsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.FindRobotsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + locationId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.FindRobotsRequest} + */ +proto.viam.app.v1.FindRobotsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.FindRobotsRequest; + return proto.viam.app.v1.FindRobotsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.FindRobotsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.FindRobotsRequest} + */ +proto.viam.app.v1.FindRobotsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.FindRobotsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.FindRobotsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.FindRobotsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.FindRobotsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string location_id = 1; + * @return {string} + */ +proto.viam.app.v1.FindRobotsRequest.prototype.getLocationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.FindRobotsRequest} returns this + */ +proto.viam.app.v1.FindRobotsRequest.prototype.setLocationId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.FindRobotsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.FindRobotsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.FindRobotsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.FindRobotsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.FindRobotsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + robotsList: jspb.Message.toObjectList(msg.getRobotsList(), + proto.viam.app.v1.Robot.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.FindRobotsResponse} + */ +proto.viam.app.v1.FindRobotsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.FindRobotsResponse; + return proto.viam.app.v1.FindRobotsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.FindRobotsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.FindRobotsResponse} + */ +proto.viam.app.v1.FindRobotsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.Robot; + reader.readMessage(value,proto.viam.app.v1.Robot.deserializeBinaryFromReader); + msg.addRobots(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.FindRobotsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.FindRobotsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.FindRobotsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.FindRobotsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRobotsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.app.v1.Robot.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Robot robots = 1; + * @return {!Array} + */ +proto.viam.app.v1.FindRobotsResponse.prototype.getRobotsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.Robot, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.FindRobotsResponse} returns this +*/ +proto.viam.app.v1.FindRobotsResponse.prototype.setRobotsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.app.v1.Robot=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.Robot} + */ +proto.viam.app.v1.FindRobotsResponse.prototype.addRobots = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.app.v1.Robot, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.FindRobotsResponse} returns this + */ +proto.viam.app.v1.FindRobotsResponse.prototype.clearRobotsList = function() { + return this.setRobotsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.NewRobotRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.NewRobotRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.NewRobotRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NewRobotRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + location: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.NewRobotRequest} + */ +proto.viam.app.v1.NewRobotRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.NewRobotRequest; + return proto.viam.app.v1.NewRobotRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.NewRobotRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.NewRobotRequest} + */ +proto.viam.app.v1.NewRobotRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.NewRobotRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.NewRobotRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.NewRobotRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NewRobotRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.app.v1.NewRobotRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NewRobotRequest} returns this + */ +proto.viam.app.v1.NewRobotRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string location = 2; + * @return {string} + */ +proto.viam.app.v1.NewRobotRequest.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NewRobotRequest} returns this + */ +proto.viam.app.v1.NewRobotRequest.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.NewRobotResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.NewRobotResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.NewRobotResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NewRobotResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.NewRobotResponse} + */ +proto.viam.app.v1.NewRobotResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.NewRobotResponse; + return proto.viam.app.v1.NewRobotResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.NewRobotResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.NewRobotResponse} + */ +proto.viam.app.v1.NewRobotResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.NewRobotResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.NewRobotResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.NewRobotResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NewRobotResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.NewRobotResponse.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NewRobotResponse} returns this + */ +proto.viam.app.v1.NewRobotResponse.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.UpdateRobotRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.UpdateRobotRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.UpdateRobotRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.UpdateRobotRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + location: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.UpdateRobotRequest} + */ +proto.viam.app.v1.UpdateRobotRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.UpdateRobotRequest; + return proto.viam.app.v1.UpdateRobotRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.UpdateRobotRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.UpdateRobotRequest} + */ +proto.viam.app.v1.UpdateRobotRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.UpdateRobotRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.UpdateRobotRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.UpdateRobotRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.UpdateRobotRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.UpdateRobotRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.UpdateRobotRequest} returns this + */ +proto.viam.app.v1.UpdateRobotRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.viam.app.v1.UpdateRobotRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.UpdateRobotRequest} returns this + */ +proto.viam.app.v1.UpdateRobotRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string location = 3; + * @return {string} + */ +proto.viam.app.v1.UpdateRobotRequest.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.UpdateRobotRequest} returns this + */ +proto.viam.app.v1.UpdateRobotRequest.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.UpdateRobotResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.UpdateRobotResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.UpdateRobotResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.UpdateRobotResponse.toObject = function(includeInstance, msg) { + var f, obj = { + robot: (f = msg.getRobot()) && proto.viam.app.v1.Robot.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.UpdateRobotResponse} + */ +proto.viam.app.v1.UpdateRobotResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.UpdateRobotResponse; + return proto.viam.app.v1.UpdateRobotResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.UpdateRobotResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.UpdateRobotResponse} + */ +proto.viam.app.v1.UpdateRobotResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.Robot; + reader.readMessage(value,proto.viam.app.v1.Robot.deserializeBinaryFromReader); + msg.setRobot(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.UpdateRobotResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.UpdateRobotResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.UpdateRobotResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.UpdateRobotResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRobot(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.v1.Robot.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Robot robot = 1; + * @return {?proto.viam.app.v1.Robot} + */ +proto.viam.app.v1.UpdateRobotResponse.prototype.getRobot = function() { + return /** @type{?proto.viam.app.v1.Robot} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Robot, 1)); +}; + + +/** + * @param {?proto.viam.app.v1.Robot|undefined} value + * @return {!proto.viam.app.v1.UpdateRobotResponse} returns this +*/ +proto.viam.app.v1.UpdateRobotResponse.prototype.setRobot = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.UpdateRobotResponse} returns this + */ +proto.viam.app.v1.UpdateRobotResponse.prototype.clearRobot = function() { + return this.setRobot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.UpdateRobotResponse.prototype.hasRobot = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.DeleteRobotRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.DeleteRobotRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.DeleteRobotRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.DeleteRobotRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.DeleteRobotRequest} + */ +proto.viam.app.v1.DeleteRobotRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.DeleteRobotRequest; + return proto.viam.app.v1.DeleteRobotRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.DeleteRobotRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.DeleteRobotRequest} + */ +proto.viam.app.v1.DeleteRobotRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.DeleteRobotRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.DeleteRobotRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.DeleteRobotRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.DeleteRobotRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.DeleteRobotRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.DeleteRobotRequest} returns this + */ +proto.viam.app.v1.DeleteRobotRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.DeleteRobotResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.DeleteRobotResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.DeleteRobotResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.DeleteRobotResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.DeleteRobotResponse} + */ +proto.viam.app.v1.DeleteRobotResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.DeleteRobotResponse; + return proto.viam.app.v1.DeleteRobotResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.DeleteRobotResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.DeleteRobotResponse} + */ +proto.viam.app.v1.DeleteRobotResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.DeleteRobotResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.DeleteRobotResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.DeleteRobotResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.DeleteRobotResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.MarkPartAsMainRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.MarkPartAsMainRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.MarkPartAsMainRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.MarkPartAsMainRequest.toObject = function(includeInstance, msg) { + var f, obj = { + partId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.MarkPartAsMainRequest} + */ +proto.viam.app.v1.MarkPartAsMainRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.MarkPartAsMainRequest; + return proto.viam.app.v1.MarkPartAsMainRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.MarkPartAsMainRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.MarkPartAsMainRequest} + */ +proto.viam.app.v1.MarkPartAsMainRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPartId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.MarkPartAsMainRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.MarkPartAsMainRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.MarkPartAsMainRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.MarkPartAsMainRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPartId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string part_id = 1; + * @return {string} + */ +proto.viam.app.v1.MarkPartAsMainRequest.prototype.getPartId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.MarkPartAsMainRequest} returns this + */ +proto.viam.app.v1.MarkPartAsMainRequest.prototype.setPartId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.MarkPartAsMainResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.MarkPartAsMainResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.MarkPartAsMainResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.MarkPartAsMainResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.MarkPartAsMainResponse} + */ +proto.viam.app.v1.MarkPartAsMainResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.MarkPartAsMainResponse; + return proto.viam.app.v1.MarkPartAsMainResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.MarkPartAsMainResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.MarkPartAsMainResponse} + */ +proto.viam.app.v1.MarkPartAsMainResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.MarkPartAsMainResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.MarkPartAsMainResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.MarkPartAsMainResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.MarkPartAsMainResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.viam.app.v1); diff --git a/gen/js/app/v1/app_pb_service.d.ts b/gen/js/app/v1/app_pb_service.d.ts new file mode 100644 index 000000000..0e3ee899d --- /dev/null +++ b/gen/js/app/v1/app_pb_service.d.ts @@ -0,0 +1,359 @@ +// package: viam.app.v1 +// file: app/v1/app.proto + +import * as app_v1_app_pb from "../../app/v1/app_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type AppServiceListOrganizations = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.ListOrganizationsRequest; + readonly responseType: typeof app_v1_app_pb.ListOrganizationsResponse; +}; + +type AppServiceListLocations = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.ListLocationsRequest; + readonly responseType: typeof app_v1_app_pb.ListLocationsResponse; +}; + +type AppServiceLocationAuth = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.LocationAuthRequest; + readonly responseType: typeof app_v1_app_pb.LocationAuthResponse; +}; + +type AppServiceGetRobot = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.GetRobotRequest; + readonly responseType: typeof app_v1_app_pb.GetRobotResponse; +}; + +type AppServiceGetRobotParts = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.GetRobotPartsRequest; + readonly responseType: typeof app_v1_app_pb.GetRobotPartsResponse; +}; + +type AppServiceGetRobotPart = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.GetRobotPartRequest; + readonly responseType: typeof app_v1_app_pb.GetRobotPartResponse; +}; + +type AppServiceGetRobotPartLogs = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.GetRobotPartLogsRequest; + readonly responseType: typeof app_v1_app_pb.GetRobotPartLogsResponse; +}; + +type AppServiceTailRobotPartLogs = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: true; + readonly requestType: typeof app_v1_app_pb.TailRobotPartLogsRequest; + readonly responseType: typeof app_v1_app_pb.TailRobotPartLogsResponse; +}; + +type AppServiceGetRobotPartHistory = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.GetRobotPartHistoryRequest; + readonly responseType: typeof app_v1_app_pb.GetRobotPartHistoryResponse; +}; + +type AppServiceUpdateRobotPart = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.UpdateRobotPartRequest; + readonly responseType: typeof app_v1_app_pb.UpdateRobotPartResponse; +}; + +type AppServiceNewRobotPart = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.NewRobotPartRequest; + readonly responseType: typeof app_v1_app_pb.NewRobotPartResponse; +}; + +type AppServiceDeleteRobotPart = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.DeleteRobotPartRequest; + readonly responseType: typeof app_v1_app_pb.DeleteRobotPartResponse; +}; + +type AppServiceMarkPartAsMain = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.MarkPartAsMainRequest; + readonly responseType: typeof app_v1_app_pb.MarkPartAsMainResponse; +}; + +type AppServiceFindRobots = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.FindRobotsRequest; + readonly responseType: typeof app_v1_app_pb.FindRobotsResponse; +}; + +type AppServiceNewRobot = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.NewRobotRequest; + readonly responseType: typeof app_v1_app_pb.NewRobotResponse; +}; + +type AppServiceUpdateRobot = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.UpdateRobotRequest; + readonly responseType: typeof app_v1_app_pb.UpdateRobotResponse; +}; + +type AppServiceDeleteRobot = { + readonly methodName: string; + readonly service: typeof AppService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_app_pb.DeleteRobotRequest; + readonly responseType: typeof app_v1_app_pb.DeleteRobotResponse; +}; + +export class AppService { + static readonly serviceName: string; + static readonly ListOrganizations: AppServiceListOrganizations; + static readonly ListLocations: AppServiceListLocations; + static readonly LocationAuth: AppServiceLocationAuth; + static readonly GetRobot: AppServiceGetRobot; + static readonly GetRobotParts: AppServiceGetRobotParts; + static readonly GetRobotPart: AppServiceGetRobotPart; + static readonly GetRobotPartLogs: AppServiceGetRobotPartLogs; + static readonly TailRobotPartLogs: AppServiceTailRobotPartLogs; + static readonly GetRobotPartHistory: AppServiceGetRobotPartHistory; + static readonly UpdateRobotPart: AppServiceUpdateRobotPart; + static readonly NewRobotPart: AppServiceNewRobotPart; + static readonly DeleteRobotPart: AppServiceDeleteRobotPart; + static readonly MarkPartAsMain: AppServiceMarkPartAsMain; + static readonly FindRobots: AppServiceFindRobots; + static readonly NewRobot: AppServiceNewRobot; + static readonly UpdateRobot: AppServiceUpdateRobot; + static readonly DeleteRobot: AppServiceDeleteRobot; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class AppServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + listOrganizations( + requestMessage: app_v1_app_pb.ListOrganizationsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.ListOrganizationsResponse|null) => void + ): UnaryResponse; + listOrganizations( + requestMessage: app_v1_app_pb.ListOrganizationsRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.ListOrganizationsResponse|null) => void + ): UnaryResponse; + listLocations( + requestMessage: app_v1_app_pb.ListLocationsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.ListLocationsResponse|null) => void + ): UnaryResponse; + listLocations( + requestMessage: app_v1_app_pb.ListLocationsRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.ListLocationsResponse|null) => void + ): UnaryResponse; + locationAuth( + requestMessage: app_v1_app_pb.LocationAuthRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.LocationAuthResponse|null) => void + ): UnaryResponse; + locationAuth( + requestMessage: app_v1_app_pb.LocationAuthRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.LocationAuthResponse|null) => void + ): UnaryResponse; + getRobot( + requestMessage: app_v1_app_pb.GetRobotRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotResponse|null) => void + ): UnaryResponse; + getRobot( + requestMessage: app_v1_app_pb.GetRobotRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotResponse|null) => void + ): UnaryResponse; + getRobotParts( + requestMessage: app_v1_app_pb.GetRobotPartsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotPartsResponse|null) => void + ): UnaryResponse; + getRobotParts( + requestMessage: app_v1_app_pb.GetRobotPartsRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotPartsResponse|null) => void + ): UnaryResponse; + getRobotPart( + requestMessage: app_v1_app_pb.GetRobotPartRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotPartResponse|null) => void + ): UnaryResponse; + getRobotPart( + requestMessage: app_v1_app_pb.GetRobotPartRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotPartResponse|null) => void + ): UnaryResponse; + getRobotPartLogs( + requestMessage: app_v1_app_pb.GetRobotPartLogsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotPartLogsResponse|null) => void + ): UnaryResponse; + getRobotPartLogs( + requestMessage: app_v1_app_pb.GetRobotPartLogsRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotPartLogsResponse|null) => void + ): UnaryResponse; + tailRobotPartLogs(requestMessage: app_v1_app_pb.TailRobotPartLogsRequest, metadata?: grpc.Metadata): ResponseStream; + getRobotPartHistory( + requestMessage: app_v1_app_pb.GetRobotPartHistoryRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotPartHistoryResponse|null) => void + ): UnaryResponse; + getRobotPartHistory( + requestMessage: app_v1_app_pb.GetRobotPartHistoryRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.GetRobotPartHistoryResponse|null) => void + ): UnaryResponse; + updateRobotPart( + requestMessage: app_v1_app_pb.UpdateRobotPartRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.UpdateRobotPartResponse|null) => void + ): UnaryResponse; + updateRobotPart( + requestMessage: app_v1_app_pb.UpdateRobotPartRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.UpdateRobotPartResponse|null) => void + ): UnaryResponse; + newRobotPart( + requestMessage: app_v1_app_pb.NewRobotPartRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.NewRobotPartResponse|null) => void + ): UnaryResponse; + newRobotPart( + requestMessage: app_v1_app_pb.NewRobotPartRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.NewRobotPartResponse|null) => void + ): UnaryResponse; + deleteRobotPart( + requestMessage: app_v1_app_pb.DeleteRobotPartRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.DeleteRobotPartResponse|null) => void + ): UnaryResponse; + deleteRobotPart( + requestMessage: app_v1_app_pb.DeleteRobotPartRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.DeleteRobotPartResponse|null) => void + ): UnaryResponse; + markPartAsMain( + requestMessage: app_v1_app_pb.MarkPartAsMainRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.MarkPartAsMainResponse|null) => void + ): UnaryResponse; + markPartAsMain( + requestMessage: app_v1_app_pb.MarkPartAsMainRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.MarkPartAsMainResponse|null) => void + ): UnaryResponse; + findRobots( + requestMessage: app_v1_app_pb.FindRobotsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.FindRobotsResponse|null) => void + ): UnaryResponse; + findRobots( + requestMessage: app_v1_app_pb.FindRobotsRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.FindRobotsResponse|null) => void + ): UnaryResponse; + newRobot( + requestMessage: app_v1_app_pb.NewRobotRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.NewRobotResponse|null) => void + ): UnaryResponse; + newRobot( + requestMessage: app_v1_app_pb.NewRobotRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.NewRobotResponse|null) => void + ): UnaryResponse; + updateRobot( + requestMessage: app_v1_app_pb.UpdateRobotRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.UpdateRobotResponse|null) => void + ): UnaryResponse; + updateRobot( + requestMessage: app_v1_app_pb.UpdateRobotRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.UpdateRobotResponse|null) => void + ): UnaryResponse; + deleteRobot( + requestMessage: app_v1_app_pb.DeleteRobotRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.DeleteRobotResponse|null) => void + ): UnaryResponse; + deleteRobot( + requestMessage: app_v1_app_pb.DeleteRobotRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_app_pb.DeleteRobotResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/app/v1/app_pb_service.js b/gen/js/app/v1/app_pb_service.js new file mode 100644 index 000000000..de317e710 --- /dev/null +++ b/gen/js/app/v1/app_pb_service.js @@ -0,0 +1,709 @@ +// package: viam.app.v1 +// file: app/v1/app.proto + +var app_v1_app_pb = require("../../app/v1/app_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var AppService = (function () { + function AppService() {} + AppService.serviceName = "viam.app.v1.AppService"; + return AppService; +}()); + +AppService.ListOrganizations = { + methodName: "ListOrganizations", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.ListOrganizationsRequest, + responseType: app_v1_app_pb.ListOrganizationsResponse +}; + +AppService.ListLocations = { + methodName: "ListLocations", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.ListLocationsRequest, + responseType: app_v1_app_pb.ListLocationsResponse +}; + +AppService.LocationAuth = { + methodName: "LocationAuth", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.LocationAuthRequest, + responseType: app_v1_app_pb.LocationAuthResponse +}; + +AppService.GetRobot = { + methodName: "GetRobot", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.GetRobotRequest, + responseType: app_v1_app_pb.GetRobotResponse +}; + +AppService.GetRobotParts = { + methodName: "GetRobotParts", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.GetRobotPartsRequest, + responseType: app_v1_app_pb.GetRobotPartsResponse +}; + +AppService.GetRobotPart = { + methodName: "GetRobotPart", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.GetRobotPartRequest, + responseType: app_v1_app_pb.GetRobotPartResponse +}; + +AppService.GetRobotPartLogs = { + methodName: "GetRobotPartLogs", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.GetRobotPartLogsRequest, + responseType: app_v1_app_pb.GetRobotPartLogsResponse +}; + +AppService.TailRobotPartLogs = { + methodName: "TailRobotPartLogs", + service: AppService, + requestStream: false, + responseStream: true, + requestType: app_v1_app_pb.TailRobotPartLogsRequest, + responseType: app_v1_app_pb.TailRobotPartLogsResponse +}; + +AppService.GetRobotPartHistory = { + methodName: "GetRobotPartHistory", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.GetRobotPartHistoryRequest, + responseType: app_v1_app_pb.GetRobotPartHistoryResponse +}; + +AppService.UpdateRobotPart = { + methodName: "UpdateRobotPart", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.UpdateRobotPartRequest, + responseType: app_v1_app_pb.UpdateRobotPartResponse +}; + +AppService.NewRobotPart = { + methodName: "NewRobotPart", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.NewRobotPartRequest, + responseType: app_v1_app_pb.NewRobotPartResponse +}; + +AppService.DeleteRobotPart = { + methodName: "DeleteRobotPart", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.DeleteRobotPartRequest, + responseType: app_v1_app_pb.DeleteRobotPartResponse +}; + +AppService.MarkPartAsMain = { + methodName: "MarkPartAsMain", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.MarkPartAsMainRequest, + responseType: app_v1_app_pb.MarkPartAsMainResponse +}; + +AppService.FindRobots = { + methodName: "FindRobots", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.FindRobotsRequest, + responseType: app_v1_app_pb.FindRobotsResponse +}; + +AppService.NewRobot = { + methodName: "NewRobot", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.NewRobotRequest, + responseType: app_v1_app_pb.NewRobotResponse +}; + +AppService.UpdateRobot = { + methodName: "UpdateRobot", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.UpdateRobotRequest, + responseType: app_v1_app_pb.UpdateRobotResponse +}; + +AppService.DeleteRobot = { + methodName: "DeleteRobot", + service: AppService, + requestStream: false, + responseStream: false, + requestType: app_v1_app_pb.DeleteRobotRequest, + responseType: app_v1_app_pb.DeleteRobotResponse +}; + +exports.AppService = AppService; + +function AppServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +AppServiceClient.prototype.listOrganizations = function listOrganizations(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.ListOrganizations, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.listLocations = function listLocations(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.ListLocations, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.locationAuth = function locationAuth(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.LocationAuth, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.getRobot = function getRobot(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.GetRobot, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.getRobotParts = function getRobotParts(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.GetRobotParts, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.getRobotPart = function getRobotPart(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.GetRobotPart, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.getRobotPartLogs = function getRobotPartLogs(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.GetRobotPartLogs, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.tailRobotPartLogs = function tailRobotPartLogs(requestMessage, metadata) { + var listeners = { + data: [], + end: [], + status: [] + }; + var client = grpc.invoke(AppService.TailRobotPartLogs, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onMessage: function (responseMessage) { + listeners.data.forEach(function (handler) { + handler(responseMessage); + }); + }, + onEnd: function (status, statusMessage, trailers) { + listeners.status.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners.end.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners = null; + } + }); + return { + on: function (type, handler) { + listeners[type].push(handler); + return this; + }, + cancel: function () { + listeners = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.getRobotPartHistory = function getRobotPartHistory(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.GetRobotPartHistory, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.updateRobotPart = function updateRobotPart(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.UpdateRobotPart, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.newRobotPart = function newRobotPart(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.NewRobotPart, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.deleteRobotPart = function deleteRobotPart(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.DeleteRobotPart, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.markPartAsMain = function markPartAsMain(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.MarkPartAsMain, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.findRobots = function findRobots(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.FindRobots, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.newRobot = function newRobot(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.NewRobot, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.updateRobot = function updateRobot(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.UpdateRobot, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AppServiceClient.prototype.deleteRobot = function deleteRobot(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AppService.DeleteRobot, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.AppServiceClient = AppServiceClient; + diff --git a/gen/js/app/v1/robot_grpc_web_pb.js b/gen/js/app/v1/robot_grpc_web_pb.js new file mode 100644 index 000000000..b7225c28f --- /dev/null +++ b/gen/js/app/v1/robot_grpc_web_pb.js @@ -0,0 +1,328 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.app.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var app_v1_app_pb = require('../../app/v1/app_pb.js') + +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') + +var tagger_v1_tagger_pb = require('../../tagger/v1/tagger_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.app = {}; +proto.viam.app.v1 = require('./robot_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.v1.RobotServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.app.v1.RobotServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.ConfigRequest, + * !proto.viam.app.v1.ConfigResponse>} + */ +const methodDescriptor_RobotService_Config = new grpc.web.MethodDescriptor( + '/viam.app.v1.RobotService/Config', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.ConfigRequest, + proto.viam.app.v1.ConfigResponse, + /** + * @param {!proto.viam.app.v1.ConfigRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.ConfigResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.ConfigRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.ConfigResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.RobotServiceClient.prototype.config = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.RobotService/Config', + request, + metadata || {}, + methodDescriptor_RobotService_Config, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.ConfigRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.RobotServicePromiseClient.prototype.config = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.RobotService/Config', + request, + metadata || {}, + methodDescriptor_RobotService_Config); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.CertificateRequest, + * !proto.viam.app.v1.CertificateResponse>} + */ +const methodDescriptor_RobotService_Certificate = new grpc.web.MethodDescriptor( + '/viam.app.v1.RobotService/Certificate', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.CertificateRequest, + proto.viam.app.v1.CertificateResponse, + /** + * @param {!proto.viam.app.v1.CertificateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.CertificateResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.CertificateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.CertificateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.RobotServiceClient.prototype.certificate = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.RobotService/Certificate', + request, + metadata || {}, + methodDescriptor_RobotService_Certificate, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.CertificateRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.RobotServicePromiseClient.prototype.certificate = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.RobotService/Certificate', + request, + metadata || {}, + methodDescriptor_RobotService_Certificate); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.LogRequest, + * !proto.viam.app.v1.LogResponse>} + */ +const methodDescriptor_RobotService_Log = new grpc.web.MethodDescriptor( + '/viam.app.v1.RobotService/Log', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.LogRequest, + proto.viam.app.v1.LogResponse, + /** + * @param {!proto.viam.app.v1.LogRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.LogResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.LogRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.LogResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.RobotServiceClient.prototype.log = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.RobotService/Log', + request, + metadata || {}, + methodDescriptor_RobotService_Log, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.LogRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.RobotServicePromiseClient.prototype.log = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.RobotService/Log', + request, + metadata || {}, + methodDescriptor_RobotService_Log); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.app.v1.NeedsRestartRequest, + * !proto.viam.app.v1.NeedsRestartResponse>} + */ +const methodDescriptor_RobotService_NeedsRestart = new grpc.web.MethodDescriptor( + '/viam.app.v1.RobotService/NeedsRestart', + grpc.web.MethodType.UNARY, + proto.viam.app.v1.NeedsRestartRequest, + proto.viam.app.v1.NeedsRestartResponse, + /** + * @param {!proto.viam.app.v1.NeedsRestartRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.app.v1.NeedsRestartResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.app.v1.NeedsRestartRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.app.v1.NeedsRestartResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.app.v1.RobotServiceClient.prototype.needsRestart = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.app.v1.RobotService/NeedsRestart', + request, + metadata || {}, + methodDescriptor_RobotService_NeedsRestart, + callback); +}; + + +/** + * @param {!proto.viam.app.v1.NeedsRestartRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.app.v1.RobotServicePromiseClient.prototype.needsRestart = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.app.v1.RobotService/NeedsRestart', + request, + metadata || {}, + methodDescriptor_RobotService_NeedsRestart); +}; + + +module.exports = proto.viam.app.v1; + diff --git a/gen/js/app/v1/robot_pb.d.ts b/gen/js/app/v1/robot_pb.d.ts new file mode 100644 index 000000000..b2de64a6e --- /dev/null +++ b/gen/js/app/v1/robot_pb.d.ts @@ -0,0 +1,1012 @@ +// package: viam.app.v1 +// file: app/v1/robot.proto + +import * as jspb from "google-protobuf"; +import * as app_v1_app_pb from "../../app/v1/app_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; +import * as tagger_v1_tagger_pb from "../../tagger/v1/tagger_pb"; + +export class RobotConfig extends jspb.Message { + hasCloud(): boolean; + clearCloud(): void; + getCloud(): CloudConfig | undefined; + setCloud(value?: CloudConfig): void; + + clearRemotesList(): void; + getRemotesList(): Array; + setRemotesList(value: Array): void; + addRemotes(value?: RemoteConfig, index?: number): RemoteConfig; + + clearComponentsList(): void; + getComponentsList(): Array; + setComponentsList(value: Array): void; + addComponents(value?: ComponentConfig, index?: number): ComponentConfig; + + clearProcessesList(): void; + getProcessesList(): Array; + setProcessesList(value: Array): void; + addProcesses(value?: ProcessConfig, index?: number): ProcessConfig; + + clearServicesList(): void; + getServicesList(): Array; + setServicesList(value: Array): void; + addServices(value?: ServiceConfig, index?: number): ServiceConfig; + + hasNetwork(): boolean; + clearNetwork(): void; + getNetwork(): NetworkConfig | undefined; + setNetwork(value?: NetworkConfig): void; + + hasAuth(): boolean; + clearAuth(): void; + getAuth(): AuthConfig | undefined; + setAuth(value?: AuthConfig): void; + + hasDebug(): boolean; + clearDebug(): void; + getDebug(): boolean; + setDebug(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RobotConfig.AsObject; + static toObject(includeInstance: boolean, msg: RobotConfig): RobotConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RobotConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RobotConfig; + static deserializeBinaryFromReader(message: RobotConfig, reader: jspb.BinaryReader): RobotConfig; +} + +export namespace RobotConfig { + export type AsObject = { + cloud?: CloudConfig.AsObject, + remotesList: Array, + componentsList: Array, + processesList: Array, + servicesList: Array, + network?: NetworkConfig.AsObject, + auth?: AuthConfig.AsObject, + debug: boolean, + } +} + +export class CloudConfig extends jspb.Message { + getId(): string; + setId(value: string): void; + + getFqdn(): string; + setFqdn(value: string): void; + + getLocalFqdn(): string; + setLocalFqdn(value: string): void; + + getManagedBy(): string; + setManagedBy(value: string): void; + + getSignalingAddress(): string; + setSignalingAddress(value: string): void; + + getSignalingInsecure(): boolean; + setSignalingInsecure(value: boolean): void; + + getLocationSecret(): string; + setLocationSecret(value: string): void; + + getSecret(): string; + setSecret(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CloudConfig.AsObject; + static toObject(includeInstance: boolean, msg: CloudConfig): CloudConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CloudConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CloudConfig; + static deserializeBinaryFromReader(message: CloudConfig, reader: jspb.BinaryReader): CloudConfig; +} + +export namespace CloudConfig { + export type AsObject = { + id: string, + fqdn: string, + localFqdn: string, + managedBy: string, + signalingAddress: string, + signalingInsecure: boolean, + locationSecret: string, + secret: string, + } +} + +export class ComponentConfig extends jspb.Message { + getName(): string; + setName(value: string): void; + + getNamespace(): string; + setNamespace(value: string): void; + + getType(): string; + setType(value: string): void; + + getModel(): string; + setModel(value: string): void; + + hasFrame(): boolean; + clearFrame(): void; + getFrame(): Frame | undefined; + setFrame(value?: Frame): void; + + clearDependsOnList(): void; + getDependsOnList(): Array; + setDependsOnList(value: Array): void; + addDependsOn(value: string, index?: number): string; + + clearServiceConfigsList(): void; + getServiceConfigsList(): Array; + setServiceConfigsList(value: Array): void; + addServiceConfigs(value?: ResourceLevelServiceConfig, index?: number): ResourceLevelServiceConfig; + + hasAttributes(): boolean; + clearAttributes(): void; + getAttributes(): google_protobuf_struct_pb.Struct | undefined; + setAttributes(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ComponentConfig.AsObject; + static toObject(includeInstance: boolean, msg: ComponentConfig): ComponentConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ComponentConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ComponentConfig; + static deserializeBinaryFromReader(message: ComponentConfig, reader: jspb.BinaryReader): ComponentConfig; +} + +export namespace ComponentConfig { + export type AsObject = { + name: string, + namespace: string, + type: string, + model: string, + frame?: Frame.AsObject, + dependsOnList: Array, + serviceConfigsList: Array, + attributes?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class ResourceLevelServiceConfig extends jspb.Message { + getType(): string; + setType(value: string): void; + + hasAttributes(): boolean; + clearAttributes(): void; + getAttributes(): google_protobuf_struct_pb.Struct | undefined; + setAttributes(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceLevelServiceConfig.AsObject; + static toObject(includeInstance: boolean, msg: ResourceLevelServiceConfig): ResourceLevelServiceConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceLevelServiceConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceLevelServiceConfig; + static deserializeBinaryFromReader(message: ResourceLevelServiceConfig, reader: jspb.BinaryReader): ResourceLevelServiceConfig; +} + +export namespace ResourceLevelServiceConfig { + export type AsObject = { + type: string, + attributes?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class ProcessConfig extends jspb.Message { + getId(): string; + setId(value: string): void; + + getName(): string; + setName(value: string): void; + + clearArgsList(): void; + getArgsList(): Array; + setArgsList(value: Array): void; + addArgs(value: string, index?: number): string; + + getCwd(): string; + setCwd(value: string): void; + + getOneShot(): boolean; + setOneShot(value: boolean): void; + + getLog(): boolean; + setLog(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProcessConfig.AsObject; + static toObject(includeInstance: boolean, msg: ProcessConfig): ProcessConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProcessConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProcessConfig; + static deserializeBinaryFromReader(message: ProcessConfig, reader: jspb.BinaryReader): ProcessConfig; +} + +export namespace ProcessConfig { + export type AsObject = { + id: string, + name: string, + argsList: Array, + cwd: string, + oneShot: boolean, + log: boolean, + } +} + +export class ServiceConfig extends jspb.Message { + getName(): string; + setName(value: string): void; + + getNamespace(): string; + setNamespace(value: string): void; + + getType(): string; + setType(value: string): void; + + hasAttributes(): boolean; + clearAttributes(): void; + getAttributes(): google_protobuf_struct_pb.Struct | undefined; + setAttributes(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceConfig.AsObject; + static toObject(includeInstance: boolean, msg: ServiceConfig): ServiceConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceConfig; + static deserializeBinaryFromReader(message: ServiceConfig, reader: jspb.BinaryReader): ServiceConfig; +} + +export namespace ServiceConfig { + export type AsObject = { + name: string, + namespace: string, + type: string, + attributes?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class NetworkConfig extends jspb.Message { + getFqdn(): string; + setFqdn(value: string): void; + + getBindAddress(): string; + setBindAddress(value: string): void; + + getTlsCertFile(): string; + setTlsCertFile(value: string): void; + + getTlsKeyFile(): string; + setTlsKeyFile(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NetworkConfig.AsObject; + static toObject(includeInstance: boolean, msg: NetworkConfig): NetworkConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NetworkConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NetworkConfig; + static deserializeBinaryFromReader(message: NetworkConfig, reader: jspb.BinaryReader): NetworkConfig; +} + +export namespace NetworkConfig { + export type AsObject = { + fqdn: string, + bindAddress: string, + tlsCertFile: string, + tlsKeyFile: string, + } +} + +export class AuthConfig extends jspb.Message { + clearHandlersList(): void; + getHandlersList(): Array; + setHandlersList(value: Array): void; + addHandlers(value?: AuthHandlerConfig, index?: number): AuthHandlerConfig; + + clearTlsAuthEntitiesList(): void; + getTlsAuthEntitiesList(): Array; + setTlsAuthEntitiesList(value: Array): void; + addTlsAuthEntities(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AuthConfig.AsObject; + static toObject(includeInstance: boolean, msg: AuthConfig): AuthConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AuthConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AuthConfig; + static deserializeBinaryFromReader(message: AuthConfig, reader: jspb.BinaryReader): AuthConfig; +} + +export namespace AuthConfig { + export type AsObject = { + handlersList: Array, + tlsAuthEntitiesList: Array, + } +} + +export class AuthHandlerConfig extends jspb.Message { + getType(): CredentialsTypeMap[keyof CredentialsTypeMap]; + setType(value: CredentialsTypeMap[keyof CredentialsTypeMap]): void; + + hasConfig(): boolean; + clearConfig(): void; + getConfig(): google_protobuf_struct_pb.Struct | undefined; + setConfig(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AuthHandlerConfig.AsObject; + static toObject(includeInstance: boolean, msg: AuthHandlerConfig): AuthHandlerConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AuthHandlerConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AuthHandlerConfig; + static deserializeBinaryFromReader(message: AuthHandlerConfig, reader: jspb.BinaryReader): AuthHandlerConfig; +} + +export namespace AuthHandlerConfig { + export type AsObject = { + type: CredentialsTypeMap[keyof CredentialsTypeMap], + config?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class Frame extends jspb.Message { + getParent(): string; + setParent(value: string): void; + + hasTranslation(): boolean; + clearTranslation(): void; + getTranslation(): Translation | undefined; + setTranslation(value?: Translation): void; + + hasOrientation(): boolean; + clearOrientation(): void; + getOrientation(): Orientation | undefined; + setOrientation(value?: Orientation): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Frame.AsObject; + static toObject(includeInstance: boolean, msg: Frame): Frame.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Frame, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Frame; + static deserializeBinaryFromReader(message: Frame, reader: jspb.BinaryReader): Frame; +} + +export namespace Frame { + export type AsObject = { + parent: string, + translation?: Translation.AsObject, + orientation?: Orientation.AsObject, + } +} + +export class Translation extends jspb.Message { + getX(): number; + setX(value: number): void; + + getY(): number; + setY(value: number): void; + + getZ(): number; + setZ(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Translation.AsObject; + static toObject(includeInstance: boolean, msg: Translation): Translation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Translation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Translation; + static deserializeBinaryFromReader(message: Translation, reader: jspb.BinaryReader): Translation; +} + +export namespace Translation { + export type AsObject = { + x: number, + y: number, + z: number, + } +} + +export class Orientation extends jspb.Message { + hasNoOrientation(): boolean; + clearNoOrientation(): void; + getNoOrientation(): Orientation.NoOrientation | undefined; + setNoOrientation(value?: Orientation.NoOrientation): void; + + hasVectorRadians(): boolean; + clearVectorRadians(): void; + getVectorRadians(): Orientation.OrientationVectorRadians | undefined; + setVectorRadians(value?: Orientation.OrientationVectorRadians): void; + + hasVectorDegrees(): boolean; + clearVectorDegrees(): void; + getVectorDegrees(): Orientation.OrientationVectorDegrees | undefined; + setVectorDegrees(value?: Orientation.OrientationVectorDegrees): void; + + hasEulerAngles(): boolean; + clearEulerAngles(): void; + getEulerAngles(): Orientation.EulerAngles | undefined; + setEulerAngles(value?: Orientation.EulerAngles): void; + + hasAxisAngles(): boolean; + clearAxisAngles(): void; + getAxisAngles(): Orientation.AxisAngles | undefined; + setAxisAngles(value?: Orientation.AxisAngles): void; + + hasQuaternion(): boolean; + clearQuaternion(): void; + getQuaternion(): Orientation.Quaternion | undefined; + setQuaternion(value?: Orientation.Quaternion): void; + + getTypeCase(): Orientation.TypeCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Orientation.AsObject; + static toObject(includeInstance: boolean, msg: Orientation): Orientation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Orientation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Orientation; + static deserializeBinaryFromReader(message: Orientation, reader: jspb.BinaryReader): Orientation; +} + +export namespace Orientation { + export type AsObject = { + noOrientation?: Orientation.NoOrientation.AsObject, + vectorRadians?: Orientation.OrientationVectorRadians.AsObject, + vectorDegrees?: Orientation.OrientationVectorDegrees.AsObject, + eulerAngles?: Orientation.EulerAngles.AsObject, + axisAngles?: Orientation.AxisAngles.AsObject, + quaternion?: Orientation.Quaternion.AsObject, + } + + export class NoOrientation extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NoOrientation.AsObject; + static toObject(includeInstance: boolean, msg: NoOrientation): NoOrientation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NoOrientation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NoOrientation; + static deserializeBinaryFromReader(message: NoOrientation, reader: jspb.BinaryReader): NoOrientation; + } + + export namespace NoOrientation { + export type AsObject = { + } + } + + export class OrientationVectorRadians extends jspb.Message { + getTheta(): number; + setTheta(value: number): void; + + getX(): number; + setX(value: number): void; + + getY(): number; + setY(value: number): void; + + getZ(): number; + setZ(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OrientationVectorRadians.AsObject; + static toObject(includeInstance: boolean, msg: OrientationVectorRadians): OrientationVectorRadians.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OrientationVectorRadians, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OrientationVectorRadians; + static deserializeBinaryFromReader(message: OrientationVectorRadians, reader: jspb.BinaryReader): OrientationVectorRadians; + } + + export namespace OrientationVectorRadians { + export type AsObject = { + theta: number, + x: number, + y: number, + z: number, + } + } + + export class OrientationVectorDegrees extends jspb.Message { + getTheta(): number; + setTheta(value: number): void; + + getX(): number; + setX(value: number): void; + + getY(): number; + setY(value: number): void; + + getZ(): number; + setZ(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OrientationVectorDegrees.AsObject; + static toObject(includeInstance: boolean, msg: OrientationVectorDegrees): OrientationVectorDegrees.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OrientationVectorDegrees, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OrientationVectorDegrees; + static deserializeBinaryFromReader(message: OrientationVectorDegrees, reader: jspb.BinaryReader): OrientationVectorDegrees; + } + + export namespace OrientationVectorDegrees { + export type AsObject = { + theta: number, + x: number, + y: number, + z: number, + } + } + + export class EulerAngles extends jspb.Message { + getRoll(): number; + setRoll(value: number): void; + + getPitch(): number; + setPitch(value: number): void; + + getYaw(): number; + setYaw(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EulerAngles.AsObject; + static toObject(includeInstance: boolean, msg: EulerAngles): EulerAngles.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EulerAngles, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EulerAngles; + static deserializeBinaryFromReader(message: EulerAngles, reader: jspb.BinaryReader): EulerAngles; + } + + export namespace EulerAngles { + export type AsObject = { + roll: number, + pitch: number, + yaw: number, + } + } + + export class AxisAngles extends jspb.Message { + getTheta(): number; + setTheta(value: number): void; + + getX(): number; + setX(value: number): void; + + getY(): number; + setY(value: number): void; + + getZ(): number; + setZ(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AxisAngles.AsObject; + static toObject(includeInstance: boolean, msg: AxisAngles): AxisAngles.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AxisAngles, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AxisAngles; + static deserializeBinaryFromReader(message: AxisAngles, reader: jspb.BinaryReader): AxisAngles; + } + + export namespace AxisAngles { + export type AsObject = { + theta: number, + x: number, + y: number, + z: number, + } + } + + export class Quaternion extends jspb.Message { + getW(): number; + setW(value: number): void; + + getX(): number; + setX(value: number): void; + + getY(): number; + setY(value: number): void; + + getZ(): number; + setZ(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Quaternion.AsObject; + static toObject(includeInstance: boolean, msg: Quaternion): Quaternion.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Quaternion, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Quaternion; + static deserializeBinaryFromReader(message: Quaternion, reader: jspb.BinaryReader): Quaternion; + } + + export namespace Quaternion { + export type AsObject = { + w: number, + x: number, + y: number, + z: number, + } + } + + export enum TypeCase { + TYPE_NOT_SET = 0, + NO_ORIENTATION = 1, + VECTOR_RADIANS = 2, + VECTOR_DEGREES = 3, + EULER_ANGLES = 4, + AXIS_ANGLES = 5, + QUATERNION = 6, + } +} + +export class RemoteConfig extends jspb.Message { + getName(): string; + setName(value: string): void; + + getAddress(): string; + setAddress(value: string): void; + + hasFrame(): boolean; + clearFrame(): void; + getFrame(): Frame | undefined; + setFrame(value?: Frame): void; + + hasAuth(): boolean; + clearAuth(): void; + getAuth(): RemoteAuth | undefined; + setAuth(value?: RemoteAuth): void; + + getManagedBy(): string; + setManagedBy(value: string): void; + + getInsecure(): boolean; + setInsecure(value: boolean): void; + + hasConnectionCheckInterval(): boolean; + clearConnectionCheckInterval(): void; + getConnectionCheckInterval(): google_protobuf_duration_pb.Duration | undefined; + setConnectionCheckInterval(value?: google_protobuf_duration_pb.Duration): void; + + hasReconnectInterval(): boolean; + clearReconnectInterval(): void; + getReconnectInterval(): google_protobuf_duration_pb.Duration | undefined; + setReconnectInterval(value?: google_protobuf_duration_pb.Duration): void; + + clearServiceConfigsList(): void; + getServiceConfigsList(): Array; + setServiceConfigsList(value: Array): void; + addServiceConfigs(value?: ResourceLevelServiceConfig, index?: number): ResourceLevelServiceConfig; + + getSecret(): string; + setSecret(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoteConfig.AsObject; + static toObject(includeInstance: boolean, msg: RemoteConfig): RemoteConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoteConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoteConfig; + static deserializeBinaryFromReader(message: RemoteConfig, reader: jspb.BinaryReader): RemoteConfig; +} + +export namespace RemoteConfig { + export type AsObject = { + name: string, + address: string, + frame?: Frame.AsObject, + auth?: RemoteAuth.AsObject, + managedBy: string, + insecure: boolean, + connectionCheckInterval?: google_protobuf_duration_pb.Duration.AsObject, + reconnectInterval?: google_protobuf_duration_pb.Duration.AsObject, + serviceConfigsList: Array, + secret: string, + } +} + +export class RemoteAuth extends jspb.Message { + hasCredentials(): boolean; + clearCredentials(): void; + getCredentials(): RemoteAuth.Credentials | undefined; + setCredentials(value?: RemoteAuth.Credentials): void; + + getEntity(): string; + setEntity(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoteAuth.AsObject; + static toObject(includeInstance: boolean, msg: RemoteAuth): RemoteAuth.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoteAuth, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoteAuth; + static deserializeBinaryFromReader(message: RemoteAuth, reader: jspb.BinaryReader): RemoteAuth; +} + +export namespace RemoteAuth { + export type AsObject = { + credentials?: RemoteAuth.Credentials.AsObject, + entity: string, + } + + export class Credentials extends jspb.Message { + getType(): CredentialsTypeMap[keyof CredentialsTypeMap]; + setType(value: CredentialsTypeMap[keyof CredentialsTypeMap]): void; + + getPayload(): string; + setPayload(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Credentials.AsObject; + static toObject(includeInstance: boolean, msg: Credentials): Credentials.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Credentials, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Credentials; + static deserializeBinaryFromReader(message: Credentials, reader: jspb.BinaryReader): Credentials; + } + + export namespace Credentials { + export type AsObject = { + type: CredentialsTypeMap[keyof CredentialsTypeMap], + payload: string, + } + } +} + +export class AgentInfo extends jspb.Message { + getHost(): string; + setHost(value: string): void; + + getOs(): string; + setOs(value: string): void; + + clearIpsList(): void; + getIpsList(): Array; + setIpsList(value: Array): void; + addIps(value: string, index?: number): string; + + getVersion(): string; + setVersion(value: string): void; + + getGitRevision(): string; + setGitRevision(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AgentInfo.AsObject; + static toObject(includeInstance: boolean, msg: AgentInfo): AgentInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AgentInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AgentInfo; + static deserializeBinaryFromReader(message: AgentInfo, reader: jspb.BinaryReader): AgentInfo; +} + +export namespace AgentInfo { + export type AsObject = { + host: string, + os: string, + ipsList: Array, + version: string, + gitRevision: string, + } +} + +export class ConfigRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + hasAgentInfo(): boolean; + clearAgentInfo(): void; + getAgentInfo(): AgentInfo | undefined; + setAgentInfo(value?: AgentInfo): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConfigRequest.AsObject; + static toObject(includeInstance: boolean, msg: ConfigRequest): ConfigRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConfigRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConfigRequest; + static deserializeBinaryFromReader(message: ConfigRequest, reader: jspb.BinaryReader): ConfigRequest; +} + +export namespace ConfigRequest { + export type AsObject = { + id: string, + agentInfo?: AgentInfo.AsObject, + } +} + +export class ConfigResponse extends jspb.Message { + hasConfig(): boolean; + clearConfig(): void; + getConfig(): RobotConfig | undefined; + setConfig(value?: RobotConfig): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConfigResponse.AsObject; + static toObject(includeInstance: boolean, msg: ConfigResponse): ConfigResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConfigResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConfigResponse; + static deserializeBinaryFromReader(message: ConfigResponse, reader: jspb.BinaryReader): ConfigResponse; +} + +export namespace ConfigResponse { + export type AsObject = { + config?: RobotConfig.AsObject, + } +} + +export class CertificateRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CertificateRequest.AsObject; + static toObject(includeInstance: boolean, msg: CertificateRequest): CertificateRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CertificateRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CertificateRequest; + static deserializeBinaryFromReader(message: CertificateRequest, reader: jspb.BinaryReader): CertificateRequest; +} + +export namespace CertificateRequest { + export type AsObject = { + id: string, + } +} + +export class CertificateResponse extends jspb.Message { + getId(): string; + setId(value: string): void; + + getTlsCertificate(): string; + setTlsCertificate(value: string): void; + + getTlsPrivateKey(): string; + setTlsPrivateKey(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CertificateResponse.AsObject; + static toObject(includeInstance: boolean, msg: CertificateResponse): CertificateResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CertificateResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CertificateResponse; + static deserializeBinaryFromReader(message: CertificateResponse, reader: jspb.BinaryReader): CertificateResponse; +} + +export namespace CertificateResponse { + export type AsObject = { + id: string, + tlsCertificate: string, + tlsPrivateKey: string, + } +} + +export class LogRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + clearLogsList(): void; + getLogsList(): Array; + setLogsList(value: Array): void; + addLogs(value?: app_v1_app_pb.LogEntry, index?: number): app_v1_app_pb.LogEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogRequest.AsObject; + static toObject(includeInstance: boolean, msg: LogRequest): LogRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LogRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogRequest; + static deserializeBinaryFromReader(message: LogRequest, reader: jspb.BinaryReader): LogRequest; +} + +export namespace LogRequest { + export type AsObject = { + id: string, + logsList: Array, + } +} + +export class LogResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LogResponse.AsObject; + static toObject(includeInstance: boolean, msg: LogResponse): LogResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LogResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LogResponse; + static deserializeBinaryFromReader(message: LogResponse, reader: jspb.BinaryReader): LogResponse; +} + +export namespace LogResponse { + export type AsObject = { + } +} + +export class NeedsRestartRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NeedsRestartRequest.AsObject; + static toObject(includeInstance: boolean, msg: NeedsRestartRequest): NeedsRestartRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NeedsRestartRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NeedsRestartRequest; + static deserializeBinaryFromReader(message: NeedsRestartRequest, reader: jspb.BinaryReader): NeedsRestartRequest; +} + +export namespace NeedsRestartRequest { + export type AsObject = { + id: string, + } +} + +export class NeedsRestartResponse extends jspb.Message { + getId(): string; + setId(value: string): void; + + getMustRestart(): boolean; + setMustRestart(value: boolean): void; + + hasRestartCheckInterval(): boolean; + clearRestartCheckInterval(): void; + getRestartCheckInterval(): google_protobuf_duration_pb.Duration | undefined; + setRestartCheckInterval(value?: google_protobuf_duration_pb.Duration): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NeedsRestartResponse.AsObject; + static toObject(includeInstance: boolean, msg: NeedsRestartResponse): NeedsRestartResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NeedsRestartResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NeedsRestartResponse; + static deserializeBinaryFromReader(message: NeedsRestartResponse, reader: jspb.BinaryReader): NeedsRestartResponse; +} + +export namespace NeedsRestartResponse { + export type AsObject = { + id: string, + mustRestart: boolean, + restartCheckInterval?: google_protobuf_duration_pb.Duration.AsObject, + } +} + +export interface CredentialsTypeMap { + CREDENTIALS_TYPE_UNSPECIFIED: 0; + CREDENTIALS_TYPE_INTERNAL: 1; + CREDENTIALS_TYPE_API_KEY: 2; + CREDENTIALS_TYPE_ROBOT_SECRET: 3; + CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET: 4; +} + +export const CredentialsType: CredentialsTypeMap; + diff --git a/gen/js/app/v1/robot_pb.js b/gen/js/app/v1/robot_pb.js new file mode 100644 index 000000000..477b64ca5 --- /dev/null +++ b/gen/js/app/v1/robot_pb.js @@ -0,0 +1,7772 @@ +// source: app/v1/robot.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var app_v1_app_pb = require('../../app/v1/app_pb.js'); +goog.object.extend(proto, app_v1_app_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +var tagger_v1_tagger_pb = require('../../tagger/v1/tagger_pb.js'); +goog.object.extend(proto, tagger_v1_tagger_pb); +goog.exportSymbol('proto.viam.app.v1.AgentInfo', null, global); +goog.exportSymbol('proto.viam.app.v1.AuthConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.AuthHandlerConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.CertificateRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.CertificateResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.CloudConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.ComponentConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.ConfigRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.ConfigResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.CredentialsType', null, global); +goog.exportSymbol('proto.viam.app.v1.Frame', null, global); +goog.exportSymbol('proto.viam.app.v1.LogRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.LogResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.NeedsRestartRequest', null, global); +goog.exportSymbol('proto.viam.app.v1.NeedsRestartResponse', null, global); +goog.exportSymbol('proto.viam.app.v1.NetworkConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.Orientation', null, global); +goog.exportSymbol('proto.viam.app.v1.Orientation.AxisAngles', null, global); +goog.exportSymbol('proto.viam.app.v1.Orientation.EulerAngles', null, global); +goog.exportSymbol('proto.viam.app.v1.Orientation.NoOrientation', null, global); +goog.exportSymbol('proto.viam.app.v1.Orientation.OrientationVectorDegrees', null, global); +goog.exportSymbol('proto.viam.app.v1.Orientation.OrientationVectorRadians', null, global); +goog.exportSymbol('proto.viam.app.v1.Orientation.Quaternion', null, global); +goog.exportSymbol('proto.viam.app.v1.Orientation.TypeCase', null, global); +goog.exportSymbol('proto.viam.app.v1.ProcessConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.RemoteAuth', null, global); +goog.exportSymbol('proto.viam.app.v1.RemoteAuth.Credentials', null, global); +goog.exportSymbol('proto.viam.app.v1.RemoteConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.ResourceLevelServiceConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.RobotConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.ServiceConfig', null, global); +goog.exportSymbol('proto.viam.app.v1.Translation', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.RobotConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.RobotConfig.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.RobotConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.RobotConfig.displayName = 'proto.viam.app.v1.RobotConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.CloudConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.CloudConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.CloudConfig.displayName = 'proto.viam.app.v1.CloudConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ComponentConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.ComponentConfig.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.ComponentConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ComponentConfig.displayName = 'proto.viam.app.v1.ComponentConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ResourceLevelServiceConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.ResourceLevelServiceConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ResourceLevelServiceConfig.displayName = 'proto.viam.app.v1.ResourceLevelServiceConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ProcessConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.ProcessConfig.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.ProcessConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ProcessConfig.displayName = 'proto.viam.app.v1.ProcessConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ServiceConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.ServiceConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ServiceConfig.displayName = 'proto.viam.app.v1.ServiceConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.NetworkConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.NetworkConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.NetworkConfig.displayName = 'proto.viam.app.v1.NetworkConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.AuthConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.AuthConfig.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.AuthConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.AuthConfig.displayName = 'proto.viam.app.v1.AuthConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.AuthHandlerConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.AuthHandlerConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.AuthHandlerConfig.displayName = 'proto.viam.app.v1.AuthHandlerConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Frame = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Frame, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Frame.displayName = 'proto.viam.app.v1.Frame'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Translation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Translation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Translation.displayName = 'proto.viam.app.v1.Translation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Orientation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.viam.app.v1.Orientation.oneofGroups_); +}; +goog.inherits(proto.viam.app.v1.Orientation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Orientation.displayName = 'proto.viam.app.v1.Orientation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Orientation.NoOrientation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Orientation.NoOrientation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Orientation.NoOrientation.displayName = 'proto.viam.app.v1.Orientation.NoOrientation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Orientation.OrientationVectorRadians, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Orientation.OrientationVectorRadians.displayName = 'proto.viam.app.v1.Orientation.OrientationVectorRadians'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Orientation.OrientationVectorDegrees, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Orientation.OrientationVectorDegrees.displayName = 'proto.viam.app.v1.Orientation.OrientationVectorDegrees'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Orientation.EulerAngles = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Orientation.EulerAngles, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Orientation.EulerAngles.displayName = 'proto.viam.app.v1.Orientation.EulerAngles'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Orientation.AxisAngles = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Orientation.AxisAngles, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Orientation.AxisAngles.displayName = 'proto.viam.app.v1.Orientation.AxisAngles'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.Orientation.Quaternion = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.Orientation.Quaternion, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.Orientation.Quaternion.displayName = 'proto.viam.app.v1.Orientation.Quaternion'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.RemoteConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.RemoteConfig.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.RemoteConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.RemoteConfig.displayName = 'proto.viam.app.v1.RemoteConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.RemoteAuth = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.RemoteAuth, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.RemoteAuth.displayName = 'proto.viam.app.v1.RemoteAuth'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.RemoteAuth.Credentials = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.RemoteAuth.Credentials, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.RemoteAuth.Credentials.displayName = 'proto.viam.app.v1.RemoteAuth.Credentials'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.AgentInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.AgentInfo.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.AgentInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.AgentInfo.displayName = 'proto.viam.app.v1.AgentInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ConfigRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.ConfigRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ConfigRequest.displayName = 'proto.viam.app.v1.ConfigRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.ConfigResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.ConfigResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.ConfigResponse.displayName = 'proto.viam.app.v1.ConfigResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.CertificateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.CertificateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.CertificateRequest.displayName = 'proto.viam.app.v1.CertificateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.CertificateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.CertificateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.CertificateResponse.displayName = 'proto.viam.app.v1.CertificateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.LogRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.app.v1.LogRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.app.v1.LogRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.LogRequest.displayName = 'proto.viam.app.v1.LogRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.LogResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.LogResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.LogResponse.displayName = 'proto.viam.app.v1.LogResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.NeedsRestartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.NeedsRestartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.NeedsRestartRequest.displayName = 'proto.viam.app.v1.NeedsRestartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.app.v1.NeedsRestartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.app.v1.NeedsRestartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.app.v1.NeedsRestartResponse.displayName = 'proto.viam.app.v1.NeedsRestartResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.RobotConfig.repeatedFields_ = [2,3,4,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.RobotConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.RobotConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.RobotConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RobotConfig.toObject = function(includeInstance, msg) { + var f, obj = { + cloud: (f = msg.getCloud()) && proto.viam.app.v1.CloudConfig.toObject(includeInstance, f), + remotesList: jspb.Message.toObjectList(msg.getRemotesList(), + proto.viam.app.v1.RemoteConfig.toObject, includeInstance), + componentsList: jspb.Message.toObjectList(msg.getComponentsList(), + proto.viam.app.v1.ComponentConfig.toObject, includeInstance), + processesList: jspb.Message.toObjectList(msg.getProcessesList(), + proto.viam.app.v1.ProcessConfig.toObject, includeInstance), + servicesList: jspb.Message.toObjectList(msg.getServicesList(), + proto.viam.app.v1.ServiceConfig.toObject, includeInstance), + network: (f = msg.getNetwork()) && proto.viam.app.v1.NetworkConfig.toObject(includeInstance, f), + auth: (f = msg.getAuth()) && proto.viam.app.v1.AuthConfig.toObject(includeInstance, f), + debug: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.RobotConfig} + */ +proto.viam.app.v1.RobotConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.RobotConfig; + return proto.viam.app.v1.RobotConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.RobotConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.RobotConfig} + */ +proto.viam.app.v1.RobotConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.CloudConfig; + reader.readMessage(value,proto.viam.app.v1.CloudConfig.deserializeBinaryFromReader); + msg.setCloud(value); + break; + case 2: + var value = new proto.viam.app.v1.RemoteConfig; + reader.readMessage(value,proto.viam.app.v1.RemoteConfig.deserializeBinaryFromReader); + msg.addRemotes(value); + break; + case 3: + var value = new proto.viam.app.v1.ComponentConfig; + reader.readMessage(value,proto.viam.app.v1.ComponentConfig.deserializeBinaryFromReader); + msg.addComponents(value); + break; + case 4: + var value = new proto.viam.app.v1.ProcessConfig; + reader.readMessage(value,proto.viam.app.v1.ProcessConfig.deserializeBinaryFromReader); + msg.addProcesses(value); + break; + case 5: + var value = new proto.viam.app.v1.ServiceConfig; + reader.readMessage(value,proto.viam.app.v1.ServiceConfig.deserializeBinaryFromReader); + msg.addServices(value); + break; + case 6: + var value = new proto.viam.app.v1.NetworkConfig; + reader.readMessage(value,proto.viam.app.v1.NetworkConfig.deserializeBinaryFromReader); + msg.setNetwork(value); + break; + case 7: + var value = new proto.viam.app.v1.AuthConfig; + reader.readMessage(value,proto.viam.app.v1.AuthConfig.deserializeBinaryFromReader); + msg.setAuth(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDebug(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.RobotConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.RobotConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.RobotConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RobotConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCloud(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.v1.CloudConfig.serializeBinaryToWriter + ); + } + f = message.getRemotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.viam.app.v1.RemoteConfig.serializeBinaryToWriter + ); + } + f = message.getComponentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.viam.app.v1.ComponentConfig.serializeBinaryToWriter + ); + } + f = message.getProcessesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.viam.app.v1.ProcessConfig.serializeBinaryToWriter + ); + } + f = message.getServicesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.viam.app.v1.ServiceConfig.serializeBinaryToWriter + ); + } + f = message.getNetwork(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.viam.app.v1.NetworkConfig.serializeBinaryToWriter + ); + } + f = message.getAuth(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.viam.app.v1.AuthConfig.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional CloudConfig cloud = 1; + * @return {?proto.viam.app.v1.CloudConfig} + */ +proto.viam.app.v1.RobotConfig.prototype.getCloud = function() { + return /** @type{?proto.viam.app.v1.CloudConfig} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.CloudConfig, 1)); +}; + + +/** + * @param {?proto.viam.app.v1.CloudConfig|undefined} value + * @return {!proto.viam.app.v1.RobotConfig} returns this +*/ +proto.viam.app.v1.RobotConfig.prototype.setCloud = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RobotConfig} returns this + */ +proto.viam.app.v1.RobotConfig.prototype.clearCloud = function() { + return this.setCloud(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RobotConfig.prototype.hasCloud = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated RemoteConfig remotes = 2; + * @return {!Array} + */ +proto.viam.app.v1.RobotConfig.prototype.getRemotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.RemoteConfig, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.RobotConfig} returns this +*/ +proto.viam.app.v1.RobotConfig.prototype.setRemotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.viam.app.v1.RemoteConfig=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.RemoteConfig} + */ +proto.viam.app.v1.RobotConfig.prototype.addRemotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.viam.app.v1.RemoteConfig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.RobotConfig} returns this + */ +proto.viam.app.v1.RobotConfig.prototype.clearRemotesList = function() { + return this.setRemotesList([]); +}; + + +/** + * repeated ComponentConfig components = 3; + * @return {!Array} + */ +proto.viam.app.v1.RobotConfig.prototype.getComponentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.ComponentConfig, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.RobotConfig} returns this +*/ +proto.viam.app.v1.RobotConfig.prototype.setComponentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.viam.app.v1.ComponentConfig=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.ComponentConfig} + */ +proto.viam.app.v1.RobotConfig.prototype.addComponents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.viam.app.v1.ComponentConfig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.RobotConfig} returns this + */ +proto.viam.app.v1.RobotConfig.prototype.clearComponentsList = function() { + return this.setComponentsList([]); +}; + + +/** + * repeated ProcessConfig processes = 4; + * @return {!Array} + */ +proto.viam.app.v1.RobotConfig.prototype.getProcessesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.ProcessConfig, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.RobotConfig} returns this +*/ +proto.viam.app.v1.RobotConfig.prototype.setProcessesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.viam.app.v1.ProcessConfig=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.ProcessConfig} + */ +proto.viam.app.v1.RobotConfig.prototype.addProcesses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.viam.app.v1.ProcessConfig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.RobotConfig} returns this + */ +proto.viam.app.v1.RobotConfig.prototype.clearProcessesList = function() { + return this.setProcessesList([]); +}; + + +/** + * repeated ServiceConfig services = 5; + * @return {!Array} + */ +proto.viam.app.v1.RobotConfig.prototype.getServicesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.ServiceConfig, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.RobotConfig} returns this +*/ +proto.viam.app.v1.RobotConfig.prototype.setServicesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.viam.app.v1.ServiceConfig=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.ServiceConfig} + */ +proto.viam.app.v1.RobotConfig.prototype.addServices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.viam.app.v1.ServiceConfig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.RobotConfig} returns this + */ +proto.viam.app.v1.RobotConfig.prototype.clearServicesList = function() { + return this.setServicesList([]); +}; + + +/** + * optional NetworkConfig network = 6; + * @return {?proto.viam.app.v1.NetworkConfig} + */ +proto.viam.app.v1.RobotConfig.prototype.getNetwork = function() { + return /** @type{?proto.viam.app.v1.NetworkConfig} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.NetworkConfig, 6)); +}; + + +/** + * @param {?proto.viam.app.v1.NetworkConfig|undefined} value + * @return {!proto.viam.app.v1.RobotConfig} returns this +*/ +proto.viam.app.v1.RobotConfig.prototype.setNetwork = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RobotConfig} returns this + */ +proto.viam.app.v1.RobotConfig.prototype.clearNetwork = function() { + return this.setNetwork(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RobotConfig.prototype.hasNetwork = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional AuthConfig auth = 7; + * @return {?proto.viam.app.v1.AuthConfig} + */ +proto.viam.app.v1.RobotConfig.prototype.getAuth = function() { + return /** @type{?proto.viam.app.v1.AuthConfig} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.AuthConfig, 7)); +}; + + +/** + * @param {?proto.viam.app.v1.AuthConfig|undefined} value + * @return {!proto.viam.app.v1.RobotConfig} returns this +*/ +proto.viam.app.v1.RobotConfig.prototype.setAuth = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RobotConfig} returns this + */ +proto.viam.app.v1.RobotConfig.prototype.clearAuth = function() { + return this.setAuth(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RobotConfig.prototype.hasAuth = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bool debug = 8; + * @return {boolean} + */ +proto.viam.app.v1.RobotConfig.prototype.getDebug = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.RobotConfig} returns this + */ +proto.viam.app.v1.RobotConfig.prototype.setDebug = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.viam.app.v1.RobotConfig} returns this + */ +proto.viam.app.v1.RobotConfig.prototype.clearDebug = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RobotConfig.prototype.hasDebug = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.CloudConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.CloudConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.CloudConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.CloudConfig.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + fqdn: jspb.Message.getFieldWithDefault(msg, 2, ""), + localFqdn: jspb.Message.getFieldWithDefault(msg, 3, ""), + managedBy: jspb.Message.getFieldWithDefault(msg, 4, ""), + signalingAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + signalingInsecure: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + locationSecret: jspb.Message.getFieldWithDefault(msg, 7, ""), + secret: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.CloudConfig} + */ +proto.viam.app.v1.CloudConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.CloudConfig; + return proto.viam.app.v1.CloudConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.CloudConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.CloudConfig} + */ +proto.viam.app.v1.CloudConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFqdn(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLocalFqdn(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setManagedBy(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSignalingAddress(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSignalingInsecure(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setLocationSecret(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setSecret(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.CloudConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.CloudConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.CloudConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.CloudConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFqdn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLocalFqdn(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getManagedBy(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSignalingAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSignalingInsecure(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getLocationSecret(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getSecret(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.CloudConfig.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CloudConfig} returns this + */ +proto.viam.app.v1.CloudConfig.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string fqdn = 2; + * @return {string} + */ +proto.viam.app.v1.CloudConfig.prototype.getFqdn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CloudConfig} returns this + */ +proto.viam.app.v1.CloudConfig.prototype.setFqdn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string local_fqdn = 3; + * @return {string} + */ +proto.viam.app.v1.CloudConfig.prototype.getLocalFqdn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CloudConfig} returns this + */ +proto.viam.app.v1.CloudConfig.prototype.setLocalFqdn = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string managed_by = 4; + * @return {string} + */ +proto.viam.app.v1.CloudConfig.prototype.getManagedBy = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CloudConfig} returns this + */ +proto.viam.app.v1.CloudConfig.prototype.setManagedBy = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string signaling_address = 5; + * @return {string} + */ +proto.viam.app.v1.CloudConfig.prototype.getSignalingAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CloudConfig} returns this + */ +proto.viam.app.v1.CloudConfig.prototype.setSignalingAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bool signaling_insecure = 6; + * @return {boolean} + */ +proto.viam.app.v1.CloudConfig.prototype.getSignalingInsecure = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.CloudConfig} returns this + */ +proto.viam.app.v1.CloudConfig.prototype.setSignalingInsecure = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string location_secret = 7; + * @return {string} + */ +proto.viam.app.v1.CloudConfig.prototype.getLocationSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CloudConfig} returns this + */ +proto.viam.app.v1.CloudConfig.prototype.setLocationSecret = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string secret = 8; + * @return {string} + */ +proto.viam.app.v1.CloudConfig.prototype.getSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CloudConfig} returns this + */ +proto.viam.app.v1.CloudConfig.prototype.setSecret = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.ComponentConfig.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ComponentConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ComponentConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ComponentConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ComponentConfig.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + namespace: jspb.Message.getFieldWithDefault(msg, 2, ""), + type: jspb.Message.getFieldWithDefault(msg, 3, ""), + model: jspb.Message.getFieldWithDefault(msg, 4, ""), + frame: (f = msg.getFrame()) && proto.viam.app.v1.Frame.toObject(includeInstance, f), + dependsOnList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + serviceConfigsList: jspb.Message.toObjectList(msg.getServiceConfigsList(), + proto.viam.app.v1.ResourceLevelServiceConfig.toObject, includeInstance), + attributes: (f = msg.getAttributes()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ComponentConfig} + */ +proto.viam.app.v1.ComponentConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ComponentConfig; + return proto.viam.app.v1.ComponentConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ComponentConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ComponentConfig} + */ +proto.viam.app.v1.ComponentConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNamespace(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setModel(value); + break; + case 5: + var value = new proto.viam.app.v1.Frame; + reader.readMessage(value,proto.viam.app.v1.Frame.deserializeBinaryFromReader); + msg.setFrame(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addDependsOn(value); + break; + case 7: + var value = new proto.viam.app.v1.ResourceLevelServiceConfig; + reader.readMessage(value,proto.viam.app.v1.ResourceLevelServiceConfig.deserializeBinaryFromReader); + msg.addServiceConfigs(value); + break; + case 8: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setAttributes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ComponentConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ComponentConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ComponentConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ComponentConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNamespace(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getModel(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getFrame(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.viam.app.v1.Frame.serializeBinaryToWriter + ); + } + f = message.getDependsOnList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getServiceConfigsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.viam.app.v1.ResourceLevelServiceConfig.serializeBinaryToWriter + ); + } + f = message.getAttributes(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.app.v1.ComponentConfig.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string namespace = 2; + * @return {string} + */ +proto.viam.app.v1.ComponentConfig.prototype.getNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.setNamespace = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string type = 3; + * @return {string} + */ +proto.viam.app.v1.ComponentConfig.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string model = 4; + * @return {string} + */ +proto.viam.app.v1.ComponentConfig.prototype.getModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.setModel = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional Frame frame = 5; + * @return {?proto.viam.app.v1.Frame} + */ +proto.viam.app.v1.ComponentConfig.prototype.getFrame = function() { + return /** @type{?proto.viam.app.v1.Frame} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Frame, 5)); +}; + + +/** + * @param {?proto.viam.app.v1.Frame|undefined} value + * @return {!proto.viam.app.v1.ComponentConfig} returns this +*/ +proto.viam.app.v1.ComponentConfig.prototype.setFrame = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.clearFrame = function() { + return this.setFrame(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.ComponentConfig.prototype.hasFrame = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated string depends_on = 6; + * @return {!Array} + */ +proto.viam.app.v1.ComponentConfig.prototype.getDependsOnList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.setDependsOnList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.addDependsOn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.clearDependsOnList = function() { + return this.setDependsOnList([]); +}; + + +/** + * repeated ResourceLevelServiceConfig service_configs = 7; + * @return {!Array} + */ +proto.viam.app.v1.ComponentConfig.prototype.getServiceConfigsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.ResourceLevelServiceConfig, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.ComponentConfig} returns this +*/ +proto.viam.app.v1.ComponentConfig.prototype.setServiceConfigsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.viam.app.v1.ResourceLevelServiceConfig=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.ResourceLevelServiceConfig} + */ +proto.viam.app.v1.ComponentConfig.prototype.addServiceConfigs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.viam.app.v1.ResourceLevelServiceConfig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.clearServiceConfigsList = function() { + return this.setServiceConfigsList([]); +}; + + +/** + * optional google.protobuf.Struct attributes = 8; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.v1.ComponentConfig.prototype.getAttributes = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.v1.ComponentConfig} returns this +*/ +proto.viam.app.v1.ComponentConfig.prototype.setAttributes = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.ComponentConfig} returns this + */ +proto.viam.app.v1.ComponentConfig.prototype.clearAttributes = function() { + return this.setAttributes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.ComponentConfig.prototype.hasAttributes = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ResourceLevelServiceConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ResourceLevelServiceConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ResourceLevelServiceConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ResourceLevelServiceConfig.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + attributes: (f = msg.getAttributes()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ResourceLevelServiceConfig} + */ +proto.viam.app.v1.ResourceLevelServiceConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ResourceLevelServiceConfig; + return proto.viam.app.v1.ResourceLevelServiceConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ResourceLevelServiceConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ResourceLevelServiceConfig} + */ +proto.viam.app.v1.ResourceLevelServiceConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setAttributes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ResourceLevelServiceConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ResourceLevelServiceConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ResourceLevelServiceConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ResourceLevelServiceConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAttributes(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.viam.app.v1.ResourceLevelServiceConfig.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ResourceLevelServiceConfig} returns this + */ +proto.viam.app.v1.ResourceLevelServiceConfig.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct attributes = 2; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.v1.ResourceLevelServiceConfig.prototype.getAttributes = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.v1.ResourceLevelServiceConfig} returns this +*/ +proto.viam.app.v1.ResourceLevelServiceConfig.prototype.setAttributes = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.ResourceLevelServiceConfig} returns this + */ +proto.viam.app.v1.ResourceLevelServiceConfig.prototype.clearAttributes = function() { + return this.setAttributes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.ResourceLevelServiceConfig.prototype.hasAttributes = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.ProcessConfig.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ProcessConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ProcessConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ProcessConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ProcessConfig.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + argsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + cwd: jspb.Message.getFieldWithDefault(msg, 4, ""), + oneShot: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + log: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ProcessConfig} + */ +proto.viam.app.v1.ProcessConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ProcessConfig; + return proto.viam.app.v1.ProcessConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ProcessConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ProcessConfig} + */ +proto.viam.app.v1.ProcessConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addArgs(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCwd(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOneShot(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLog(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ProcessConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ProcessConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ProcessConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ProcessConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArgsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getCwd(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getOneShot(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getLog(); + if (f) { + writer.writeBool( + 6, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.ProcessConfig.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ProcessConfig} returns this + */ +proto.viam.app.v1.ProcessConfig.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.viam.app.v1.ProcessConfig.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ProcessConfig} returns this + */ +proto.viam.app.v1.ProcessConfig.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string args = 3; + * @return {!Array} + */ +proto.viam.app.v1.ProcessConfig.prototype.getArgsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.ProcessConfig} returns this + */ +proto.viam.app.v1.ProcessConfig.prototype.setArgsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.ProcessConfig} returns this + */ +proto.viam.app.v1.ProcessConfig.prototype.addArgs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.ProcessConfig} returns this + */ +proto.viam.app.v1.ProcessConfig.prototype.clearArgsList = function() { + return this.setArgsList([]); +}; + + +/** + * optional string cwd = 4; + * @return {string} + */ +proto.viam.app.v1.ProcessConfig.prototype.getCwd = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ProcessConfig} returns this + */ +proto.viam.app.v1.ProcessConfig.prototype.setCwd = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool one_shot = 5; + * @return {boolean} + */ +proto.viam.app.v1.ProcessConfig.prototype.getOneShot = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.ProcessConfig} returns this + */ +proto.viam.app.v1.ProcessConfig.prototype.setOneShot = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional bool log = 6; + * @return {boolean} + */ +proto.viam.app.v1.ProcessConfig.prototype.getLog = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.ProcessConfig} returns this + */ +proto.viam.app.v1.ProcessConfig.prototype.setLog = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ServiceConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ServiceConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ServiceConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ServiceConfig.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + namespace: jspb.Message.getFieldWithDefault(msg, 2, ""), + type: jspb.Message.getFieldWithDefault(msg, 3, ""), + attributes: (f = msg.getAttributes()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ServiceConfig} + */ +proto.viam.app.v1.ServiceConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ServiceConfig; + return proto.viam.app.v1.ServiceConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ServiceConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ServiceConfig} + */ +proto.viam.app.v1.ServiceConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNamespace(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 4: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setAttributes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ServiceConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ServiceConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ServiceConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ServiceConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNamespace(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAttributes(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.app.v1.ServiceConfig.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ServiceConfig} returns this + */ +proto.viam.app.v1.ServiceConfig.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string namespace = 2; + * @return {string} + */ +proto.viam.app.v1.ServiceConfig.prototype.getNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ServiceConfig} returns this + */ +proto.viam.app.v1.ServiceConfig.prototype.setNamespace = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string type = 3; + * @return {string} + */ +proto.viam.app.v1.ServiceConfig.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ServiceConfig} returns this + */ +proto.viam.app.v1.ServiceConfig.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct attributes = 4; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.v1.ServiceConfig.prototype.getAttributes = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.v1.ServiceConfig} returns this +*/ +proto.viam.app.v1.ServiceConfig.prototype.setAttributes = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.ServiceConfig} returns this + */ +proto.viam.app.v1.ServiceConfig.prototype.clearAttributes = function() { + return this.setAttributes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.ServiceConfig.prototype.hasAttributes = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.NetworkConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.NetworkConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.NetworkConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NetworkConfig.toObject = function(includeInstance, msg) { + var f, obj = { + fqdn: jspb.Message.getFieldWithDefault(msg, 1, ""), + bindAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + tlsCertFile: jspb.Message.getFieldWithDefault(msg, 3, ""), + tlsKeyFile: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.NetworkConfig} + */ +proto.viam.app.v1.NetworkConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.NetworkConfig; + return proto.viam.app.v1.NetworkConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.NetworkConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.NetworkConfig} + */ +proto.viam.app.v1.NetworkConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFqdn(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBindAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTlsCertFile(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setTlsKeyFile(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.NetworkConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.NetworkConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.NetworkConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NetworkConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFqdn(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBindAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTlsCertFile(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getTlsKeyFile(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string fqdn = 1; + * @return {string} + */ +proto.viam.app.v1.NetworkConfig.prototype.getFqdn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NetworkConfig} returns this + */ +proto.viam.app.v1.NetworkConfig.prototype.setFqdn = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bind_address = 2; + * @return {string} + */ +proto.viam.app.v1.NetworkConfig.prototype.getBindAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NetworkConfig} returns this + */ +proto.viam.app.v1.NetworkConfig.prototype.setBindAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string tls_cert_file = 3; + * @return {string} + */ +proto.viam.app.v1.NetworkConfig.prototype.getTlsCertFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NetworkConfig} returns this + */ +proto.viam.app.v1.NetworkConfig.prototype.setTlsCertFile = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string tls_key_file = 4; + * @return {string} + */ +proto.viam.app.v1.NetworkConfig.prototype.getTlsKeyFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NetworkConfig} returns this + */ +proto.viam.app.v1.NetworkConfig.prototype.setTlsKeyFile = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.AuthConfig.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.AuthConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.AuthConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.AuthConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.AuthConfig.toObject = function(includeInstance, msg) { + var f, obj = { + handlersList: jspb.Message.toObjectList(msg.getHandlersList(), + proto.viam.app.v1.AuthHandlerConfig.toObject, includeInstance), + tlsAuthEntitiesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.AuthConfig} + */ +proto.viam.app.v1.AuthConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.AuthConfig; + return proto.viam.app.v1.AuthConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.AuthConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.AuthConfig} + */ +proto.viam.app.v1.AuthConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.AuthHandlerConfig; + reader.readMessage(value,proto.viam.app.v1.AuthHandlerConfig.deserializeBinaryFromReader); + msg.addHandlers(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addTlsAuthEntities(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.AuthConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.AuthConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.AuthConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.AuthConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHandlersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.app.v1.AuthHandlerConfig.serializeBinaryToWriter + ); + } + f = message.getTlsAuthEntitiesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * repeated AuthHandlerConfig handlers = 1; + * @return {!Array} + */ +proto.viam.app.v1.AuthConfig.prototype.getHandlersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.AuthHandlerConfig, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.AuthConfig} returns this +*/ +proto.viam.app.v1.AuthConfig.prototype.setHandlersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.app.v1.AuthHandlerConfig=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.AuthHandlerConfig} + */ +proto.viam.app.v1.AuthConfig.prototype.addHandlers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.app.v1.AuthHandlerConfig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.AuthConfig} returns this + */ +proto.viam.app.v1.AuthConfig.prototype.clearHandlersList = function() { + return this.setHandlersList([]); +}; + + +/** + * repeated string tls_auth_entities = 2; + * @return {!Array} + */ +proto.viam.app.v1.AuthConfig.prototype.getTlsAuthEntitiesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.AuthConfig} returns this + */ +proto.viam.app.v1.AuthConfig.prototype.setTlsAuthEntitiesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.AuthConfig} returns this + */ +proto.viam.app.v1.AuthConfig.prototype.addTlsAuthEntities = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.AuthConfig} returns this + */ +proto.viam.app.v1.AuthConfig.prototype.clearTlsAuthEntitiesList = function() { + return this.setTlsAuthEntitiesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.AuthHandlerConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.AuthHandlerConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.AuthHandlerConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.AuthHandlerConfig.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + config: (f = msg.getConfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.AuthHandlerConfig} + */ +proto.viam.app.v1.AuthHandlerConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.AuthHandlerConfig; + return proto.viam.app.v1.AuthHandlerConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.AuthHandlerConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.AuthHandlerConfig} + */ +proto.viam.app.v1.AuthHandlerConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.viam.app.v1.CredentialsType} */ (reader.readEnum()); + msg.setType(value); + break; + case 5: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setConfig(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.AuthHandlerConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.AuthHandlerConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.AuthHandlerConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.AuthHandlerConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getConfig(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional CredentialsType type = 1; + * @return {!proto.viam.app.v1.CredentialsType} + */ +proto.viam.app.v1.AuthHandlerConfig.prototype.getType = function() { + return /** @type {!proto.viam.app.v1.CredentialsType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.viam.app.v1.CredentialsType} value + * @return {!proto.viam.app.v1.AuthHandlerConfig} returns this + */ +proto.viam.app.v1.AuthHandlerConfig.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct config = 5; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.app.v1.AuthHandlerConfig.prototype.getConfig = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.app.v1.AuthHandlerConfig} returns this +*/ +proto.viam.app.v1.AuthHandlerConfig.prototype.setConfig = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.AuthHandlerConfig} returns this + */ +proto.viam.app.v1.AuthHandlerConfig.prototype.clearConfig = function() { + return this.setConfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.AuthHandlerConfig.prototype.hasConfig = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Frame.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Frame.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Frame} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Frame.toObject = function(includeInstance, msg) { + var f, obj = { + parent: jspb.Message.getFieldWithDefault(msg, 1, ""), + translation: (f = msg.getTranslation()) && proto.viam.app.v1.Translation.toObject(includeInstance, f), + orientation: (f = msg.getOrientation()) && proto.viam.app.v1.Orientation.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Frame} + */ +proto.viam.app.v1.Frame.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Frame; + return proto.viam.app.v1.Frame.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Frame} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Frame} + */ +proto.viam.app.v1.Frame.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setParent(value); + break; + case 2: + var value = new proto.viam.app.v1.Translation; + reader.readMessage(value,proto.viam.app.v1.Translation.deserializeBinaryFromReader); + msg.setTranslation(value); + break; + case 3: + var value = new proto.viam.app.v1.Orientation; + reader.readMessage(value,proto.viam.app.v1.Orientation.deserializeBinaryFromReader); + msg.setOrientation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Frame.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Frame.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Frame} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Frame.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParent(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTranslation(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.app.v1.Translation.serializeBinaryToWriter + ); + } + f = message.getOrientation(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.viam.app.v1.Orientation.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string parent = 1; + * @return {string} + */ +proto.viam.app.v1.Frame.prototype.getParent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.Frame} returns this + */ +proto.viam.app.v1.Frame.prototype.setParent = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Translation translation = 2; + * @return {?proto.viam.app.v1.Translation} + */ +proto.viam.app.v1.Frame.prototype.getTranslation = function() { + return /** @type{?proto.viam.app.v1.Translation} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Translation, 2)); +}; + + +/** + * @param {?proto.viam.app.v1.Translation|undefined} value + * @return {!proto.viam.app.v1.Frame} returns this +*/ +proto.viam.app.v1.Frame.prototype.setTranslation = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Frame} returns this + */ +proto.viam.app.v1.Frame.prototype.clearTranslation = function() { + return this.setTranslation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Frame.prototype.hasTranslation = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Orientation orientation = 3; + * @return {?proto.viam.app.v1.Orientation} + */ +proto.viam.app.v1.Frame.prototype.getOrientation = function() { + return /** @type{?proto.viam.app.v1.Orientation} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Orientation, 3)); +}; + + +/** + * @param {?proto.viam.app.v1.Orientation|undefined} value + * @return {!proto.viam.app.v1.Frame} returns this +*/ +proto.viam.app.v1.Frame.prototype.setOrientation = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Frame} returns this + */ +proto.viam.app.v1.Frame.prototype.clearOrientation = function() { + return this.setOrientation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Frame.prototype.hasOrientation = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Translation.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Translation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Translation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Translation.toObject = function(includeInstance, msg) { + var f, obj = { + x: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + y: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + z: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Translation} + */ +proto.viam.app.v1.Translation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Translation; + return proto.viam.app.v1.Translation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Translation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Translation} + */ +proto.viam.app.v1.Translation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setX(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setY(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setZ(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Translation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Translation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Translation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Translation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getX(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getY(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getZ(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } +}; + + +/** + * optional double x = 1; + * @return {number} + */ +proto.viam.app.v1.Translation.prototype.getX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Translation} returns this + */ +proto.viam.app.v1.Translation.prototype.setX = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double y = 2; + * @return {number} + */ +proto.viam.app.v1.Translation.prototype.getY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Translation} returns this + */ +proto.viam.app.v1.Translation.prototype.setY = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double z = 3; + * @return {number} + */ +proto.viam.app.v1.Translation.prototype.getZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Translation} returns this + */ +proto.viam.app.v1.Translation.prototype.setZ = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.viam.app.v1.Orientation.oneofGroups_ = [[1,2,3,4,5,6]]; + +/** + * @enum {number} + */ +proto.viam.app.v1.Orientation.TypeCase = { + TYPE_NOT_SET: 0, + NO_ORIENTATION: 1, + VECTOR_RADIANS: 2, + VECTOR_DEGREES: 3, + EULER_ANGLES: 4, + AXIS_ANGLES: 5, + QUATERNION: 6 +}; + +/** + * @return {proto.viam.app.v1.Orientation.TypeCase} + */ +proto.viam.app.v1.Orientation.prototype.getTypeCase = function() { + return /** @type {proto.viam.app.v1.Orientation.TypeCase} */(jspb.Message.computeOneofCase(this, proto.viam.app.v1.Orientation.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Orientation.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Orientation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Orientation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.toObject = function(includeInstance, msg) { + var f, obj = { + noOrientation: (f = msg.getNoOrientation()) && proto.viam.app.v1.Orientation.NoOrientation.toObject(includeInstance, f), + vectorRadians: (f = msg.getVectorRadians()) && proto.viam.app.v1.Orientation.OrientationVectorRadians.toObject(includeInstance, f), + vectorDegrees: (f = msg.getVectorDegrees()) && proto.viam.app.v1.Orientation.OrientationVectorDegrees.toObject(includeInstance, f), + eulerAngles: (f = msg.getEulerAngles()) && proto.viam.app.v1.Orientation.EulerAngles.toObject(includeInstance, f), + axisAngles: (f = msg.getAxisAngles()) && proto.viam.app.v1.Orientation.AxisAngles.toObject(includeInstance, f), + quaternion: (f = msg.getQuaternion()) && proto.viam.app.v1.Orientation.Quaternion.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Orientation} + */ +proto.viam.app.v1.Orientation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Orientation; + return proto.viam.app.v1.Orientation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Orientation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Orientation} + */ +proto.viam.app.v1.Orientation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.Orientation.NoOrientation; + reader.readMessage(value,proto.viam.app.v1.Orientation.NoOrientation.deserializeBinaryFromReader); + msg.setNoOrientation(value); + break; + case 2: + var value = new proto.viam.app.v1.Orientation.OrientationVectorRadians; + reader.readMessage(value,proto.viam.app.v1.Orientation.OrientationVectorRadians.deserializeBinaryFromReader); + msg.setVectorRadians(value); + break; + case 3: + var value = new proto.viam.app.v1.Orientation.OrientationVectorDegrees; + reader.readMessage(value,proto.viam.app.v1.Orientation.OrientationVectorDegrees.deserializeBinaryFromReader); + msg.setVectorDegrees(value); + break; + case 4: + var value = new proto.viam.app.v1.Orientation.EulerAngles; + reader.readMessage(value,proto.viam.app.v1.Orientation.EulerAngles.deserializeBinaryFromReader); + msg.setEulerAngles(value); + break; + case 5: + var value = new proto.viam.app.v1.Orientation.AxisAngles; + reader.readMessage(value,proto.viam.app.v1.Orientation.AxisAngles.deserializeBinaryFromReader); + msg.setAxisAngles(value); + break; + case 6: + var value = new proto.viam.app.v1.Orientation.Quaternion; + reader.readMessage(value,proto.viam.app.v1.Orientation.Quaternion.deserializeBinaryFromReader); + msg.setQuaternion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Orientation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Orientation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Orientation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNoOrientation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.v1.Orientation.NoOrientation.serializeBinaryToWriter + ); + } + f = message.getVectorRadians(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.app.v1.Orientation.OrientationVectorRadians.serializeBinaryToWriter + ); + } + f = message.getVectorDegrees(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.viam.app.v1.Orientation.OrientationVectorDegrees.serializeBinaryToWriter + ); + } + f = message.getEulerAngles(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.viam.app.v1.Orientation.EulerAngles.serializeBinaryToWriter + ); + } + f = message.getAxisAngles(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.viam.app.v1.Orientation.AxisAngles.serializeBinaryToWriter + ); + } + f = message.getQuaternion(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.viam.app.v1.Orientation.Quaternion.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Orientation.NoOrientation.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Orientation.NoOrientation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Orientation.NoOrientation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.NoOrientation.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Orientation.NoOrientation} + */ +proto.viam.app.v1.Orientation.NoOrientation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Orientation.NoOrientation; + return proto.viam.app.v1.Orientation.NoOrientation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Orientation.NoOrientation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Orientation.NoOrientation} + */ +proto.viam.app.v1.Orientation.NoOrientation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Orientation.NoOrientation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Orientation.NoOrientation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Orientation.NoOrientation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.NoOrientation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Orientation.OrientationVectorRadians.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Orientation.OrientationVectorRadians} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.toObject = function(includeInstance, msg) { + var f, obj = { + theta: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + x: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + y: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + z: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Orientation.OrientationVectorRadians} + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Orientation.OrientationVectorRadians; + return proto.viam.app.v1.Orientation.OrientationVectorRadians.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Orientation.OrientationVectorRadians} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Orientation.OrientationVectorRadians} + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setTheta(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setX(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setY(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setZ(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Orientation.OrientationVectorRadians.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Orientation.OrientationVectorRadians} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTheta(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getX(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getY(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getZ(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } +}; + + +/** + * optional double theta = 1; + * @return {number} + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.getTheta = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.OrientationVectorRadians} returns this + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.setTheta = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double x = 2; + * @return {number} + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.getX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.OrientationVectorRadians} returns this + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.setX = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double y = 3; + * @return {number} + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.getY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.OrientationVectorRadians} returns this + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.setY = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional double z = 4; + * @return {number} + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.getZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.OrientationVectorRadians} returns this + */ +proto.viam.app.v1.Orientation.OrientationVectorRadians.prototype.setZ = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Orientation.OrientationVectorDegrees.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Orientation.OrientationVectorDegrees} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.toObject = function(includeInstance, msg) { + var f, obj = { + theta: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + x: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + y: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + z: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Orientation.OrientationVectorDegrees} + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Orientation.OrientationVectorDegrees; + return proto.viam.app.v1.Orientation.OrientationVectorDegrees.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Orientation.OrientationVectorDegrees} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Orientation.OrientationVectorDegrees} + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setTheta(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setX(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setY(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setZ(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Orientation.OrientationVectorDegrees.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Orientation.OrientationVectorDegrees} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTheta(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getX(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getY(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getZ(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } +}; + + +/** + * optional double theta = 1; + * @return {number} + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.getTheta = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.OrientationVectorDegrees} returns this + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.setTheta = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double x = 2; + * @return {number} + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.getX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.OrientationVectorDegrees} returns this + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.setX = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double y = 3; + * @return {number} + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.getY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.OrientationVectorDegrees} returns this + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.setY = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional double z = 4; + * @return {number} + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.getZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.OrientationVectorDegrees} returns this + */ +proto.viam.app.v1.Orientation.OrientationVectorDegrees.prototype.setZ = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Orientation.EulerAngles.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Orientation.EulerAngles.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Orientation.EulerAngles} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.EulerAngles.toObject = function(includeInstance, msg) { + var f, obj = { + roll: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + pitch: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + yaw: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Orientation.EulerAngles} + */ +proto.viam.app.v1.Orientation.EulerAngles.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Orientation.EulerAngles; + return proto.viam.app.v1.Orientation.EulerAngles.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Orientation.EulerAngles} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Orientation.EulerAngles} + */ +proto.viam.app.v1.Orientation.EulerAngles.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setRoll(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setPitch(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setYaw(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Orientation.EulerAngles.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Orientation.EulerAngles.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Orientation.EulerAngles} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.EulerAngles.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRoll(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getPitch(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getYaw(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } +}; + + +/** + * optional double roll = 1; + * @return {number} + */ +proto.viam.app.v1.Orientation.EulerAngles.prototype.getRoll = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.EulerAngles} returns this + */ +proto.viam.app.v1.Orientation.EulerAngles.prototype.setRoll = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double pitch = 2; + * @return {number} + */ +proto.viam.app.v1.Orientation.EulerAngles.prototype.getPitch = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.EulerAngles} returns this + */ +proto.viam.app.v1.Orientation.EulerAngles.prototype.setPitch = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double yaw = 3; + * @return {number} + */ +proto.viam.app.v1.Orientation.EulerAngles.prototype.getYaw = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.EulerAngles} returns this + */ +proto.viam.app.v1.Orientation.EulerAngles.prototype.setYaw = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Orientation.AxisAngles.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Orientation.AxisAngles} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.AxisAngles.toObject = function(includeInstance, msg) { + var f, obj = { + theta: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + x: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + y: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + z: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Orientation.AxisAngles} + */ +proto.viam.app.v1.Orientation.AxisAngles.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Orientation.AxisAngles; + return proto.viam.app.v1.Orientation.AxisAngles.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Orientation.AxisAngles} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Orientation.AxisAngles} + */ +proto.viam.app.v1.Orientation.AxisAngles.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setTheta(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setX(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setY(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setZ(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Orientation.AxisAngles.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Orientation.AxisAngles} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.AxisAngles.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTheta(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getX(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getY(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getZ(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } +}; + + +/** + * optional double theta = 1; + * @return {number} + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.getTheta = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.AxisAngles} returns this + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.setTheta = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double x = 2; + * @return {number} + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.getX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.AxisAngles} returns this + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.setX = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double y = 3; + * @return {number} + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.getY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.AxisAngles} returns this + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.setY = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional double z = 4; + * @return {number} + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.getZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.AxisAngles} returns this + */ +proto.viam.app.v1.Orientation.AxisAngles.prototype.setZ = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.Orientation.Quaternion.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.Orientation.Quaternion} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.Quaternion.toObject = function(includeInstance, msg) { + var f, obj = { + w: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + x: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + y: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + z: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.Orientation.Quaternion} + */ +proto.viam.app.v1.Orientation.Quaternion.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.Orientation.Quaternion; + return proto.viam.app.v1.Orientation.Quaternion.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.Orientation.Quaternion} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.Orientation.Quaternion} + */ +proto.viam.app.v1.Orientation.Quaternion.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setW(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setX(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setY(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setZ(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.Orientation.Quaternion.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.Orientation.Quaternion} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.Orientation.Quaternion.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getW(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getX(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getY(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getZ(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } +}; + + +/** + * optional double w = 1; + * @return {number} + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.getW = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.Quaternion} returns this + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.setW = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double x = 2; + * @return {number} + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.getX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.Quaternion} returns this + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.setX = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double y = 3; + * @return {number} + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.getY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.Quaternion} returns this + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.setY = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional double z = 4; + * @return {number} + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.getZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.app.v1.Orientation.Quaternion} returns this + */ +proto.viam.app.v1.Orientation.Quaternion.prototype.setZ = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional NoOrientation no_orientation = 1; + * @return {?proto.viam.app.v1.Orientation.NoOrientation} + */ +proto.viam.app.v1.Orientation.prototype.getNoOrientation = function() { + return /** @type{?proto.viam.app.v1.Orientation.NoOrientation} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Orientation.NoOrientation, 1)); +}; + + +/** + * @param {?proto.viam.app.v1.Orientation.NoOrientation|undefined} value + * @return {!proto.viam.app.v1.Orientation} returns this +*/ +proto.viam.app.v1.Orientation.prototype.setNoOrientation = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.viam.app.v1.Orientation.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Orientation} returns this + */ +proto.viam.app.v1.Orientation.prototype.clearNoOrientation = function() { + return this.setNoOrientation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Orientation.prototype.hasNoOrientation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional OrientationVectorRadians vector_radians = 2; + * @return {?proto.viam.app.v1.Orientation.OrientationVectorRadians} + */ +proto.viam.app.v1.Orientation.prototype.getVectorRadians = function() { + return /** @type{?proto.viam.app.v1.Orientation.OrientationVectorRadians} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Orientation.OrientationVectorRadians, 2)); +}; + + +/** + * @param {?proto.viam.app.v1.Orientation.OrientationVectorRadians|undefined} value + * @return {!proto.viam.app.v1.Orientation} returns this +*/ +proto.viam.app.v1.Orientation.prototype.setVectorRadians = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.viam.app.v1.Orientation.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Orientation} returns this + */ +proto.viam.app.v1.Orientation.prototype.clearVectorRadians = function() { + return this.setVectorRadians(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Orientation.prototype.hasVectorRadians = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional OrientationVectorDegrees vector_degrees = 3; + * @return {?proto.viam.app.v1.Orientation.OrientationVectorDegrees} + */ +proto.viam.app.v1.Orientation.prototype.getVectorDegrees = function() { + return /** @type{?proto.viam.app.v1.Orientation.OrientationVectorDegrees} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Orientation.OrientationVectorDegrees, 3)); +}; + + +/** + * @param {?proto.viam.app.v1.Orientation.OrientationVectorDegrees|undefined} value + * @return {!proto.viam.app.v1.Orientation} returns this +*/ +proto.viam.app.v1.Orientation.prototype.setVectorDegrees = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.viam.app.v1.Orientation.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Orientation} returns this + */ +proto.viam.app.v1.Orientation.prototype.clearVectorDegrees = function() { + return this.setVectorDegrees(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Orientation.prototype.hasVectorDegrees = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional EulerAngles euler_angles = 4; + * @return {?proto.viam.app.v1.Orientation.EulerAngles} + */ +proto.viam.app.v1.Orientation.prototype.getEulerAngles = function() { + return /** @type{?proto.viam.app.v1.Orientation.EulerAngles} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Orientation.EulerAngles, 4)); +}; + + +/** + * @param {?proto.viam.app.v1.Orientation.EulerAngles|undefined} value + * @return {!proto.viam.app.v1.Orientation} returns this +*/ +proto.viam.app.v1.Orientation.prototype.setEulerAngles = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.viam.app.v1.Orientation.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Orientation} returns this + */ +proto.viam.app.v1.Orientation.prototype.clearEulerAngles = function() { + return this.setEulerAngles(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Orientation.prototype.hasEulerAngles = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional AxisAngles axis_angles = 5; + * @return {?proto.viam.app.v1.Orientation.AxisAngles} + */ +proto.viam.app.v1.Orientation.prototype.getAxisAngles = function() { + return /** @type{?proto.viam.app.v1.Orientation.AxisAngles} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Orientation.AxisAngles, 5)); +}; + + +/** + * @param {?proto.viam.app.v1.Orientation.AxisAngles|undefined} value + * @return {!proto.viam.app.v1.Orientation} returns this +*/ +proto.viam.app.v1.Orientation.prototype.setAxisAngles = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.viam.app.v1.Orientation.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Orientation} returns this + */ +proto.viam.app.v1.Orientation.prototype.clearAxisAngles = function() { + return this.setAxisAngles(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Orientation.prototype.hasAxisAngles = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Quaternion quaternion = 6; + * @return {?proto.viam.app.v1.Orientation.Quaternion} + */ +proto.viam.app.v1.Orientation.prototype.getQuaternion = function() { + return /** @type{?proto.viam.app.v1.Orientation.Quaternion} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Orientation.Quaternion, 6)); +}; + + +/** + * @param {?proto.viam.app.v1.Orientation.Quaternion|undefined} value + * @return {!proto.viam.app.v1.Orientation} returns this +*/ +proto.viam.app.v1.Orientation.prototype.setQuaternion = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.viam.app.v1.Orientation.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.Orientation} returns this + */ +proto.viam.app.v1.Orientation.prototype.clearQuaternion = function() { + return this.setQuaternion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.Orientation.prototype.hasQuaternion = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.RemoteConfig.repeatedFields_ = [9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.RemoteConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.RemoteConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.RemoteConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RemoteConfig.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + frame: (f = msg.getFrame()) && proto.viam.app.v1.Frame.toObject(includeInstance, f), + auth: (f = msg.getAuth()) && proto.viam.app.v1.RemoteAuth.toObject(includeInstance, f), + managedBy: jspb.Message.getFieldWithDefault(msg, 5, ""), + insecure: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + connectionCheckInterval: (f = msg.getConnectionCheckInterval()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + reconnectInterval: (f = msg.getReconnectInterval()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + serviceConfigsList: jspb.Message.toObjectList(msg.getServiceConfigsList(), + proto.viam.app.v1.ResourceLevelServiceConfig.toObject, includeInstance), + secret: jspb.Message.getFieldWithDefault(msg, 10, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.RemoteConfig} + */ +proto.viam.app.v1.RemoteConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.RemoteConfig; + return proto.viam.app.v1.RemoteConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.RemoteConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.RemoteConfig} + */ +proto.viam.app.v1.RemoteConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = new proto.viam.app.v1.Frame; + reader.readMessage(value,proto.viam.app.v1.Frame.deserializeBinaryFromReader); + msg.setFrame(value); + break; + case 4: + var value = new proto.viam.app.v1.RemoteAuth; + reader.readMessage(value,proto.viam.app.v1.RemoteAuth.deserializeBinaryFromReader); + msg.setAuth(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setManagedBy(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setInsecure(value); + break; + case 7: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setConnectionCheckInterval(value); + break; + case 8: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setReconnectInterval(value); + break; + case 9: + var value = new proto.viam.app.v1.ResourceLevelServiceConfig; + reader.readMessage(value,proto.viam.app.v1.ResourceLevelServiceConfig.deserializeBinaryFromReader); + msg.addServiceConfigs(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setSecret(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.RemoteConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.RemoteConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.RemoteConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RemoteConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFrame(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.viam.app.v1.Frame.serializeBinaryToWriter + ); + } + f = message.getAuth(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.viam.app.v1.RemoteAuth.serializeBinaryToWriter + ); + } + f = message.getManagedBy(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getInsecure(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getConnectionCheckInterval(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getReconnectInterval(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getServiceConfigsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.viam.app.v1.ResourceLevelServiceConfig.serializeBinaryToWriter + ); + } + f = message.getSecret(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.app.v1.RemoteConfig.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string address = 2; + * @return {string} + */ +proto.viam.app.v1.RemoteConfig.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Frame frame = 3; + * @return {?proto.viam.app.v1.Frame} + */ +proto.viam.app.v1.RemoteConfig.prototype.getFrame = function() { + return /** @type{?proto.viam.app.v1.Frame} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.Frame, 3)); +}; + + +/** + * @param {?proto.viam.app.v1.Frame|undefined} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this +*/ +proto.viam.app.v1.RemoteConfig.prototype.setFrame = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.clearFrame = function() { + return this.setFrame(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RemoteConfig.prototype.hasFrame = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional RemoteAuth auth = 4; + * @return {?proto.viam.app.v1.RemoteAuth} + */ +proto.viam.app.v1.RemoteConfig.prototype.getAuth = function() { + return /** @type{?proto.viam.app.v1.RemoteAuth} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.RemoteAuth, 4)); +}; + + +/** + * @param {?proto.viam.app.v1.RemoteAuth|undefined} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this +*/ +proto.viam.app.v1.RemoteConfig.prototype.setAuth = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.clearAuth = function() { + return this.setAuth(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RemoteConfig.prototype.hasAuth = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string managed_by = 5; + * @return {string} + */ +proto.viam.app.v1.RemoteConfig.prototype.getManagedBy = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.setManagedBy = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bool insecure = 6; + * @return {boolean} + */ +proto.viam.app.v1.RemoteConfig.prototype.getInsecure = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.setInsecure = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional google.protobuf.Duration connection_check_interval = 7; + * @return {?proto.google.protobuf.Duration} + */ +proto.viam.app.v1.RemoteConfig.prototype.getConnectionCheckInterval = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 7)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this +*/ +proto.viam.app.v1.RemoteConfig.prototype.setConnectionCheckInterval = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.clearConnectionCheckInterval = function() { + return this.setConnectionCheckInterval(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RemoteConfig.prototype.hasConnectionCheckInterval = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional google.protobuf.Duration reconnect_interval = 8; + * @return {?proto.google.protobuf.Duration} + */ +proto.viam.app.v1.RemoteConfig.prototype.getReconnectInterval = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this +*/ +proto.viam.app.v1.RemoteConfig.prototype.setReconnectInterval = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.clearReconnectInterval = function() { + return this.setReconnectInterval(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RemoteConfig.prototype.hasReconnectInterval = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated ResourceLevelServiceConfig service_configs = 9; + * @return {!Array} + */ +proto.viam.app.v1.RemoteConfig.prototype.getServiceConfigsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.app.v1.ResourceLevelServiceConfig, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this +*/ +proto.viam.app.v1.RemoteConfig.prototype.setServiceConfigsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.viam.app.v1.ResourceLevelServiceConfig=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.ResourceLevelServiceConfig} + */ +proto.viam.app.v1.RemoteConfig.prototype.addServiceConfigs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.viam.app.v1.ResourceLevelServiceConfig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.clearServiceConfigsList = function() { + return this.setServiceConfigsList([]); +}; + + +/** + * optional string secret = 10; + * @return {string} + */ +proto.viam.app.v1.RemoteConfig.prototype.getSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RemoteConfig} returns this + */ +proto.viam.app.v1.RemoteConfig.prototype.setSecret = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.RemoteAuth.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.RemoteAuth.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.RemoteAuth} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RemoteAuth.toObject = function(includeInstance, msg) { + var f, obj = { + credentials: (f = msg.getCredentials()) && proto.viam.app.v1.RemoteAuth.Credentials.toObject(includeInstance, f), + entity: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.RemoteAuth} + */ +proto.viam.app.v1.RemoteAuth.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.RemoteAuth; + return proto.viam.app.v1.RemoteAuth.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.RemoteAuth} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.RemoteAuth} + */ +proto.viam.app.v1.RemoteAuth.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.RemoteAuth.Credentials; + reader.readMessage(value,proto.viam.app.v1.RemoteAuth.Credentials.deserializeBinaryFromReader); + msg.setCredentials(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setEntity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.RemoteAuth.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.RemoteAuth.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.RemoteAuth} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RemoteAuth.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCredentials(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.v1.RemoteAuth.Credentials.serializeBinaryToWriter + ); + } + f = message.getEntity(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.RemoteAuth.Credentials.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.RemoteAuth.Credentials.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.RemoteAuth.Credentials} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RemoteAuth.Credentials.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + payload: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.RemoteAuth.Credentials} + */ +proto.viam.app.v1.RemoteAuth.Credentials.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.RemoteAuth.Credentials; + return proto.viam.app.v1.RemoteAuth.Credentials.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.RemoteAuth.Credentials} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.RemoteAuth.Credentials} + */ +proto.viam.app.v1.RemoteAuth.Credentials.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.viam.app.v1.CredentialsType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPayload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.RemoteAuth.Credentials.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.RemoteAuth.Credentials.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.RemoteAuth.Credentials} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.RemoteAuth.Credentials.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getPayload(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional CredentialsType type = 1; + * @return {!proto.viam.app.v1.CredentialsType} + */ +proto.viam.app.v1.RemoteAuth.Credentials.prototype.getType = function() { + return /** @type {!proto.viam.app.v1.CredentialsType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.viam.app.v1.CredentialsType} value + * @return {!proto.viam.app.v1.RemoteAuth.Credentials} returns this + */ +proto.viam.app.v1.RemoteAuth.Credentials.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string payload = 2; + * @return {string} + */ +proto.viam.app.v1.RemoteAuth.Credentials.prototype.getPayload = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RemoteAuth.Credentials} returns this + */ +proto.viam.app.v1.RemoteAuth.Credentials.prototype.setPayload = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Credentials credentials = 1; + * @return {?proto.viam.app.v1.RemoteAuth.Credentials} + */ +proto.viam.app.v1.RemoteAuth.prototype.getCredentials = function() { + return /** @type{?proto.viam.app.v1.RemoteAuth.Credentials} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.RemoteAuth.Credentials, 1)); +}; + + +/** + * @param {?proto.viam.app.v1.RemoteAuth.Credentials|undefined} value + * @return {!proto.viam.app.v1.RemoteAuth} returns this +*/ +proto.viam.app.v1.RemoteAuth.prototype.setCredentials = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.RemoteAuth} returns this + */ +proto.viam.app.v1.RemoteAuth.prototype.clearCredentials = function() { + return this.setCredentials(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.RemoteAuth.prototype.hasCredentials = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string entity = 2; + * @return {string} + */ +proto.viam.app.v1.RemoteAuth.prototype.getEntity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.RemoteAuth} returns this + */ +proto.viam.app.v1.RemoteAuth.prototype.setEntity = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.AgentInfo.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.AgentInfo.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.AgentInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.AgentInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.AgentInfo.toObject = function(includeInstance, msg) { + var f, obj = { + host: jspb.Message.getFieldWithDefault(msg, 1, ""), + os: jspb.Message.getFieldWithDefault(msg, 2, ""), + ipsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + version: jspb.Message.getFieldWithDefault(msg, 4, ""), + gitRevision: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.AgentInfo} + */ +proto.viam.app.v1.AgentInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.AgentInfo; + return proto.viam.app.v1.AgentInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.AgentInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.AgentInfo} + */ +proto.viam.app.v1.AgentInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHost(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOs(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addIps(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setGitRevision(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.AgentInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.AgentInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.AgentInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.AgentInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOs(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIpsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getGitRevision(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string host = 1; + * @return {string} + */ +proto.viam.app.v1.AgentInfo.prototype.getHost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.AgentInfo} returns this + */ +proto.viam.app.v1.AgentInfo.prototype.setHost = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string os = 2; + * @return {string} + */ +proto.viam.app.v1.AgentInfo.prototype.getOs = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.AgentInfo} returns this + */ +proto.viam.app.v1.AgentInfo.prototype.setOs = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string ips = 3; + * @return {!Array} + */ +proto.viam.app.v1.AgentInfo.prototype.getIpsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.AgentInfo} returns this + */ +proto.viam.app.v1.AgentInfo.prototype.setIpsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.AgentInfo} returns this + */ +proto.viam.app.v1.AgentInfo.prototype.addIps = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.AgentInfo} returns this + */ +proto.viam.app.v1.AgentInfo.prototype.clearIpsList = function() { + return this.setIpsList([]); +}; + + +/** + * optional string version = 4; + * @return {string} + */ +proto.viam.app.v1.AgentInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.AgentInfo} returns this + */ +proto.viam.app.v1.AgentInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string git_revision = 5; + * @return {string} + */ +proto.viam.app.v1.AgentInfo.prototype.getGitRevision = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.AgentInfo} returns this + */ +proto.viam.app.v1.AgentInfo.prototype.setGitRevision = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ConfigRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ConfigRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ConfigRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ConfigRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + agentInfo: (f = msg.getAgentInfo()) && proto.viam.app.v1.AgentInfo.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ConfigRequest} + */ +proto.viam.app.v1.ConfigRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ConfigRequest; + return proto.viam.app.v1.ConfigRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ConfigRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ConfigRequest} + */ +proto.viam.app.v1.ConfigRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new proto.viam.app.v1.AgentInfo; + reader.readMessage(value,proto.viam.app.v1.AgentInfo.deserializeBinaryFromReader); + msg.setAgentInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ConfigRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ConfigRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ConfigRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ConfigRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAgentInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.app.v1.AgentInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.ConfigRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.ConfigRequest} returns this + */ +proto.viam.app.v1.ConfigRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional AgentInfo agent_info = 2; + * @return {?proto.viam.app.v1.AgentInfo} + */ +proto.viam.app.v1.ConfigRequest.prototype.getAgentInfo = function() { + return /** @type{?proto.viam.app.v1.AgentInfo} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.AgentInfo, 2)); +}; + + +/** + * @param {?proto.viam.app.v1.AgentInfo|undefined} value + * @return {!proto.viam.app.v1.ConfigRequest} returns this +*/ +proto.viam.app.v1.ConfigRequest.prototype.setAgentInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.ConfigRequest} returns this + */ +proto.viam.app.v1.ConfigRequest.prototype.clearAgentInfo = function() { + return this.setAgentInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.ConfigRequest.prototype.hasAgentInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.ConfigResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.ConfigResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.ConfigResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ConfigResponse.toObject = function(includeInstance, msg) { + var f, obj = { + config: (f = msg.getConfig()) && proto.viam.app.v1.RobotConfig.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.ConfigResponse} + */ +proto.viam.app.v1.ConfigResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.ConfigResponse; + return proto.viam.app.v1.ConfigResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.ConfigResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.ConfigResponse} + */ +proto.viam.app.v1.ConfigResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.app.v1.RobotConfig; + reader.readMessage(value,proto.viam.app.v1.RobotConfig.deserializeBinaryFromReader); + msg.setConfig(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.ConfigResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.ConfigResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.ConfigResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.ConfigResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConfig(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.app.v1.RobotConfig.serializeBinaryToWriter + ); + } +}; + + +/** + * optional RobotConfig config = 1; + * @return {?proto.viam.app.v1.RobotConfig} + */ +proto.viam.app.v1.ConfigResponse.prototype.getConfig = function() { + return /** @type{?proto.viam.app.v1.RobotConfig} */ ( + jspb.Message.getWrapperField(this, proto.viam.app.v1.RobotConfig, 1)); +}; + + +/** + * @param {?proto.viam.app.v1.RobotConfig|undefined} value + * @return {!proto.viam.app.v1.ConfigResponse} returns this +*/ +proto.viam.app.v1.ConfigResponse.prototype.setConfig = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.ConfigResponse} returns this + */ +proto.viam.app.v1.ConfigResponse.prototype.clearConfig = function() { + return this.setConfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.ConfigResponse.prototype.hasConfig = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.CertificateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.CertificateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.CertificateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.CertificateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.CertificateRequest} + */ +proto.viam.app.v1.CertificateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.CertificateRequest; + return proto.viam.app.v1.CertificateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.CertificateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.CertificateRequest} + */ +proto.viam.app.v1.CertificateRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.CertificateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.CertificateRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.CertificateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.CertificateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.CertificateRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CertificateRequest} returns this + */ +proto.viam.app.v1.CertificateRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.CertificateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.CertificateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.CertificateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.CertificateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + tlsCertificate: jspb.Message.getFieldWithDefault(msg, 2, ""), + tlsPrivateKey: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.CertificateResponse} + */ +proto.viam.app.v1.CertificateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.CertificateResponse; + return proto.viam.app.v1.CertificateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.CertificateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.CertificateResponse} + */ +proto.viam.app.v1.CertificateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTlsCertificate(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTlsPrivateKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.CertificateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.CertificateResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.CertificateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.CertificateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTlsCertificate(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTlsPrivateKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.CertificateResponse.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CertificateResponse} returns this + */ +proto.viam.app.v1.CertificateResponse.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string tls_certificate = 2; + * @return {string} + */ +proto.viam.app.v1.CertificateResponse.prototype.getTlsCertificate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CertificateResponse} returns this + */ +proto.viam.app.v1.CertificateResponse.prototype.setTlsCertificate = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string tls_private_key = 3; + * @return {string} + */ +proto.viam.app.v1.CertificateResponse.prototype.getTlsPrivateKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.CertificateResponse} returns this + */ +proto.viam.app.v1.CertificateResponse.prototype.setTlsPrivateKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.app.v1.LogRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.LogRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.LogRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.LogRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LogRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + logsList: jspb.Message.toObjectList(msg.getLogsList(), + app_v1_app_pb.LogEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.LogRequest} + */ +proto.viam.app.v1.LogRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.LogRequest; + return proto.viam.app.v1.LogRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.LogRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.LogRequest} + */ +proto.viam.app.v1.LogRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new app_v1_app_pb.LogEntry; + reader.readMessage(value,app_v1_app_pb.LogEntry.deserializeBinaryFromReader); + msg.addLogs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.LogRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.LogRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.LogRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LogRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLogsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + app_v1_app_pb.LogEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.LogRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.LogRequest} returns this + */ +proto.viam.app.v1.LogRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated LogEntry logs = 2; + * @return {!Array} + */ +proto.viam.app.v1.LogRequest.prototype.getLogsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, app_v1_app_pb.LogEntry, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.app.v1.LogRequest} returns this +*/ +proto.viam.app.v1.LogRequest.prototype.setLogsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.viam.app.v1.LogEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.app.v1.LogEntry} + */ +proto.viam.app.v1.LogRequest.prototype.addLogs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.viam.app.v1.LogEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.app.v1.LogRequest} returns this + */ +proto.viam.app.v1.LogRequest.prototype.clearLogsList = function() { + return this.setLogsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.LogResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.LogResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.LogResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LogResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.LogResponse} + */ +proto.viam.app.v1.LogResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.LogResponse; + return proto.viam.app.v1.LogResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.LogResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.LogResponse} + */ +proto.viam.app.v1.LogResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.LogResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.LogResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.LogResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.LogResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.NeedsRestartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.NeedsRestartRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.NeedsRestartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NeedsRestartRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.NeedsRestartRequest} + */ +proto.viam.app.v1.NeedsRestartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.NeedsRestartRequest; + return proto.viam.app.v1.NeedsRestartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.NeedsRestartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.NeedsRestartRequest} + */ +proto.viam.app.v1.NeedsRestartRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.NeedsRestartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.NeedsRestartRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.NeedsRestartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NeedsRestartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.NeedsRestartRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NeedsRestartRequest} returns this + */ +proto.viam.app.v1.NeedsRestartRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.app.v1.NeedsRestartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.app.v1.NeedsRestartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.app.v1.NeedsRestartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NeedsRestartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + mustRestart: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + restartCheckInterval: (f = msg.getRestartCheckInterval()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.app.v1.NeedsRestartResponse} + */ +proto.viam.app.v1.NeedsRestartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.app.v1.NeedsRestartResponse; + return proto.viam.app.v1.NeedsRestartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.app.v1.NeedsRestartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.app.v1.NeedsRestartResponse} + */ +proto.viam.app.v1.NeedsRestartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMustRestart(value); + break; + case 3: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setRestartCheckInterval(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.app.v1.NeedsRestartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.app.v1.NeedsRestartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.app.v1.NeedsRestartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.app.v1.NeedsRestartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMustRestart(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getRestartCheckInterval(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.app.v1.NeedsRestartResponse.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.app.v1.NeedsRestartResponse} returns this + */ +proto.viam.app.v1.NeedsRestartResponse.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool must_restart = 2; + * @return {boolean} + */ +proto.viam.app.v1.NeedsRestartResponse.prototype.getMustRestart = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.app.v1.NeedsRestartResponse} returns this + */ +proto.viam.app.v1.NeedsRestartResponse.prototype.setMustRestart = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional google.protobuf.Duration restart_check_interval = 3; + * @return {?proto.google.protobuf.Duration} + */ +proto.viam.app.v1.NeedsRestartResponse.prototype.getRestartCheckInterval = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.viam.app.v1.NeedsRestartResponse} returns this +*/ +proto.viam.app.v1.NeedsRestartResponse.prototype.setRestartCheckInterval = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.v1.NeedsRestartResponse} returns this + */ +proto.viam.app.v1.NeedsRestartResponse.prototype.clearRestartCheckInterval = function() { + return this.setRestartCheckInterval(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.v1.NeedsRestartResponse.prototype.hasRestartCheckInterval = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * @enum {number} + */ +proto.viam.app.v1.CredentialsType = { + CREDENTIALS_TYPE_UNSPECIFIED: 0, + CREDENTIALS_TYPE_INTERNAL: 1, + CREDENTIALS_TYPE_API_KEY: 2, + CREDENTIALS_TYPE_ROBOT_SECRET: 3, + CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET: 4 +}; + +goog.object.extend(exports, proto.viam.app.v1); diff --git a/gen/js/app/v1/robot_pb_service.d.ts b/gen/js/app/v1/robot_pb_service.d.ts new file mode 100644 index 000000000..0f6089bd9 --- /dev/null +++ b/gen/js/app/v1/robot_pb_service.d.ts @@ -0,0 +1,120 @@ +// package: viam.app.v1 +// file: app/v1/robot.proto + +import * as app_v1_robot_pb from "../../app/v1/robot_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type RobotServiceConfig = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_robot_pb.ConfigRequest; + readonly responseType: typeof app_v1_robot_pb.ConfigResponse; +}; + +type RobotServiceCertificate = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_robot_pb.CertificateRequest; + readonly responseType: typeof app_v1_robot_pb.CertificateResponse; +}; + +type RobotServiceLog = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_robot_pb.LogRequest; + readonly responseType: typeof app_v1_robot_pb.LogResponse; +}; + +type RobotServiceNeedsRestart = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof app_v1_robot_pb.NeedsRestartRequest; + readonly responseType: typeof app_v1_robot_pb.NeedsRestartResponse; +}; + +export class RobotService { + static readonly serviceName: string; + static readonly Config: RobotServiceConfig; + static readonly Certificate: RobotServiceCertificate; + static readonly Log: RobotServiceLog; + static readonly NeedsRestart: RobotServiceNeedsRestart; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class RobotServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + config( + requestMessage: app_v1_robot_pb.ConfigRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_robot_pb.ConfigResponse|null) => void + ): UnaryResponse; + config( + requestMessage: app_v1_robot_pb.ConfigRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_robot_pb.ConfigResponse|null) => void + ): UnaryResponse; + certificate( + requestMessage: app_v1_robot_pb.CertificateRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_robot_pb.CertificateResponse|null) => void + ): UnaryResponse; + certificate( + requestMessage: app_v1_robot_pb.CertificateRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_robot_pb.CertificateResponse|null) => void + ): UnaryResponse; + log( + requestMessage: app_v1_robot_pb.LogRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_robot_pb.LogResponse|null) => void + ): UnaryResponse; + log( + requestMessage: app_v1_robot_pb.LogRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_robot_pb.LogResponse|null) => void + ): UnaryResponse; + needsRestart( + requestMessage: app_v1_robot_pb.NeedsRestartRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: app_v1_robot_pb.NeedsRestartResponse|null) => void + ): UnaryResponse; + needsRestart( + requestMessage: app_v1_robot_pb.NeedsRestartRequest, + callback: (error: ServiceError|null, responseMessage: app_v1_robot_pb.NeedsRestartResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/app/v1/robot_pb_service.js b/gen/js/app/v1/robot_pb_service.js new file mode 100644 index 000000000..b25ff0682 --- /dev/null +++ b/gen/js/app/v1/robot_pb_service.js @@ -0,0 +1,181 @@ +// package: viam.app.v1 +// file: app/v1/robot.proto + +var app_v1_robot_pb = require("../../app/v1/robot_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var RobotService = (function () { + function RobotService() {} + RobotService.serviceName = "viam.app.v1.RobotService"; + return RobotService; +}()); + +RobotService.Config = { + methodName: "Config", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: app_v1_robot_pb.ConfigRequest, + responseType: app_v1_robot_pb.ConfigResponse +}; + +RobotService.Certificate = { + methodName: "Certificate", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: app_v1_robot_pb.CertificateRequest, + responseType: app_v1_robot_pb.CertificateResponse +}; + +RobotService.Log = { + methodName: "Log", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: app_v1_robot_pb.LogRequest, + responseType: app_v1_robot_pb.LogResponse +}; + +RobotService.NeedsRestart = { + methodName: "NeedsRestart", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: app_v1_robot_pb.NeedsRestartRequest, + responseType: app_v1_robot_pb.NeedsRestartResponse +}; + +exports.RobotService = RobotService; + +function RobotServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +RobotServiceClient.prototype.config = function config(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.Config, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.certificate = function certificate(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.Certificate, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.log = function log(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.Log, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.needsRestart = function needsRestart(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.NeedsRestart, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.RobotServiceClient = RobotServiceClient; + diff --git a/gen/js/common/v1/common_pb.d.ts b/gen/js/common/v1/common_pb.d.ts new file mode 100644 index 000000000..d2feef51f --- /dev/null +++ b/gen/js/common/v1/common_pb.d.ts @@ -0,0 +1,470 @@ +// package: viam.common.v1 +// file: common/v1/common.proto + +import * as jspb from "google-protobuf"; + +export class ResourceName extends jspb.Message { + getNamespace(): string; + setNamespace(value: string): void; + + getType(): string; + setType(value: string): void; + + getSubtype(): string; + setSubtype(value: string): void; + + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceName.AsObject; + static toObject(includeInstance: boolean, msg: ResourceName): ResourceName.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceName, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceName; + static deserializeBinaryFromReader(message: ResourceName, reader: jspb.BinaryReader): ResourceName; +} + +export namespace ResourceName { + export type AsObject = { + namespace: string, + type: string, + subtype: string, + name: string, + } +} + +export class BoardStatus extends jspb.Message { + getAnalogsMap(): jspb.Map; + clearAnalogsMap(): void; + getDigitalInterruptsMap(): jspb.Map; + clearDigitalInterruptsMap(): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardStatus.AsObject; + static toObject(includeInstance: boolean, msg: BoardStatus): BoardStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardStatus; + static deserializeBinaryFromReader(message: BoardStatus, reader: jspb.BinaryReader): BoardStatus; +} + +export namespace BoardStatus { + export type AsObject = { + analogsMap: Array<[string, AnalogStatus.AsObject]>, + digitalInterruptsMap: Array<[string, DigitalInterruptStatus.AsObject]>, + } +} + +export class AnalogStatus extends jspb.Message { + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AnalogStatus.AsObject; + static toObject(includeInstance: boolean, msg: AnalogStatus): AnalogStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AnalogStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AnalogStatus; + static deserializeBinaryFromReader(message: AnalogStatus, reader: jspb.BinaryReader): AnalogStatus; +} + +export namespace AnalogStatus { + export type AsObject = { + value: number, + } +} + +export class DigitalInterruptStatus extends jspb.Message { + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DigitalInterruptStatus.AsObject; + static toObject(includeInstance: boolean, msg: DigitalInterruptStatus): DigitalInterruptStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DigitalInterruptStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DigitalInterruptStatus; + static deserializeBinaryFromReader(message: DigitalInterruptStatus, reader: jspb.BinaryReader): DigitalInterruptStatus; +} + +export namespace DigitalInterruptStatus { + export type AsObject = { + value: number, + } +} + +export class Pose extends jspb.Message { + getX(): number; + setX(value: number): void; + + getY(): number; + setY(value: number): void; + + getZ(): number; + setZ(value: number): void; + + getOX(): number; + setOX(value: number): void; + + getOY(): number; + setOY(value: number): void; + + getOZ(): number; + setOZ(value: number): void; + + getTheta(): number; + setTheta(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Pose.AsObject; + static toObject(includeInstance: boolean, msg: Pose): Pose.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Pose, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Pose; + static deserializeBinaryFromReader(message: Pose, reader: jspb.BinaryReader): Pose; +} + +export namespace Pose { + export type AsObject = { + x: number, + y: number, + z: number, + oX: number, + oY: number, + oZ: number, + theta: number, + } +} + +export class Orientation extends jspb.Message { + getOX(): number; + setOX(value: number): void; + + getOY(): number; + setOY(value: number): void; + + getOZ(): number; + setOZ(value: number): void; + + getTheta(): number; + setTheta(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Orientation.AsObject; + static toObject(includeInstance: boolean, msg: Orientation): Orientation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Orientation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Orientation; + static deserializeBinaryFromReader(message: Orientation, reader: jspb.BinaryReader): Orientation; +} + +export namespace Orientation { + export type AsObject = { + oX: number, + oY: number, + oZ: number, + theta: number, + } +} + +export class PoseInFrame extends jspb.Message { + getReferenceFrame(): string; + setReferenceFrame(value: string): void; + + hasPose(): boolean; + clearPose(): void; + getPose(): Pose | undefined; + setPose(value?: Pose): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PoseInFrame.AsObject; + static toObject(includeInstance: boolean, msg: PoseInFrame): PoseInFrame.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PoseInFrame, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PoseInFrame; + static deserializeBinaryFromReader(message: PoseInFrame, reader: jspb.BinaryReader): PoseInFrame; +} + +export namespace PoseInFrame { + export type AsObject = { + referenceFrame: string, + pose?: Pose.AsObject, + } +} + +export class Vector3 extends jspb.Message { + getX(): number; + setX(value: number): void; + + getY(): number; + setY(value: number): void; + + getZ(): number; + setZ(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Vector3.AsObject; + static toObject(includeInstance: boolean, msg: Vector3): Vector3.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Vector3, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Vector3; + static deserializeBinaryFromReader(message: Vector3, reader: jspb.BinaryReader): Vector3; +} + +export namespace Vector3 { + export type AsObject = { + x: number, + y: number, + z: number, + } +} + +export class Sphere extends jspb.Message { + getRadiusMm(): number; + setRadiusMm(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Sphere.AsObject; + static toObject(includeInstance: boolean, msg: Sphere): Sphere.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Sphere, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Sphere; + static deserializeBinaryFromReader(message: Sphere, reader: jspb.BinaryReader): Sphere; +} + +export namespace Sphere { + export type AsObject = { + radiusMm: number, + } +} + +export class RectangularPrism extends jspb.Message { + hasDimsMm(): boolean; + clearDimsMm(): void; + getDimsMm(): Vector3 | undefined; + setDimsMm(value?: Vector3): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RectangularPrism.AsObject; + static toObject(includeInstance: boolean, msg: RectangularPrism): RectangularPrism.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RectangularPrism, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RectangularPrism; + static deserializeBinaryFromReader(message: RectangularPrism, reader: jspb.BinaryReader): RectangularPrism; +} + +export namespace RectangularPrism { + export type AsObject = { + dimsMm?: Vector3.AsObject, + } +} + +export class Geometry extends jspb.Message { + hasCenter(): boolean; + clearCenter(): void; + getCenter(): Pose | undefined; + setCenter(value?: Pose): void; + + hasSphere(): boolean; + clearSphere(): void; + getSphere(): Sphere | undefined; + setSphere(value?: Sphere): void; + + hasBox(): boolean; + clearBox(): void; + getBox(): RectangularPrism | undefined; + setBox(value?: RectangularPrism): void; + + getGeometryTypeCase(): Geometry.GeometryTypeCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Geometry.AsObject; + static toObject(includeInstance: boolean, msg: Geometry): Geometry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Geometry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Geometry; + static deserializeBinaryFromReader(message: Geometry, reader: jspb.BinaryReader): Geometry; +} + +export namespace Geometry { + export type AsObject = { + center?: Pose.AsObject, + sphere?: Sphere.AsObject, + box?: RectangularPrism.AsObject, + } + + export enum GeometryTypeCase { + GEOMETRY_TYPE_NOT_SET = 0, + SPHERE = 2, + BOX = 3, + } +} + +export class GeometriesInFrame extends jspb.Message { + getReferenceFrame(): string; + setReferenceFrame(value: string): void; + + clearGeometriesList(): void; + getGeometriesList(): Array; + setGeometriesList(value: Array): void; + addGeometries(value?: Geometry, index?: number): Geometry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GeometriesInFrame.AsObject; + static toObject(includeInstance: boolean, msg: GeometriesInFrame): GeometriesInFrame.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GeometriesInFrame, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GeometriesInFrame; + static deserializeBinaryFromReader(message: GeometriesInFrame, reader: jspb.BinaryReader): GeometriesInFrame; +} + +export namespace GeometriesInFrame { + export type AsObject = { + referenceFrame: string, + geometriesList: Array, + } +} + +export class PointCloudObject extends jspb.Message { + getPointCloud(): Uint8Array | string; + getPointCloud_asU8(): Uint8Array; + getPointCloud_asB64(): string; + setPointCloud(value: Uint8Array | string): void; + + hasGeometries(): boolean; + clearGeometries(): void; + getGeometries(): GeometriesInFrame | undefined; + setGeometries(value?: GeometriesInFrame): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PointCloudObject.AsObject; + static toObject(includeInstance: boolean, msg: PointCloudObject): PointCloudObject.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PointCloudObject, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PointCloudObject; + static deserializeBinaryFromReader(message: PointCloudObject, reader: jspb.BinaryReader): PointCloudObject; +} + +export namespace PointCloudObject { + export type AsObject = { + pointCloud: Uint8Array | string, + geometries?: GeometriesInFrame.AsObject, + } +} + +export class GeoPoint extends jspb.Message { + getLatitude(): number; + setLatitude(value: number): void; + + getLongitude(): number; + setLongitude(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GeoPoint.AsObject; + static toObject(includeInstance: boolean, msg: GeoPoint): GeoPoint.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GeoPoint, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GeoPoint; + static deserializeBinaryFromReader(message: GeoPoint, reader: jspb.BinaryReader): GeoPoint; +} + +export namespace GeoPoint { + export type AsObject = { + latitude: number, + longitude: number, + } +} + +export class Transform extends jspb.Message { + getReferenceFrame(): string; + setReferenceFrame(value: string): void; + + hasPoseInObserverFrame(): boolean; + clearPoseInObserverFrame(): void; + getPoseInObserverFrame(): PoseInFrame | undefined; + setPoseInObserverFrame(value?: PoseInFrame): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Transform.AsObject; + static toObject(includeInstance: boolean, msg: Transform): Transform.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Transform, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Transform; + static deserializeBinaryFromReader(message: Transform, reader: jspb.BinaryReader): Transform; +} + +export namespace Transform { + export type AsObject = { + referenceFrame: string, + poseInObserverFrame?: PoseInFrame.AsObject, + } +} + +export class WorldState extends jspb.Message { + clearObstaclesList(): void; + getObstaclesList(): Array; + setObstaclesList(value: Array): void; + addObstacles(value?: GeometriesInFrame, index?: number): GeometriesInFrame; + + clearInteractionSpacesList(): void; + getInteractionSpacesList(): Array; + setInteractionSpacesList(value: Array): void; + addInteractionSpaces(value?: GeometriesInFrame, index?: number): GeometriesInFrame; + + clearTransformsList(): void; + getTransformsList(): Array; + setTransformsList(value: Array): void; + addTransforms(value?: Transform, index?: number): Transform; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WorldState.AsObject; + static toObject(includeInstance: boolean, msg: WorldState): WorldState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WorldState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WorldState; + static deserializeBinaryFromReader(message: WorldState, reader: jspb.BinaryReader): WorldState; +} + +export namespace WorldState { + export type AsObject = { + obstaclesList: Array, + interactionSpacesList: Array, + transformsList: Array, + } +} + +export class ActuatorStatus extends jspb.Message { + getIsMoving(): boolean; + setIsMoving(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ActuatorStatus.AsObject; + static toObject(includeInstance: boolean, msg: ActuatorStatus): ActuatorStatus.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ActuatorStatus, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ActuatorStatus; + static deserializeBinaryFromReader(message: ActuatorStatus, reader: jspb.BinaryReader): ActuatorStatus; +} + +export namespace ActuatorStatus { + export type AsObject = { + isMoving: boolean, + } +} + diff --git a/gen/js/common/v1/common_pb.js b/gen/js/common/v1/common_pb.js new file mode 100644 index 000000000..1b183bfd8 --- /dev/null +++ b/gen/js/common/v1/common_pb.js @@ -0,0 +1,3632 @@ +// source: common/v1/common.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.viam.common.v1.ActuatorStatus', null, global); +goog.exportSymbol('proto.viam.common.v1.AnalogStatus', null, global); +goog.exportSymbol('proto.viam.common.v1.BoardStatus', null, global); +goog.exportSymbol('proto.viam.common.v1.DigitalInterruptStatus', null, global); +goog.exportSymbol('proto.viam.common.v1.GeoPoint', null, global); +goog.exportSymbol('proto.viam.common.v1.GeometriesInFrame', null, global); +goog.exportSymbol('proto.viam.common.v1.Geometry', null, global); +goog.exportSymbol('proto.viam.common.v1.Geometry.GeometryTypeCase', null, global); +goog.exportSymbol('proto.viam.common.v1.Orientation', null, global); +goog.exportSymbol('proto.viam.common.v1.PointCloudObject', null, global); +goog.exportSymbol('proto.viam.common.v1.Pose', null, global); +goog.exportSymbol('proto.viam.common.v1.PoseInFrame', null, global); +goog.exportSymbol('proto.viam.common.v1.RectangularPrism', null, global); +goog.exportSymbol('proto.viam.common.v1.ResourceName', null, global); +goog.exportSymbol('proto.viam.common.v1.Sphere', null, global); +goog.exportSymbol('proto.viam.common.v1.Transform', null, global); +goog.exportSymbol('proto.viam.common.v1.Vector3', null, global); +goog.exportSymbol('proto.viam.common.v1.WorldState', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.ResourceName = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.ResourceName, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.ResourceName.displayName = 'proto.viam.common.v1.ResourceName'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.BoardStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.BoardStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.BoardStatus.displayName = 'proto.viam.common.v1.BoardStatus'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.AnalogStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.AnalogStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.AnalogStatus.displayName = 'proto.viam.common.v1.AnalogStatus'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.DigitalInterruptStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.DigitalInterruptStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.DigitalInterruptStatus.displayName = 'proto.viam.common.v1.DigitalInterruptStatus'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.Pose = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.Pose, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.Pose.displayName = 'proto.viam.common.v1.Pose'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.Orientation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.Orientation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.Orientation.displayName = 'proto.viam.common.v1.Orientation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.PoseInFrame = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.PoseInFrame, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.PoseInFrame.displayName = 'proto.viam.common.v1.PoseInFrame'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.Vector3 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.Vector3, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.Vector3.displayName = 'proto.viam.common.v1.Vector3'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.Sphere = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.Sphere, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.Sphere.displayName = 'proto.viam.common.v1.Sphere'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.RectangularPrism = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.RectangularPrism, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.RectangularPrism.displayName = 'proto.viam.common.v1.RectangularPrism'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.Geometry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.viam.common.v1.Geometry.oneofGroups_); +}; +goog.inherits(proto.viam.common.v1.Geometry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.Geometry.displayName = 'proto.viam.common.v1.Geometry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.GeometriesInFrame = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.common.v1.GeometriesInFrame.repeatedFields_, null); +}; +goog.inherits(proto.viam.common.v1.GeometriesInFrame, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.GeometriesInFrame.displayName = 'proto.viam.common.v1.GeometriesInFrame'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.PointCloudObject = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.PointCloudObject, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.PointCloudObject.displayName = 'proto.viam.common.v1.PointCloudObject'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.GeoPoint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.GeoPoint, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.GeoPoint.displayName = 'proto.viam.common.v1.GeoPoint'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.Transform = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.Transform, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.Transform.displayName = 'proto.viam.common.v1.Transform'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.WorldState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.common.v1.WorldState.repeatedFields_, null); +}; +goog.inherits(proto.viam.common.v1.WorldState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.WorldState.displayName = 'proto.viam.common.v1.WorldState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.common.v1.ActuatorStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.common.v1.ActuatorStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.common.v1.ActuatorStatus.displayName = 'proto.viam.common.v1.ActuatorStatus'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.ResourceName.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.ResourceName.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.ResourceName} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.ResourceName.toObject = function(includeInstance, msg) { + var f, obj = { + namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + subtype: jspb.Message.getFieldWithDefault(msg, 3, ""), + name: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.ResourceName} + */ +proto.viam.common.v1.ResourceName.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.ResourceName; + return proto.viam.common.v1.ResourceName.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.ResourceName} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.ResourceName} + */ +proto.viam.common.v1.ResourceName.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNamespace(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSubtype(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.ResourceName.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.ResourceName.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.ResourceName} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.ResourceName.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNamespace(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSubtype(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string namespace = 1; + * @return {string} + */ +proto.viam.common.v1.ResourceName.prototype.getNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.common.v1.ResourceName} returns this + */ +proto.viam.common.v1.ResourceName.prototype.setNamespace = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string type = 2; + * @return {string} + */ +proto.viam.common.v1.ResourceName.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.common.v1.ResourceName} returns this + */ +proto.viam.common.v1.ResourceName.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string subtype = 3; + * @return {string} + */ +proto.viam.common.v1.ResourceName.prototype.getSubtype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.common.v1.ResourceName} returns this + */ +proto.viam.common.v1.ResourceName.prototype.setSubtype = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string name = 4; + * @return {string} + */ +proto.viam.common.v1.ResourceName.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.common.v1.ResourceName} returns this + */ +proto.viam.common.v1.ResourceName.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.BoardStatus.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.BoardStatus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.BoardStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.BoardStatus.toObject = function(includeInstance, msg) { + var f, obj = { + analogsMap: (f = msg.getAnalogsMap()) ? f.toObject(includeInstance, proto.viam.common.v1.AnalogStatus.toObject) : [], + digitalInterruptsMap: (f = msg.getDigitalInterruptsMap()) ? f.toObject(includeInstance, proto.viam.common.v1.DigitalInterruptStatus.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.BoardStatus} + */ +proto.viam.common.v1.BoardStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.BoardStatus; + return proto.viam.common.v1.BoardStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.BoardStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.BoardStatus} + */ +proto.viam.common.v1.BoardStatus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getAnalogsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.viam.common.v1.AnalogStatus.deserializeBinaryFromReader, "", new proto.viam.common.v1.AnalogStatus()); + }); + break; + case 2: + var value = msg.getDigitalInterruptsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.viam.common.v1.DigitalInterruptStatus.deserializeBinaryFromReader, "", new proto.viam.common.v1.DigitalInterruptStatus()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.BoardStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.BoardStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.BoardStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.BoardStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAnalogsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.viam.common.v1.AnalogStatus.serializeBinaryToWriter); + } + f = message.getDigitalInterruptsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.viam.common.v1.DigitalInterruptStatus.serializeBinaryToWriter); + } +}; + + +/** + * map analogs = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.common.v1.BoardStatus.prototype.getAnalogsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.viam.common.v1.AnalogStatus)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.common.v1.BoardStatus} returns this + */ +proto.viam.common.v1.BoardStatus.prototype.clearAnalogsMap = function() { + this.getAnalogsMap().clear(); + return this;}; + + +/** + * map digital_interrupts = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.common.v1.BoardStatus.prototype.getDigitalInterruptsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + proto.viam.common.v1.DigitalInterruptStatus)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.common.v1.BoardStatus} returns this + */ +proto.viam.common.v1.BoardStatus.prototype.clearDigitalInterruptsMap = function() { + this.getDigitalInterruptsMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.AnalogStatus.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.AnalogStatus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.AnalogStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.AnalogStatus.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.AnalogStatus} + */ +proto.viam.common.v1.AnalogStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.AnalogStatus; + return proto.viam.common.v1.AnalogStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.AnalogStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.AnalogStatus} + */ +proto.viam.common.v1.AnalogStatus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.AnalogStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.AnalogStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.AnalogStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.AnalogStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 value = 1; + * @return {number} + */ +proto.viam.common.v1.AnalogStatus.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.AnalogStatus} returns this + */ +proto.viam.common.v1.AnalogStatus.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.DigitalInterruptStatus.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.DigitalInterruptStatus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.DigitalInterruptStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.DigitalInterruptStatus.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.DigitalInterruptStatus} + */ +proto.viam.common.v1.DigitalInterruptStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.DigitalInterruptStatus; + return proto.viam.common.v1.DigitalInterruptStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.DigitalInterruptStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.DigitalInterruptStatus} + */ +proto.viam.common.v1.DigitalInterruptStatus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.DigitalInterruptStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.DigitalInterruptStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.DigitalInterruptStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.DigitalInterruptStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 value = 1; + * @return {number} + */ +proto.viam.common.v1.DigitalInterruptStatus.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.DigitalInterruptStatus} returns this + */ +proto.viam.common.v1.DigitalInterruptStatus.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.Pose.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.Pose.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.Pose} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Pose.toObject = function(includeInstance, msg) { + var f, obj = { + x: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + y: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + z: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + oX: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + oY: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + oZ: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0), + theta: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.Pose} + */ +proto.viam.common.v1.Pose.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.Pose; + return proto.viam.common.v1.Pose.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.Pose} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.Pose} + */ +proto.viam.common.v1.Pose.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setX(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setY(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setZ(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setOX(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setOY(value); + break; + case 6: + var value = /** @type {number} */ (reader.readDouble()); + msg.setOZ(value); + break; + case 7: + var value = /** @type {number} */ (reader.readDouble()); + msg.setTheta(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.Pose.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.Pose.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.Pose} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Pose.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getX(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getY(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getZ(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getOX(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getOY(); + if (f !== 0.0) { + writer.writeDouble( + 5, + f + ); + } + f = message.getOZ(); + if (f !== 0.0) { + writer.writeDouble( + 6, + f + ); + } + f = message.getTheta(); + if (f !== 0.0) { + writer.writeDouble( + 7, + f + ); + } +}; + + +/** + * optional double x = 1; + * @return {number} + */ +proto.viam.common.v1.Pose.prototype.getX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Pose} returns this + */ +proto.viam.common.v1.Pose.prototype.setX = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double y = 2; + * @return {number} + */ +proto.viam.common.v1.Pose.prototype.getY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Pose} returns this + */ +proto.viam.common.v1.Pose.prototype.setY = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double z = 3; + * @return {number} + */ +proto.viam.common.v1.Pose.prototype.getZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Pose} returns this + */ +proto.viam.common.v1.Pose.prototype.setZ = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional double o_x = 4; + * @return {number} + */ +proto.viam.common.v1.Pose.prototype.getOX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Pose} returns this + */ +proto.viam.common.v1.Pose.prototype.setOX = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional double o_y = 5; + * @return {number} + */ +proto.viam.common.v1.Pose.prototype.getOY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Pose} returns this + */ +proto.viam.common.v1.Pose.prototype.setOY = function(value) { + return jspb.Message.setProto3FloatField(this, 5, value); +}; + + +/** + * optional double o_z = 6; + * @return {number} + */ +proto.viam.common.v1.Pose.prototype.getOZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Pose} returns this + */ +proto.viam.common.v1.Pose.prototype.setOZ = function(value) { + return jspb.Message.setProto3FloatField(this, 6, value); +}; + + +/** + * optional double theta = 7; + * @return {number} + */ +proto.viam.common.v1.Pose.prototype.getTheta = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Pose} returns this + */ +proto.viam.common.v1.Pose.prototype.setTheta = function(value) { + return jspb.Message.setProto3FloatField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.Orientation.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.Orientation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.Orientation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Orientation.toObject = function(includeInstance, msg) { + var f, obj = { + oX: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + oY: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + oZ: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + theta: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.Orientation} + */ +proto.viam.common.v1.Orientation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.Orientation; + return proto.viam.common.v1.Orientation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.Orientation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.Orientation} + */ +proto.viam.common.v1.Orientation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setOX(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setOY(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setOZ(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setTheta(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.Orientation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.Orientation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.Orientation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Orientation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOX(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getOY(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getOZ(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getTheta(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } +}; + + +/** + * optional double o_x = 1; + * @return {number} + */ +proto.viam.common.v1.Orientation.prototype.getOX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Orientation} returns this + */ +proto.viam.common.v1.Orientation.prototype.setOX = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double o_y = 2; + * @return {number} + */ +proto.viam.common.v1.Orientation.prototype.getOY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Orientation} returns this + */ +proto.viam.common.v1.Orientation.prototype.setOY = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double o_z = 3; + * @return {number} + */ +proto.viam.common.v1.Orientation.prototype.getOZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Orientation} returns this + */ +proto.viam.common.v1.Orientation.prototype.setOZ = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional double theta = 4; + * @return {number} + */ +proto.viam.common.v1.Orientation.prototype.getTheta = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Orientation} returns this + */ +proto.viam.common.v1.Orientation.prototype.setTheta = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.PoseInFrame.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.PoseInFrame.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.PoseInFrame} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.PoseInFrame.toObject = function(includeInstance, msg) { + var f, obj = { + referenceFrame: jspb.Message.getFieldWithDefault(msg, 1, ""), + pose: (f = msg.getPose()) && proto.viam.common.v1.Pose.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.PoseInFrame} + */ +proto.viam.common.v1.PoseInFrame.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.PoseInFrame; + return proto.viam.common.v1.PoseInFrame.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.PoseInFrame} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.PoseInFrame} + */ +proto.viam.common.v1.PoseInFrame.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setReferenceFrame(value); + break; + case 2: + var value = new proto.viam.common.v1.Pose; + reader.readMessage(value,proto.viam.common.v1.Pose.deserializeBinaryFromReader); + msg.setPose(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.PoseInFrame.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.PoseInFrame.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.PoseInFrame} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.PoseInFrame.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReferenceFrame(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPose(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.common.v1.Pose.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string reference_frame = 1; + * @return {string} + */ +proto.viam.common.v1.PoseInFrame.prototype.getReferenceFrame = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.common.v1.PoseInFrame} returns this + */ +proto.viam.common.v1.PoseInFrame.prototype.setReferenceFrame = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Pose pose = 2; + * @return {?proto.viam.common.v1.Pose} + */ +proto.viam.common.v1.PoseInFrame.prototype.getPose = function() { + return /** @type{?proto.viam.common.v1.Pose} */ ( + jspb.Message.getWrapperField(this, proto.viam.common.v1.Pose, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.Pose|undefined} value + * @return {!proto.viam.common.v1.PoseInFrame} returns this +*/ +proto.viam.common.v1.PoseInFrame.prototype.setPose = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.common.v1.PoseInFrame} returns this + */ +proto.viam.common.v1.PoseInFrame.prototype.clearPose = function() { + return this.setPose(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.common.v1.PoseInFrame.prototype.hasPose = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.Vector3.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.Vector3.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.Vector3} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Vector3.toObject = function(includeInstance, msg) { + var f, obj = { + x: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + y: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + z: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.Vector3} + */ +proto.viam.common.v1.Vector3.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.Vector3; + return proto.viam.common.v1.Vector3.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.Vector3} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.Vector3} + */ +proto.viam.common.v1.Vector3.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setX(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setY(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setZ(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.Vector3.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.Vector3.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.Vector3} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Vector3.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getX(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getY(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getZ(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } +}; + + +/** + * optional double x = 1; + * @return {number} + */ +proto.viam.common.v1.Vector3.prototype.getX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Vector3} returns this + */ +proto.viam.common.v1.Vector3.prototype.setX = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double y = 2; + * @return {number} + */ +proto.viam.common.v1.Vector3.prototype.getY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Vector3} returns this + */ +proto.viam.common.v1.Vector3.prototype.setY = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double z = 3; + * @return {number} + */ +proto.viam.common.v1.Vector3.prototype.getZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Vector3} returns this + */ +proto.viam.common.v1.Vector3.prototype.setZ = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.Sphere.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.Sphere.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.Sphere} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Sphere.toObject = function(includeInstance, msg) { + var f, obj = { + radiusMm: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.Sphere} + */ +proto.viam.common.v1.Sphere.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.Sphere; + return proto.viam.common.v1.Sphere.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.Sphere} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.Sphere} + */ +proto.viam.common.v1.Sphere.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setRadiusMm(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.Sphere.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.Sphere.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.Sphere} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Sphere.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRadiusMm(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } +}; + + +/** + * optional double radius_mm = 1; + * @return {number} + */ +proto.viam.common.v1.Sphere.prototype.getRadiusMm = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.Sphere} returns this + */ +proto.viam.common.v1.Sphere.prototype.setRadiusMm = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.RectangularPrism.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.RectangularPrism.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.RectangularPrism} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.RectangularPrism.toObject = function(includeInstance, msg) { + var f, obj = { + dimsMm: (f = msg.getDimsMm()) && proto.viam.common.v1.Vector3.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.RectangularPrism} + */ +proto.viam.common.v1.RectangularPrism.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.RectangularPrism; + return proto.viam.common.v1.RectangularPrism.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.RectangularPrism} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.RectangularPrism} + */ +proto.viam.common.v1.RectangularPrism.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.common.v1.Vector3; + reader.readMessage(value,proto.viam.common.v1.Vector3.deserializeBinaryFromReader); + msg.setDimsMm(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.RectangularPrism.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.RectangularPrism.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.RectangularPrism} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.RectangularPrism.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDimsMm(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.common.v1.Vector3.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Vector3 dims_mm = 1; + * @return {?proto.viam.common.v1.Vector3} + */ +proto.viam.common.v1.RectangularPrism.prototype.getDimsMm = function() { + return /** @type{?proto.viam.common.v1.Vector3} */ ( + jspb.Message.getWrapperField(this, proto.viam.common.v1.Vector3, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.Vector3|undefined} value + * @return {!proto.viam.common.v1.RectangularPrism} returns this +*/ +proto.viam.common.v1.RectangularPrism.prototype.setDimsMm = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.common.v1.RectangularPrism} returns this + */ +proto.viam.common.v1.RectangularPrism.prototype.clearDimsMm = function() { + return this.setDimsMm(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.common.v1.RectangularPrism.prototype.hasDimsMm = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.viam.common.v1.Geometry.oneofGroups_ = [[2,3]]; + +/** + * @enum {number} + */ +proto.viam.common.v1.Geometry.GeometryTypeCase = { + GEOMETRY_TYPE_NOT_SET: 0, + SPHERE: 2, + BOX: 3 +}; + +/** + * @return {proto.viam.common.v1.Geometry.GeometryTypeCase} + */ +proto.viam.common.v1.Geometry.prototype.getGeometryTypeCase = function() { + return /** @type {proto.viam.common.v1.Geometry.GeometryTypeCase} */(jspb.Message.computeOneofCase(this, proto.viam.common.v1.Geometry.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.Geometry.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.Geometry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.Geometry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Geometry.toObject = function(includeInstance, msg) { + var f, obj = { + center: (f = msg.getCenter()) && proto.viam.common.v1.Pose.toObject(includeInstance, f), + sphere: (f = msg.getSphere()) && proto.viam.common.v1.Sphere.toObject(includeInstance, f), + box: (f = msg.getBox()) && proto.viam.common.v1.RectangularPrism.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.Geometry} + */ +proto.viam.common.v1.Geometry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.Geometry; + return proto.viam.common.v1.Geometry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.Geometry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.Geometry} + */ +proto.viam.common.v1.Geometry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.common.v1.Pose; + reader.readMessage(value,proto.viam.common.v1.Pose.deserializeBinaryFromReader); + msg.setCenter(value); + break; + case 2: + var value = new proto.viam.common.v1.Sphere; + reader.readMessage(value,proto.viam.common.v1.Sphere.deserializeBinaryFromReader); + msg.setSphere(value); + break; + case 3: + var value = new proto.viam.common.v1.RectangularPrism; + reader.readMessage(value,proto.viam.common.v1.RectangularPrism.deserializeBinaryFromReader); + msg.setBox(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.Geometry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.Geometry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.Geometry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Geometry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCenter(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.common.v1.Pose.serializeBinaryToWriter + ); + } + f = message.getSphere(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.common.v1.Sphere.serializeBinaryToWriter + ); + } + f = message.getBox(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.viam.common.v1.RectangularPrism.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Pose center = 1; + * @return {?proto.viam.common.v1.Pose} + */ +proto.viam.common.v1.Geometry.prototype.getCenter = function() { + return /** @type{?proto.viam.common.v1.Pose} */ ( + jspb.Message.getWrapperField(this, proto.viam.common.v1.Pose, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.Pose|undefined} value + * @return {!proto.viam.common.v1.Geometry} returns this +*/ +proto.viam.common.v1.Geometry.prototype.setCenter = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.common.v1.Geometry} returns this + */ +proto.viam.common.v1.Geometry.prototype.clearCenter = function() { + return this.setCenter(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.common.v1.Geometry.prototype.hasCenter = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Sphere sphere = 2; + * @return {?proto.viam.common.v1.Sphere} + */ +proto.viam.common.v1.Geometry.prototype.getSphere = function() { + return /** @type{?proto.viam.common.v1.Sphere} */ ( + jspb.Message.getWrapperField(this, proto.viam.common.v1.Sphere, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.Sphere|undefined} value + * @return {!proto.viam.common.v1.Geometry} returns this +*/ +proto.viam.common.v1.Geometry.prototype.setSphere = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.viam.common.v1.Geometry.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.common.v1.Geometry} returns this + */ +proto.viam.common.v1.Geometry.prototype.clearSphere = function() { + return this.setSphere(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.common.v1.Geometry.prototype.hasSphere = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional RectangularPrism box = 3; + * @return {?proto.viam.common.v1.RectangularPrism} + */ +proto.viam.common.v1.Geometry.prototype.getBox = function() { + return /** @type{?proto.viam.common.v1.RectangularPrism} */ ( + jspb.Message.getWrapperField(this, proto.viam.common.v1.RectangularPrism, 3)); +}; + + +/** + * @param {?proto.viam.common.v1.RectangularPrism|undefined} value + * @return {!proto.viam.common.v1.Geometry} returns this +*/ +proto.viam.common.v1.Geometry.prototype.setBox = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.viam.common.v1.Geometry.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.common.v1.Geometry} returns this + */ +proto.viam.common.v1.Geometry.prototype.clearBox = function() { + return this.setBox(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.common.v1.Geometry.prototype.hasBox = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.common.v1.GeometriesInFrame.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.GeometriesInFrame.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.GeometriesInFrame.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.GeometriesInFrame} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.GeometriesInFrame.toObject = function(includeInstance, msg) { + var f, obj = { + referenceFrame: jspb.Message.getFieldWithDefault(msg, 1, ""), + geometriesList: jspb.Message.toObjectList(msg.getGeometriesList(), + proto.viam.common.v1.Geometry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.GeometriesInFrame} + */ +proto.viam.common.v1.GeometriesInFrame.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.GeometriesInFrame; + return proto.viam.common.v1.GeometriesInFrame.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.GeometriesInFrame} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.GeometriesInFrame} + */ +proto.viam.common.v1.GeometriesInFrame.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setReferenceFrame(value); + break; + case 2: + var value = new proto.viam.common.v1.Geometry; + reader.readMessage(value,proto.viam.common.v1.Geometry.deserializeBinaryFromReader); + msg.addGeometries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.GeometriesInFrame.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.GeometriesInFrame.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.GeometriesInFrame} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.GeometriesInFrame.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReferenceFrame(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getGeometriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.viam.common.v1.Geometry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string reference_frame = 1; + * @return {string} + */ +proto.viam.common.v1.GeometriesInFrame.prototype.getReferenceFrame = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.common.v1.GeometriesInFrame} returns this + */ +proto.viam.common.v1.GeometriesInFrame.prototype.setReferenceFrame = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Geometry geometries = 2; + * @return {!Array} + */ +proto.viam.common.v1.GeometriesInFrame.prototype.getGeometriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.common.v1.Geometry, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.common.v1.GeometriesInFrame} returns this +*/ +proto.viam.common.v1.GeometriesInFrame.prototype.setGeometriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.viam.common.v1.Geometry=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.Geometry} + */ +proto.viam.common.v1.GeometriesInFrame.prototype.addGeometries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.viam.common.v1.Geometry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.common.v1.GeometriesInFrame} returns this + */ +proto.viam.common.v1.GeometriesInFrame.prototype.clearGeometriesList = function() { + return this.setGeometriesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.PointCloudObject.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.PointCloudObject.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.PointCloudObject} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.PointCloudObject.toObject = function(includeInstance, msg) { + var f, obj = { + pointCloud: msg.getPointCloud_asB64(), + geometries: (f = msg.getGeometries()) && proto.viam.common.v1.GeometriesInFrame.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.PointCloudObject} + */ +proto.viam.common.v1.PointCloudObject.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.PointCloudObject; + return proto.viam.common.v1.PointCloudObject.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.PointCloudObject} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.PointCloudObject} + */ +proto.viam.common.v1.PointCloudObject.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPointCloud(value); + break; + case 2: + var value = new proto.viam.common.v1.GeometriesInFrame; + reader.readMessage(value,proto.viam.common.v1.GeometriesInFrame.deserializeBinaryFromReader); + msg.setGeometries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.PointCloudObject.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.PointCloudObject.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.PointCloudObject} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.PointCloudObject.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPointCloud_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getGeometries(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.common.v1.GeometriesInFrame.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes point_cloud = 1; + * @return {string} + */ +proto.viam.common.v1.PointCloudObject.prototype.getPointCloud = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes point_cloud = 1; + * This is a type-conversion wrapper around `getPointCloud()` + * @return {string} + */ +proto.viam.common.v1.PointCloudObject.prototype.getPointCloud_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPointCloud())); +}; + + +/** + * optional bytes point_cloud = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPointCloud()` + * @return {!Uint8Array} + */ +proto.viam.common.v1.PointCloudObject.prototype.getPointCloud_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPointCloud())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.common.v1.PointCloudObject} returns this + */ +proto.viam.common.v1.PointCloudObject.prototype.setPointCloud = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional GeometriesInFrame geometries = 2; + * @return {?proto.viam.common.v1.GeometriesInFrame} + */ +proto.viam.common.v1.PointCloudObject.prototype.getGeometries = function() { + return /** @type{?proto.viam.common.v1.GeometriesInFrame} */ ( + jspb.Message.getWrapperField(this, proto.viam.common.v1.GeometriesInFrame, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.GeometriesInFrame|undefined} value + * @return {!proto.viam.common.v1.PointCloudObject} returns this +*/ +proto.viam.common.v1.PointCloudObject.prototype.setGeometries = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.common.v1.PointCloudObject} returns this + */ +proto.viam.common.v1.PointCloudObject.prototype.clearGeometries = function() { + return this.setGeometries(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.common.v1.PointCloudObject.prototype.hasGeometries = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.GeoPoint.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.GeoPoint.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.GeoPoint} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.GeoPoint.toObject = function(includeInstance, msg) { + var f, obj = { + latitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + longitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.GeoPoint} + */ +proto.viam.common.v1.GeoPoint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.GeoPoint; + return proto.viam.common.v1.GeoPoint.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.GeoPoint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.GeoPoint} + */ +proto.viam.common.v1.GeoPoint.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLatitude(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLongitude(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.GeoPoint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.GeoPoint.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.GeoPoint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.GeoPoint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLatitude(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getLongitude(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } +}; + + +/** + * optional double latitude = 1; + * @return {number} + */ +proto.viam.common.v1.GeoPoint.prototype.getLatitude = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.GeoPoint} returns this + */ +proto.viam.common.v1.GeoPoint.prototype.setLatitude = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double longitude = 2; + * @return {number} + */ +proto.viam.common.v1.GeoPoint.prototype.getLongitude = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.common.v1.GeoPoint} returns this + */ +proto.viam.common.v1.GeoPoint.prototype.setLongitude = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.Transform.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.Transform.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.Transform} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Transform.toObject = function(includeInstance, msg) { + var f, obj = { + referenceFrame: jspb.Message.getFieldWithDefault(msg, 1, ""), + poseInObserverFrame: (f = msg.getPoseInObserverFrame()) && proto.viam.common.v1.PoseInFrame.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.Transform} + */ +proto.viam.common.v1.Transform.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.Transform; + return proto.viam.common.v1.Transform.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.Transform} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.Transform} + */ +proto.viam.common.v1.Transform.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setReferenceFrame(value); + break; + case 2: + var value = new proto.viam.common.v1.PoseInFrame; + reader.readMessage(value,proto.viam.common.v1.PoseInFrame.deserializeBinaryFromReader); + msg.setPoseInObserverFrame(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.Transform.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.Transform.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.Transform} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.Transform.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReferenceFrame(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPoseInObserverFrame(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.common.v1.PoseInFrame.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string reference_frame = 1; + * @return {string} + */ +proto.viam.common.v1.Transform.prototype.getReferenceFrame = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.common.v1.Transform} returns this + */ +proto.viam.common.v1.Transform.prototype.setReferenceFrame = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional PoseInFrame pose_in_observer_frame = 2; + * @return {?proto.viam.common.v1.PoseInFrame} + */ +proto.viam.common.v1.Transform.prototype.getPoseInObserverFrame = function() { + return /** @type{?proto.viam.common.v1.PoseInFrame} */ ( + jspb.Message.getWrapperField(this, proto.viam.common.v1.PoseInFrame, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.PoseInFrame|undefined} value + * @return {!proto.viam.common.v1.Transform} returns this +*/ +proto.viam.common.v1.Transform.prototype.setPoseInObserverFrame = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.common.v1.Transform} returns this + */ +proto.viam.common.v1.Transform.prototype.clearPoseInObserverFrame = function() { + return this.setPoseInObserverFrame(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.common.v1.Transform.prototype.hasPoseInObserverFrame = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.common.v1.WorldState.repeatedFields_ = [1,2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.WorldState.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.WorldState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.WorldState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.WorldState.toObject = function(includeInstance, msg) { + var f, obj = { + obstaclesList: jspb.Message.toObjectList(msg.getObstaclesList(), + proto.viam.common.v1.GeometriesInFrame.toObject, includeInstance), + interactionSpacesList: jspb.Message.toObjectList(msg.getInteractionSpacesList(), + proto.viam.common.v1.GeometriesInFrame.toObject, includeInstance), + transformsList: jspb.Message.toObjectList(msg.getTransformsList(), + proto.viam.common.v1.Transform.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.WorldState} + */ +proto.viam.common.v1.WorldState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.WorldState; + return proto.viam.common.v1.WorldState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.WorldState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.WorldState} + */ +proto.viam.common.v1.WorldState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.common.v1.GeometriesInFrame; + reader.readMessage(value,proto.viam.common.v1.GeometriesInFrame.deserializeBinaryFromReader); + msg.addObstacles(value); + break; + case 2: + var value = new proto.viam.common.v1.GeometriesInFrame; + reader.readMessage(value,proto.viam.common.v1.GeometriesInFrame.deserializeBinaryFromReader); + msg.addInteractionSpaces(value); + break; + case 3: + var value = new proto.viam.common.v1.Transform; + reader.readMessage(value,proto.viam.common.v1.Transform.deserializeBinaryFromReader); + msg.addTransforms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.WorldState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.WorldState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.WorldState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.WorldState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getObstaclesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.common.v1.GeometriesInFrame.serializeBinaryToWriter + ); + } + f = message.getInteractionSpacesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.viam.common.v1.GeometriesInFrame.serializeBinaryToWriter + ); + } + f = message.getTransformsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.viam.common.v1.Transform.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated GeometriesInFrame obstacles = 1; + * @return {!Array} + */ +proto.viam.common.v1.WorldState.prototype.getObstaclesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.common.v1.GeometriesInFrame, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.common.v1.WorldState} returns this +*/ +proto.viam.common.v1.WorldState.prototype.setObstaclesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.common.v1.GeometriesInFrame=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.GeometriesInFrame} + */ +proto.viam.common.v1.WorldState.prototype.addObstacles = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.common.v1.GeometriesInFrame, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.common.v1.WorldState} returns this + */ +proto.viam.common.v1.WorldState.prototype.clearObstaclesList = function() { + return this.setObstaclesList([]); +}; + + +/** + * repeated GeometriesInFrame interaction_spaces = 2; + * @return {!Array} + */ +proto.viam.common.v1.WorldState.prototype.getInteractionSpacesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.common.v1.GeometriesInFrame, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.common.v1.WorldState} returns this +*/ +proto.viam.common.v1.WorldState.prototype.setInteractionSpacesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.viam.common.v1.GeometriesInFrame=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.GeometriesInFrame} + */ +proto.viam.common.v1.WorldState.prototype.addInteractionSpaces = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.viam.common.v1.GeometriesInFrame, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.common.v1.WorldState} returns this + */ +proto.viam.common.v1.WorldState.prototype.clearInteractionSpacesList = function() { + return this.setInteractionSpacesList([]); +}; + + +/** + * repeated Transform transforms = 3; + * @return {!Array} + */ +proto.viam.common.v1.WorldState.prototype.getTransformsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.common.v1.Transform, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.common.v1.WorldState} returns this +*/ +proto.viam.common.v1.WorldState.prototype.setTransformsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.viam.common.v1.Transform=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.Transform} + */ +proto.viam.common.v1.WorldState.prototype.addTransforms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.viam.common.v1.Transform, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.common.v1.WorldState} returns this + */ +proto.viam.common.v1.WorldState.prototype.clearTransformsList = function() { + return this.setTransformsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.common.v1.ActuatorStatus.prototype.toObject = function(opt_includeInstance) { + return proto.viam.common.v1.ActuatorStatus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.common.v1.ActuatorStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.ActuatorStatus.toObject = function(includeInstance, msg) { + var f, obj = { + isMoving: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.common.v1.ActuatorStatus} + */ +proto.viam.common.v1.ActuatorStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.common.v1.ActuatorStatus; + return proto.viam.common.v1.ActuatorStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.common.v1.ActuatorStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.common.v1.ActuatorStatus} + */ +proto.viam.common.v1.ActuatorStatus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsMoving(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.common.v1.ActuatorStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.common.v1.ActuatorStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.common.v1.ActuatorStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.common.v1.ActuatorStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsMoving(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool is_moving = 1; + * @return {boolean} + */ +proto.viam.common.v1.ActuatorStatus.prototype.getIsMoving = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.common.v1.ActuatorStatus} returns this + */ +proto.viam.common.v1.ActuatorStatus.prototype.setIsMoving = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +goog.object.extend(exports, proto.viam.common.v1); diff --git a/gen/js/common/v1/common_pb_service.d.ts b/gen/js/common/v1/common_pb_service.d.ts new file mode 100644 index 000000000..fcd9790b4 --- /dev/null +++ b/gen/js/common/v1/common_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: viam.common.v1 +// file: common/v1/common.proto + diff --git a/gen/js/common/v1/common_pb_service.js b/gen/js/common/v1/common_pb_service.js new file mode 100644 index 000000000..fcd9790b4 --- /dev/null +++ b/gen/js/common/v1/common_pb_service.js @@ -0,0 +1,3 @@ +// package: viam.common.v1 +// file: common/v1/common.proto + diff --git a/gen/js/component/arm/v1/arm_grpc_web_pb.js b/gen/js/component/arm/v1/arm_grpc_web_pb.js new file mode 100644 index 000000000..15f79615d --- /dev/null +++ b/gen/js/component/arm/v1/arm_grpc_web_pb.js @@ -0,0 +1,388 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.arm.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.arm = {}; +proto.viam.component.arm.v1 = require('./arm_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.arm.v1.ArmServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.arm.v1.ArmServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.arm.v1.GetEndPositionRequest, + * !proto.viam.component.arm.v1.GetEndPositionResponse>} + */ +const methodDescriptor_ArmService_GetEndPosition = new grpc.web.MethodDescriptor( + '/viam.component.arm.v1.ArmService/GetEndPosition', + grpc.web.MethodType.UNARY, + proto.viam.component.arm.v1.GetEndPositionRequest, + proto.viam.component.arm.v1.GetEndPositionResponse, + /** + * @param {!proto.viam.component.arm.v1.GetEndPositionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.arm.v1.GetEndPositionResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.arm.v1.GetEndPositionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.arm.v1.GetEndPositionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.arm.v1.ArmServiceClient.prototype.getEndPosition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/GetEndPosition', + request, + metadata || {}, + methodDescriptor_ArmService_GetEndPosition, + callback); +}; + + +/** + * @param {!proto.viam.component.arm.v1.GetEndPositionRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.arm.v1.ArmServicePromiseClient.prototype.getEndPosition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/GetEndPosition', + request, + metadata || {}, + methodDescriptor_ArmService_GetEndPosition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.arm.v1.MoveToPositionRequest, + * !proto.viam.component.arm.v1.MoveToPositionResponse>} + */ +const methodDescriptor_ArmService_MoveToPosition = new grpc.web.MethodDescriptor( + '/viam.component.arm.v1.ArmService/MoveToPosition', + grpc.web.MethodType.UNARY, + proto.viam.component.arm.v1.MoveToPositionRequest, + proto.viam.component.arm.v1.MoveToPositionResponse, + /** + * @param {!proto.viam.component.arm.v1.MoveToPositionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.arm.v1.MoveToPositionResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.arm.v1.MoveToPositionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.arm.v1.MoveToPositionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.arm.v1.ArmServiceClient.prototype.moveToPosition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/MoveToPosition', + request, + metadata || {}, + methodDescriptor_ArmService_MoveToPosition, + callback); +}; + + +/** + * @param {!proto.viam.component.arm.v1.MoveToPositionRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.arm.v1.ArmServicePromiseClient.prototype.moveToPosition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/MoveToPosition', + request, + metadata || {}, + methodDescriptor_ArmService_MoveToPosition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.arm.v1.GetJointPositionsRequest, + * !proto.viam.component.arm.v1.GetJointPositionsResponse>} + */ +const methodDescriptor_ArmService_GetJointPositions = new grpc.web.MethodDescriptor( + '/viam.component.arm.v1.ArmService/GetJointPositions', + grpc.web.MethodType.UNARY, + proto.viam.component.arm.v1.GetJointPositionsRequest, + proto.viam.component.arm.v1.GetJointPositionsResponse, + /** + * @param {!proto.viam.component.arm.v1.GetJointPositionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.arm.v1.GetJointPositionsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.arm.v1.GetJointPositionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.arm.v1.GetJointPositionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.arm.v1.ArmServiceClient.prototype.getJointPositions = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/GetJointPositions', + request, + metadata || {}, + methodDescriptor_ArmService_GetJointPositions, + callback); +}; + + +/** + * @param {!proto.viam.component.arm.v1.GetJointPositionsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.arm.v1.ArmServicePromiseClient.prototype.getJointPositions = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/GetJointPositions', + request, + metadata || {}, + methodDescriptor_ArmService_GetJointPositions); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.arm.v1.MoveToJointPositionsRequest, + * !proto.viam.component.arm.v1.MoveToJointPositionsResponse>} + */ +const methodDescriptor_ArmService_MoveToJointPositions = new grpc.web.MethodDescriptor( + '/viam.component.arm.v1.ArmService/MoveToJointPositions', + grpc.web.MethodType.UNARY, + proto.viam.component.arm.v1.MoveToJointPositionsRequest, + proto.viam.component.arm.v1.MoveToJointPositionsResponse, + /** + * @param {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.arm.v1.MoveToJointPositionsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.arm.v1.MoveToJointPositionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.arm.v1.ArmServiceClient.prototype.moveToJointPositions = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/MoveToJointPositions', + request, + metadata || {}, + methodDescriptor_ArmService_MoveToJointPositions, + callback); +}; + + +/** + * @param {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.arm.v1.ArmServicePromiseClient.prototype.moveToJointPositions = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/MoveToJointPositions', + request, + metadata || {}, + methodDescriptor_ArmService_MoveToJointPositions); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.arm.v1.StopRequest, + * !proto.viam.component.arm.v1.StopResponse>} + */ +const methodDescriptor_ArmService_Stop = new grpc.web.MethodDescriptor( + '/viam.component.arm.v1.ArmService/Stop', + grpc.web.MethodType.UNARY, + proto.viam.component.arm.v1.StopRequest, + proto.viam.component.arm.v1.StopResponse, + /** + * @param {!proto.viam.component.arm.v1.StopRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.arm.v1.StopResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.arm.v1.StopRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.arm.v1.StopResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.arm.v1.ArmServiceClient.prototype.stop = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/Stop', + request, + metadata || {}, + methodDescriptor_ArmService_Stop, + callback); +}; + + +/** + * @param {!proto.viam.component.arm.v1.StopRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.arm.v1.ArmServicePromiseClient.prototype.stop = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.arm.v1.ArmService/Stop', + request, + metadata || {}, + methodDescriptor_ArmService_Stop); +}; + + +module.exports = proto.viam.component.arm.v1; + diff --git a/gen/js/component/arm/v1/arm_pb.d.ts b/gen/js/component/arm/v1/arm_pb.d.ts new file mode 100644 index 000000000..7f245de21 --- /dev/null +++ b/gen/js/component/arm/v1/arm_pb.d.ts @@ -0,0 +1,302 @@ +// package: viam.component.arm.v1 +// file: component/arm/v1/arm.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class GetEndPositionRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEndPositionRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetEndPositionRequest): GetEndPositionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEndPositionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEndPositionRequest; + static deserializeBinaryFromReader(message: GetEndPositionRequest, reader: jspb.BinaryReader): GetEndPositionRequest; +} + +export namespace GetEndPositionRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetEndPositionResponse extends jspb.Message { + hasPose(): boolean; + clearPose(): void; + getPose(): common_v1_common_pb.Pose | undefined; + setPose(value?: common_v1_common_pb.Pose): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEndPositionResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetEndPositionResponse): GetEndPositionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEndPositionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEndPositionResponse; + static deserializeBinaryFromReader(message: GetEndPositionResponse, reader: jspb.BinaryReader): GetEndPositionResponse; +} + +export namespace GetEndPositionResponse { + export type AsObject = { + pose?: common_v1_common_pb.Pose.AsObject, + } +} + +export class JointPositions extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): JointPositions.AsObject; + static toObject(includeInstance: boolean, msg: JointPositions): JointPositions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: JointPositions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): JointPositions; + static deserializeBinaryFromReader(message: JointPositions, reader: jspb.BinaryReader): JointPositions; +} + +export namespace JointPositions { + export type AsObject = { + valuesList: Array, + } +} + +export class GetJointPositionsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetJointPositionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetJointPositionsRequest): GetJointPositionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetJointPositionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetJointPositionsRequest; + static deserializeBinaryFromReader(message: GetJointPositionsRequest, reader: jspb.BinaryReader): GetJointPositionsRequest; +} + +export namespace GetJointPositionsRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetJointPositionsResponse extends jspb.Message { + hasPositions(): boolean; + clearPositions(): void; + getPositions(): JointPositions | undefined; + setPositions(value?: JointPositions): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetJointPositionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetJointPositionsResponse): GetJointPositionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetJointPositionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetJointPositionsResponse; + static deserializeBinaryFromReader(message: GetJointPositionsResponse, reader: jspb.BinaryReader): GetJointPositionsResponse; +} + +export namespace GetJointPositionsResponse { + export type AsObject = { + positions?: JointPositions.AsObject, + } +} + +export class MoveToPositionRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasTo(): boolean; + clearTo(): void; + getTo(): common_v1_common_pb.Pose | undefined; + setTo(value?: common_v1_common_pb.Pose): void; + + hasWorldState(): boolean; + clearWorldState(): void; + getWorldState(): common_v1_common_pb.WorldState | undefined; + setWorldState(value?: common_v1_common_pb.WorldState): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveToPositionRequest.AsObject; + static toObject(includeInstance: boolean, msg: MoveToPositionRequest): MoveToPositionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveToPositionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveToPositionRequest; + static deserializeBinaryFromReader(message: MoveToPositionRequest, reader: jspb.BinaryReader): MoveToPositionRequest; +} + +export namespace MoveToPositionRequest { + export type AsObject = { + name: string, + to?: common_v1_common_pb.Pose.AsObject, + worldState?: common_v1_common_pb.WorldState.AsObject, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class MoveToPositionResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveToPositionResponse.AsObject; + static toObject(includeInstance: boolean, msg: MoveToPositionResponse): MoveToPositionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveToPositionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveToPositionResponse; + static deserializeBinaryFromReader(message: MoveToPositionResponse, reader: jspb.BinaryReader): MoveToPositionResponse; +} + +export namespace MoveToPositionResponse { + export type AsObject = { + } +} + +export class MoveToJointPositionsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasPositions(): boolean; + clearPositions(): void; + getPositions(): JointPositions | undefined; + setPositions(value?: JointPositions): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveToJointPositionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: MoveToJointPositionsRequest): MoveToJointPositionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveToJointPositionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveToJointPositionsRequest; + static deserializeBinaryFromReader(message: MoveToJointPositionsRequest, reader: jspb.BinaryReader): MoveToJointPositionsRequest; +} + +export namespace MoveToJointPositionsRequest { + export type AsObject = { + name: string, + positions?: JointPositions.AsObject, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class MoveToJointPositionsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveToJointPositionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: MoveToJointPositionsResponse): MoveToJointPositionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveToJointPositionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveToJointPositionsResponse; + static deserializeBinaryFromReader(message: MoveToJointPositionsResponse, reader: jspb.BinaryReader): MoveToJointPositionsResponse; +} + +export namespace MoveToJointPositionsResponse { + export type AsObject = { + } +} + +export class StopRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopRequest.AsObject; + static toObject(includeInstance: boolean, msg: StopRequest): StopRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopRequest; + static deserializeBinaryFromReader(message: StopRequest, reader: jspb.BinaryReader): StopRequest; +} + +export namespace StopRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class StopResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopResponse.AsObject; + static toObject(includeInstance: boolean, msg: StopResponse): StopResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopResponse; + static deserializeBinaryFromReader(message: StopResponse, reader: jspb.BinaryReader): StopResponse; +} + +export namespace StopResponse { + export type AsObject = { + } +} + +export class Status extends jspb.Message { + hasEndPosition(): boolean; + clearEndPosition(): void; + getEndPosition(): common_v1_common_pb.Pose | undefined; + setEndPosition(value?: common_v1_common_pb.Pose): void; + + hasJointPositions(): boolean; + clearJointPositions(): void; + getJointPositions(): JointPositions | undefined; + setJointPositions(value?: JointPositions): void; + + getIsMoving(): boolean; + setIsMoving(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; +} + +export namespace Status { + export type AsObject = { + endPosition?: common_v1_common_pb.Pose.AsObject, + jointPositions?: JointPositions.AsObject, + isMoving: boolean, + } +} + diff --git a/gen/js/component/arm/v1/arm_pb.js b/gen/js/component/arm/v1/arm_pb.js new file mode 100644 index 000000000..6ce87d3c9 --- /dev/null +++ b/gen/js/component/arm/v1/arm_pb.js @@ -0,0 +1,2341 @@ +// source: component/arm/v1/arm.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.component.arm.v1.GetEndPositionRequest', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.GetEndPositionResponse', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.GetJointPositionsRequest', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.GetJointPositionsResponse', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.JointPositions', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.MoveToJointPositionsRequest', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.MoveToJointPositionsResponse', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.MoveToPositionRequest', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.MoveToPositionResponse', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.Status', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.StopRequest', null, global); +goog.exportSymbol('proto.viam.component.arm.v1.StopResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.GetEndPositionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.GetEndPositionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.GetEndPositionRequest.displayName = 'proto.viam.component.arm.v1.GetEndPositionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.GetEndPositionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.GetEndPositionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.GetEndPositionResponse.displayName = 'proto.viam.component.arm.v1.GetEndPositionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.JointPositions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.arm.v1.JointPositions.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.arm.v1.JointPositions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.JointPositions.displayName = 'proto.viam.component.arm.v1.JointPositions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.GetJointPositionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.GetJointPositionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.GetJointPositionsRequest.displayName = 'proto.viam.component.arm.v1.GetJointPositionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.GetJointPositionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.GetJointPositionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.GetJointPositionsResponse.displayName = 'proto.viam.component.arm.v1.GetJointPositionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.MoveToPositionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.MoveToPositionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.MoveToPositionRequest.displayName = 'proto.viam.component.arm.v1.MoveToPositionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.MoveToPositionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.MoveToPositionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.MoveToPositionResponse.displayName = 'proto.viam.component.arm.v1.MoveToPositionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.MoveToJointPositionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.MoveToJointPositionsRequest.displayName = 'proto.viam.component.arm.v1.MoveToJointPositionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.MoveToJointPositionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.MoveToJointPositionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.MoveToJointPositionsResponse.displayName = 'proto.viam.component.arm.v1.MoveToJointPositionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.StopRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.StopRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.StopRequest.displayName = 'proto.viam.component.arm.v1.StopRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.StopResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.StopResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.StopResponse.displayName = 'proto.viam.component.arm.v1.StopResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.arm.v1.Status = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.arm.v1.Status, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.arm.v1.Status.displayName = 'proto.viam.component.arm.v1.Status'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.GetEndPositionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.GetEndPositionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.GetEndPositionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.GetEndPositionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.GetEndPositionRequest} + */ +proto.viam.component.arm.v1.GetEndPositionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.GetEndPositionRequest; + return proto.viam.component.arm.v1.GetEndPositionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.GetEndPositionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.GetEndPositionRequest} + */ +proto.viam.component.arm.v1.GetEndPositionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.GetEndPositionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.GetEndPositionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.GetEndPositionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.GetEndPositionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.arm.v1.GetEndPositionRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.arm.v1.GetEndPositionRequest} returns this + */ +proto.viam.component.arm.v1.GetEndPositionRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.arm.v1.GetEndPositionRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.arm.v1.GetEndPositionRequest} returns this +*/ +proto.viam.component.arm.v1.GetEndPositionRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.GetEndPositionRequest} returns this + */ +proto.viam.component.arm.v1.GetEndPositionRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.GetEndPositionRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.GetEndPositionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.GetEndPositionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.GetEndPositionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.GetEndPositionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pose: (f = msg.getPose()) && common_v1_common_pb.Pose.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.GetEndPositionResponse} + */ +proto.viam.component.arm.v1.GetEndPositionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.GetEndPositionResponse; + return proto.viam.component.arm.v1.GetEndPositionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.GetEndPositionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.GetEndPositionResponse} + */ +proto.viam.component.arm.v1.GetEndPositionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.Pose; + reader.readMessage(value,common_v1_common_pb.Pose.deserializeBinaryFromReader); + msg.setPose(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.GetEndPositionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.GetEndPositionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.GetEndPositionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.GetEndPositionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPose(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.Pose.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.Pose pose = 1; + * @return {?proto.viam.common.v1.Pose} + */ +proto.viam.component.arm.v1.GetEndPositionResponse.prototype.getPose = function() { + return /** @type{?proto.viam.common.v1.Pose} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Pose, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.Pose|undefined} value + * @return {!proto.viam.component.arm.v1.GetEndPositionResponse} returns this +*/ +proto.viam.component.arm.v1.GetEndPositionResponse.prototype.setPose = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.GetEndPositionResponse} returns this + */ +proto.viam.component.arm.v1.GetEndPositionResponse.prototype.clearPose = function() { + return this.setPose(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.GetEndPositionResponse.prototype.hasPose = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.arm.v1.JointPositions.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.JointPositions.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.JointPositions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.JointPositions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.JointPositions.toObject = function(includeInstance, msg) { + var f, obj = { + valuesList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.JointPositions} + */ +proto.viam.component.arm.v1.JointPositions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.JointPositions; + return proto.viam.component.arm.v1.JointPositions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.JointPositions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.JointPositions} + */ +proto.viam.component.arm.v1.JointPositions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addValues(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.JointPositions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.JointPositions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.JointPositions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.JointPositions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writePackedDouble( + 1, + f + ); + } +}; + + +/** + * repeated double values = 1; + * @return {!Array} + */ +proto.viam.component.arm.v1.JointPositions.prototype.getValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.arm.v1.JointPositions} returns this + */ +proto.viam.component.arm.v1.JointPositions.prototype.setValuesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.viam.component.arm.v1.JointPositions} returns this + */ +proto.viam.component.arm.v1.JointPositions.prototype.addValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.arm.v1.JointPositions} returns this + */ +proto.viam.component.arm.v1.JointPositions.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.GetJointPositionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.GetJointPositionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.GetJointPositionsRequest} + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.GetJointPositionsRequest; + return proto.viam.component.arm.v1.GetJointPositionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.GetJointPositionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.GetJointPositionsRequest} + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.GetJointPositionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.GetJointPositionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.arm.v1.GetJointPositionsRequest} returns this + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.arm.v1.GetJointPositionsRequest} returns this +*/ +proto.viam.component.arm.v1.GetJointPositionsRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.GetJointPositionsRequest} returns this + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.GetJointPositionsRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.GetJointPositionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.GetJointPositionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.GetJointPositionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.GetJointPositionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + positions: (f = msg.getPositions()) && proto.viam.component.arm.v1.JointPositions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.GetJointPositionsResponse} + */ +proto.viam.component.arm.v1.GetJointPositionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.GetJointPositionsResponse; + return proto.viam.component.arm.v1.GetJointPositionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.GetJointPositionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.GetJointPositionsResponse} + */ +proto.viam.component.arm.v1.GetJointPositionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.component.arm.v1.JointPositions; + reader.readMessage(value,proto.viam.component.arm.v1.JointPositions.deserializeBinaryFromReader); + msg.setPositions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.GetJointPositionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.GetJointPositionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.GetJointPositionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.GetJointPositionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPositions(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.component.arm.v1.JointPositions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional JointPositions positions = 1; + * @return {?proto.viam.component.arm.v1.JointPositions} + */ +proto.viam.component.arm.v1.GetJointPositionsResponse.prototype.getPositions = function() { + return /** @type{?proto.viam.component.arm.v1.JointPositions} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.arm.v1.JointPositions, 1)); +}; + + +/** + * @param {?proto.viam.component.arm.v1.JointPositions|undefined} value + * @return {!proto.viam.component.arm.v1.GetJointPositionsResponse} returns this +*/ +proto.viam.component.arm.v1.GetJointPositionsResponse.prototype.setPositions = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.GetJointPositionsResponse} returns this + */ +proto.viam.component.arm.v1.GetJointPositionsResponse.prototype.clearPositions = function() { + return this.setPositions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.GetJointPositionsResponse.prototype.hasPositions = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.MoveToPositionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.MoveToPositionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.MoveToPositionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + to: (f = msg.getTo()) && common_v1_common_pb.Pose.toObject(includeInstance, f), + worldState: (f = msg.getWorldState()) && common_v1_common_pb.WorldState.toObject(includeInstance, f), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.MoveToPositionRequest} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.MoveToPositionRequest; + return proto.viam.component.arm.v1.MoveToPositionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.MoveToPositionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.MoveToPositionRequest} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new common_v1_common_pb.Pose; + reader.readMessage(value,common_v1_common_pb.Pose.deserializeBinaryFromReader); + msg.setTo(value); + break; + case 3: + var value = new common_v1_common_pb.WorldState; + reader.readMessage(value,common_v1_common_pb.WorldState.deserializeBinaryFromReader); + msg.setWorldState(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.MoveToPositionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.MoveToPositionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.MoveToPositionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTo(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_v1_common_pb.Pose.serializeBinaryToWriter + ); + } + f = message.getWorldState(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_v1_common_pb.WorldState.serializeBinaryToWriter + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.arm.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional viam.common.v1.Pose to = 2; + * @return {?proto.viam.common.v1.Pose} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.getTo = function() { + return /** @type{?proto.viam.common.v1.Pose} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Pose, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.Pose|undefined} value + * @return {!proto.viam.component.arm.v1.MoveToPositionRequest} returns this +*/ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.setTo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.clearTo = function() { + return this.setTo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.hasTo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional viam.common.v1.WorldState world_state = 3; + * @return {?proto.viam.common.v1.WorldState} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.getWorldState = function() { + return /** @type{?proto.viam.common.v1.WorldState} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.WorldState, 3)); +}; + + +/** + * @param {?proto.viam.common.v1.WorldState|undefined} value + * @return {!proto.viam.component.arm.v1.MoveToPositionRequest} returns this +*/ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.setWorldState = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.clearWorldState = function() { + return this.setWorldState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.hasWorldState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.arm.v1.MoveToPositionRequest} returns this +*/ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.MoveToPositionRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.MoveToPositionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.MoveToPositionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.MoveToPositionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.MoveToPositionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.MoveToPositionResponse} + */ +proto.viam.component.arm.v1.MoveToPositionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.MoveToPositionResponse; + return proto.viam.component.arm.v1.MoveToPositionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.MoveToPositionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.MoveToPositionResponse} + */ +proto.viam.component.arm.v1.MoveToPositionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.MoveToPositionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.MoveToPositionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.MoveToPositionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.MoveToPositionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.MoveToJointPositionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + positions: (f = msg.getPositions()) && proto.viam.component.arm.v1.JointPositions.toObject(includeInstance, f), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.MoveToJointPositionsRequest; + return proto.viam.component.arm.v1.MoveToJointPositionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.viam.component.arm.v1.JointPositions; + reader.readMessage(value,proto.viam.component.arm.v1.JointPositions.deserializeBinaryFromReader); + msg.setPositions(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.MoveToJointPositionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPositions(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.component.arm.v1.JointPositions.serializeBinaryToWriter + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} returns this + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional JointPositions positions = 2; + * @return {?proto.viam.component.arm.v1.JointPositions} + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.getPositions = function() { + return /** @type{?proto.viam.component.arm.v1.JointPositions} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.arm.v1.JointPositions, 2)); +}; + + +/** + * @param {?proto.viam.component.arm.v1.JointPositions|undefined} value + * @return {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} returns this +*/ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.setPositions = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} returns this + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.clearPositions = function() { + return this.setPositions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.hasPositions = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} returns this +*/ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.MoveToJointPositionsRequest} returns this + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.MoveToJointPositionsRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.MoveToJointPositionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.MoveToJointPositionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.MoveToJointPositionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.MoveToJointPositionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.MoveToJointPositionsResponse} + */ +proto.viam.component.arm.v1.MoveToJointPositionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.MoveToJointPositionsResponse; + return proto.viam.component.arm.v1.MoveToJointPositionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.MoveToJointPositionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.MoveToJointPositionsResponse} + */ +proto.viam.component.arm.v1.MoveToJointPositionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.MoveToJointPositionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.MoveToJointPositionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.MoveToJointPositionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.MoveToJointPositionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.StopRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.StopRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.StopRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.StopRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.StopRequest} + */ +proto.viam.component.arm.v1.StopRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.StopRequest; + return proto.viam.component.arm.v1.StopRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.StopRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.StopRequest} + */ +proto.viam.component.arm.v1.StopRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.StopRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.StopRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.StopRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.StopRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.arm.v1.StopRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.arm.v1.StopRequest} returns this + */ +proto.viam.component.arm.v1.StopRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.arm.v1.StopRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.arm.v1.StopRequest} returns this +*/ +proto.viam.component.arm.v1.StopRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.StopRequest} returns this + */ +proto.viam.component.arm.v1.StopRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.StopRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.StopResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.StopResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.StopResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.StopResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.StopResponse} + */ +proto.viam.component.arm.v1.StopResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.StopResponse; + return proto.viam.component.arm.v1.StopResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.StopResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.StopResponse} + */ +proto.viam.component.arm.v1.StopResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.StopResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.StopResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.StopResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.StopResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.arm.v1.Status.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.arm.v1.Status.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.arm.v1.Status} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.Status.toObject = function(includeInstance, msg) { + var f, obj = { + endPosition: (f = msg.getEndPosition()) && common_v1_common_pb.Pose.toObject(includeInstance, f), + jointPositions: (f = msg.getJointPositions()) && proto.viam.component.arm.v1.JointPositions.toObject(includeInstance, f), + isMoving: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.arm.v1.Status} + */ +proto.viam.component.arm.v1.Status.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.arm.v1.Status; + return proto.viam.component.arm.v1.Status.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.arm.v1.Status} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.arm.v1.Status} + */ +proto.viam.component.arm.v1.Status.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.Pose; + reader.readMessage(value,common_v1_common_pb.Pose.deserializeBinaryFromReader); + msg.setEndPosition(value); + break; + case 2: + var value = new proto.viam.component.arm.v1.JointPositions; + reader.readMessage(value,proto.viam.component.arm.v1.JointPositions.deserializeBinaryFromReader); + msg.setJointPositions(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsMoving(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.arm.v1.Status.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.arm.v1.Status.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.arm.v1.Status} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.arm.v1.Status.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEndPosition(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.Pose.serializeBinaryToWriter + ); + } + f = message.getJointPositions(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.component.arm.v1.JointPositions.serializeBinaryToWriter + ); + } + f = message.getIsMoving(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional viam.common.v1.Pose end_position = 1; + * @return {?proto.viam.common.v1.Pose} + */ +proto.viam.component.arm.v1.Status.prototype.getEndPosition = function() { + return /** @type{?proto.viam.common.v1.Pose} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Pose, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.Pose|undefined} value + * @return {!proto.viam.component.arm.v1.Status} returns this +*/ +proto.viam.component.arm.v1.Status.prototype.setEndPosition = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.Status} returns this + */ +proto.viam.component.arm.v1.Status.prototype.clearEndPosition = function() { + return this.setEndPosition(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.Status.prototype.hasEndPosition = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional JointPositions joint_positions = 2; + * @return {?proto.viam.component.arm.v1.JointPositions} + */ +proto.viam.component.arm.v1.Status.prototype.getJointPositions = function() { + return /** @type{?proto.viam.component.arm.v1.JointPositions} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.arm.v1.JointPositions, 2)); +}; + + +/** + * @param {?proto.viam.component.arm.v1.JointPositions|undefined} value + * @return {!proto.viam.component.arm.v1.Status} returns this +*/ +proto.viam.component.arm.v1.Status.prototype.setJointPositions = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.arm.v1.Status} returns this + */ +proto.viam.component.arm.v1.Status.prototype.clearJointPositions = function() { + return this.setJointPositions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.arm.v1.Status.prototype.hasJointPositions = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool is_moving = 3; + * @return {boolean} + */ +proto.viam.component.arm.v1.Status.prototype.getIsMoving = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.arm.v1.Status} returns this + */ +proto.viam.component.arm.v1.Status.prototype.setIsMoving = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +goog.object.extend(exports, proto.viam.component.arm.v1); diff --git a/gen/js/component/arm/v1/arm_pb_service.d.ts b/gen/js/component/arm/v1/arm_pb_service.d.ts new file mode 100644 index 000000000..51b03e695 --- /dev/null +++ b/gen/js/component/arm/v1/arm_pb_service.d.ts @@ -0,0 +1,139 @@ +// package: viam.component.arm.v1 +// file: component/arm/v1/arm.proto + +import * as component_arm_v1_arm_pb from "../../../component/arm/v1/arm_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type ArmServiceGetEndPosition = { + readonly methodName: string; + readonly service: typeof ArmService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_arm_v1_arm_pb.GetEndPositionRequest; + readonly responseType: typeof component_arm_v1_arm_pb.GetEndPositionResponse; +}; + +type ArmServiceMoveToPosition = { + readonly methodName: string; + readonly service: typeof ArmService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_arm_v1_arm_pb.MoveToPositionRequest; + readonly responseType: typeof component_arm_v1_arm_pb.MoveToPositionResponse; +}; + +type ArmServiceGetJointPositions = { + readonly methodName: string; + readonly service: typeof ArmService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_arm_v1_arm_pb.GetJointPositionsRequest; + readonly responseType: typeof component_arm_v1_arm_pb.GetJointPositionsResponse; +}; + +type ArmServiceMoveToJointPositions = { + readonly methodName: string; + readonly service: typeof ArmService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_arm_v1_arm_pb.MoveToJointPositionsRequest; + readonly responseType: typeof component_arm_v1_arm_pb.MoveToJointPositionsResponse; +}; + +type ArmServiceStop = { + readonly methodName: string; + readonly service: typeof ArmService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_arm_v1_arm_pb.StopRequest; + readonly responseType: typeof component_arm_v1_arm_pb.StopResponse; +}; + +export class ArmService { + static readonly serviceName: string; + static readonly GetEndPosition: ArmServiceGetEndPosition; + static readonly MoveToPosition: ArmServiceMoveToPosition; + static readonly GetJointPositions: ArmServiceGetJointPositions; + static readonly MoveToJointPositions: ArmServiceMoveToJointPositions; + static readonly Stop: ArmServiceStop; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class ArmServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getEndPosition( + requestMessage: component_arm_v1_arm_pb.GetEndPositionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.GetEndPositionResponse|null) => void + ): UnaryResponse; + getEndPosition( + requestMessage: component_arm_v1_arm_pb.GetEndPositionRequest, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.GetEndPositionResponse|null) => void + ): UnaryResponse; + moveToPosition( + requestMessage: component_arm_v1_arm_pb.MoveToPositionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.MoveToPositionResponse|null) => void + ): UnaryResponse; + moveToPosition( + requestMessage: component_arm_v1_arm_pb.MoveToPositionRequest, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.MoveToPositionResponse|null) => void + ): UnaryResponse; + getJointPositions( + requestMessage: component_arm_v1_arm_pb.GetJointPositionsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.GetJointPositionsResponse|null) => void + ): UnaryResponse; + getJointPositions( + requestMessage: component_arm_v1_arm_pb.GetJointPositionsRequest, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.GetJointPositionsResponse|null) => void + ): UnaryResponse; + moveToJointPositions( + requestMessage: component_arm_v1_arm_pb.MoveToJointPositionsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.MoveToJointPositionsResponse|null) => void + ): UnaryResponse; + moveToJointPositions( + requestMessage: component_arm_v1_arm_pb.MoveToJointPositionsRequest, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.MoveToJointPositionsResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_arm_v1_arm_pb.StopRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.StopResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_arm_v1_arm_pb.StopRequest, + callback: (error: ServiceError|null, responseMessage: component_arm_v1_arm_pb.StopResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/arm/v1/arm_pb_service.js b/gen/js/component/arm/v1/arm_pb_service.js new file mode 100644 index 000000000..1642c2715 --- /dev/null +++ b/gen/js/component/arm/v1/arm_pb_service.js @@ -0,0 +1,221 @@ +// package: viam.component.arm.v1 +// file: component/arm/v1/arm.proto + +var component_arm_v1_arm_pb = require("../../../component/arm/v1/arm_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var ArmService = (function () { + function ArmService() {} + ArmService.serviceName = "viam.component.arm.v1.ArmService"; + return ArmService; +}()); + +ArmService.GetEndPosition = { + methodName: "GetEndPosition", + service: ArmService, + requestStream: false, + responseStream: false, + requestType: component_arm_v1_arm_pb.GetEndPositionRequest, + responseType: component_arm_v1_arm_pb.GetEndPositionResponse +}; + +ArmService.MoveToPosition = { + methodName: "MoveToPosition", + service: ArmService, + requestStream: false, + responseStream: false, + requestType: component_arm_v1_arm_pb.MoveToPositionRequest, + responseType: component_arm_v1_arm_pb.MoveToPositionResponse +}; + +ArmService.GetJointPositions = { + methodName: "GetJointPositions", + service: ArmService, + requestStream: false, + responseStream: false, + requestType: component_arm_v1_arm_pb.GetJointPositionsRequest, + responseType: component_arm_v1_arm_pb.GetJointPositionsResponse +}; + +ArmService.MoveToJointPositions = { + methodName: "MoveToJointPositions", + service: ArmService, + requestStream: false, + responseStream: false, + requestType: component_arm_v1_arm_pb.MoveToJointPositionsRequest, + responseType: component_arm_v1_arm_pb.MoveToJointPositionsResponse +}; + +ArmService.Stop = { + methodName: "Stop", + service: ArmService, + requestStream: false, + responseStream: false, + requestType: component_arm_v1_arm_pb.StopRequest, + responseType: component_arm_v1_arm_pb.StopResponse +}; + +exports.ArmService = ArmService; + +function ArmServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +ArmServiceClient.prototype.getEndPosition = function getEndPosition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ArmService.GetEndPosition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ArmServiceClient.prototype.moveToPosition = function moveToPosition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ArmService.MoveToPosition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ArmServiceClient.prototype.getJointPositions = function getJointPositions(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ArmService.GetJointPositions, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ArmServiceClient.prototype.moveToJointPositions = function moveToJointPositions(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ArmService.MoveToJointPositions, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ArmServiceClient.prototype.stop = function stop(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ArmService.Stop, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.ArmServiceClient = ArmServiceClient; + diff --git a/gen/js/component/audioinput/v1/audioinput_grpc_web_pb.js b/gen/js/component/audioinput/v1/audioinput_grpc_web_pb.js new file mode 100644 index 000000000..bba346365 --- /dev/null +++ b/gen/js/component/audioinput/v1/audioinput_grpc_web_pb.js @@ -0,0 +1,261 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.audioinput.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_api_httpbody_pb = require('../../../google/api/httpbody_pb.js') + +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.audioinput = {}; +proto.viam.component.audioinput.v1 = require('./audioinput_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.audioinput.v1.AudioInputServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.audioinput.v1.AudioInputServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.audioinput.v1.ChunksRequest, + * !proto.viam.component.audioinput.v1.ChunksResponse>} + */ +const methodDescriptor_AudioInputService_Chunks = new grpc.web.MethodDescriptor( + '/viam.component.audioinput.v1.AudioInputService/Chunks', + grpc.web.MethodType.SERVER_STREAMING, + proto.viam.component.audioinput.v1.ChunksRequest, + proto.viam.component.audioinput.v1.ChunksResponse, + /** + * @param {!proto.viam.component.audioinput.v1.ChunksRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.audioinput.v1.ChunksResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.audioinput.v1.ChunksRequest} request The request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!grpc.web.ClientReadableStream} + * The XHR Node Readable Stream + */ +proto.viam.component.audioinput.v1.AudioInputServiceClient.prototype.chunks = + function(request, metadata) { + return this.client_.serverStreaming(this.hostname_ + + '/viam.component.audioinput.v1.AudioInputService/Chunks', + request, + metadata || {}, + methodDescriptor_AudioInputService_Chunks); +}; + + +/** + * @param {!proto.viam.component.audioinput.v1.ChunksRequest} request The request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!grpc.web.ClientReadableStream} + * The XHR Node Readable Stream + */ +proto.viam.component.audioinput.v1.AudioInputServicePromiseClient.prototype.chunks = + function(request, metadata) { + return this.client_.serverStreaming(this.hostname_ + + '/viam.component.audioinput.v1.AudioInputService/Chunks', + request, + metadata || {}, + methodDescriptor_AudioInputService_Chunks); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.audioinput.v1.PropertiesRequest, + * !proto.viam.component.audioinput.v1.PropertiesResponse>} + */ +const methodDescriptor_AudioInputService_Properties = new grpc.web.MethodDescriptor( + '/viam.component.audioinput.v1.AudioInputService/Properties', + grpc.web.MethodType.UNARY, + proto.viam.component.audioinput.v1.PropertiesRequest, + proto.viam.component.audioinput.v1.PropertiesResponse, + /** + * @param {!proto.viam.component.audioinput.v1.PropertiesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.audioinput.v1.PropertiesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.audioinput.v1.PropertiesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.audioinput.v1.PropertiesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.audioinput.v1.AudioInputServiceClient.prototype.properties = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.audioinput.v1.AudioInputService/Properties', + request, + metadata || {}, + methodDescriptor_AudioInputService_Properties, + callback); +}; + + +/** + * @param {!proto.viam.component.audioinput.v1.PropertiesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.audioinput.v1.AudioInputServicePromiseClient.prototype.properties = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.audioinput.v1.AudioInputService/Properties', + request, + metadata || {}, + methodDescriptor_AudioInputService_Properties); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.audioinput.v1.RecordRequest, + * !proto.google.api.HttpBody>} + */ +const methodDescriptor_AudioInputService_Record = new grpc.web.MethodDescriptor( + '/viam.component.audioinput.v1.AudioInputService/Record', + grpc.web.MethodType.UNARY, + proto.viam.component.audioinput.v1.RecordRequest, + google_api_httpbody_pb.HttpBody, + /** + * @param {!proto.viam.component.audioinput.v1.RecordRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + google_api_httpbody_pb.HttpBody.deserializeBinary +); + + +/** + * @param {!proto.viam.component.audioinput.v1.RecordRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.google.api.HttpBody)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.audioinput.v1.AudioInputServiceClient.prototype.record = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.audioinput.v1.AudioInputService/Record', + request, + metadata || {}, + methodDescriptor_AudioInputService_Record, + callback); +}; + + +/** + * @param {!proto.viam.component.audioinput.v1.RecordRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.audioinput.v1.AudioInputServicePromiseClient.prototype.record = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.audioinput.v1.AudioInputService/Record', + request, + metadata || {}, + methodDescriptor_AudioInputService_Record); +}; + + +module.exports = proto.viam.component.audioinput.v1; + diff --git a/gen/js/component/audioinput/v1/audioinput_pb.d.ts b/gen/js/component/audioinput/v1/audioinput_pb.d.ts new file mode 100644 index 000000000..8686e47c4 --- /dev/null +++ b/gen/js/component/audioinput/v1/audioinput_pb.d.ts @@ -0,0 +1,221 @@ +// package: viam.component.audioinput.v1 +// file: component/audioinput/v1/audioinput.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_api_httpbody_pb from "../../../google/api/httpbody_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; + +export class RecordRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasDuration(): boolean; + clearDuration(): void; + getDuration(): google_protobuf_duration_pb.Duration | undefined; + setDuration(value?: google_protobuf_duration_pb.Duration): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RecordRequest.AsObject; + static toObject(includeInstance: boolean, msg: RecordRequest): RecordRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RecordRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RecordRequest; + static deserializeBinaryFromReader(message: RecordRequest, reader: jspb.BinaryReader): RecordRequest; +} + +export namespace RecordRequest { + export type AsObject = { + name: string, + duration?: google_protobuf_duration_pb.Duration.AsObject, + } +} + +export class AudioChunkInfo extends jspb.Message { + getSampleFormat(): SampleFormatMap[keyof SampleFormatMap]; + setSampleFormat(value: SampleFormatMap[keyof SampleFormatMap]): void; + + getChannels(): number; + setChannels(value: number): void; + + getSamplingRate(): number; + setSamplingRate(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AudioChunkInfo.AsObject; + static toObject(includeInstance: boolean, msg: AudioChunkInfo): AudioChunkInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AudioChunkInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AudioChunkInfo; + static deserializeBinaryFromReader(message: AudioChunkInfo, reader: jspb.BinaryReader): AudioChunkInfo; +} + +export namespace AudioChunkInfo { + export type AsObject = { + sampleFormat: SampleFormatMap[keyof SampleFormatMap], + channels: number, + samplingRate: number, + } +} + +export class AudioChunk extends jspb.Message { + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + getLength(): number; + setLength(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AudioChunk.AsObject; + static toObject(includeInstance: boolean, msg: AudioChunk): AudioChunk.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AudioChunk, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AudioChunk; + static deserializeBinaryFromReader(message: AudioChunk, reader: jspb.BinaryReader): AudioChunk; +} + +export namespace AudioChunk { + export type AsObject = { + data: Uint8Array | string, + length: number, + } +} + +export class ChunksRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getSampleFormat(): SampleFormatMap[keyof SampleFormatMap]; + setSampleFormat(value: SampleFormatMap[keyof SampleFormatMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChunksRequest.AsObject; + static toObject(includeInstance: boolean, msg: ChunksRequest): ChunksRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChunksRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChunksRequest; + static deserializeBinaryFromReader(message: ChunksRequest, reader: jspb.BinaryReader): ChunksRequest; +} + +export namespace ChunksRequest { + export type AsObject = { + name: string, + sampleFormat: SampleFormatMap[keyof SampleFormatMap], + } +} + +export class ChunksResponse extends jspb.Message { + hasInfo(): boolean; + clearInfo(): void; + getInfo(): AudioChunkInfo | undefined; + setInfo(value?: AudioChunkInfo): void; + + hasChunk(): boolean; + clearChunk(): void; + getChunk(): AudioChunk | undefined; + setChunk(value?: AudioChunk): void; + + getTypeCase(): ChunksResponse.TypeCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChunksResponse.AsObject; + static toObject(includeInstance: boolean, msg: ChunksResponse): ChunksResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ChunksResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ChunksResponse; + static deserializeBinaryFromReader(message: ChunksResponse, reader: jspb.BinaryReader): ChunksResponse; +} + +export namespace ChunksResponse { + export type AsObject = { + info?: AudioChunkInfo.AsObject, + chunk?: AudioChunk.AsObject, + } + + export enum TypeCase { + TYPE_NOT_SET = 0, + INFO = 1, + CHUNK = 2, + } +} + +export class PropertiesRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PropertiesRequest.AsObject; + static toObject(includeInstance: boolean, msg: PropertiesRequest): PropertiesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PropertiesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PropertiesRequest; + static deserializeBinaryFromReader(message: PropertiesRequest, reader: jspb.BinaryReader): PropertiesRequest; +} + +export namespace PropertiesRequest { + export type AsObject = { + name: string, + } +} + +export class PropertiesResponse extends jspb.Message { + getChannelCount(): number; + setChannelCount(value: number): void; + + hasLatency(): boolean; + clearLatency(): void; + getLatency(): google_protobuf_duration_pb.Duration | undefined; + setLatency(value?: google_protobuf_duration_pb.Duration): void; + + getSampleRate(): number; + setSampleRate(value: number): void; + + getSampleSize(): number; + setSampleSize(value: number): void; + + getIsBigEndian(): boolean; + setIsBigEndian(value: boolean): void; + + getIsFloat(): boolean; + setIsFloat(value: boolean): void; + + getIsInterleaved(): boolean; + setIsInterleaved(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PropertiesResponse.AsObject; + static toObject(includeInstance: boolean, msg: PropertiesResponse): PropertiesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PropertiesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PropertiesResponse; + static deserializeBinaryFromReader(message: PropertiesResponse, reader: jspb.BinaryReader): PropertiesResponse; +} + +export namespace PropertiesResponse { + export type AsObject = { + channelCount: number, + latency?: google_protobuf_duration_pb.Duration.AsObject, + sampleRate: number, + sampleSize: number, + isBigEndian: boolean, + isFloat: boolean, + isInterleaved: boolean, + } +} + +export interface SampleFormatMap { + SAMPLE_FORMAT_UNSPECIFIED: 0; + SAMPLE_FORMAT_INT16_INTERLEAVED: 1; + SAMPLE_FORMAT_FLOAT32_INTERLEAVED: 2; +} + +export const SampleFormat: SampleFormatMap; + diff --git a/gen/js/component/audioinput/v1/audioinput_pb.js b/gen/js/component/audioinput/v1/audioinput_pb.js new file mode 100644 index 000000000..8cd4a2e8d --- /dev/null +++ b/gen/js/component/audioinput/v1/audioinput_pb.js @@ -0,0 +1,1593 @@ +// source: component/audioinput/v1/audioinput.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_api_httpbody_pb = require('../../../google/api/httpbody_pb.js'); +goog.object.extend(proto, google_api_httpbody_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +goog.exportSymbol('proto.viam.component.audioinput.v1.AudioChunk', null, global); +goog.exportSymbol('proto.viam.component.audioinput.v1.AudioChunkInfo', null, global); +goog.exportSymbol('proto.viam.component.audioinput.v1.ChunksRequest', null, global); +goog.exportSymbol('proto.viam.component.audioinput.v1.ChunksResponse', null, global); +goog.exportSymbol('proto.viam.component.audioinput.v1.ChunksResponse.TypeCase', null, global); +goog.exportSymbol('proto.viam.component.audioinput.v1.PropertiesRequest', null, global); +goog.exportSymbol('proto.viam.component.audioinput.v1.PropertiesResponse', null, global); +goog.exportSymbol('proto.viam.component.audioinput.v1.RecordRequest', null, global); +goog.exportSymbol('proto.viam.component.audioinput.v1.SampleFormat', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.audioinput.v1.RecordRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.audioinput.v1.RecordRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.audioinput.v1.RecordRequest.displayName = 'proto.viam.component.audioinput.v1.RecordRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.audioinput.v1.AudioChunkInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.audioinput.v1.AudioChunkInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.audioinput.v1.AudioChunkInfo.displayName = 'proto.viam.component.audioinput.v1.AudioChunkInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.audioinput.v1.AudioChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.audioinput.v1.AudioChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.audioinput.v1.AudioChunk.displayName = 'proto.viam.component.audioinput.v1.AudioChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.audioinput.v1.ChunksRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.audioinput.v1.ChunksRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.audioinput.v1.ChunksRequest.displayName = 'proto.viam.component.audioinput.v1.ChunksRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.audioinput.v1.ChunksResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.viam.component.audioinput.v1.ChunksResponse.oneofGroups_); +}; +goog.inherits(proto.viam.component.audioinput.v1.ChunksResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.audioinput.v1.ChunksResponse.displayName = 'proto.viam.component.audioinput.v1.ChunksResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.audioinput.v1.PropertiesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.audioinput.v1.PropertiesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.audioinput.v1.PropertiesRequest.displayName = 'proto.viam.component.audioinput.v1.PropertiesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.audioinput.v1.PropertiesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.audioinput.v1.PropertiesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.audioinput.v1.PropertiesResponse.displayName = 'proto.viam.component.audioinput.v1.PropertiesResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.audioinput.v1.RecordRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.audioinput.v1.RecordRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.audioinput.v1.RecordRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.RecordRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + duration: (f = msg.getDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.audioinput.v1.RecordRequest} + */ +proto.viam.component.audioinput.v1.RecordRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.audioinput.v1.RecordRequest; + return proto.viam.component.audioinput.v1.RecordRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.audioinput.v1.RecordRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.audioinput.v1.RecordRequest} + */ +proto.viam.component.audioinput.v1.RecordRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setDuration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.audioinput.v1.RecordRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.audioinput.v1.RecordRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.audioinput.v1.RecordRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.RecordRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDuration(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.audioinput.v1.RecordRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.audioinput.v1.RecordRequest} returns this + */ +proto.viam.component.audioinput.v1.RecordRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Duration duration = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.viam.component.audioinput.v1.RecordRequest.prototype.getDuration = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.viam.component.audioinput.v1.RecordRequest} returns this +*/ +proto.viam.component.audioinput.v1.RecordRequest.prototype.setDuration = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.audioinput.v1.RecordRequest} returns this + */ +proto.viam.component.audioinput.v1.RecordRequest.prototype.clearDuration = function() { + return this.setDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.audioinput.v1.RecordRequest.prototype.hasDuration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.audioinput.v1.AudioChunkInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.audioinput.v1.AudioChunkInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.toObject = function(includeInstance, msg) { + var f, obj = { + sampleFormat: jspb.Message.getFieldWithDefault(msg, 1, 0), + channels: jspb.Message.getFieldWithDefault(msg, 2, 0), + samplingRate: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.audioinput.v1.AudioChunkInfo} + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.audioinput.v1.AudioChunkInfo; + return proto.viam.component.audioinput.v1.AudioChunkInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.audioinput.v1.AudioChunkInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.audioinput.v1.AudioChunkInfo} + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.viam.component.audioinput.v1.SampleFormat} */ (reader.readEnum()); + msg.setSampleFormat(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChannels(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSamplingRate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.audioinput.v1.AudioChunkInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.audioinput.v1.AudioChunkInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSampleFormat(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getChannels(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getSamplingRate(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional SampleFormat sample_format = 1; + * @return {!proto.viam.component.audioinput.v1.SampleFormat} + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.prototype.getSampleFormat = function() { + return /** @type {!proto.viam.component.audioinput.v1.SampleFormat} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.viam.component.audioinput.v1.SampleFormat} value + * @return {!proto.viam.component.audioinput.v1.AudioChunkInfo} returns this + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.prototype.setSampleFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint32 channels = 2; + * @return {number} + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.prototype.getChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.audioinput.v1.AudioChunkInfo} returns this + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.prototype.setChannels = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 sampling_rate = 3; + * @return {number} + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.prototype.getSamplingRate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.audioinput.v1.AudioChunkInfo} returns this + */ +proto.viam.component.audioinput.v1.AudioChunkInfo.prototype.setSamplingRate = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.audioinput.v1.AudioChunk.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.audioinput.v1.AudioChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.audioinput.v1.AudioChunk} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.AudioChunk.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + length: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.audioinput.v1.AudioChunk} + */ +proto.viam.component.audioinput.v1.AudioChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.audioinput.v1.AudioChunk; + return proto.viam.component.audioinput.v1.AudioChunk.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.audioinput.v1.AudioChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.audioinput.v1.AudioChunk} + */ +proto.viam.component.audioinput.v1.AudioChunk.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLength(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.audioinput.v1.AudioChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.audioinput.v1.AudioChunk.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.audioinput.v1.AudioChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.AudioChunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getLength(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {string} + */ +proto.viam.component.audioinput.v1.AudioChunk.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data = 1; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.viam.component.audioinput.v1.AudioChunk.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.viam.component.audioinput.v1.AudioChunk.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.component.audioinput.v1.AudioChunk} returns this + */ +proto.viam.component.audioinput.v1.AudioChunk.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 length = 2; + * @return {number} + */ +proto.viam.component.audioinput.v1.AudioChunk.prototype.getLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.audioinput.v1.AudioChunk} returns this + */ +proto.viam.component.audioinput.v1.AudioChunk.prototype.setLength = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.audioinput.v1.ChunksRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.audioinput.v1.ChunksRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.audioinput.v1.ChunksRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.ChunksRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + sampleFormat: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.audioinput.v1.ChunksRequest} + */ +proto.viam.component.audioinput.v1.ChunksRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.audioinput.v1.ChunksRequest; + return proto.viam.component.audioinput.v1.ChunksRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.audioinput.v1.ChunksRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.audioinput.v1.ChunksRequest} + */ +proto.viam.component.audioinput.v1.ChunksRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {!proto.viam.component.audioinput.v1.SampleFormat} */ (reader.readEnum()); + msg.setSampleFormat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.audioinput.v1.ChunksRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.audioinput.v1.ChunksRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.audioinput.v1.ChunksRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.ChunksRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSampleFormat(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.audioinput.v1.ChunksRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.audioinput.v1.ChunksRequest} returns this + */ +proto.viam.component.audioinput.v1.ChunksRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional SampleFormat sample_format = 2; + * @return {!proto.viam.component.audioinput.v1.SampleFormat} + */ +proto.viam.component.audioinput.v1.ChunksRequest.prototype.getSampleFormat = function() { + return /** @type {!proto.viam.component.audioinput.v1.SampleFormat} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.viam.component.audioinput.v1.SampleFormat} value + * @return {!proto.viam.component.audioinput.v1.ChunksRequest} returns this + */ +proto.viam.component.audioinput.v1.ChunksRequest.prototype.setSampleFormat = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.viam.component.audioinput.v1.ChunksResponse.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.viam.component.audioinput.v1.ChunksResponse.TypeCase = { + TYPE_NOT_SET: 0, + INFO: 1, + CHUNK: 2 +}; + +/** + * @return {proto.viam.component.audioinput.v1.ChunksResponse.TypeCase} + */ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.getTypeCase = function() { + return /** @type {proto.viam.component.audioinput.v1.ChunksResponse.TypeCase} */(jspb.Message.computeOneofCase(this, proto.viam.component.audioinput.v1.ChunksResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.audioinput.v1.ChunksResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.audioinput.v1.ChunksResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.ChunksResponse.toObject = function(includeInstance, msg) { + var f, obj = { + info: (f = msg.getInfo()) && proto.viam.component.audioinput.v1.AudioChunkInfo.toObject(includeInstance, f), + chunk: (f = msg.getChunk()) && proto.viam.component.audioinput.v1.AudioChunk.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.audioinput.v1.ChunksResponse} + */ +proto.viam.component.audioinput.v1.ChunksResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.audioinput.v1.ChunksResponse; + return proto.viam.component.audioinput.v1.ChunksResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.audioinput.v1.ChunksResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.audioinput.v1.ChunksResponse} + */ +proto.viam.component.audioinput.v1.ChunksResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.component.audioinput.v1.AudioChunkInfo; + reader.readMessage(value,proto.viam.component.audioinput.v1.AudioChunkInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 2: + var value = new proto.viam.component.audioinput.v1.AudioChunk; + reader.readMessage(value,proto.viam.component.audioinput.v1.AudioChunk.deserializeBinaryFromReader); + msg.setChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.audioinput.v1.ChunksResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.audioinput.v1.ChunksResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.ChunksResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.component.audioinput.v1.AudioChunkInfo.serializeBinaryToWriter + ); + } + f = message.getChunk(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.component.audioinput.v1.AudioChunk.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AudioChunkInfo info = 1; + * @return {?proto.viam.component.audioinput.v1.AudioChunkInfo} + */ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.getInfo = function() { + return /** @type{?proto.viam.component.audioinput.v1.AudioChunkInfo} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.audioinput.v1.AudioChunkInfo, 1)); +}; + + +/** + * @param {?proto.viam.component.audioinput.v1.AudioChunkInfo|undefined} value + * @return {!proto.viam.component.audioinput.v1.ChunksResponse} returns this +*/ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.setInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.viam.component.audioinput.v1.ChunksResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.audioinput.v1.ChunksResponse} returns this + */ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.hasInfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional AudioChunk chunk = 2; + * @return {?proto.viam.component.audioinput.v1.AudioChunk} + */ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.getChunk = function() { + return /** @type{?proto.viam.component.audioinput.v1.AudioChunk} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.audioinput.v1.AudioChunk, 2)); +}; + + +/** + * @param {?proto.viam.component.audioinput.v1.AudioChunk|undefined} value + * @return {!proto.viam.component.audioinput.v1.ChunksResponse} returns this +*/ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.setChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.viam.component.audioinput.v1.ChunksResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.audioinput.v1.ChunksResponse} returns this + */ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.clearChunk = function() { + return this.setChunk(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.audioinput.v1.ChunksResponse.prototype.hasChunk = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.audioinput.v1.PropertiesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.audioinput.v1.PropertiesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.audioinput.v1.PropertiesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.PropertiesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.audioinput.v1.PropertiesRequest} + */ +proto.viam.component.audioinput.v1.PropertiesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.audioinput.v1.PropertiesRequest; + return proto.viam.component.audioinput.v1.PropertiesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.audioinput.v1.PropertiesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.audioinput.v1.PropertiesRequest} + */ +proto.viam.component.audioinput.v1.PropertiesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.audioinput.v1.PropertiesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.audioinput.v1.PropertiesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.audioinput.v1.PropertiesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.PropertiesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.audioinput.v1.PropertiesRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.audioinput.v1.PropertiesRequest} returns this + */ +proto.viam.component.audioinput.v1.PropertiesRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.audioinput.v1.PropertiesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.audioinput.v1.PropertiesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.PropertiesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelCount: jspb.Message.getFieldWithDefault(msg, 1, 0), + latency: (f = msg.getLatency()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + sampleRate: jspb.Message.getFieldWithDefault(msg, 3, 0), + sampleSize: jspb.Message.getFieldWithDefault(msg, 4, 0), + isBigEndian: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + isFloat: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + isInterleaved: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.audioinput.v1.PropertiesResponse; + return proto.viam.component.audioinput.v1.PropertiesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.audioinput.v1.PropertiesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChannelCount(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setLatency(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setSampleRate(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setSampleSize(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsBigEndian(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsFloat(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsInterleaved(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.audioinput.v1.PropertiesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.audioinput.v1.PropertiesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.audioinput.v1.PropertiesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelCount(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLatency(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getSampleRate(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getSampleSize(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getIsBigEndian(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getIsFloat(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getIsInterleaved(); + if (f) { + writer.writeBool( + 7, + f + ); + } +}; + + +/** + * optional uint32 channel_count = 1; + * @return {number} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.getChannelCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} returns this + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.setChannelCount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Duration latency = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.getLatency = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} returns this +*/ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.setLatency = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} returns this + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.clearLatency = function() { + return this.setLatency(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.hasLatency = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 sample_rate = 3; + * @return {number} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.getSampleRate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} returns this + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.setSampleRate = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 sample_size = 4; + * @return {number} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.getSampleSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} returns this + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.setSampleSize = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool is_big_endian = 5; + * @return {boolean} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.getIsBigEndian = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} returns this + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.setIsBigEndian = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional bool is_float = 6; + * @return {boolean} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.getIsFloat = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} returns this + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.setIsFloat = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional bool is_interleaved = 7; + * @return {boolean} + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.getIsInterleaved = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.audioinput.v1.PropertiesResponse} returns this + */ +proto.viam.component.audioinput.v1.PropertiesResponse.prototype.setIsInterleaved = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * @enum {number} + */ +proto.viam.component.audioinput.v1.SampleFormat = { + SAMPLE_FORMAT_UNSPECIFIED: 0, + SAMPLE_FORMAT_INT16_INTERLEAVED: 1, + SAMPLE_FORMAT_FLOAT32_INTERLEAVED: 2 +}; + +goog.object.extend(exports, proto.viam.component.audioinput.v1); diff --git a/gen/js/component/audioinput/v1/audioinput_pb_service.d.ts b/gen/js/component/audioinput/v1/audioinput_pb_service.d.ts new file mode 100644 index 000000000..dd88abcc7 --- /dev/null +++ b/gen/js/component/audioinput/v1/audioinput_pb_service.d.ts @@ -0,0 +1,94 @@ +// package: viam.component.audioinput.v1 +// file: component/audioinput/v1/audioinput.proto + +import * as component_audioinput_v1_audioinput_pb from "../../../component/audioinput/v1/audioinput_pb"; +import * as google_api_httpbody_pb from "../../../google/api/httpbody_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type AudioInputServiceChunks = { + readonly methodName: string; + readonly service: typeof AudioInputService; + readonly requestStream: false; + readonly responseStream: true; + readonly requestType: typeof component_audioinput_v1_audioinput_pb.ChunksRequest; + readonly responseType: typeof component_audioinput_v1_audioinput_pb.ChunksResponse; +}; + +type AudioInputServiceProperties = { + readonly methodName: string; + readonly service: typeof AudioInputService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_audioinput_v1_audioinput_pb.PropertiesRequest; + readonly responseType: typeof component_audioinput_v1_audioinput_pb.PropertiesResponse; +}; + +type AudioInputServiceRecord = { + readonly methodName: string; + readonly service: typeof AudioInputService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_audioinput_v1_audioinput_pb.RecordRequest; + readonly responseType: typeof google_api_httpbody_pb.HttpBody; +}; + +export class AudioInputService { + static readonly serviceName: string; + static readonly Chunks: AudioInputServiceChunks; + static readonly Properties: AudioInputServiceProperties; + static readonly Record: AudioInputServiceRecord; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class AudioInputServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + chunks(requestMessage: component_audioinput_v1_audioinput_pb.ChunksRequest, metadata?: grpc.Metadata): ResponseStream; + properties( + requestMessage: component_audioinput_v1_audioinput_pb.PropertiesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_audioinput_v1_audioinput_pb.PropertiesResponse|null) => void + ): UnaryResponse; + properties( + requestMessage: component_audioinput_v1_audioinput_pb.PropertiesRequest, + callback: (error: ServiceError|null, responseMessage: component_audioinput_v1_audioinput_pb.PropertiesResponse|null) => void + ): UnaryResponse; + record( + requestMessage: component_audioinput_v1_audioinput_pb.RecordRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: google_api_httpbody_pb.HttpBody|null) => void + ): UnaryResponse; + record( + requestMessage: component_audioinput_v1_audioinput_pb.RecordRequest, + callback: (error: ServiceError|null, responseMessage: google_api_httpbody_pb.HttpBody|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/audioinput/v1/audioinput_pb_service.js b/gen/js/component/audioinput/v1/audioinput_pb_service.js new file mode 100644 index 000000000..cfc7ea3b5 --- /dev/null +++ b/gen/js/component/audioinput/v1/audioinput_pb_service.js @@ -0,0 +1,150 @@ +// package: viam.component.audioinput.v1 +// file: component/audioinput/v1/audioinput.proto + +var component_audioinput_v1_audioinput_pb = require("../../../component/audioinput/v1/audioinput_pb"); +var google_api_httpbody_pb = require("../../../google/api/httpbody_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var AudioInputService = (function () { + function AudioInputService() {} + AudioInputService.serviceName = "viam.component.audioinput.v1.AudioInputService"; + return AudioInputService; +}()); + +AudioInputService.Chunks = { + methodName: "Chunks", + service: AudioInputService, + requestStream: false, + responseStream: true, + requestType: component_audioinput_v1_audioinput_pb.ChunksRequest, + responseType: component_audioinput_v1_audioinput_pb.ChunksResponse +}; + +AudioInputService.Properties = { + methodName: "Properties", + service: AudioInputService, + requestStream: false, + responseStream: false, + requestType: component_audioinput_v1_audioinput_pb.PropertiesRequest, + responseType: component_audioinput_v1_audioinput_pb.PropertiesResponse +}; + +AudioInputService.Record = { + methodName: "Record", + service: AudioInputService, + requestStream: false, + responseStream: false, + requestType: component_audioinput_v1_audioinput_pb.RecordRequest, + responseType: google_api_httpbody_pb.HttpBody +}; + +exports.AudioInputService = AudioInputService; + +function AudioInputServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +AudioInputServiceClient.prototype.chunks = function chunks(requestMessage, metadata) { + var listeners = { + data: [], + end: [], + status: [] + }; + var client = grpc.invoke(AudioInputService.Chunks, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onMessage: function (responseMessage) { + listeners.data.forEach(function (handler) { + handler(responseMessage); + }); + }, + onEnd: function (status, statusMessage, trailers) { + listeners.status.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners.end.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners = null; + } + }); + return { + on: function (type, handler) { + listeners[type].push(handler); + return this; + }, + cancel: function () { + listeners = null; + client.close(); + } + }; +}; + +AudioInputServiceClient.prototype.properties = function properties(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AudioInputService.Properties, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +AudioInputServiceClient.prototype.record = function record(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(AudioInputService.Record, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.AudioInputServiceClient = AudioInputServiceClient; + diff --git a/gen/js/component/base/v1/base_grpc_web_pb.js b/gen/js/component/base/v1/base_grpc_web_pb.js new file mode 100644 index 000000000..60419497d --- /dev/null +++ b/gen/js/component/base/v1/base_grpc_web_pb.js @@ -0,0 +1,388 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.base.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.base = {}; +proto.viam.component.base.v1 = require('./base_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.base.v1.BaseServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.base.v1.BaseServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.base.v1.MoveStraightRequest, + * !proto.viam.component.base.v1.MoveStraightResponse>} + */ +const methodDescriptor_BaseService_MoveStraight = new grpc.web.MethodDescriptor( + '/viam.component.base.v1.BaseService/MoveStraight', + grpc.web.MethodType.UNARY, + proto.viam.component.base.v1.MoveStraightRequest, + proto.viam.component.base.v1.MoveStraightResponse, + /** + * @param {!proto.viam.component.base.v1.MoveStraightRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.base.v1.MoveStraightResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.base.v1.MoveStraightRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.base.v1.MoveStraightResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.base.v1.BaseServiceClient.prototype.moveStraight = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.base.v1.BaseService/MoveStraight', + request, + metadata || {}, + methodDescriptor_BaseService_MoveStraight, + callback); +}; + + +/** + * @param {!proto.viam.component.base.v1.MoveStraightRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.base.v1.BaseServicePromiseClient.prototype.moveStraight = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.base.v1.BaseService/MoveStraight', + request, + metadata || {}, + methodDescriptor_BaseService_MoveStraight); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.base.v1.SpinRequest, + * !proto.viam.component.base.v1.SpinResponse>} + */ +const methodDescriptor_BaseService_Spin = new grpc.web.MethodDescriptor( + '/viam.component.base.v1.BaseService/Spin', + grpc.web.MethodType.UNARY, + proto.viam.component.base.v1.SpinRequest, + proto.viam.component.base.v1.SpinResponse, + /** + * @param {!proto.viam.component.base.v1.SpinRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.base.v1.SpinResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.base.v1.SpinRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.base.v1.SpinResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.base.v1.BaseServiceClient.prototype.spin = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.base.v1.BaseService/Spin', + request, + metadata || {}, + methodDescriptor_BaseService_Spin, + callback); +}; + + +/** + * @param {!proto.viam.component.base.v1.SpinRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.base.v1.BaseServicePromiseClient.prototype.spin = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.base.v1.BaseService/Spin', + request, + metadata || {}, + methodDescriptor_BaseService_Spin); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.base.v1.SetPowerRequest, + * !proto.viam.component.base.v1.SetPowerResponse>} + */ +const methodDescriptor_BaseService_SetPower = new grpc.web.MethodDescriptor( + '/viam.component.base.v1.BaseService/SetPower', + grpc.web.MethodType.UNARY, + proto.viam.component.base.v1.SetPowerRequest, + proto.viam.component.base.v1.SetPowerResponse, + /** + * @param {!proto.viam.component.base.v1.SetPowerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.base.v1.SetPowerResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.base.v1.SetPowerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.base.v1.SetPowerResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.base.v1.BaseServiceClient.prototype.setPower = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.base.v1.BaseService/SetPower', + request, + metadata || {}, + methodDescriptor_BaseService_SetPower, + callback); +}; + + +/** + * @param {!proto.viam.component.base.v1.SetPowerRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.base.v1.BaseServicePromiseClient.prototype.setPower = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.base.v1.BaseService/SetPower', + request, + metadata || {}, + methodDescriptor_BaseService_SetPower); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.base.v1.SetVelocityRequest, + * !proto.viam.component.base.v1.SetVelocityResponse>} + */ +const methodDescriptor_BaseService_SetVelocity = new grpc.web.MethodDescriptor( + '/viam.component.base.v1.BaseService/SetVelocity', + grpc.web.MethodType.UNARY, + proto.viam.component.base.v1.SetVelocityRequest, + proto.viam.component.base.v1.SetVelocityResponse, + /** + * @param {!proto.viam.component.base.v1.SetVelocityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.base.v1.SetVelocityResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.base.v1.SetVelocityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.base.v1.SetVelocityResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.base.v1.BaseServiceClient.prototype.setVelocity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.base.v1.BaseService/SetVelocity', + request, + metadata || {}, + methodDescriptor_BaseService_SetVelocity, + callback); +}; + + +/** + * @param {!proto.viam.component.base.v1.SetVelocityRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.base.v1.BaseServicePromiseClient.prototype.setVelocity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.base.v1.BaseService/SetVelocity', + request, + metadata || {}, + methodDescriptor_BaseService_SetVelocity); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.base.v1.StopRequest, + * !proto.viam.component.base.v1.StopResponse>} + */ +const methodDescriptor_BaseService_Stop = new grpc.web.MethodDescriptor( + '/viam.component.base.v1.BaseService/Stop', + grpc.web.MethodType.UNARY, + proto.viam.component.base.v1.StopRequest, + proto.viam.component.base.v1.StopResponse, + /** + * @param {!proto.viam.component.base.v1.StopRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.base.v1.StopResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.base.v1.StopRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.base.v1.StopResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.base.v1.BaseServiceClient.prototype.stop = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.base.v1.BaseService/Stop', + request, + metadata || {}, + methodDescriptor_BaseService_Stop, + callback); +}; + + +/** + * @param {!proto.viam.component.base.v1.StopRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.base.v1.BaseServicePromiseClient.prototype.stop = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.base.v1.BaseService/Stop', + request, + metadata || {}, + methodDescriptor_BaseService_Stop); +}; + + +module.exports = proto.viam.component.base.v1; + diff --git a/gen/js/component/base/v1/base_pb.d.ts b/gen/js/component/base/v1/base_pb.d.ts new file mode 100644 index 000000000..180969e19 --- /dev/null +++ b/gen/js/component/base/v1/base_pb.d.ts @@ -0,0 +1,258 @@ +// package: viam.component.base.v1 +// file: component/base/v1/base.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class MoveStraightRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getDistanceMm(): number; + setDistanceMm(value: number): void; + + getMmPerSec(): number; + setMmPerSec(value: number): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveStraightRequest.AsObject; + static toObject(includeInstance: boolean, msg: MoveStraightRequest): MoveStraightRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveStraightRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveStraightRequest; + static deserializeBinaryFromReader(message: MoveStraightRequest, reader: jspb.BinaryReader): MoveStraightRequest; +} + +export namespace MoveStraightRequest { + export type AsObject = { + name: string, + distanceMm: number, + mmPerSec: number, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class MoveStraightResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveStraightResponse.AsObject; + static toObject(includeInstance: boolean, msg: MoveStraightResponse): MoveStraightResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveStraightResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveStraightResponse; + static deserializeBinaryFromReader(message: MoveStraightResponse, reader: jspb.BinaryReader): MoveStraightResponse; +} + +export namespace MoveStraightResponse { + export type AsObject = { + } +} + +export class SpinRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getAngleDeg(): number; + setAngleDeg(value: number): void; + + getDegsPerSec(): number; + setDegsPerSec(value: number): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SpinRequest.AsObject; + static toObject(includeInstance: boolean, msg: SpinRequest): SpinRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SpinRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SpinRequest; + static deserializeBinaryFromReader(message: SpinRequest, reader: jspb.BinaryReader): SpinRequest; +} + +export namespace SpinRequest { + export type AsObject = { + name: string, + angleDeg: number, + degsPerSec: number, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class SpinResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SpinResponse.AsObject; + static toObject(includeInstance: boolean, msg: SpinResponse): SpinResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SpinResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SpinResponse; + static deserializeBinaryFromReader(message: SpinResponse, reader: jspb.BinaryReader): SpinResponse; +} + +export namespace SpinResponse { + export type AsObject = { + } +} + +export class StopRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopRequest.AsObject; + static toObject(includeInstance: boolean, msg: StopRequest): StopRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopRequest; + static deserializeBinaryFromReader(message: StopRequest, reader: jspb.BinaryReader): StopRequest; +} + +export namespace StopRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class StopResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopResponse.AsObject; + static toObject(includeInstance: boolean, msg: StopResponse): StopResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopResponse; + static deserializeBinaryFromReader(message: StopResponse, reader: jspb.BinaryReader): StopResponse; +} + +export namespace StopResponse { + export type AsObject = { + } +} + +export class SetPowerRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasLinear(): boolean; + clearLinear(): void; + getLinear(): common_v1_common_pb.Vector3 | undefined; + setLinear(value?: common_v1_common_pb.Vector3): void; + + hasAngular(): boolean; + clearAngular(): void; + getAngular(): common_v1_common_pb.Vector3 | undefined; + setAngular(value?: common_v1_common_pb.Vector3): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetPowerRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetPowerRequest): SetPowerRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetPowerRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetPowerRequest; + static deserializeBinaryFromReader(message: SetPowerRequest, reader: jspb.BinaryReader): SetPowerRequest; +} + +export namespace SetPowerRequest { + export type AsObject = { + name: string, + linear?: common_v1_common_pb.Vector3.AsObject, + angular?: common_v1_common_pb.Vector3.AsObject, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class SetPowerResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetPowerResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetPowerResponse): SetPowerResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetPowerResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetPowerResponse; + static deserializeBinaryFromReader(message: SetPowerResponse, reader: jspb.BinaryReader): SetPowerResponse; +} + +export namespace SetPowerResponse { + export type AsObject = { + } +} + +export class SetVelocityRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasLinear(): boolean; + clearLinear(): void; + getLinear(): common_v1_common_pb.Vector3 | undefined; + setLinear(value?: common_v1_common_pb.Vector3): void; + + hasAngular(): boolean; + clearAngular(): void; + getAngular(): common_v1_common_pb.Vector3 | undefined; + setAngular(value?: common_v1_common_pb.Vector3): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetVelocityRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetVelocityRequest): SetVelocityRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetVelocityRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetVelocityRequest; + static deserializeBinaryFromReader(message: SetVelocityRequest, reader: jspb.BinaryReader): SetVelocityRequest; +} + +export namespace SetVelocityRequest { + export type AsObject = { + name: string, + linear?: common_v1_common_pb.Vector3.AsObject, + angular?: common_v1_common_pb.Vector3.AsObject, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class SetVelocityResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetVelocityResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetVelocityResponse): SetVelocityResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetVelocityResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetVelocityResponse; + static deserializeBinaryFromReader(message: SetVelocityResponse, reader: jspb.BinaryReader): SetVelocityResponse; +} + +export namespace SetVelocityResponse { + export type AsObject = { + } +} + diff --git a/gen/js/component/base/v1/base_pb.js b/gen/js/component/base/v1/base_pb.js new file mode 100644 index 000000000..edc518e6a --- /dev/null +++ b/gen/js/component/base/v1/base_pb.js @@ -0,0 +1,1978 @@ +// source: component/base/v1/base.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.component.base.v1.MoveStraightRequest', null, global); +goog.exportSymbol('proto.viam.component.base.v1.MoveStraightResponse', null, global); +goog.exportSymbol('proto.viam.component.base.v1.SetPowerRequest', null, global); +goog.exportSymbol('proto.viam.component.base.v1.SetPowerResponse', null, global); +goog.exportSymbol('proto.viam.component.base.v1.SetVelocityRequest', null, global); +goog.exportSymbol('proto.viam.component.base.v1.SetVelocityResponse', null, global); +goog.exportSymbol('proto.viam.component.base.v1.SpinRequest', null, global); +goog.exportSymbol('proto.viam.component.base.v1.SpinResponse', null, global); +goog.exportSymbol('proto.viam.component.base.v1.StopRequest', null, global); +goog.exportSymbol('proto.viam.component.base.v1.StopResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.MoveStraightRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.MoveStraightRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.MoveStraightRequest.displayName = 'proto.viam.component.base.v1.MoveStraightRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.MoveStraightResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.MoveStraightResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.MoveStraightResponse.displayName = 'proto.viam.component.base.v1.MoveStraightResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.SpinRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.SpinRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.SpinRequest.displayName = 'proto.viam.component.base.v1.SpinRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.SpinResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.SpinResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.SpinResponse.displayName = 'proto.viam.component.base.v1.SpinResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.StopRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.StopRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.StopRequest.displayName = 'proto.viam.component.base.v1.StopRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.StopResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.StopResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.StopResponse.displayName = 'proto.viam.component.base.v1.StopResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.SetPowerRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.SetPowerRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.SetPowerRequest.displayName = 'proto.viam.component.base.v1.SetPowerRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.SetPowerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.SetPowerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.SetPowerResponse.displayName = 'proto.viam.component.base.v1.SetPowerResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.SetVelocityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.SetVelocityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.SetVelocityRequest.displayName = 'proto.viam.component.base.v1.SetVelocityRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.base.v1.SetVelocityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.base.v1.SetVelocityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.base.v1.SetVelocityResponse.displayName = 'proto.viam.component.base.v1.SetVelocityResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.MoveStraightRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.MoveStraightRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.MoveStraightRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + distanceMm: jspb.Message.getFieldWithDefault(msg, 2, 0), + mmPerSec: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.MoveStraightRequest} + */ +proto.viam.component.base.v1.MoveStraightRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.MoveStraightRequest; + return proto.viam.component.base.v1.MoveStraightRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.MoveStraightRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.MoveStraightRequest} + */ +proto.viam.component.base.v1.MoveStraightRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDistanceMm(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setMmPerSec(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.MoveStraightRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.MoveStraightRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.MoveStraightRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDistanceMm(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getMmPerSec(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.base.v1.MoveStraightRequest} returns this + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 distance_mm = 2; + * @return {number} + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.getDistanceMm = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.base.v1.MoveStraightRequest} returns this + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.setDistanceMm = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional double mm_per_sec = 3; + * @return {number} + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.getMmPerSec = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.base.v1.MoveStraightRequest} returns this + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.setMmPerSec = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.base.v1.MoveStraightRequest} returns this +*/ +proto.viam.component.base.v1.MoveStraightRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.base.v1.MoveStraightRequest} returns this + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.base.v1.MoveStraightRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.MoveStraightResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.MoveStraightResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.MoveStraightResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.MoveStraightResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.MoveStraightResponse} + */ +proto.viam.component.base.v1.MoveStraightResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.MoveStraightResponse; + return proto.viam.component.base.v1.MoveStraightResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.MoveStraightResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.MoveStraightResponse} + */ +proto.viam.component.base.v1.MoveStraightResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.MoveStraightResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.MoveStraightResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.MoveStraightResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.MoveStraightResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.SpinRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.SpinRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.SpinRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SpinRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + angleDeg: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + degsPerSec: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.SpinRequest} + */ +proto.viam.component.base.v1.SpinRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.SpinRequest; + return proto.viam.component.base.v1.SpinRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.SpinRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.SpinRequest} + */ +proto.viam.component.base.v1.SpinRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setAngleDeg(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDegsPerSec(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.SpinRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.SpinRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.SpinRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SpinRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAngleDeg(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getDegsPerSec(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.base.v1.SpinRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.base.v1.SpinRequest} returns this + */ +proto.viam.component.base.v1.SpinRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional double angle_deg = 2; + * @return {number} + */ +proto.viam.component.base.v1.SpinRequest.prototype.getAngleDeg = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.base.v1.SpinRequest} returns this + */ +proto.viam.component.base.v1.SpinRequest.prototype.setAngleDeg = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double degs_per_sec = 3; + * @return {number} + */ +proto.viam.component.base.v1.SpinRequest.prototype.getDegsPerSec = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.base.v1.SpinRequest} returns this + */ +proto.viam.component.base.v1.SpinRequest.prototype.setDegsPerSec = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.base.v1.SpinRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.base.v1.SpinRequest} returns this +*/ +proto.viam.component.base.v1.SpinRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.base.v1.SpinRequest} returns this + */ +proto.viam.component.base.v1.SpinRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.base.v1.SpinRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.SpinResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.SpinResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.SpinResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SpinResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.SpinResponse} + */ +proto.viam.component.base.v1.SpinResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.SpinResponse; + return proto.viam.component.base.v1.SpinResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.SpinResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.SpinResponse} + */ +proto.viam.component.base.v1.SpinResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.SpinResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.SpinResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.SpinResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SpinResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.StopRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.StopRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.StopRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.StopRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.StopRequest} + */ +proto.viam.component.base.v1.StopRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.StopRequest; + return proto.viam.component.base.v1.StopRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.StopRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.StopRequest} + */ +proto.viam.component.base.v1.StopRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.StopRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.StopRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.StopRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.StopRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.base.v1.StopRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.base.v1.StopRequest} returns this + */ +proto.viam.component.base.v1.StopRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.base.v1.StopRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.base.v1.StopRequest} returns this +*/ +proto.viam.component.base.v1.StopRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.base.v1.StopRequest} returns this + */ +proto.viam.component.base.v1.StopRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.base.v1.StopRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.StopResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.StopResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.StopResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.StopResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.StopResponse} + */ +proto.viam.component.base.v1.StopResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.StopResponse; + return proto.viam.component.base.v1.StopResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.StopResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.StopResponse} + */ +proto.viam.component.base.v1.StopResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.StopResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.StopResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.StopResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.StopResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.SetPowerRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.SetPowerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SetPowerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + linear: (f = msg.getLinear()) && common_v1_common_pb.Vector3.toObject(includeInstance, f), + angular: (f = msg.getAngular()) && common_v1_common_pb.Vector3.toObject(includeInstance, f), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.SetPowerRequest} + */ +proto.viam.component.base.v1.SetPowerRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.SetPowerRequest; + return proto.viam.component.base.v1.SetPowerRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.SetPowerRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.SetPowerRequest} + */ +proto.viam.component.base.v1.SetPowerRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new common_v1_common_pb.Vector3; + reader.readMessage(value,common_v1_common_pb.Vector3.deserializeBinaryFromReader); + msg.setLinear(value); + break; + case 3: + var value = new common_v1_common_pb.Vector3; + reader.readMessage(value,common_v1_common_pb.Vector3.deserializeBinaryFromReader); + msg.setAngular(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.SetPowerRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.SetPowerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SetPowerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLinear(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_v1_common_pb.Vector3.serializeBinaryToWriter + ); + } + f = message.getAngular(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_v1_common_pb.Vector3.serializeBinaryToWriter + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.base.v1.SetPowerRequest} returns this + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional viam.common.v1.Vector3 linear = 2; + * @return {?proto.viam.common.v1.Vector3} + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.getLinear = function() { + return /** @type{?proto.viam.common.v1.Vector3} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Vector3, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.Vector3|undefined} value + * @return {!proto.viam.component.base.v1.SetPowerRequest} returns this +*/ +proto.viam.component.base.v1.SetPowerRequest.prototype.setLinear = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.base.v1.SetPowerRequest} returns this + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.clearLinear = function() { + return this.setLinear(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.hasLinear = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional viam.common.v1.Vector3 angular = 3; + * @return {?proto.viam.common.v1.Vector3} + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.getAngular = function() { + return /** @type{?proto.viam.common.v1.Vector3} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Vector3, 3)); +}; + + +/** + * @param {?proto.viam.common.v1.Vector3|undefined} value + * @return {!proto.viam.component.base.v1.SetPowerRequest} returns this +*/ +proto.viam.component.base.v1.SetPowerRequest.prototype.setAngular = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.base.v1.SetPowerRequest} returns this + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.clearAngular = function() { + return this.setAngular(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.hasAngular = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.base.v1.SetPowerRequest} returns this +*/ +proto.viam.component.base.v1.SetPowerRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.base.v1.SetPowerRequest} returns this + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.base.v1.SetPowerRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.SetPowerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.SetPowerResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.SetPowerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SetPowerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.SetPowerResponse} + */ +proto.viam.component.base.v1.SetPowerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.SetPowerResponse; + return proto.viam.component.base.v1.SetPowerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.SetPowerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.SetPowerResponse} + */ +proto.viam.component.base.v1.SetPowerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.SetPowerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.SetPowerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.SetPowerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SetPowerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.SetVelocityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.SetVelocityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SetVelocityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + linear: (f = msg.getLinear()) && common_v1_common_pb.Vector3.toObject(includeInstance, f), + angular: (f = msg.getAngular()) && common_v1_common_pb.Vector3.toObject(includeInstance, f), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.SetVelocityRequest} + */ +proto.viam.component.base.v1.SetVelocityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.SetVelocityRequest; + return proto.viam.component.base.v1.SetVelocityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.SetVelocityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.SetVelocityRequest} + */ +proto.viam.component.base.v1.SetVelocityRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new common_v1_common_pb.Vector3; + reader.readMessage(value,common_v1_common_pb.Vector3.deserializeBinaryFromReader); + msg.setLinear(value); + break; + case 3: + var value = new common_v1_common_pb.Vector3; + reader.readMessage(value,common_v1_common_pb.Vector3.deserializeBinaryFromReader); + msg.setAngular(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.SetVelocityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.SetVelocityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SetVelocityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLinear(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_v1_common_pb.Vector3.serializeBinaryToWriter + ); + } + f = message.getAngular(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_v1_common_pb.Vector3.serializeBinaryToWriter + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.base.v1.SetVelocityRequest} returns this + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional viam.common.v1.Vector3 linear = 2; + * @return {?proto.viam.common.v1.Vector3} + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.getLinear = function() { + return /** @type{?proto.viam.common.v1.Vector3} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Vector3, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.Vector3|undefined} value + * @return {!proto.viam.component.base.v1.SetVelocityRequest} returns this +*/ +proto.viam.component.base.v1.SetVelocityRequest.prototype.setLinear = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.base.v1.SetVelocityRequest} returns this + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.clearLinear = function() { + return this.setLinear(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.hasLinear = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional viam.common.v1.Vector3 angular = 3; + * @return {?proto.viam.common.v1.Vector3} + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.getAngular = function() { + return /** @type{?proto.viam.common.v1.Vector3} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Vector3, 3)); +}; + + +/** + * @param {?proto.viam.common.v1.Vector3|undefined} value + * @return {!proto.viam.component.base.v1.SetVelocityRequest} returns this +*/ +proto.viam.component.base.v1.SetVelocityRequest.prototype.setAngular = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.base.v1.SetVelocityRequest} returns this + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.clearAngular = function() { + return this.setAngular(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.hasAngular = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.base.v1.SetVelocityRequest} returns this +*/ +proto.viam.component.base.v1.SetVelocityRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.base.v1.SetVelocityRequest} returns this + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.base.v1.SetVelocityRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.base.v1.SetVelocityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.base.v1.SetVelocityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.base.v1.SetVelocityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SetVelocityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.base.v1.SetVelocityResponse} + */ +proto.viam.component.base.v1.SetVelocityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.base.v1.SetVelocityResponse; + return proto.viam.component.base.v1.SetVelocityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.base.v1.SetVelocityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.base.v1.SetVelocityResponse} + */ +proto.viam.component.base.v1.SetVelocityResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.base.v1.SetVelocityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.base.v1.SetVelocityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.base.v1.SetVelocityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.base.v1.SetVelocityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.viam.component.base.v1); diff --git a/gen/js/component/base/v1/base_pb_service.d.ts b/gen/js/component/base/v1/base_pb_service.d.ts new file mode 100644 index 000000000..27ce5a7c4 --- /dev/null +++ b/gen/js/component/base/v1/base_pb_service.d.ts @@ -0,0 +1,139 @@ +// package: viam.component.base.v1 +// file: component/base/v1/base.proto + +import * as component_base_v1_base_pb from "../../../component/base/v1/base_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type BaseServiceMoveStraight = { + readonly methodName: string; + readonly service: typeof BaseService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_base_v1_base_pb.MoveStraightRequest; + readonly responseType: typeof component_base_v1_base_pb.MoveStraightResponse; +}; + +type BaseServiceSpin = { + readonly methodName: string; + readonly service: typeof BaseService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_base_v1_base_pb.SpinRequest; + readonly responseType: typeof component_base_v1_base_pb.SpinResponse; +}; + +type BaseServiceSetPower = { + readonly methodName: string; + readonly service: typeof BaseService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_base_v1_base_pb.SetPowerRequest; + readonly responseType: typeof component_base_v1_base_pb.SetPowerResponse; +}; + +type BaseServiceSetVelocity = { + readonly methodName: string; + readonly service: typeof BaseService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_base_v1_base_pb.SetVelocityRequest; + readonly responseType: typeof component_base_v1_base_pb.SetVelocityResponse; +}; + +type BaseServiceStop = { + readonly methodName: string; + readonly service: typeof BaseService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_base_v1_base_pb.StopRequest; + readonly responseType: typeof component_base_v1_base_pb.StopResponse; +}; + +export class BaseService { + static readonly serviceName: string; + static readonly MoveStraight: BaseServiceMoveStraight; + static readonly Spin: BaseServiceSpin; + static readonly SetPower: BaseServiceSetPower; + static readonly SetVelocity: BaseServiceSetVelocity; + static readonly Stop: BaseServiceStop; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class BaseServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + moveStraight( + requestMessage: component_base_v1_base_pb.MoveStraightRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.MoveStraightResponse|null) => void + ): UnaryResponse; + moveStraight( + requestMessage: component_base_v1_base_pb.MoveStraightRequest, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.MoveStraightResponse|null) => void + ): UnaryResponse; + spin( + requestMessage: component_base_v1_base_pb.SpinRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.SpinResponse|null) => void + ): UnaryResponse; + spin( + requestMessage: component_base_v1_base_pb.SpinRequest, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.SpinResponse|null) => void + ): UnaryResponse; + setPower( + requestMessage: component_base_v1_base_pb.SetPowerRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.SetPowerResponse|null) => void + ): UnaryResponse; + setPower( + requestMessage: component_base_v1_base_pb.SetPowerRequest, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.SetPowerResponse|null) => void + ): UnaryResponse; + setVelocity( + requestMessage: component_base_v1_base_pb.SetVelocityRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.SetVelocityResponse|null) => void + ): UnaryResponse; + setVelocity( + requestMessage: component_base_v1_base_pb.SetVelocityRequest, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.SetVelocityResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_base_v1_base_pb.StopRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.StopResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_base_v1_base_pb.StopRequest, + callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.StopResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/base/v1/base_pb_service.js b/gen/js/component/base/v1/base_pb_service.js new file mode 100644 index 000000000..98679a140 --- /dev/null +++ b/gen/js/component/base/v1/base_pb_service.js @@ -0,0 +1,221 @@ +// package: viam.component.base.v1 +// file: component/base/v1/base.proto + +var component_base_v1_base_pb = require("../../../component/base/v1/base_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var BaseService = (function () { + function BaseService() {} + BaseService.serviceName = "viam.component.base.v1.BaseService"; + return BaseService; +}()); + +BaseService.MoveStraight = { + methodName: "MoveStraight", + service: BaseService, + requestStream: false, + responseStream: false, + requestType: component_base_v1_base_pb.MoveStraightRequest, + responseType: component_base_v1_base_pb.MoveStraightResponse +}; + +BaseService.Spin = { + methodName: "Spin", + service: BaseService, + requestStream: false, + responseStream: false, + requestType: component_base_v1_base_pb.SpinRequest, + responseType: component_base_v1_base_pb.SpinResponse +}; + +BaseService.SetPower = { + methodName: "SetPower", + service: BaseService, + requestStream: false, + responseStream: false, + requestType: component_base_v1_base_pb.SetPowerRequest, + responseType: component_base_v1_base_pb.SetPowerResponse +}; + +BaseService.SetVelocity = { + methodName: "SetVelocity", + service: BaseService, + requestStream: false, + responseStream: false, + requestType: component_base_v1_base_pb.SetVelocityRequest, + responseType: component_base_v1_base_pb.SetVelocityResponse +}; + +BaseService.Stop = { + methodName: "Stop", + service: BaseService, + requestStream: false, + responseStream: false, + requestType: component_base_v1_base_pb.StopRequest, + responseType: component_base_v1_base_pb.StopResponse +}; + +exports.BaseService = BaseService; + +function BaseServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +BaseServiceClient.prototype.moveStraight = function moveStraight(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BaseService.MoveStraight, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BaseServiceClient.prototype.spin = function spin(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BaseService.Spin, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BaseServiceClient.prototype.setPower = function setPower(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BaseService.SetPower, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BaseServiceClient.prototype.setVelocity = function setVelocity(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BaseService.SetVelocity, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BaseServiceClient.prototype.stop = function stop(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BaseService.Stop, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.BaseServiceClient = BaseServiceClient; + diff --git a/gen/js/component/board/v1/board_grpc_web_pb.js b/gen/js/component/board/v1/board_grpc_web_pb.js new file mode 100644 index 000000000..c0b5d1f0b --- /dev/null +++ b/gen/js/component/board/v1/board_grpc_web_pb.js @@ -0,0 +1,632 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.board.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.board = {}; +proto.viam.component.board.v1 = require('./board_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.board.v1.BoardServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.board.v1.BoardServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.board.v1.StatusRequest, + * !proto.viam.component.board.v1.StatusResponse>} + */ +const methodDescriptor_BoardService_Status = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/Status', + grpc.web.MethodType.UNARY, + proto.viam.component.board.v1.StatusRequest, + proto.viam.component.board.v1.StatusResponse, + /** + * @param {!proto.viam.component.board.v1.StatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.board.v1.StatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.board.v1.StatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.board.v1.StatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.status = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/Status', + request, + metadata || {}, + methodDescriptor_BoardService_Status, + callback); +}; + + +/** + * @param {!proto.viam.component.board.v1.StatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.status = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/Status', + request, + metadata || {}, + methodDescriptor_BoardService_Status); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.board.v1.SetGPIORequest, + * !proto.viam.component.board.v1.SetGPIOResponse>} + */ +const methodDescriptor_BoardService_SetGPIO = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/SetGPIO', + grpc.web.MethodType.UNARY, + proto.viam.component.board.v1.SetGPIORequest, + proto.viam.component.board.v1.SetGPIOResponse, + /** + * @param {!proto.viam.component.board.v1.SetGPIORequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.board.v1.SetGPIOResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.board.v1.SetGPIORequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.board.v1.SetGPIOResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.setGPIO = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/SetGPIO', + request, + metadata || {}, + methodDescriptor_BoardService_SetGPIO, + callback); +}; + + +/** + * @param {!proto.viam.component.board.v1.SetGPIORequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.setGPIO = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/SetGPIO', + request, + metadata || {}, + methodDescriptor_BoardService_SetGPIO); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.board.v1.GetGPIORequest, + * !proto.viam.component.board.v1.GetGPIOResponse>} + */ +const methodDescriptor_BoardService_GetGPIO = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/GetGPIO', + grpc.web.MethodType.UNARY, + proto.viam.component.board.v1.GetGPIORequest, + proto.viam.component.board.v1.GetGPIOResponse, + /** + * @param {!proto.viam.component.board.v1.GetGPIORequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.board.v1.GetGPIOResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.board.v1.GetGPIORequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.board.v1.GetGPIOResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.getGPIO = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/GetGPIO', + request, + metadata || {}, + methodDescriptor_BoardService_GetGPIO, + callback); +}; + + +/** + * @param {!proto.viam.component.board.v1.GetGPIORequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.getGPIO = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/GetGPIO', + request, + metadata || {}, + methodDescriptor_BoardService_GetGPIO); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.board.v1.PWMRequest, + * !proto.viam.component.board.v1.PWMResponse>} + */ +const methodDescriptor_BoardService_PWM = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/PWM', + grpc.web.MethodType.UNARY, + proto.viam.component.board.v1.PWMRequest, + proto.viam.component.board.v1.PWMResponse, + /** + * @param {!proto.viam.component.board.v1.PWMRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.board.v1.PWMResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.board.v1.PWMRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.board.v1.PWMResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.pWM = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/PWM', + request, + metadata || {}, + methodDescriptor_BoardService_PWM, + callback); +}; + + +/** + * @param {!proto.viam.component.board.v1.PWMRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.pWM = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/PWM', + request, + metadata || {}, + methodDescriptor_BoardService_PWM); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.board.v1.SetPWMRequest, + * !proto.viam.component.board.v1.SetPWMResponse>} + */ +const methodDescriptor_BoardService_SetPWM = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/SetPWM', + grpc.web.MethodType.UNARY, + proto.viam.component.board.v1.SetPWMRequest, + proto.viam.component.board.v1.SetPWMResponse, + /** + * @param {!proto.viam.component.board.v1.SetPWMRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.board.v1.SetPWMResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.board.v1.SetPWMRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.board.v1.SetPWMResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.setPWM = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/SetPWM', + request, + metadata || {}, + methodDescriptor_BoardService_SetPWM, + callback); +}; + + +/** + * @param {!proto.viam.component.board.v1.SetPWMRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.setPWM = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/SetPWM', + request, + metadata || {}, + methodDescriptor_BoardService_SetPWM); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.board.v1.PWMFrequencyRequest, + * !proto.viam.component.board.v1.PWMFrequencyResponse>} + */ +const methodDescriptor_BoardService_PWMFrequency = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/PWMFrequency', + grpc.web.MethodType.UNARY, + proto.viam.component.board.v1.PWMFrequencyRequest, + proto.viam.component.board.v1.PWMFrequencyResponse, + /** + * @param {!proto.viam.component.board.v1.PWMFrequencyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.board.v1.PWMFrequencyResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.board.v1.PWMFrequencyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.board.v1.PWMFrequencyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.pWMFrequency = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/PWMFrequency', + request, + metadata || {}, + methodDescriptor_BoardService_PWMFrequency, + callback); +}; + + +/** + * @param {!proto.viam.component.board.v1.PWMFrequencyRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.pWMFrequency = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/PWMFrequency', + request, + metadata || {}, + methodDescriptor_BoardService_PWMFrequency); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.board.v1.SetPWMFrequencyRequest, + * !proto.viam.component.board.v1.SetPWMFrequencyResponse>} + */ +const methodDescriptor_BoardService_SetPWMFrequency = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/SetPWMFrequency', + grpc.web.MethodType.UNARY, + proto.viam.component.board.v1.SetPWMFrequencyRequest, + proto.viam.component.board.v1.SetPWMFrequencyResponse, + /** + * @param {!proto.viam.component.board.v1.SetPWMFrequencyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.board.v1.SetPWMFrequencyResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.board.v1.SetPWMFrequencyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.board.v1.SetPWMFrequencyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.setPWMFrequency = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/SetPWMFrequency', + request, + metadata || {}, + methodDescriptor_BoardService_SetPWMFrequency, + callback); +}; + + +/** + * @param {!proto.viam.component.board.v1.SetPWMFrequencyRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.setPWMFrequency = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/SetPWMFrequency', + request, + metadata || {}, + methodDescriptor_BoardService_SetPWMFrequency); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.board.v1.ReadAnalogReaderRequest, + * !proto.viam.component.board.v1.ReadAnalogReaderResponse>} + */ +const methodDescriptor_BoardService_ReadAnalogReader = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/ReadAnalogReader', + grpc.web.MethodType.UNARY, + proto.viam.component.board.v1.ReadAnalogReaderRequest, + proto.viam.component.board.v1.ReadAnalogReaderResponse, + /** + * @param {!proto.viam.component.board.v1.ReadAnalogReaderRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.board.v1.ReadAnalogReaderResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.board.v1.ReadAnalogReaderRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.board.v1.ReadAnalogReaderResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.readAnalogReader = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/ReadAnalogReader', + request, + metadata || {}, + methodDescriptor_BoardService_ReadAnalogReader, + callback); +}; + + +/** + * @param {!proto.viam.component.board.v1.ReadAnalogReaderRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.readAnalogReader = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/ReadAnalogReader', + request, + metadata || {}, + methodDescriptor_BoardService_ReadAnalogReader); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.board.v1.GetDigitalInterruptValueRequest, + * !proto.viam.component.board.v1.GetDigitalInterruptValueResponse>} + */ +const methodDescriptor_BoardService_GetDigitalInterruptValue = new grpc.web.MethodDescriptor( + '/viam.component.board.v1.BoardService/GetDigitalInterruptValue', + grpc.web.MethodType.UNARY, + proto.viam.component.board.v1.GetDigitalInterruptValueRequest, + proto.viam.component.board.v1.GetDigitalInterruptValueResponse, + /** + * @param {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.board.v1.GetDigitalInterruptValueResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.board.v1.GetDigitalInterruptValueResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.board.v1.BoardServiceClient.prototype.getDigitalInterruptValue = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.board.v1.BoardService/GetDigitalInterruptValue', + request, + metadata || {}, + methodDescriptor_BoardService_GetDigitalInterruptValue, + callback); +}; + + +/** + * @param {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.board.v1.BoardServicePromiseClient.prototype.getDigitalInterruptValue = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.board.v1.BoardService/GetDigitalInterruptValue', + request, + metadata || {}, + methodDescriptor_BoardService_GetDigitalInterruptValue); +}; + + +module.exports = proto.viam.component.board.v1; + diff --git a/gen/js/component/board/v1/board_pb.d.ts b/gen/js/component/board/v1/board_pb.d.ts new file mode 100644 index 000000000..58d0be027 --- /dev/null +++ b/gen/js/component/board/v1/board_pb.d.ts @@ -0,0 +1,456 @@ +// package: viam.component.board.v1 +// file: component/board/v1/board.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class StatusRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: StatusRequest): StatusRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StatusRequest; + static deserializeBinaryFromReader(message: StatusRequest, reader: jspb.BinaryReader): StatusRequest; +} + +export namespace StatusRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class StatusResponse extends jspb.Message { + hasStatus(): boolean; + clearStatus(): void; + getStatus(): common_v1_common_pb.BoardStatus | undefined; + setStatus(value?: common_v1_common_pb.BoardStatus): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StatusResponse.AsObject; + static toObject(includeInstance: boolean, msg: StatusResponse): StatusResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StatusResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StatusResponse; + static deserializeBinaryFromReader(message: StatusResponse, reader: jspb.BinaryReader): StatusResponse; +} + +export namespace StatusResponse { + export type AsObject = { + status?: common_v1_common_pb.BoardStatus.AsObject, + } +} + +export class SetGPIORequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getPin(): string; + setPin(value: string): void; + + getHigh(): boolean; + setHigh(value: boolean): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetGPIORequest.AsObject; + static toObject(includeInstance: boolean, msg: SetGPIORequest): SetGPIORequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetGPIORequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetGPIORequest; + static deserializeBinaryFromReader(message: SetGPIORequest, reader: jspb.BinaryReader): SetGPIORequest; +} + +export namespace SetGPIORequest { + export type AsObject = { + name: string, + pin: string, + high: boolean, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class SetGPIOResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetGPIOResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetGPIOResponse): SetGPIOResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetGPIOResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetGPIOResponse; + static deserializeBinaryFromReader(message: SetGPIOResponse, reader: jspb.BinaryReader): SetGPIOResponse; +} + +export namespace SetGPIOResponse { + export type AsObject = { + } +} + +export class GetGPIORequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getPin(): string; + setPin(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGPIORequest.AsObject; + static toObject(includeInstance: boolean, msg: GetGPIORequest): GetGPIORequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGPIORequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGPIORequest; + static deserializeBinaryFromReader(message: GetGPIORequest, reader: jspb.BinaryReader): GetGPIORequest; +} + +export namespace GetGPIORequest { + export type AsObject = { + name: string, + pin: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetGPIOResponse extends jspb.Message { + getHigh(): boolean; + setHigh(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGPIOResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetGPIOResponse): GetGPIOResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGPIOResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGPIOResponse; + static deserializeBinaryFromReader(message: GetGPIOResponse, reader: jspb.BinaryReader): GetGPIOResponse; +} + +export namespace GetGPIOResponse { + export type AsObject = { + high: boolean, + } +} + +export class PWMRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getPin(): string; + setPin(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PWMRequest.AsObject; + static toObject(includeInstance: boolean, msg: PWMRequest): PWMRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PWMRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PWMRequest; + static deserializeBinaryFromReader(message: PWMRequest, reader: jspb.BinaryReader): PWMRequest; +} + +export namespace PWMRequest { + export type AsObject = { + name: string, + pin: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class PWMResponse extends jspb.Message { + getDutyCyclePct(): number; + setDutyCyclePct(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PWMResponse.AsObject; + static toObject(includeInstance: boolean, msg: PWMResponse): PWMResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PWMResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PWMResponse; + static deserializeBinaryFromReader(message: PWMResponse, reader: jspb.BinaryReader): PWMResponse; +} + +export namespace PWMResponse { + export type AsObject = { + dutyCyclePct: number, + } +} + +export class SetPWMRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getPin(): string; + setPin(value: string): void; + + getDutyCyclePct(): number; + setDutyCyclePct(value: number): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetPWMRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetPWMRequest): SetPWMRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetPWMRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetPWMRequest; + static deserializeBinaryFromReader(message: SetPWMRequest, reader: jspb.BinaryReader): SetPWMRequest; +} + +export namespace SetPWMRequest { + export type AsObject = { + name: string, + pin: string, + dutyCyclePct: number, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class SetPWMResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetPWMResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetPWMResponse): SetPWMResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetPWMResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetPWMResponse; + static deserializeBinaryFromReader(message: SetPWMResponse, reader: jspb.BinaryReader): SetPWMResponse; +} + +export namespace SetPWMResponse { + export type AsObject = { + } +} + +export class PWMFrequencyRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getPin(): string; + setPin(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PWMFrequencyRequest.AsObject; + static toObject(includeInstance: boolean, msg: PWMFrequencyRequest): PWMFrequencyRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PWMFrequencyRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PWMFrequencyRequest; + static deserializeBinaryFromReader(message: PWMFrequencyRequest, reader: jspb.BinaryReader): PWMFrequencyRequest; +} + +export namespace PWMFrequencyRequest { + export type AsObject = { + name: string, + pin: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class PWMFrequencyResponse extends jspb.Message { + getFrequencyHz(): number; + setFrequencyHz(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PWMFrequencyResponse.AsObject; + static toObject(includeInstance: boolean, msg: PWMFrequencyResponse): PWMFrequencyResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PWMFrequencyResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PWMFrequencyResponse; + static deserializeBinaryFromReader(message: PWMFrequencyResponse, reader: jspb.BinaryReader): PWMFrequencyResponse; +} + +export namespace PWMFrequencyResponse { + export type AsObject = { + frequencyHz: number, + } +} + +export class SetPWMFrequencyRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getPin(): string; + setPin(value: string): void; + + getFrequencyHz(): number; + setFrequencyHz(value: number): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetPWMFrequencyRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetPWMFrequencyRequest): SetPWMFrequencyRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetPWMFrequencyRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetPWMFrequencyRequest; + static deserializeBinaryFromReader(message: SetPWMFrequencyRequest, reader: jspb.BinaryReader): SetPWMFrequencyRequest; +} + +export namespace SetPWMFrequencyRequest { + export type AsObject = { + name: string, + pin: string, + frequencyHz: number, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class SetPWMFrequencyResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetPWMFrequencyResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetPWMFrequencyResponse): SetPWMFrequencyResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetPWMFrequencyResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetPWMFrequencyResponse; + static deserializeBinaryFromReader(message: SetPWMFrequencyResponse, reader: jspb.BinaryReader): SetPWMFrequencyResponse; +} + +export namespace SetPWMFrequencyResponse { + export type AsObject = { + } +} + +export class ReadAnalogReaderRequest extends jspb.Message { + getBoardName(): string; + setBoardName(value: string): void; + + getAnalogReaderName(): string; + setAnalogReaderName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReadAnalogReaderRequest.AsObject; + static toObject(includeInstance: boolean, msg: ReadAnalogReaderRequest): ReadAnalogReaderRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReadAnalogReaderRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReadAnalogReaderRequest; + static deserializeBinaryFromReader(message: ReadAnalogReaderRequest, reader: jspb.BinaryReader): ReadAnalogReaderRequest; +} + +export namespace ReadAnalogReaderRequest { + export type AsObject = { + boardName: string, + analogReaderName: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class ReadAnalogReaderResponse extends jspb.Message { + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReadAnalogReaderResponse.AsObject; + static toObject(includeInstance: boolean, msg: ReadAnalogReaderResponse): ReadAnalogReaderResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReadAnalogReaderResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReadAnalogReaderResponse; + static deserializeBinaryFromReader(message: ReadAnalogReaderResponse, reader: jspb.BinaryReader): ReadAnalogReaderResponse; +} + +export namespace ReadAnalogReaderResponse { + export type AsObject = { + value: number, + } +} + +export class GetDigitalInterruptValueRequest extends jspb.Message { + getBoardName(): string; + setBoardName(value: string): void; + + getDigitalInterruptName(): string; + setDigitalInterruptName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDigitalInterruptValueRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetDigitalInterruptValueRequest): GetDigitalInterruptValueRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDigitalInterruptValueRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDigitalInterruptValueRequest; + static deserializeBinaryFromReader(message: GetDigitalInterruptValueRequest, reader: jspb.BinaryReader): GetDigitalInterruptValueRequest; +} + +export namespace GetDigitalInterruptValueRequest { + export type AsObject = { + boardName: string, + digitalInterruptName: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetDigitalInterruptValueResponse extends jspb.Message { + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDigitalInterruptValueResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetDigitalInterruptValueResponse): GetDigitalInterruptValueResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDigitalInterruptValueResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDigitalInterruptValueResponse; + static deserializeBinaryFromReader(message: GetDigitalInterruptValueResponse, reader: jspb.BinaryReader): GetDigitalInterruptValueResponse; +} + +export namespace GetDigitalInterruptValueResponse { + export type AsObject = { + value: number, + } +} + diff --git a/gen/js/component/board/v1/board_pb.js b/gen/js/component/board/v1/board_pb.js new file mode 100644 index 000000000..b8e31f5f0 --- /dev/null +++ b/gen/js/component/board/v1/board_pb.js @@ -0,0 +1,3483 @@ +// source: component/board/v1/board.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.component.board.v1.GetDigitalInterruptValueRequest', null, global); +goog.exportSymbol('proto.viam.component.board.v1.GetDigitalInterruptValueResponse', null, global); +goog.exportSymbol('proto.viam.component.board.v1.GetGPIORequest', null, global); +goog.exportSymbol('proto.viam.component.board.v1.GetGPIOResponse', null, global); +goog.exportSymbol('proto.viam.component.board.v1.PWMFrequencyRequest', null, global); +goog.exportSymbol('proto.viam.component.board.v1.PWMFrequencyResponse', null, global); +goog.exportSymbol('proto.viam.component.board.v1.PWMRequest', null, global); +goog.exportSymbol('proto.viam.component.board.v1.PWMResponse', null, global); +goog.exportSymbol('proto.viam.component.board.v1.ReadAnalogReaderRequest', null, global); +goog.exportSymbol('proto.viam.component.board.v1.ReadAnalogReaderResponse', null, global); +goog.exportSymbol('proto.viam.component.board.v1.SetGPIORequest', null, global); +goog.exportSymbol('proto.viam.component.board.v1.SetGPIOResponse', null, global); +goog.exportSymbol('proto.viam.component.board.v1.SetPWMFrequencyRequest', null, global); +goog.exportSymbol('proto.viam.component.board.v1.SetPWMFrequencyResponse', null, global); +goog.exportSymbol('proto.viam.component.board.v1.SetPWMRequest', null, global); +goog.exportSymbol('proto.viam.component.board.v1.SetPWMResponse', null, global); +goog.exportSymbol('proto.viam.component.board.v1.StatusRequest', null, global); +goog.exportSymbol('proto.viam.component.board.v1.StatusResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.StatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.StatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.StatusRequest.displayName = 'proto.viam.component.board.v1.StatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.StatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.StatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.StatusResponse.displayName = 'proto.viam.component.board.v1.StatusResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.SetGPIORequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.SetGPIORequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.SetGPIORequest.displayName = 'proto.viam.component.board.v1.SetGPIORequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.SetGPIOResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.SetGPIOResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.SetGPIOResponse.displayName = 'proto.viam.component.board.v1.SetGPIOResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.GetGPIORequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.GetGPIORequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.GetGPIORequest.displayName = 'proto.viam.component.board.v1.GetGPIORequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.GetGPIOResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.GetGPIOResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.GetGPIOResponse.displayName = 'proto.viam.component.board.v1.GetGPIOResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.PWMRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.PWMRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.PWMRequest.displayName = 'proto.viam.component.board.v1.PWMRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.PWMResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.PWMResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.PWMResponse.displayName = 'proto.viam.component.board.v1.PWMResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.SetPWMRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.SetPWMRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.SetPWMRequest.displayName = 'proto.viam.component.board.v1.SetPWMRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.SetPWMResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.SetPWMResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.SetPWMResponse.displayName = 'proto.viam.component.board.v1.SetPWMResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.PWMFrequencyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.PWMFrequencyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.PWMFrequencyRequest.displayName = 'proto.viam.component.board.v1.PWMFrequencyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.PWMFrequencyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.PWMFrequencyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.PWMFrequencyResponse.displayName = 'proto.viam.component.board.v1.PWMFrequencyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.SetPWMFrequencyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.SetPWMFrequencyRequest.displayName = 'proto.viam.component.board.v1.SetPWMFrequencyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.SetPWMFrequencyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.SetPWMFrequencyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.SetPWMFrequencyResponse.displayName = 'proto.viam.component.board.v1.SetPWMFrequencyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.ReadAnalogReaderRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.ReadAnalogReaderRequest.displayName = 'proto.viam.component.board.v1.ReadAnalogReaderRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.ReadAnalogReaderResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.ReadAnalogReaderResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.ReadAnalogReaderResponse.displayName = 'proto.viam.component.board.v1.ReadAnalogReaderResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.GetDigitalInterruptValueRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.GetDigitalInterruptValueRequest.displayName = 'proto.viam.component.board.v1.GetDigitalInterruptValueRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.board.v1.GetDigitalInterruptValueResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.board.v1.GetDigitalInterruptValueResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.board.v1.GetDigitalInterruptValueResponse.displayName = 'proto.viam.component.board.v1.GetDigitalInterruptValueResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.StatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.StatusRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.StatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.StatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.StatusRequest} + */ +proto.viam.component.board.v1.StatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.StatusRequest; + return proto.viam.component.board.v1.StatusRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.StatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.StatusRequest} + */ +proto.viam.component.board.v1.StatusRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.StatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.StatusRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.StatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.StatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.board.v1.StatusRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.StatusRequest} returns this + */ +proto.viam.component.board.v1.StatusRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.board.v1.StatusRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.board.v1.StatusRequest} returns this +*/ +proto.viam.component.board.v1.StatusRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.StatusRequest} returns this + */ +proto.viam.component.board.v1.StatusRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.StatusRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.StatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.StatusResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.StatusResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.StatusResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: (f = msg.getStatus()) && common_v1_common_pb.BoardStatus.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.StatusResponse} + */ +proto.viam.component.board.v1.StatusResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.StatusResponse; + return proto.viam.component.board.v1.StatusResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.StatusResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.StatusResponse} + */ +proto.viam.component.board.v1.StatusResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.BoardStatus; + reader.readMessage(value,common_v1_common_pb.BoardStatus.deserializeBinaryFromReader); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.StatusResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.StatusResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.StatusResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.StatusResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.BoardStatus.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.BoardStatus status = 1; + * @return {?proto.viam.common.v1.BoardStatus} + */ +proto.viam.component.board.v1.StatusResponse.prototype.getStatus = function() { + return /** @type{?proto.viam.common.v1.BoardStatus} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.BoardStatus, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.BoardStatus|undefined} value + * @return {!proto.viam.component.board.v1.StatusResponse} returns this +*/ +proto.viam.component.board.v1.StatusResponse.prototype.setStatus = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.StatusResponse} returns this + */ +proto.viam.component.board.v1.StatusResponse.prototype.clearStatus = function() { + return this.setStatus(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.StatusResponse.prototype.hasStatus = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.SetGPIORequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.SetGPIORequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetGPIORequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + pin: jspb.Message.getFieldWithDefault(msg, 2, ""), + high: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.SetGPIORequest} + */ +proto.viam.component.board.v1.SetGPIORequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.SetGPIORequest; + return proto.viam.component.board.v1.SetGPIORequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.SetGPIORequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.SetGPIORequest} + */ +proto.viam.component.board.v1.SetGPIORequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPin(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHigh(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.SetGPIORequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.SetGPIORequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetGPIORequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPin(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHigh(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.SetGPIORequest} returns this + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string pin = 2; + * @return {string} + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.getPin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.SetGPIORequest} returns this + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.setPin = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool high = 3; + * @return {boolean} + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.getHigh = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.board.v1.SetGPIORequest} returns this + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.setHigh = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.board.v1.SetGPIORequest} returns this +*/ +proto.viam.component.board.v1.SetGPIORequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.SetGPIORequest} returns this + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.SetGPIORequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.SetGPIOResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.SetGPIOResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.SetGPIOResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetGPIOResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.SetGPIOResponse} + */ +proto.viam.component.board.v1.SetGPIOResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.SetGPIOResponse; + return proto.viam.component.board.v1.SetGPIOResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.SetGPIOResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.SetGPIOResponse} + */ +proto.viam.component.board.v1.SetGPIOResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.SetGPIOResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.SetGPIOResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.SetGPIOResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetGPIOResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.GetGPIORequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.GetGPIORequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.GetGPIORequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.GetGPIORequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + pin: jspb.Message.getFieldWithDefault(msg, 2, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.GetGPIORequest} + */ +proto.viam.component.board.v1.GetGPIORequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.GetGPIORequest; + return proto.viam.component.board.v1.GetGPIORequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.GetGPIORequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.GetGPIORequest} + */ +proto.viam.component.board.v1.GetGPIORequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPin(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.GetGPIORequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.GetGPIORequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.GetGPIORequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.GetGPIORequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPin(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.board.v1.GetGPIORequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.GetGPIORequest} returns this + */ +proto.viam.component.board.v1.GetGPIORequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string pin = 2; + * @return {string} + */ +proto.viam.component.board.v1.GetGPIORequest.prototype.getPin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.GetGPIORequest} returns this + */ +proto.viam.component.board.v1.GetGPIORequest.prototype.setPin = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.board.v1.GetGPIORequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.board.v1.GetGPIORequest} returns this +*/ +proto.viam.component.board.v1.GetGPIORequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.GetGPIORequest} returns this + */ +proto.viam.component.board.v1.GetGPIORequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.GetGPIORequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.GetGPIOResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.GetGPIOResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.GetGPIOResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.GetGPIOResponse.toObject = function(includeInstance, msg) { + var f, obj = { + high: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.GetGPIOResponse} + */ +proto.viam.component.board.v1.GetGPIOResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.GetGPIOResponse; + return proto.viam.component.board.v1.GetGPIOResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.GetGPIOResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.GetGPIOResponse} + */ +proto.viam.component.board.v1.GetGPIOResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHigh(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.GetGPIOResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.GetGPIOResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.GetGPIOResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.GetGPIOResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHigh(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool high = 1; + * @return {boolean} + */ +proto.viam.component.board.v1.GetGPIOResponse.prototype.getHigh = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.board.v1.GetGPIOResponse} returns this + */ +proto.viam.component.board.v1.GetGPIOResponse.prototype.setHigh = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.PWMRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.PWMRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.PWMRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.PWMRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + pin: jspb.Message.getFieldWithDefault(msg, 2, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.PWMRequest} + */ +proto.viam.component.board.v1.PWMRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.PWMRequest; + return proto.viam.component.board.v1.PWMRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.PWMRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.PWMRequest} + */ +proto.viam.component.board.v1.PWMRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPin(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.PWMRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.PWMRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.PWMRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.PWMRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPin(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.board.v1.PWMRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.PWMRequest} returns this + */ +proto.viam.component.board.v1.PWMRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string pin = 2; + * @return {string} + */ +proto.viam.component.board.v1.PWMRequest.prototype.getPin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.PWMRequest} returns this + */ +proto.viam.component.board.v1.PWMRequest.prototype.setPin = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.board.v1.PWMRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.board.v1.PWMRequest} returns this +*/ +proto.viam.component.board.v1.PWMRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.PWMRequest} returns this + */ +proto.viam.component.board.v1.PWMRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.PWMRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.PWMResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.PWMResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.PWMResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.PWMResponse.toObject = function(includeInstance, msg) { + var f, obj = { + dutyCyclePct: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.PWMResponse} + */ +proto.viam.component.board.v1.PWMResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.PWMResponse; + return proto.viam.component.board.v1.PWMResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.PWMResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.PWMResponse} + */ +proto.viam.component.board.v1.PWMResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDutyCyclePct(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.PWMResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.PWMResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.PWMResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.PWMResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDutyCyclePct(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } +}; + + +/** + * optional double duty_cycle_pct = 1; + * @return {number} + */ +proto.viam.component.board.v1.PWMResponse.prototype.getDutyCyclePct = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.board.v1.PWMResponse} returns this + */ +proto.viam.component.board.v1.PWMResponse.prototype.setDutyCyclePct = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.SetPWMRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.SetPWMRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetPWMRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + pin: jspb.Message.getFieldWithDefault(msg, 2, ""), + dutyCyclePct: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.SetPWMRequest} + */ +proto.viam.component.board.v1.SetPWMRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.SetPWMRequest; + return proto.viam.component.board.v1.SetPWMRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.SetPWMRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.SetPWMRequest} + */ +proto.viam.component.board.v1.SetPWMRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPin(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDutyCyclePct(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.SetPWMRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.SetPWMRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetPWMRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPin(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDutyCyclePct(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.SetPWMRequest} returns this + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string pin = 2; + * @return {string} + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.getPin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.SetPWMRequest} returns this + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.setPin = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional double duty_cycle_pct = 3; + * @return {number} + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.getDutyCyclePct = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.board.v1.SetPWMRequest} returns this + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.setDutyCyclePct = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.board.v1.SetPWMRequest} returns this +*/ +proto.viam.component.board.v1.SetPWMRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.SetPWMRequest} returns this + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.SetPWMRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.SetPWMResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.SetPWMResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.SetPWMResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetPWMResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.SetPWMResponse} + */ +proto.viam.component.board.v1.SetPWMResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.SetPWMResponse; + return proto.viam.component.board.v1.SetPWMResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.SetPWMResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.SetPWMResponse} + */ +proto.viam.component.board.v1.SetPWMResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.SetPWMResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.SetPWMResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.SetPWMResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetPWMResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.PWMFrequencyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.PWMFrequencyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.PWMFrequencyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + pin: jspb.Message.getFieldWithDefault(msg, 2, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.PWMFrequencyRequest} + */ +proto.viam.component.board.v1.PWMFrequencyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.PWMFrequencyRequest; + return proto.viam.component.board.v1.PWMFrequencyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.PWMFrequencyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.PWMFrequencyRequest} + */ +proto.viam.component.board.v1.PWMFrequencyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPin(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.PWMFrequencyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.PWMFrequencyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.PWMFrequencyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPin(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.PWMFrequencyRequest} returns this + */ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string pin = 2; + * @return {string} + */ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.getPin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.PWMFrequencyRequest} returns this + */ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.setPin = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.board.v1.PWMFrequencyRequest} returns this +*/ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.PWMFrequencyRequest} returns this + */ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.PWMFrequencyRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.PWMFrequencyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.PWMFrequencyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.PWMFrequencyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.PWMFrequencyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + frequencyHz: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.PWMFrequencyResponse} + */ +proto.viam.component.board.v1.PWMFrequencyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.PWMFrequencyResponse; + return proto.viam.component.board.v1.PWMFrequencyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.PWMFrequencyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.PWMFrequencyResponse} + */ +proto.viam.component.board.v1.PWMFrequencyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFrequencyHz(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.PWMFrequencyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.PWMFrequencyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.PWMFrequencyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.PWMFrequencyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFrequencyHz(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 frequency_hz = 1; + * @return {number} + */ +proto.viam.component.board.v1.PWMFrequencyResponse.prototype.getFrequencyHz = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.board.v1.PWMFrequencyResponse} returns this + */ +proto.viam.component.board.v1.PWMFrequencyResponse.prototype.setFrequencyHz = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.SetPWMFrequencyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.SetPWMFrequencyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + pin: jspb.Message.getFieldWithDefault(msg, 2, ""), + frequencyHz: jspb.Message.getFieldWithDefault(msg, 3, 0), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.SetPWMFrequencyRequest} + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.SetPWMFrequencyRequest; + return proto.viam.component.board.v1.SetPWMFrequencyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.SetPWMFrequencyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.SetPWMFrequencyRequest} + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPin(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFrequencyHz(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.SetPWMFrequencyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.SetPWMFrequencyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPin(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFrequencyHz(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.SetPWMFrequencyRequest} returns this + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string pin = 2; + * @return {string} + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.getPin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.SetPWMFrequencyRequest} returns this + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.setPin = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 frequency_hz = 3; + * @return {number} + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.getFrequencyHz = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.board.v1.SetPWMFrequencyRequest} returns this + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.setFrequencyHz = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.board.v1.SetPWMFrequencyRequest} returns this +*/ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.SetPWMFrequencyRequest} returns this + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.SetPWMFrequencyRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.SetPWMFrequencyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.SetPWMFrequencyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.SetPWMFrequencyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetPWMFrequencyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.SetPWMFrequencyResponse} + */ +proto.viam.component.board.v1.SetPWMFrequencyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.SetPWMFrequencyResponse; + return proto.viam.component.board.v1.SetPWMFrequencyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.SetPWMFrequencyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.SetPWMFrequencyResponse} + */ +proto.viam.component.board.v1.SetPWMFrequencyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.SetPWMFrequencyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.SetPWMFrequencyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.SetPWMFrequencyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.SetPWMFrequencyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.ReadAnalogReaderRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.ReadAnalogReaderRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.toObject = function(includeInstance, msg) { + var f, obj = { + boardName: jspb.Message.getFieldWithDefault(msg, 1, ""), + analogReaderName: jspb.Message.getFieldWithDefault(msg, 2, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.ReadAnalogReaderRequest} + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.ReadAnalogReaderRequest; + return proto.viam.component.board.v1.ReadAnalogReaderRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.ReadAnalogReaderRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.ReadAnalogReaderRequest} + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBoardName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAnalogReaderName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.ReadAnalogReaderRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.ReadAnalogReaderRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBoardName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAnalogReaderName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string board_name = 1; + * @return {string} + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.getBoardName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.ReadAnalogReaderRequest} returns this + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.setBoardName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string analog_reader_name = 2; + * @return {string} + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.getAnalogReaderName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.ReadAnalogReaderRequest} returns this + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.setAnalogReaderName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.board.v1.ReadAnalogReaderRequest} returns this +*/ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.ReadAnalogReaderRequest} returns this + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.ReadAnalogReaderRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.ReadAnalogReaderResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.ReadAnalogReaderResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.ReadAnalogReaderResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.ReadAnalogReaderResponse.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.ReadAnalogReaderResponse} + */ +proto.viam.component.board.v1.ReadAnalogReaderResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.ReadAnalogReaderResponse; + return proto.viam.component.board.v1.ReadAnalogReaderResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.ReadAnalogReaderResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.ReadAnalogReaderResponse} + */ +proto.viam.component.board.v1.ReadAnalogReaderResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.ReadAnalogReaderResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.ReadAnalogReaderResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.ReadAnalogReaderResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.ReadAnalogReaderResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 value = 1; + * @return {number} + */ +proto.viam.component.board.v1.ReadAnalogReaderResponse.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.board.v1.ReadAnalogReaderResponse} returns this + */ +proto.viam.component.board.v1.ReadAnalogReaderResponse.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.GetDigitalInterruptValueRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.toObject = function(includeInstance, msg) { + var f, obj = { + boardName: jspb.Message.getFieldWithDefault(msg, 1, ""), + digitalInterruptName: jspb.Message.getFieldWithDefault(msg, 2, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.GetDigitalInterruptValueRequest; + return proto.viam.component.board.v1.GetDigitalInterruptValueRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBoardName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDigitalInterruptName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.GetDigitalInterruptValueRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBoardName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDigitalInterruptName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string board_name = 1; + * @return {string} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.getBoardName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} returns this + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.setBoardName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string digital_interrupt_name = 2; + * @return {string} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.getDigitalInterruptName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} returns this + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.setDigitalInterruptName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} returns this +*/ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.board.v1.GetDigitalInterruptValueRequest} returns this + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.board.v1.GetDigitalInterruptValueResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.board.v1.GetDigitalInterruptValueResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.GetDigitalInterruptValueResponse.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.board.v1.GetDigitalInterruptValueResponse} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.board.v1.GetDigitalInterruptValueResponse; + return proto.viam.component.board.v1.GetDigitalInterruptValueResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.board.v1.GetDigitalInterruptValueResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.board.v1.GetDigitalInterruptValueResponse} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.board.v1.GetDigitalInterruptValueResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.board.v1.GetDigitalInterruptValueResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.board.v1.GetDigitalInterruptValueResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 value = 1; + * @return {number} + */ +proto.viam.component.board.v1.GetDigitalInterruptValueResponse.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.board.v1.GetDigitalInterruptValueResponse} returns this + */ +proto.viam.component.board.v1.GetDigitalInterruptValueResponse.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +goog.object.extend(exports, proto.viam.component.board.v1); diff --git a/gen/js/component/board/v1/board_pb_service.d.ts b/gen/js/component/board/v1/board_pb_service.d.ts new file mode 100644 index 000000000..2ac516fa2 --- /dev/null +++ b/gen/js/component/board/v1/board_pb_service.d.ts @@ -0,0 +1,215 @@ +// package: viam.component.board.v1 +// file: component/board/v1/board.proto + +import * as component_board_v1_board_pb from "../../../component/board/v1/board_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type BoardServiceStatus = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_board_v1_board_pb.StatusRequest; + readonly responseType: typeof component_board_v1_board_pb.StatusResponse; +}; + +type BoardServiceSetGPIO = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_board_v1_board_pb.SetGPIORequest; + readonly responseType: typeof component_board_v1_board_pb.SetGPIOResponse; +}; + +type BoardServiceGetGPIO = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_board_v1_board_pb.GetGPIORequest; + readonly responseType: typeof component_board_v1_board_pb.GetGPIOResponse; +}; + +type BoardServicePWM = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_board_v1_board_pb.PWMRequest; + readonly responseType: typeof component_board_v1_board_pb.PWMResponse; +}; + +type BoardServiceSetPWM = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_board_v1_board_pb.SetPWMRequest; + readonly responseType: typeof component_board_v1_board_pb.SetPWMResponse; +}; + +type BoardServicePWMFrequency = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_board_v1_board_pb.PWMFrequencyRequest; + readonly responseType: typeof component_board_v1_board_pb.PWMFrequencyResponse; +}; + +type BoardServiceSetPWMFrequency = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_board_v1_board_pb.SetPWMFrequencyRequest; + readonly responseType: typeof component_board_v1_board_pb.SetPWMFrequencyResponse; +}; + +type BoardServiceReadAnalogReader = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_board_v1_board_pb.ReadAnalogReaderRequest; + readonly responseType: typeof component_board_v1_board_pb.ReadAnalogReaderResponse; +}; + +type BoardServiceGetDigitalInterruptValue = { + readonly methodName: string; + readonly service: typeof BoardService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_board_v1_board_pb.GetDigitalInterruptValueRequest; + readonly responseType: typeof component_board_v1_board_pb.GetDigitalInterruptValueResponse; +}; + +export class BoardService { + static readonly serviceName: string; + static readonly Status: BoardServiceStatus; + static readonly SetGPIO: BoardServiceSetGPIO; + static readonly GetGPIO: BoardServiceGetGPIO; + static readonly PWM: BoardServicePWM; + static readonly SetPWM: BoardServiceSetPWM; + static readonly PWMFrequency: BoardServicePWMFrequency; + static readonly SetPWMFrequency: BoardServiceSetPWMFrequency; + static readonly ReadAnalogReader: BoardServiceReadAnalogReader; + static readonly GetDigitalInterruptValue: BoardServiceGetDigitalInterruptValue; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class BoardServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + status( + requestMessage: component_board_v1_board_pb.StatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.StatusResponse|null) => void + ): UnaryResponse; + status( + requestMessage: component_board_v1_board_pb.StatusRequest, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.StatusResponse|null) => void + ): UnaryResponse; + setGPIO( + requestMessage: component_board_v1_board_pb.SetGPIORequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.SetGPIOResponse|null) => void + ): UnaryResponse; + setGPIO( + requestMessage: component_board_v1_board_pb.SetGPIORequest, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.SetGPIOResponse|null) => void + ): UnaryResponse; + getGPIO( + requestMessage: component_board_v1_board_pb.GetGPIORequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.GetGPIOResponse|null) => void + ): UnaryResponse; + getGPIO( + requestMessage: component_board_v1_board_pb.GetGPIORequest, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.GetGPIOResponse|null) => void + ): UnaryResponse; + pWM( + requestMessage: component_board_v1_board_pb.PWMRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.PWMResponse|null) => void + ): UnaryResponse; + pWM( + requestMessage: component_board_v1_board_pb.PWMRequest, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.PWMResponse|null) => void + ): UnaryResponse; + setPWM( + requestMessage: component_board_v1_board_pb.SetPWMRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.SetPWMResponse|null) => void + ): UnaryResponse; + setPWM( + requestMessage: component_board_v1_board_pb.SetPWMRequest, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.SetPWMResponse|null) => void + ): UnaryResponse; + pWMFrequency( + requestMessage: component_board_v1_board_pb.PWMFrequencyRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.PWMFrequencyResponse|null) => void + ): UnaryResponse; + pWMFrequency( + requestMessage: component_board_v1_board_pb.PWMFrequencyRequest, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.PWMFrequencyResponse|null) => void + ): UnaryResponse; + setPWMFrequency( + requestMessage: component_board_v1_board_pb.SetPWMFrequencyRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.SetPWMFrequencyResponse|null) => void + ): UnaryResponse; + setPWMFrequency( + requestMessage: component_board_v1_board_pb.SetPWMFrequencyRequest, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.SetPWMFrequencyResponse|null) => void + ): UnaryResponse; + readAnalogReader( + requestMessage: component_board_v1_board_pb.ReadAnalogReaderRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.ReadAnalogReaderResponse|null) => void + ): UnaryResponse; + readAnalogReader( + requestMessage: component_board_v1_board_pb.ReadAnalogReaderRequest, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.ReadAnalogReaderResponse|null) => void + ): UnaryResponse; + getDigitalInterruptValue( + requestMessage: component_board_v1_board_pb.GetDigitalInterruptValueRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.GetDigitalInterruptValueResponse|null) => void + ): UnaryResponse; + getDigitalInterruptValue( + requestMessage: component_board_v1_board_pb.GetDigitalInterruptValueRequest, + callback: (error: ServiceError|null, responseMessage: component_board_v1_board_pb.GetDigitalInterruptValueResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/board/v1/board_pb_service.js b/gen/js/component/board/v1/board_pb_service.js new file mode 100644 index 000000000..42052059b --- /dev/null +++ b/gen/js/component/board/v1/board_pb_service.js @@ -0,0 +1,381 @@ +// package: viam.component.board.v1 +// file: component/board/v1/board.proto + +var component_board_v1_board_pb = require("../../../component/board/v1/board_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var BoardService = (function () { + function BoardService() {} + BoardService.serviceName = "viam.component.board.v1.BoardService"; + return BoardService; +}()); + +BoardService.Status = { + methodName: "Status", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: component_board_v1_board_pb.StatusRequest, + responseType: component_board_v1_board_pb.StatusResponse +}; + +BoardService.SetGPIO = { + methodName: "SetGPIO", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: component_board_v1_board_pb.SetGPIORequest, + responseType: component_board_v1_board_pb.SetGPIOResponse +}; + +BoardService.GetGPIO = { + methodName: "GetGPIO", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: component_board_v1_board_pb.GetGPIORequest, + responseType: component_board_v1_board_pb.GetGPIOResponse +}; + +BoardService.PWM = { + methodName: "PWM", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: component_board_v1_board_pb.PWMRequest, + responseType: component_board_v1_board_pb.PWMResponse +}; + +BoardService.SetPWM = { + methodName: "SetPWM", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: component_board_v1_board_pb.SetPWMRequest, + responseType: component_board_v1_board_pb.SetPWMResponse +}; + +BoardService.PWMFrequency = { + methodName: "PWMFrequency", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: component_board_v1_board_pb.PWMFrequencyRequest, + responseType: component_board_v1_board_pb.PWMFrequencyResponse +}; + +BoardService.SetPWMFrequency = { + methodName: "SetPWMFrequency", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: component_board_v1_board_pb.SetPWMFrequencyRequest, + responseType: component_board_v1_board_pb.SetPWMFrequencyResponse +}; + +BoardService.ReadAnalogReader = { + methodName: "ReadAnalogReader", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: component_board_v1_board_pb.ReadAnalogReaderRequest, + responseType: component_board_v1_board_pb.ReadAnalogReaderResponse +}; + +BoardService.GetDigitalInterruptValue = { + methodName: "GetDigitalInterruptValue", + service: BoardService, + requestStream: false, + responseStream: false, + requestType: component_board_v1_board_pb.GetDigitalInterruptValueRequest, + responseType: component_board_v1_board_pb.GetDigitalInterruptValueResponse +}; + +exports.BoardService = BoardService; + +function BoardServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +BoardServiceClient.prototype.status = function status(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.Status, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BoardServiceClient.prototype.setGPIO = function setGPIO(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.SetGPIO, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BoardServiceClient.prototype.getGPIO = function getGPIO(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.GetGPIO, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BoardServiceClient.prototype.pWM = function pWM(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.PWM, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BoardServiceClient.prototype.setPWM = function setPWM(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.SetPWM, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BoardServiceClient.prototype.pWMFrequency = function pWMFrequency(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.PWMFrequency, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BoardServiceClient.prototype.setPWMFrequency = function setPWMFrequency(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.SetPWMFrequency, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BoardServiceClient.prototype.readAnalogReader = function readAnalogReader(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.ReadAnalogReader, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +BoardServiceClient.prototype.getDigitalInterruptValue = function getDigitalInterruptValue(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(BoardService.GetDigitalInterruptValue, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.BoardServiceClient = BoardServiceClient; + diff --git a/gen/js/component/camera/v1/camera_grpc_web_pb.js b/gen/js/component/camera/v1/camera_grpc_web_pb.js new file mode 100644 index 000000000..ec72432b2 --- /dev/null +++ b/gen/js/component/camera/v1/camera_grpc_web_pb.js @@ -0,0 +1,325 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.camera.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_api_httpbody_pb = require('../../../google/api/httpbody_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.camera = {}; +proto.viam.component.camera.v1 = require('./camera_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.camera.v1.CameraServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.camera.v1.CameraServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.camera.v1.GetImageRequest, + * !proto.viam.component.camera.v1.GetImageResponse>} + */ +const methodDescriptor_CameraService_GetImage = new grpc.web.MethodDescriptor( + '/viam.component.camera.v1.CameraService/GetImage', + grpc.web.MethodType.UNARY, + proto.viam.component.camera.v1.GetImageRequest, + proto.viam.component.camera.v1.GetImageResponse, + /** + * @param {!proto.viam.component.camera.v1.GetImageRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.camera.v1.GetImageResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.camera.v1.GetImageRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.camera.v1.GetImageResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.camera.v1.CameraServiceClient.prototype.getImage = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/GetImage', + request, + metadata || {}, + methodDescriptor_CameraService_GetImage, + callback); +}; + + +/** + * @param {!proto.viam.component.camera.v1.GetImageRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.camera.v1.CameraServicePromiseClient.prototype.getImage = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/GetImage', + request, + metadata || {}, + methodDescriptor_CameraService_GetImage); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.camera.v1.RenderFrameRequest, + * !proto.google.api.HttpBody>} + */ +const methodDescriptor_CameraService_RenderFrame = new grpc.web.MethodDescriptor( + '/viam.component.camera.v1.CameraService/RenderFrame', + grpc.web.MethodType.UNARY, + proto.viam.component.camera.v1.RenderFrameRequest, + google_api_httpbody_pb.HttpBody, + /** + * @param {!proto.viam.component.camera.v1.RenderFrameRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + google_api_httpbody_pb.HttpBody.deserializeBinary +); + + +/** + * @param {!proto.viam.component.camera.v1.RenderFrameRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.google.api.HttpBody)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.camera.v1.CameraServiceClient.prototype.renderFrame = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/RenderFrame', + request, + metadata || {}, + methodDescriptor_CameraService_RenderFrame, + callback); +}; + + +/** + * @param {!proto.viam.component.camera.v1.RenderFrameRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.camera.v1.CameraServicePromiseClient.prototype.renderFrame = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/RenderFrame', + request, + metadata || {}, + methodDescriptor_CameraService_RenderFrame); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.camera.v1.GetPointCloudRequest, + * !proto.viam.component.camera.v1.GetPointCloudResponse>} + */ +const methodDescriptor_CameraService_GetPointCloud = new grpc.web.MethodDescriptor( + '/viam.component.camera.v1.CameraService/GetPointCloud', + grpc.web.MethodType.UNARY, + proto.viam.component.camera.v1.GetPointCloudRequest, + proto.viam.component.camera.v1.GetPointCloudResponse, + /** + * @param {!proto.viam.component.camera.v1.GetPointCloudRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.camera.v1.GetPointCloudResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.camera.v1.GetPointCloudRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.camera.v1.GetPointCloudResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.camera.v1.CameraServiceClient.prototype.getPointCloud = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/GetPointCloud', + request, + metadata || {}, + methodDescriptor_CameraService_GetPointCloud, + callback); +}; + + +/** + * @param {!proto.viam.component.camera.v1.GetPointCloudRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.camera.v1.CameraServicePromiseClient.prototype.getPointCloud = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/GetPointCloud', + request, + metadata || {}, + methodDescriptor_CameraService_GetPointCloud); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.camera.v1.GetPropertiesRequest, + * !proto.viam.component.camera.v1.GetPropertiesResponse>} + */ +const methodDescriptor_CameraService_GetProperties = new grpc.web.MethodDescriptor( + '/viam.component.camera.v1.CameraService/GetProperties', + grpc.web.MethodType.UNARY, + proto.viam.component.camera.v1.GetPropertiesRequest, + proto.viam.component.camera.v1.GetPropertiesResponse, + /** + * @param {!proto.viam.component.camera.v1.GetPropertiesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.camera.v1.GetPropertiesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.camera.v1.GetPropertiesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.camera.v1.GetPropertiesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.camera.v1.CameraServiceClient.prototype.getProperties = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/GetProperties', + request, + metadata || {}, + methodDescriptor_CameraService_GetProperties, + callback); +}; + + +/** + * @param {!proto.viam.component.camera.v1.GetPropertiesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.camera.v1.CameraServicePromiseClient.prototype.getProperties = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.camera.v1.CameraService/GetProperties', + request, + metadata || {}, + methodDescriptor_CameraService_GetProperties); +}; + + +module.exports = proto.viam.component.camera.v1; + diff --git a/gen/js/component/camera/v1/camera_pb.d.ts b/gen/js/component/camera/v1/camera_pb.d.ts new file mode 100644 index 000000000..97f312be9 --- /dev/null +++ b/gen/js/component/camera/v1/camera_pb.d.ts @@ -0,0 +1,371 @@ +// package: viam.component.camera.v1 +// file: component/camera/v1/camera.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_api_httpbody_pb from "../../../google/api/httpbody_pb"; + +export class GetImageRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getMimeType(): string; + setMimeType(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetImageRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetImageRequest): GetImageRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetImageRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetImageRequest; + static deserializeBinaryFromReader(message: GetImageRequest, reader: jspb.BinaryReader): GetImageRequest; +} + +export namespace GetImageRequest { + export type AsObject = { + name: string, + mimeType: string, + } +} + +export class GetImageResponse extends jspb.Message { + getMimeType(): string; + setMimeType(value: string): void; + + getImage(): Uint8Array | string; + getImage_asU8(): Uint8Array; + getImage_asB64(): string; + setImage(value: Uint8Array | string): void; + + getWidthPx(): number; + setWidthPx(value: number): void; + + getHeightPx(): number; + setHeightPx(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetImageResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetImageResponse): GetImageResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetImageResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetImageResponse; + static deserializeBinaryFromReader(message: GetImageResponse, reader: jspb.BinaryReader): GetImageResponse; +} + +export namespace GetImageResponse { + export type AsObject = { + mimeType: string, + image: Uint8Array | string, + widthPx: number, + heightPx: number, + } +} + +export class RenderFrameRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getMimeType(): string; + setMimeType(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RenderFrameRequest.AsObject; + static toObject(includeInstance: boolean, msg: RenderFrameRequest): RenderFrameRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RenderFrameRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RenderFrameRequest; + static deserializeBinaryFromReader(message: RenderFrameRequest, reader: jspb.BinaryReader): RenderFrameRequest; +} + +export namespace RenderFrameRequest { + export type AsObject = { + name: string, + mimeType: string, + } +} + +export class GetPointCloudRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getMimeType(): string; + setMimeType(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPointCloudRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPointCloudRequest): GetPointCloudRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPointCloudRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPointCloudRequest; + static deserializeBinaryFromReader(message: GetPointCloudRequest, reader: jspb.BinaryReader): GetPointCloudRequest; +} + +export namespace GetPointCloudRequest { + export type AsObject = { + name: string, + mimeType: string, + } +} + +export class GetPointCloudResponse extends jspb.Message { + getMimeType(): string; + setMimeType(value: string): void; + + getPointCloud(): Uint8Array | string; + getPointCloud_asU8(): Uint8Array; + getPointCloud_asB64(): string; + setPointCloud(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPointCloudResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPointCloudResponse): GetPointCloudResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPointCloudResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPointCloudResponse; + static deserializeBinaryFromReader(message: GetPointCloudResponse, reader: jspb.BinaryReader): GetPointCloudResponse; +} + +export namespace GetPointCloudResponse { + export type AsObject = { + mimeType: string, + pointCloud: Uint8Array | string, + } +} + +export class GetPropertiesRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPropertiesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPropertiesRequest): GetPropertiesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPropertiesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPropertiesRequest; + static deserializeBinaryFromReader(message: GetPropertiesRequest, reader: jspb.BinaryReader): GetPropertiesRequest; +} + +export namespace GetPropertiesRequest { + export type AsObject = { + name: string, + } +} + +export class GetPropertiesResponse extends jspb.Message { + getSupportsPcd(): boolean; + setSupportsPcd(value: boolean): void; + + hasIntrinsicParameters(): boolean; + clearIntrinsicParameters(): void; + getIntrinsicParameters(): IntrinsicParameters | undefined; + setIntrinsicParameters(value?: IntrinsicParameters): void; + + hasDistortionParameters(): boolean; + clearDistortionParameters(): void; + getDistortionParameters(): DistortionParameters | undefined; + setDistortionParameters(value?: DistortionParameters): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPropertiesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPropertiesResponse): GetPropertiesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPropertiesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPropertiesResponse; + static deserializeBinaryFromReader(message: GetPropertiesResponse, reader: jspb.BinaryReader): GetPropertiesResponse; +} + +export namespace GetPropertiesResponse { + export type AsObject = { + supportsPcd: boolean, + intrinsicParameters?: IntrinsicParameters.AsObject, + distortionParameters?: DistortionParameters.AsObject, + } +} + +export class Webcams extends jspb.Message { + clearWebcamsList(): void; + getWebcamsList(): Array; + setWebcamsList(value: Array): void; + addWebcams(value?: Webcam, index?: number): Webcam; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Webcams.AsObject; + static toObject(includeInstance: boolean, msg: Webcams): Webcams.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Webcams, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Webcams; + static deserializeBinaryFromReader(message: Webcams, reader: jspb.BinaryReader): Webcams; +} + +export namespace Webcams { + export type AsObject = { + webcamsList: Array, + } +} + +export class Webcam extends jspb.Message { + getLabel(): string; + setLabel(value: string): void; + + getStatus(): string; + setStatus(value: string): void; + + clearPropertiesList(): void; + getPropertiesList(): Array; + setPropertiesList(value: Array): void; + addProperties(value?: Property, index?: number): Property; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Webcam.AsObject; + static toObject(includeInstance: boolean, msg: Webcam): Webcam.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Webcam, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Webcam; + static deserializeBinaryFromReader(message: Webcam, reader: jspb.BinaryReader): Webcam; +} + +export namespace Webcam { + export type AsObject = { + label: string, + status: string, + propertiesList: Array, + } +} + +export class Property extends jspb.Message { + hasVideo(): boolean; + clearVideo(): void; + getVideo(): Video | undefined; + setVideo(value?: Video): void; + + getWidth(): number; + setWidth(value: number): void; + + getHeight(): number; + setHeight(value: number): void; + + getFrameFormat(): string; + setFrameFormat(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Property.AsObject; + static toObject(includeInstance: boolean, msg: Property): Property.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Property, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Property; + static deserializeBinaryFromReader(message: Property, reader: jspb.BinaryReader): Property; +} + +export namespace Property { + export type AsObject = { + video?: Video.AsObject, + width: number, + height: number, + frameFormat: string, + } +} + +export class Video extends jspb.Message { + getWidth(): number; + setWidth(value: number): void; + + getHeight(): number; + setHeight(value: number): void; + + getFrameFormat(): string; + setFrameFormat(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Video.AsObject; + static toObject(includeInstance: boolean, msg: Video): Video.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Video, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Video; + static deserializeBinaryFromReader(message: Video, reader: jspb.BinaryReader): Video; +} + +export namespace Video { + export type AsObject = { + width: number, + height: number, + frameFormat: string, + } +} + +export class IntrinsicParameters extends jspb.Message { + getWidthPx(): number; + setWidthPx(value: number): void; + + getHeightPx(): number; + setHeightPx(value: number): void; + + getFocalXPx(): number; + setFocalXPx(value: number): void; + + getFocalYPx(): number; + setFocalYPx(value: number): void; + + getCenterXPx(): number; + setCenterXPx(value: number): void; + + getCenterYPx(): number; + setCenterYPx(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IntrinsicParameters.AsObject; + static toObject(includeInstance: boolean, msg: IntrinsicParameters): IntrinsicParameters.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IntrinsicParameters, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IntrinsicParameters; + static deserializeBinaryFromReader(message: IntrinsicParameters, reader: jspb.BinaryReader): IntrinsicParameters; +} + +export namespace IntrinsicParameters { + export type AsObject = { + widthPx: number, + heightPx: number, + focalXPx: number, + focalYPx: number, + centerXPx: number, + centerYPx: number, + } +} + +export class DistortionParameters extends jspb.Message { + getModel(): string; + setModel(value: string): void; + + clearParametersList(): void; + getParametersList(): Array; + setParametersList(value: Array): void; + addParameters(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DistortionParameters.AsObject; + static toObject(includeInstance: boolean, msg: DistortionParameters): DistortionParameters.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DistortionParameters, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DistortionParameters; + static deserializeBinaryFromReader(message: DistortionParameters, reader: jspb.BinaryReader): DistortionParameters; +} + +export namespace DistortionParameters { + export type AsObject = { + model: string, + parametersList: Array, + } +} + diff --git a/gen/js/component/camera/v1/camera_pb.js b/gen/js/component/camera/v1/camera_pb.js new file mode 100644 index 000000000..1f5366102 --- /dev/null +++ b/gen/js/component/camera/v1/camera_pb.js @@ -0,0 +1,2857 @@ +// source: component/camera/v1/camera.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_api_httpbody_pb = require('../../../google/api/httpbody_pb.js'); +goog.object.extend(proto, google_api_httpbody_pb); +goog.exportSymbol('proto.viam.component.camera.v1.DistortionParameters', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.GetImageRequest', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.GetImageResponse', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.GetPointCloudRequest', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.GetPointCloudResponse', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.GetPropertiesRequest', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.GetPropertiesResponse', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.IntrinsicParameters', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.Property', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.RenderFrameRequest', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.Video', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.Webcam', null, global); +goog.exportSymbol('proto.viam.component.camera.v1.Webcams', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.GetImageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.GetImageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.GetImageRequest.displayName = 'proto.viam.component.camera.v1.GetImageRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.GetImageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.GetImageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.GetImageResponse.displayName = 'proto.viam.component.camera.v1.GetImageResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.RenderFrameRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.RenderFrameRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.RenderFrameRequest.displayName = 'proto.viam.component.camera.v1.RenderFrameRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.GetPointCloudRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.GetPointCloudRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.GetPointCloudRequest.displayName = 'proto.viam.component.camera.v1.GetPointCloudRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.GetPointCloudResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.GetPointCloudResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.GetPointCloudResponse.displayName = 'proto.viam.component.camera.v1.GetPointCloudResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.GetPropertiesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.GetPropertiesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.GetPropertiesRequest.displayName = 'proto.viam.component.camera.v1.GetPropertiesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.GetPropertiesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.GetPropertiesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.GetPropertiesResponse.displayName = 'proto.viam.component.camera.v1.GetPropertiesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.Webcams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.camera.v1.Webcams.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.camera.v1.Webcams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.Webcams.displayName = 'proto.viam.component.camera.v1.Webcams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.Webcam = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.camera.v1.Webcam.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.camera.v1.Webcam, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.Webcam.displayName = 'proto.viam.component.camera.v1.Webcam'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.Property = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.Property, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.Property.displayName = 'proto.viam.component.camera.v1.Property'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.Video = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.Video, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.Video.displayName = 'proto.viam.component.camera.v1.Video'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.IntrinsicParameters = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.camera.v1.IntrinsicParameters, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.IntrinsicParameters.displayName = 'proto.viam.component.camera.v1.IntrinsicParameters'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.camera.v1.DistortionParameters = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.camera.v1.DistortionParameters.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.camera.v1.DistortionParameters, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.camera.v1.DistortionParameters.displayName = 'proto.viam.component.camera.v1.DistortionParameters'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.GetImageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.GetImageRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.GetImageRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetImageRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + mimeType: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.GetImageRequest} + */ +proto.viam.component.camera.v1.GetImageRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.GetImageRequest; + return proto.viam.component.camera.v1.GetImageRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.GetImageRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.GetImageRequest} + */ +proto.viam.component.camera.v1.GetImageRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.GetImageRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.GetImageRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.GetImageRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetImageRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.camera.v1.GetImageRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.GetImageRequest} returns this + */ +proto.viam.component.camera.v1.GetImageRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string mime_type = 2; + * @return {string} + */ +proto.viam.component.camera.v1.GetImageRequest.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.GetImageRequest} returns this + */ +proto.viam.component.camera.v1.GetImageRequest.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.GetImageResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.GetImageResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetImageResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mimeType: jspb.Message.getFieldWithDefault(msg, 1, ""), + image: msg.getImage_asB64(), + widthPx: jspb.Message.getFieldWithDefault(msg, 3, 0), + heightPx: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.GetImageResponse} + */ +proto.viam.component.camera.v1.GetImageResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.GetImageResponse; + return proto.viam.component.camera.v1.GetImageResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.GetImageResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.GetImageResponse} + */ +proto.viam.component.camera.v1.GetImageResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setImage(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setWidthPx(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeightPx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.GetImageResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.GetImageResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetImageResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getImage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getWidthPx(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getHeightPx(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional string mime_type = 1; + * @return {string} + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.GetImageResponse} returns this + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes image = 2; + * @return {string} + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.getImage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes image = 2; + * This is a type-conversion wrapper around `getImage()` + * @return {string} + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.getImage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getImage())); +}; + + +/** + * optional bytes image = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getImage()` + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.getImage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getImage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.component.camera.v1.GetImageResponse} returns this + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.setImage = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 width_px = 3; + * @return {number} + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.getWidthPx = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.GetImageResponse} returns this + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.setWidthPx = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 height_px = 4; + * @return {number} + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.getHeightPx = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.GetImageResponse} returns this + */ +proto.viam.component.camera.v1.GetImageResponse.prototype.setHeightPx = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.RenderFrameRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.RenderFrameRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.RenderFrameRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.RenderFrameRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + mimeType: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.RenderFrameRequest} + */ +proto.viam.component.camera.v1.RenderFrameRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.RenderFrameRequest; + return proto.viam.component.camera.v1.RenderFrameRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.RenderFrameRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.RenderFrameRequest} + */ +proto.viam.component.camera.v1.RenderFrameRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.RenderFrameRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.RenderFrameRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.RenderFrameRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.RenderFrameRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.camera.v1.RenderFrameRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.RenderFrameRequest} returns this + */ +proto.viam.component.camera.v1.RenderFrameRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string mime_type = 2; + * @return {string} + */ +proto.viam.component.camera.v1.RenderFrameRequest.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.RenderFrameRequest} returns this + */ +proto.viam.component.camera.v1.RenderFrameRequest.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.GetPointCloudRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.GetPointCloudRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.GetPointCloudRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetPointCloudRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + mimeType: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.GetPointCloudRequest} + */ +proto.viam.component.camera.v1.GetPointCloudRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.GetPointCloudRequest; + return proto.viam.component.camera.v1.GetPointCloudRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.GetPointCloudRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.GetPointCloudRequest} + */ +proto.viam.component.camera.v1.GetPointCloudRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.GetPointCloudRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.GetPointCloudRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.GetPointCloudRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetPointCloudRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.camera.v1.GetPointCloudRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.GetPointCloudRequest} returns this + */ +proto.viam.component.camera.v1.GetPointCloudRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string mime_type = 2; + * @return {string} + */ +proto.viam.component.camera.v1.GetPointCloudRequest.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.GetPointCloudRequest} returns this + */ +proto.viam.component.camera.v1.GetPointCloudRequest.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.GetPointCloudResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.GetPointCloudResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.GetPointCloudResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetPointCloudResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mimeType: jspb.Message.getFieldWithDefault(msg, 1, ""), + pointCloud: msg.getPointCloud_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.GetPointCloudResponse} + */ +proto.viam.component.camera.v1.GetPointCloudResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.GetPointCloudResponse; + return proto.viam.component.camera.v1.GetPointCloudResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.GetPointCloudResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.GetPointCloudResponse} + */ +proto.viam.component.camera.v1.GetPointCloudResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPointCloud(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.GetPointCloudResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.GetPointCloudResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.GetPointCloudResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetPointCloudResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPointCloud_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string mime_type = 1; + * @return {string} + */ +proto.viam.component.camera.v1.GetPointCloudResponse.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.GetPointCloudResponse} returns this + */ +proto.viam.component.camera.v1.GetPointCloudResponse.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes point_cloud = 2; + * @return {string} + */ +proto.viam.component.camera.v1.GetPointCloudResponse.prototype.getPointCloud = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes point_cloud = 2; + * This is a type-conversion wrapper around `getPointCloud()` + * @return {string} + */ +proto.viam.component.camera.v1.GetPointCloudResponse.prototype.getPointCloud_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPointCloud())); +}; + + +/** + * optional bytes point_cloud = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPointCloud()` + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.GetPointCloudResponse.prototype.getPointCloud_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPointCloud())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.component.camera.v1.GetPointCloudResponse} returns this + */ +proto.viam.component.camera.v1.GetPointCloudResponse.prototype.setPointCloud = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.GetPropertiesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.GetPropertiesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.GetPropertiesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetPropertiesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.GetPropertiesRequest} + */ +proto.viam.component.camera.v1.GetPropertiesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.GetPropertiesRequest; + return proto.viam.component.camera.v1.GetPropertiesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.GetPropertiesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.GetPropertiesRequest} + */ +proto.viam.component.camera.v1.GetPropertiesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.GetPropertiesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.GetPropertiesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.GetPropertiesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetPropertiesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.camera.v1.GetPropertiesRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.GetPropertiesRequest} returns this + */ +proto.viam.component.camera.v1.GetPropertiesRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.GetPropertiesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.GetPropertiesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetPropertiesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + supportsPcd: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + intrinsicParameters: (f = msg.getIntrinsicParameters()) && proto.viam.component.camera.v1.IntrinsicParameters.toObject(includeInstance, f), + distortionParameters: (f = msg.getDistortionParameters()) && proto.viam.component.camera.v1.DistortionParameters.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.GetPropertiesResponse} + */ +proto.viam.component.camera.v1.GetPropertiesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.GetPropertiesResponse; + return proto.viam.component.camera.v1.GetPropertiesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.GetPropertiesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.GetPropertiesResponse} + */ +proto.viam.component.camera.v1.GetPropertiesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSupportsPcd(value); + break; + case 2: + var value = new proto.viam.component.camera.v1.IntrinsicParameters; + reader.readMessage(value,proto.viam.component.camera.v1.IntrinsicParameters.deserializeBinaryFromReader); + msg.setIntrinsicParameters(value); + break; + case 3: + var value = new proto.viam.component.camera.v1.DistortionParameters; + reader.readMessage(value,proto.viam.component.camera.v1.DistortionParameters.deserializeBinaryFromReader); + msg.setDistortionParameters(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.GetPropertiesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.GetPropertiesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.GetPropertiesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSupportsPcd(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getIntrinsicParameters(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.component.camera.v1.IntrinsicParameters.serializeBinaryToWriter + ); + } + f = message.getDistortionParameters(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.viam.component.camera.v1.DistortionParameters.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool supports_pcd = 1; + * @return {boolean} + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.getSupportsPcd = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.camera.v1.GetPropertiesResponse} returns this + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.setSupportsPcd = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional IntrinsicParameters intrinsic_parameters = 2; + * @return {?proto.viam.component.camera.v1.IntrinsicParameters} + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.getIntrinsicParameters = function() { + return /** @type{?proto.viam.component.camera.v1.IntrinsicParameters} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.camera.v1.IntrinsicParameters, 2)); +}; + + +/** + * @param {?proto.viam.component.camera.v1.IntrinsicParameters|undefined} value + * @return {!proto.viam.component.camera.v1.GetPropertiesResponse} returns this +*/ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.setIntrinsicParameters = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.camera.v1.GetPropertiesResponse} returns this + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.clearIntrinsicParameters = function() { + return this.setIntrinsicParameters(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.hasIntrinsicParameters = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional DistortionParameters distortion_parameters = 3; + * @return {?proto.viam.component.camera.v1.DistortionParameters} + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.getDistortionParameters = function() { + return /** @type{?proto.viam.component.camera.v1.DistortionParameters} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.camera.v1.DistortionParameters, 3)); +}; + + +/** + * @param {?proto.viam.component.camera.v1.DistortionParameters|undefined} value + * @return {!proto.viam.component.camera.v1.GetPropertiesResponse} returns this +*/ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.setDistortionParameters = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.camera.v1.GetPropertiesResponse} returns this + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.clearDistortionParameters = function() { + return this.setDistortionParameters(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.camera.v1.GetPropertiesResponse.prototype.hasDistortionParameters = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.camera.v1.Webcams.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.Webcams.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.Webcams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.Webcams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.Webcams.toObject = function(includeInstance, msg) { + var f, obj = { + webcamsList: jspb.Message.toObjectList(msg.getWebcamsList(), + proto.viam.component.camera.v1.Webcam.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.Webcams} + */ +proto.viam.component.camera.v1.Webcams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.Webcams; + return proto.viam.component.camera.v1.Webcams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.Webcams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.Webcams} + */ +proto.viam.component.camera.v1.Webcams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.component.camera.v1.Webcam; + reader.readMessage(value,proto.viam.component.camera.v1.Webcam.deserializeBinaryFromReader); + msg.addWebcams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.Webcams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.Webcams.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.Webcams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.Webcams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWebcamsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.component.camera.v1.Webcam.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Webcam webcams = 1; + * @return {!Array} + */ +proto.viam.component.camera.v1.Webcams.prototype.getWebcamsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.component.camera.v1.Webcam, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.camera.v1.Webcams} returns this +*/ +proto.viam.component.camera.v1.Webcams.prototype.setWebcamsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.component.camera.v1.Webcam=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.component.camera.v1.Webcam} + */ +proto.viam.component.camera.v1.Webcams.prototype.addWebcams = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.component.camera.v1.Webcam, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.camera.v1.Webcams} returns this + */ +proto.viam.component.camera.v1.Webcams.prototype.clearWebcamsList = function() { + return this.setWebcamsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.camera.v1.Webcam.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.Webcam.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.Webcam.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.Webcam} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.Webcam.toObject = function(includeInstance, msg) { + var f, obj = { + label: jspb.Message.getFieldWithDefault(msg, 1, ""), + status: jspb.Message.getFieldWithDefault(msg, 2, ""), + propertiesList: jspb.Message.toObjectList(msg.getPropertiesList(), + proto.viam.component.camera.v1.Property.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.Webcam} + */ +proto.viam.component.camera.v1.Webcam.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.Webcam; + return proto.viam.component.camera.v1.Webcam.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.Webcam} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.Webcam} + */ +proto.viam.component.camera.v1.Webcam.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(value); + break; + case 3: + var value = new proto.viam.component.camera.v1.Property; + reader.readMessage(value,proto.viam.component.camera.v1.Property.deserializeBinaryFromReader); + msg.addProperties(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.Webcam.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.Webcam.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.Webcam} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.Webcam.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPropertiesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.viam.component.camera.v1.Property.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string label = 1; + * @return {string} + */ +proto.viam.component.camera.v1.Webcam.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.Webcam} returns this + */ +proto.viam.component.camera.v1.Webcam.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string status = 2; + * @return {string} + */ +proto.viam.component.camera.v1.Webcam.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.Webcam} returns this + */ +proto.viam.component.camera.v1.Webcam.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Property properties = 3; + * @return {!Array} + */ +proto.viam.component.camera.v1.Webcam.prototype.getPropertiesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.component.camera.v1.Property, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.camera.v1.Webcam} returns this +*/ +proto.viam.component.camera.v1.Webcam.prototype.setPropertiesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.viam.component.camera.v1.Property=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.component.camera.v1.Property} + */ +proto.viam.component.camera.v1.Webcam.prototype.addProperties = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.viam.component.camera.v1.Property, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.camera.v1.Webcam} returns this + */ +proto.viam.component.camera.v1.Webcam.prototype.clearPropertiesList = function() { + return this.setPropertiesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.Property.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.Property.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.Property} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.Property.toObject = function(includeInstance, msg) { + var f, obj = { + video: (f = msg.getVideo()) && proto.viam.component.camera.v1.Video.toObject(includeInstance, f), + width: jspb.Message.getFieldWithDefault(msg, 2, 0), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + frameFormat: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.Property} + */ +proto.viam.component.camera.v1.Property.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.Property; + return proto.viam.component.camera.v1.Property.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.Property} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.Property} + */ +proto.viam.component.camera.v1.Property.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.component.camera.v1.Video; + reader.readMessage(value,proto.viam.component.camera.v1.Video.deserializeBinaryFromReader); + msg.setVideo(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWidth(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFrameFormat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.Property.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.Property.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.Property} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.Property.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVideo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.component.camera.v1.Video.serializeBinaryToWriter + ); + } + f = message.getWidth(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getFrameFormat(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Video video = 1; + * @return {?proto.viam.component.camera.v1.Video} + */ +proto.viam.component.camera.v1.Property.prototype.getVideo = function() { + return /** @type{?proto.viam.component.camera.v1.Video} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.camera.v1.Video, 1)); +}; + + +/** + * @param {?proto.viam.component.camera.v1.Video|undefined} value + * @return {!proto.viam.component.camera.v1.Property} returns this +*/ +proto.viam.component.camera.v1.Property.prototype.setVideo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.camera.v1.Property} returns this + */ +proto.viam.component.camera.v1.Property.prototype.clearVideo = function() { + return this.setVideo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.camera.v1.Property.prototype.hasVideo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 width = 2; + * @return {number} + */ +proto.viam.component.camera.v1.Property.prototype.getWidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.Property} returns this + */ +proto.viam.component.camera.v1.Property.prototype.setWidth = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 height = 3; + * @return {number} + */ +proto.viam.component.camera.v1.Property.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.Property} returns this + */ +proto.viam.component.camera.v1.Property.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string frame_format = 4; + * @return {string} + */ +proto.viam.component.camera.v1.Property.prototype.getFrameFormat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.Property} returns this + */ +proto.viam.component.camera.v1.Property.prototype.setFrameFormat = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.Video.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.Video.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.Video} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.Video.toObject = function(includeInstance, msg) { + var f, obj = { + width: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + frameFormat: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.Video} + */ +proto.viam.component.camera.v1.Video.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.Video; + return proto.viam.component.camera.v1.Video.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.Video} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.Video} + */ +proto.viam.component.camera.v1.Video.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWidth(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFrameFormat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.Video.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.Video.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.Video} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.Video.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWidth(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getFrameFormat(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional int32 width = 1; + * @return {number} + */ +proto.viam.component.camera.v1.Video.prototype.getWidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.Video} returns this + */ +proto.viam.component.camera.v1.Video.prototype.setWidth = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 height = 2; + * @return {number} + */ +proto.viam.component.camera.v1.Video.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.Video} returns this + */ +proto.viam.component.camera.v1.Video.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string frame_format = 3; + * @return {string} + */ +proto.viam.component.camera.v1.Video.prototype.getFrameFormat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.Video} returns this + */ +proto.viam.component.camera.v1.Video.prototype.setFrameFormat = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.IntrinsicParameters.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.IntrinsicParameters} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.IntrinsicParameters.toObject = function(includeInstance, msg) { + var f, obj = { + widthPx: jspb.Message.getFieldWithDefault(msg, 1, 0), + heightPx: jspb.Message.getFieldWithDefault(msg, 2, 0), + focalXPx: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + focalYPx: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + centerXPx: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + centerYPx: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.IntrinsicParameters} + */ +proto.viam.component.camera.v1.IntrinsicParameters.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.IntrinsicParameters; + return proto.viam.component.camera.v1.IntrinsicParameters.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.IntrinsicParameters} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.IntrinsicParameters} + */ +proto.viam.component.camera.v1.IntrinsicParameters.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setWidthPx(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeightPx(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setFocalXPx(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setFocalYPx(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setCenterXPx(value); + break; + case 6: + var value = /** @type {number} */ (reader.readDouble()); + msg.setCenterYPx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.IntrinsicParameters.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.IntrinsicParameters} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.IntrinsicParameters.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWidthPx(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getHeightPx(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getFocalXPx(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getFocalYPx(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getCenterXPx(); + if (f !== 0.0) { + writer.writeDouble( + 5, + f + ); + } + f = message.getCenterYPx(); + if (f !== 0.0) { + writer.writeDouble( + 6, + f + ); + } +}; + + +/** + * optional uint32 width_px = 1; + * @return {number} + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.getWidthPx = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.IntrinsicParameters} returns this + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.setWidthPx = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 height_px = 2; + * @return {number} + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.getHeightPx = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.IntrinsicParameters} returns this + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.setHeightPx = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional double focal_x_px = 3; + * @return {number} + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.getFocalXPx = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.IntrinsicParameters} returns this + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.setFocalXPx = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional double focal_y_px = 4; + * @return {number} + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.getFocalYPx = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.IntrinsicParameters} returns this + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.setFocalYPx = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional double center_x_px = 5; + * @return {number} + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.getCenterXPx = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.IntrinsicParameters} returns this + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.setCenterXPx = function(value) { + return jspb.Message.setProto3FloatField(this, 5, value); +}; + + +/** + * optional double center_y_px = 6; + * @return {number} + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.getCenterYPx = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.camera.v1.IntrinsicParameters} returns this + */ +proto.viam.component.camera.v1.IntrinsicParameters.prototype.setCenterYPx = function(value) { + return jspb.Message.setProto3FloatField(this, 6, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.camera.v1.DistortionParameters.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.camera.v1.DistortionParameters.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.camera.v1.DistortionParameters.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.camera.v1.DistortionParameters} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.DistortionParameters.toObject = function(includeInstance, msg) { + var f, obj = { + model: jspb.Message.getFieldWithDefault(msg, 1, ""), + parametersList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.camera.v1.DistortionParameters} + */ +proto.viam.component.camera.v1.DistortionParameters.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.camera.v1.DistortionParameters; + return proto.viam.component.camera.v1.DistortionParameters.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.camera.v1.DistortionParameters} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.camera.v1.DistortionParameters} + */ +proto.viam.component.camera.v1.DistortionParameters.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setModel(value); + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addParameters(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.camera.v1.DistortionParameters.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.camera.v1.DistortionParameters.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.camera.v1.DistortionParameters} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.camera.v1.DistortionParameters.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getModel(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParametersList(); + if (f.length > 0) { + writer.writePackedDouble( + 2, + f + ); + } +}; + + +/** + * optional string model = 1; + * @return {string} + */ +proto.viam.component.camera.v1.DistortionParameters.prototype.getModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.camera.v1.DistortionParameters} returns this + */ +proto.viam.component.camera.v1.DistortionParameters.prototype.setModel = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated double parameters = 2; + * @return {!Array} + */ +proto.viam.component.camera.v1.DistortionParameters.prototype.getParametersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.camera.v1.DistortionParameters} returns this + */ +proto.viam.component.camera.v1.DistortionParameters.prototype.setParametersList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.viam.component.camera.v1.DistortionParameters} returns this + */ +proto.viam.component.camera.v1.DistortionParameters.prototype.addParameters = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.camera.v1.DistortionParameters} returns this + */ +proto.viam.component.camera.v1.DistortionParameters.prototype.clearParametersList = function() { + return this.setParametersList([]); +}; + + +goog.object.extend(exports, proto.viam.component.camera.v1); diff --git a/gen/js/component/camera/v1/camera_pb_service.d.ts b/gen/js/component/camera/v1/camera_pb_service.d.ts new file mode 100644 index 000000000..9082a2b7a --- /dev/null +++ b/gen/js/component/camera/v1/camera_pb_service.d.ts @@ -0,0 +1,121 @@ +// package: viam.component.camera.v1 +// file: component/camera/v1/camera.proto + +import * as component_camera_v1_camera_pb from "../../../component/camera/v1/camera_pb"; +import * as google_api_httpbody_pb from "../../../google/api/httpbody_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type CameraServiceGetImage = { + readonly methodName: string; + readonly service: typeof CameraService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_camera_v1_camera_pb.GetImageRequest; + readonly responseType: typeof component_camera_v1_camera_pb.GetImageResponse; +}; + +type CameraServiceRenderFrame = { + readonly methodName: string; + readonly service: typeof CameraService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_camera_v1_camera_pb.RenderFrameRequest; + readonly responseType: typeof google_api_httpbody_pb.HttpBody; +}; + +type CameraServiceGetPointCloud = { + readonly methodName: string; + readonly service: typeof CameraService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_camera_v1_camera_pb.GetPointCloudRequest; + readonly responseType: typeof component_camera_v1_camera_pb.GetPointCloudResponse; +}; + +type CameraServiceGetProperties = { + readonly methodName: string; + readonly service: typeof CameraService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_camera_v1_camera_pb.GetPropertiesRequest; + readonly responseType: typeof component_camera_v1_camera_pb.GetPropertiesResponse; +}; + +export class CameraService { + static readonly serviceName: string; + static readonly GetImage: CameraServiceGetImage; + static readonly RenderFrame: CameraServiceRenderFrame; + static readonly GetPointCloud: CameraServiceGetPointCloud; + static readonly GetProperties: CameraServiceGetProperties; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class CameraServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getImage( + requestMessage: component_camera_v1_camera_pb.GetImageRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_camera_v1_camera_pb.GetImageResponse|null) => void + ): UnaryResponse; + getImage( + requestMessage: component_camera_v1_camera_pb.GetImageRequest, + callback: (error: ServiceError|null, responseMessage: component_camera_v1_camera_pb.GetImageResponse|null) => void + ): UnaryResponse; + renderFrame( + requestMessage: component_camera_v1_camera_pb.RenderFrameRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: google_api_httpbody_pb.HttpBody|null) => void + ): UnaryResponse; + renderFrame( + requestMessage: component_camera_v1_camera_pb.RenderFrameRequest, + callback: (error: ServiceError|null, responseMessage: google_api_httpbody_pb.HttpBody|null) => void + ): UnaryResponse; + getPointCloud( + requestMessage: component_camera_v1_camera_pb.GetPointCloudRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_camera_v1_camera_pb.GetPointCloudResponse|null) => void + ): UnaryResponse; + getPointCloud( + requestMessage: component_camera_v1_camera_pb.GetPointCloudRequest, + callback: (error: ServiceError|null, responseMessage: component_camera_v1_camera_pb.GetPointCloudResponse|null) => void + ): UnaryResponse; + getProperties( + requestMessage: component_camera_v1_camera_pb.GetPropertiesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_camera_v1_camera_pb.GetPropertiesResponse|null) => void + ): UnaryResponse; + getProperties( + requestMessage: component_camera_v1_camera_pb.GetPropertiesRequest, + callback: (error: ServiceError|null, responseMessage: component_camera_v1_camera_pb.GetPropertiesResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/camera/v1/camera_pb_service.js b/gen/js/component/camera/v1/camera_pb_service.js new file mode 100644 index 000000000..2efbdefd1 --- /dev/null +++ b/gen/js/component/camera/v1/camera_pb_service.js @@ -0,0 +1,182 @@ +// package: viam.component.camera.v1 +// file: component/camera/v1/camera.proto + +var component_camera_v1_camera_pb = require("../../../component/camera/v1/camera_pb"); +var google_api_httpbody_pb = require("../../../google/api/httpbody_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var CameraService = (function () { + function CameraService() {} + CameraService.serviceName = "viam.component.camera.v1.CameraService"; + return CameraService; +}()); + +CameraService.GetImage = { + methodName: "GetImage", + service: CameraService, + requestStream: false, + responseStream: false, + requestType: component_camera_v1_camera_pb.GetImageRequest, + responseType: component_camera_v1_camera_pb.GetImageResponse +}; + +CameraService.RenderFrame = { + methodName: "RenderFrame", + service: CameraService, + requestStream: false, + responseStream: false, + requestType: component_camera_v1_camera_pb.RenderFrameRequest, + responseType: google_api_httpbody_pb.HttpBody +}; + +CameraService.GetPointCloud = { + methodName: "GetPointCloud", + service: CameraService, + requestStream: false, + responseStream: false, + requestType: component_camera_v1_camera_pb.GetPointCloudRequest, + responseType: component_camera_v1_camera_pb.GetPointCloudResponse +}; + +CameraService.GetProperties = { + methodName: "GetProperties", + service: CameraService, + requestStream: false, + responseStream: false, + requestType: component_camera_v1_camera_pb.GetPropertiesRequest, + responseType: component_camera_v1_camera_pb.GetPropertiesResponse +}; + +exports.CameraService = CameraService; + +function CameraServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +CameraServiceClient.prototype.getImage = function getImage(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(CameraService.GetImage, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +CameraServiceClient.prototype.renderFrame = function renderFrame(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(CameraService.RenderFrame, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +CameraServiceClient.prototype.getPointCloud = function getPointCloud(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(CameraService.GetPointCloud, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +CameraServiceClient.prototype.getProperties = function getProperties(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(CameraService.GetProperties, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.CameraServiceClient = CameraServiceClient; + diff --git a/gen/js/component/gantry/v1/gantry_grpc_web_pb.js b/gen/js/component/gantry/v1/gantry_grpc_web_pb.js new file mode 100644 index 000000000..5096f0470 --- /dev/null +++ b/gen/js/component/gantry/v1/gantry_grpc_web_pb.js @@ -0,0 +1,327 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.gantry.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.gantry = {}; +proto.viam.component.gantry.v1 = require('./gantry_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.gantry.v1.GantryServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.gantry.v1.GantryServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.gantry.v1.GetPositionRequest, + * !proto.viam.component.gantry.v1.GetPositionResponse>} + */ +const methodDescriptor_GantryService_GetPosition = new grpc.web.MethodDescriptor( + '/viam.component.gantry.v1.GantryService/GetPosition', + grpc.web.MethodType.UNARY, + proto.viam.component.gantry.v1.GetPositionRequest, + proto.viam.component.gantry.v1.GetPositionResponse, + /** + * @param {!proto.viam.component.gantry.v1.GetPositionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.gantry.v1.GetPositionResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.gantry.v1.GetPositionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.gantry.v1.GetPositionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.gantry.v1.GantryServiceClient.prototype.getPosition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/GetPosition', + request, + metadata || {}, + methodDescriptor_GantryService_GetPosition, + callback); +}; + + +/** + * @param {!proto.viam.component.gantry.v1.GetPositionRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.gantry.v1.GantryServicePromiseClient.prototype.getPosition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/GetPosition', + request, + metadata || {}, + methodDescriptor_GantryService_GetPosition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.gantry.v1.MoveToPositionRequest, + * !proto.viam.component.gantry.v1.MoveToPositionResponse>} + */ +const methodDescriptor_GantryService_MoveToPosition = new grpc.web.MethodDescriptor( + '/viam.component.gantry.v1.GantryService/MoveToPosition', + grpc.web.MethodType.UNARY, + proto.viam.component.gantry.v1.MoveToPositionRequest, + proto.viam.component.gantry.v1.MoveToPositionResponse, + /** + * @param {!proto.viam.component.gantry.v1.MoveToPositionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.gantry.v1.MoveToPositionResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.gantry.v1.MoveToPositionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.gantry.v1.MoveToPositionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.gantry.v1.GantryServiceClient.prototype.moveToPosition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/MoveToPosition', + request, + metadata || {}, + methodDescriptor_GantryService_MoveToPosition, + callback); +}; + + +/** + * @param {!proto.viam.component.gantry.v1.MoveToPositionRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.gantry.v1.GantryServicePromiseClient.prototype.moveToPosition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/MoveToPosition', + request, + metadata || {}, + methodDescriptor_GantryService_MoveToPosition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.gantry.v1.GetLengthsRequest, + * !proto.viam.component.gantry.v1.GetLengthsResponse>} + */ +const methodDescriptor_GantryService_GetLengths = new grpc.web.MethodDescriptor( + '/viam.component.gantry.v1.GantryService/GetLengths', + grpc.web.MethodType.UNARY, + proto.viam.component.gantry.v1.GetLengthsRequest, + proto.viam.component.gantry.v1.GetLengthsResponse, + /** + * @param {!proto.viam.component.gantry.v1.GetLengthsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.gantry.v1.GetLengthsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.gantry.v1.GetLengthsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.gantry.v1.GetLengthsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.gantry.v1.GantryServiceClient.prototype.getLengths = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/GetLengths', + request, + metadata || {}, + methodDescriptor_GantryService_GetLengths, + callback); +}; + + +/** + * @param {!proto.viam.component.gantry.v1.GetLengthsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.gantry.v1.GantryServicePromiseClient.prototype.getLengths = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/GetLengths', + request, + metadata || {}, + methodDescriptor_GantryService_GetLengths); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.gantry.v1.StopRequest, + * !proto.viam.component.gantry.v1.StopResponse>} + */ +const methodDescriptor_GantryService_Stop = new grpc.web.MethodDescriptor( + '/viam.component.gantry.v1.GantryService/Stop', + grpc.web.MethodType.UNARY, + proto.viam.component.gantry.v1.StopRequest, + proto.viam.component.gantry.v1.StopResponse, + /** + * @param {!proto.viam.component.gantry.v1.StopRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.gantry.v1.StopResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.gantry.v1.StopRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.gantry.v1.StopResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.gantry.v1.GantryServiceClient.prototype.stop = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/Stop', + request, + metadata || {}, + methodDescriptor_GantryService_Stop, + callback); +}; + + +/** + * @param {!proto.viam.component.gantry.v1.StopRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.gantry.v1.GantryServicePromiseClient.prototype.stop = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.gantry.v1.GantryService/Stop', + request, + metadata || {}, + methodDescriptor_GantryService_Stop); +}; + + +module.exports = proto.viam.component.gantry.v1; + diff --git a/gen/js/component/gantry/v1/gantry_pb.d.ts b/gen/js/component/gantry/v1/gantry_pb.d.ts new file mode 100644 index 000000000..56fa49e41 --- /dev/null +++ b/gen/js/component/gantry/v1/gantry_pb.d.ts @@ -0,0 +1,232 @@ +// package: viam.component.gantry.v1 +// file: component/gantry/v1/gantry.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class GetPositionRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionRequest): GetPositionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionRequest; + static deserializeBinaryFromReader(message: GetPositionRequest, reader: jspb.BinaryReader): GetPositionRequest; +} + +export namespace GetPositionRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetPositionResponse extends jspb.Message { + clearPositionsMmList(): void; + getPositionsMmList(): Array; + setPositionsMmList(value: Array): void; + addPositionsMm(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionResponse): GetPositionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionResponse; + static deserializeBinaryFromReader(message: GetPositionResponse, reader: jspb.BinaryReader): GetPositionResponse; +} + +export namespace GetPositionResponse { + export type AsObject = { + positionsMmList: Array, + } +} + +export class MoveToPositionRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearPositionsMmList(): void; + getPositionsMmList(): Array; + setPositionsMmList(value: Array): void; + addPositionsMm(value: number, index?: number): number; + + hasWorldState(): boolean; + clearWorldState(): void; + getWorldState(): common_v1_common_pb.WorldState | undefined; + setWorldState(value?: common_v1_common_pb.WorldState): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveToPositionRequest.AsObject; + static toObject(includeInstance: boolean, msg: MoveToPositionRequest): MoveToPositionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveToPositionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveToPositionRequest; + static deserializeBinaryFromReader(message: MoveToPositionRequest, reader: jspb.BinaryReader): MoveToPositionRequest; +} + +export namespace MoveToPositionRequest { + export type AsObject = { + name: string, + positionsMmList: Array, + worldState?: common_v1_common_pb.WorldState.AsObject, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class MoveToPositionResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveToPositionResponse.AsObject; + static toObject(includeInstance: boolean, msg: MoveToPositionResponse): MoveToPositionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveToPositionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveToPositionResponse; + static deserializeBinaryFromReader(message: MoveToPositionResponse, reader: jspb.BinaryReader): MoveToPositionResponse; +} + +export namespace MoveToPositionResponse { + export type AsObject = { + } +} + +export class GetLengthsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLengthsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetLengthsRequest): GetLengthsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetLengthsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLengthsRequest; + static deserializeBinaryFromReader(message: GetLengthsRequest, reader: jspb.BinaryReader): GetLengthsRequest; +} + +export namespace GetLengthsRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetLengthsResponse extends jspb.Message { + clearLengthsMmList(): void; + getLengthsMmList(): Array; + setLengthsMmList(value: Array): void; + addLengthsMm(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLengthsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetLengthsResponse): GetLengthsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetLengthsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLengthsResponse; + static deserializeBinaryFromReader(message: GetLengthsResponse, reader: jspb.BinaryReader): GetLengthsResponse; +} + +export namespace GetLengthsResponse { + export type AsObject = { + lengthsMmList: Array, + } +} + +export class StopRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopRequest.AsObject; + static toObject(includeInstance: boolean, msg: StopRequest): StopRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopRequest; + static deserializeBinaryFromReader(message: StopRequest, reader: jspb.BinaryReader): StopRequest; +} + +export namespace StopRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class StopResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopResponse.AsObject; + static toObject(includeInstance: boolean, msg: StopResponse): StopResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopResponse; + static deserializeBinaryFromReader(message: StopResponse, reader: jspb.BinaryReader): StopResponse; +} + +export namespace StopResponse { + export type AsObject = { + } +} + +export class Status extends jspb.Message { + clearPositionsMmList(): void; + getPositionsMmList(): Array; + setPositionsMmList(value: Array): void; + addPositionsMm(value: number, index?: number): number; + + clearLengthsMmList(): void; + getLengthsMmList(): Array; + setLengthsMmList(value: Array): void; + addLengthsMm(value: number, index?: number): number; + + getIsMoving(): boolean; + setIsMoving(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; +} + +export namespace Status { + export type AsObject = { + positionsMmList: Array, + lengthsMmList: Array, + isMoving: boolean, + } +} + diff --git a/gen/js/component/gantry/v1/gantry_pb.js b/gen/js/component/gantry/v1/gantry_pb.js new file mode 100644 index 000000000..207fa647f --- /dev/null +++ b/gen/js/component/gantry/v1/gantry_pb.js @@ -0,0 +1,1812 @@ +// source: component/gantry/v1/gantry.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.component.gantry.v1.GetLengthsRequest', null, global); +goog.exportSymbol('proto.viam.component.gantry.v1.GetLengthsResponse', null, global); +goog.exportSymbol('proto.viam.component.gantry.v1.GetPositionRequest', null, global); +goog.exportSymbol('proto.viam.component.gantry.v1.GetPositionResponse', null, global); +goog.exportSymbol('proto.viam.component.gantry.v1.MoveToPositionRequest', null, global); +goog.exportSymbol('proto.viam.component.gantry.v1.MoveToPositionResponse', null, global); +goog.exportSymbol('proto.viam.component.gantry.v1.Status', null, global); +goog.exportSymbol('proto.viam.component.gantry.v1.StopRequest', null, global); +goog.exportSymbol('proto.viam.component.gantry.v1.StopResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gantry.v1.GetPositionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gantry.v1.GetPositionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gantry.v1.GetPositionRequest.displayName = 'proto.viam.component.gantry.v1.GetPositionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gantry.v1.GetPositionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.gantry.v1.GetPositionResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.gantry.v1.GetPositionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gantry.v1.GetPositionResponse.displayName = 'proto.viam.component.gantry.v1.GetPositionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gantry.v1.MoveToPositionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.gantry.v1.MoveToPositionRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.gantry.v1.MoveToPositionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gantry.v1.MoveToPositionRequest.displayName = 'proto.viam.component.gantry.v1.MoveToPositionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gantry.v1.MoveToPositionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gantry.v1.MoveToPositionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gantry.v1.MoveToPositionResponse.displayName = 'proto.viam.component.gantry.v1.MoveToPositionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gantry.v1.GetLengthsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gantry.v1.GetLengthsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gantry.v1.GetLengthsRequest.displayName = 'proto.viam.component.gantry.v1.GetLengthsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gantry.v1.GetLengthsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.gantry.v1.GetLengthsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.gantry.v1.GetLengthsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gantry.v1.GetLengthsResponse.displayName = 'proto.viam.component.gantry.v1.GetLengthsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gantry.v1.StopRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gantry.v1.StopRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gantry.v1.StopRequest.displayName = 'proto.viam.component.gantry.v1.StopRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gantry.v1.StopResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gantry.v1.StopResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gantry.v1.StopResponse.displayName = 'proto.viam.component.gantry.v1.StopResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gantry.v1.Status = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.gantry.v1.Status.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.gantry.v1.Status, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gantry.v1.Status.displayName = 'proto.viam.component.gantry.v1.Status'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gantry.v1.GetPositionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gantry.v1.GetPositionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gantry.v1.GetPositionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.GetPositionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gantry.v1.GetPositionRequest} + */ +proto.viam.component.gantry.v1.GetPositionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gantry.v1.GetPositionRequest; + return proto.viam.component.gantry.v1.GetPositionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gantry.v1.GetPositionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gantry.v1.GetPositionRequest} + */ +proto.viam.component.gantry.v1.GetPositionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gantry.v1.GetPositionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gantry.v1.GetPositionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gantry.v1.GetPositionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.GetPositionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.gantry.v1.GetPositionRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.gantry.v1.GetPositionRequest} returns this + */ +proto.viam.component.gantry.v1.GetPositionRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.gantry.v1.GetPositionRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.gantry.v1.GetPositionRequest} returns this +*/ +proto.viam.component.gantry.v1.GetPositionRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.gantry.v1.GetPositionRequest} returns this + */ +proto.viam.component.gantry.v1.GetPositionRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.gantry.v1.GetPositionRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.gantry.v1.GetPositionResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gantry.v1.GetPositionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gantry.v1.GetPositionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gantry.v1.GetPositionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.GetPositionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + positionsMmList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gantry.v1.GetPositionResponse} + */ +proto.viam.component.gantry.v1.GetPositionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gantry.v1.GetPositionResponse; + return proto.viam.component.gantry.v1.GetPositionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gantry.v1.GetPositionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gantry.v1.GetPositionResponse} + */ +proto.viam.component.gantry.v1.GetPositionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addPositionsMm(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gantry.v1.GetPositionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gantry.v1.GetPositionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gantry.v1.GetPositionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.GetPositionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPositionsMmList(); + if (f.length > 0) { + writer.writePackedDouble( + 1, + f + ); + } +}; + + +/** + * repeated double positions_mm = 1; + * @return {!Array} + */ +proto.viam.component.gantry.v1.GetPositionResponse.prototype.getPositionsMmList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.gantry.v1.GetPositionResponse} returns this + */ +proto.viam.component.gantry.v1.GetPositionResponse.prototype.setPositionsMmList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.viam.component.gantry.v1.GetPositionResponse} returns this + */ +proto.viam.component.gantry.v1.GetPositionResponse.prototype.addPositionsMm = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.gantry.v1.GetPositionResponse} returns this + */ +proto.viam.component.gantry.v1.GetPositionResponse.prototype.clearPositionsMmList = function() { + return this.setPositionsMmList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gantry.v1.MoveToPositionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gantry.v1.MoveToPositionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + positionsMmList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 2)) == null ? undefined : f, + worldState: (f = msg.getWorldState()) && common_v1_common_pb.WorldState.toObject(includeInstance, f), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gantry.v1.MoveToPositionRequest; + return proto.viam.component.gantry.v1.MoveToPositionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gantry.v1.MoveToPositionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addPositionsMm(values[i]); + } + break; + case 3: + var value = new common_v1_common_pb.WorldState; + reader.readMessage(value,common_v1_common_pb.WorldState.deserializeBinaryFromReader); + msg.setWorldState(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gantry.v1.MoveToPositionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gantry.v1.MoveToPositionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPositionsMmList(); + if (f.length > 0) { + writer.writePackedDouble( + 2, + f + ); + } + f = message.getWorldState(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_v1_common_pb.WorldState.serializeBinaryToWriter + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated double positions_mm = 2; + * @return {!Array} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.getPositionsMmList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.setPositionsMmList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.addPositionsMm = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.clearPositionsMmList = function() { + return this.setPositionsMmList([]); +}; + + +/** + * optional viam.common.v1.WorldState world_state = 3; + * @return {?proto.viam.common.v1.WorldState} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.getWorldState = function() { + return /** @type{?proto.viam.common.v1.WorldState} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.WorldState, 3)); +}; + + +/** + * @param {?proto.viam.common.v1.WorldState|undefined} value + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} returns this +*/ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.setWorldState = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.clearWorldState = function() { + return this.setWorldState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.hasWorldState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} returns this +*/ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.gantry.v1.MoveToPositionRequest} returns this + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.gantry.v1.MoveToPositionRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gantry.v1.MoveToPositionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gantry.v1.MoveToPositionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gantry.v1.MoveToPositionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.MoveToPositionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gantry.v1.MoveToPositionResponse} + */ +proto.viam.component.gantry.v1.MoveToPositionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gantry.v1.MoveToPositionResponse; + return proto.viam.component.gantry.v1.MoveToPositionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gantry.v1.MoveToPositionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gantry.v1.MoveToPositionResponse} + */ +proto.viam.component.gantry.v1.MoveToPositionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gantry.v1.MoveToPositionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gantry.v1.MoveToPositionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gantry.v1.MoveToPositionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.MoveToPositionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gantry.v1.GetLengthsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gantry.v1.GetLengthsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gantry.v1.GetLengthsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.GetLengthsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gantry.v1.GetLengthsRequest} + */ +proto.viam.component.gantry.v1.GetLengthsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gantry.v1.GetLengthsRequest; + return proto.viam.component.gantry.v1.GetLengthsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gantry.v1.GetLengthsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gantry.v1.GetLengthsRequest} + */ +proto.viam.component.gantry.v1.GetLengthsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gantry.v1.GetLengthsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gantry.v1.GetLengthsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gantry.v1.GetLengthsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.GetLengthsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.gantry.v1.GetLengthsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.gantry.v1.GetLengthsRequest} returns this + */ +proto.viam.component.gantry.v1.GetLengthsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.gantry.v1.GetLengthsRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.gantry.v1.GetLengthsRequest} returns this +*/ +proto.viam.component.gantry.v1.GetLengthsRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.gantry.v1.GetLengthsRequest} returns this + */ +proto.viam.component.gantry.v1.GetLengthsRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.gantry.v1.GetLengthsRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.gantry.v1.GetLengthsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gantry.v1.GetLengthsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gantry.v1.GetLengthsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gantry.v1.GetLengthsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.GetLengthsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + lengthsMmList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gantry.v1.GetLengthsResponse} + */ +proto.viam.component.gantry.v1.GetLengthsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gantry.v1.GetLengthsResponse; + return proto.viam.component.gantry.v1.GetLengthsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gantry.v1.GetLengthsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gantry.v1.GetLengthsResponse} + */ +proto.viam.component.gantry.v1.GetLengthsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addLengthsMm(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gantry.v1.GetLengthsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gantry.v1.GetLengthsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gantry.v1.GetLengthsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.GetLengthsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLengthsMmList(); + if (f.length > 0) { + writer.writePackedDouble( + 1, + f + ); + } +}; + + +/** + * repeated double lengths_mm = 1; + * @return {!Array} + */ +proto.viam.component.gantry.v1.GetLengthsResponse.prototype.getLengthsMmList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.gantry.v1.GetLengthsResponse} returns this + */ +proto.viam.component.gantry.v1.GetLengthsResponse.prototype.setLengthsMmList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.viam.component.gantry.v1.GetLengthsResponse} returns this + */ +proto.viam.component.gantry.v1.GetLengthsResponse.prototype.addLengthsMm = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.gantry.v1.GetLengthsResponse} returns this + */ +proto.viam.component.gantry.v1.GetLengthsResponse.prototype.clearLengthsMmList = function() { + return this.setLengthsMmList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gantry.v1.StopRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gantry.v1.StopRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gantry.v1.StopRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.StopRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gantry.v1.StopRequest} + */ +proto.viam.component.gantry.v1.StopRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gantry.v1.StopRequest; + return proto.viam.component.gantry.v1.StopRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gantry.v1.StopRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gantry.v1.StopRequest} + */ +proto.viam.component.gantry.v1.StopRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gantry.v1.StopRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gantry.v1.StopRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gantry.v1.StopRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.StopRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.gantry.v1.StopRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.gantry.v1.StopRequest} returns this + */ +proto.viam.component.gantry.v1.StopRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.gantry.v1.StopRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.gantry.v1.StopRequest} returns this +*/ +proto.viam.component.gantry.v1.StopRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.gantry.v1.StopRequest} returns this + */ +proto.viam.component.gantry.v1.StopRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.gantry.v1.StopRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gantry.v1.StopResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gantry.v1.StopResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gantry.v1.StopResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.StopResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gantry.v1.StopResponse} + */ +proto.viam.component.gantry.v1.StopResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gantry.v1.StopResponse; + return proto.viam.component.gantry.v1.StopResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gantry.v1.StopResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gantry.v1.StopResponse} + */ +proto.viam.component.gantry.v1.StopResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gantry.v1.StopResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gantry.v1.StopResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gantry.v1.StopResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.StopResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.gantry.v1.Status.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gantry.v1.Status.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gantry.v1.Status.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gantry.v1.Status} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.Status.toObject = function(includeInstance, msg) { + var f, obj = { + positionsMmList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : f, + lengthsMmList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 2)) == null ? undefined : f, + isMoving: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gantry.v1.Status} + */ +proto.viam.component.gantry.v1.Status.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gantry.v1.Status; + return proto.viam.component.gantry.v1.Status.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gantry.v1.Status} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gantry.v1.Status} + */ +proto.viam.component.gantry.v1.Status.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addPositionsMm(values[i]); + } + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addLengthsMm(values[i]); + } + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsMoving(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gantry.v1.Status.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gantry.v1.Status.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gantry.v1.Status} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gantry.v1.Status.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPositionsMmList(); + if (f.length > 0) { + writer.writePackedDouble( + 1, + f + ); + } + f = message.getLengthsMmList(); + if (f.length > 0) { + writer.writePackedDouble( + 2, + f + ); + } + f = message.getIsMoving(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * repeated double positions_mm = 1; + * @return {!Array} + */ +proto.viam.component.gantry.v1.Status.prototype.getPositionsMmList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.gantry.v1.Status} returns this + */ +proto.viam.component.gantry.v1.Status.prototype.setPositionsMmList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.viam.component.gantry.v1.Status} returns this + */ +proto.viam.component.gantry.v1.Status.prototype.addPositionsMm = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.gantry.v1.Status} returns this + */ +proto.viam.component.gantry.v1.Status.prototype.clearPositionsMmList = function() { + return this.setPositionsMmList([]); +}; + + +/** + * repeated double lengths_mm = 2; + * @return {!Array} + */ +proto.viam.component.gantry.v1.Status.prototype.getLengthsMmList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.gantry.v1.Status} returns this + */ +proto.viam.component.gantry.v1.Status.prototype.setLengthsMmList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.viam.component.gantry.v1.Status} returns this + */ +proto.viam.component.gantry.v1.Status.prototype.addLengthsMm = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.gantry.v1.Status} returns this + */ +proto.viam.component.gantry.v1.Status.prototype.clearLengthsMmList = function() { + return this.setLengthsMmList([]); +}; + + +/** + * optional bool is_moving = 3; + * @return {boolean} + */ +proto.viam.component.gantry.v1.Status.prototype.getIsMoving = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.gantry.v1.Status} returns this + */ +proto.viam.component.gantry.v1.Status.prototype.setIsMoving = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +goog.object.extend(exports, proto.viam.component.gantry.v1); diff --git a/gen/js/component/gantry/v1/gantry_pb_service.d.ts b/gen/js/component/gantry/v1/gantry_pb_service.d.ts new file mode 100644 index 000000000..199b07714 --- /dev/null +++ b/gen/js/component/gantry/v1/gantry_pb_service.d.ts @@ -0,0 +1,120 @@ +// package: viam.component.gantry.v1 +// file: component/gantry/v1/gantry.proto + +import * as component_gantry_v1_gantry_pb from "../../../component/gantry/v1/gantry_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type GantryServiceGetPosition = { + readonly methodName: string; + readonly service: typeof GantryService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_gantry_v1_gantry_pb.GetPositionRequest; + readonly responseType: typeof component_gantry_v1_gantry_pb.GetPositionResponse; +}; + +type GantryServiceMoveToPosition = { + readonly methodName: string; + readonly service: typeof GantryService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_gantry_v1_gantry_pb.MoveToPositionRequest; + readonly responseType: typeof component_gantry_v1_gantry_pb.MoveToPositionResponse; +}; + +type GantryServiceGetLengths = { + readonly methodName: string; + readonly service: typeof GantryService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_gantry_v1_gantry_pb.GetLengthsRequest; + readonly responseType: typeof component_gantry_v1_gantry_pb.GetLengthsResponse; +}; + +type GantryServiceStop = { + readonly methodName: string; + readonly service: typeof GantryService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_gantry_v1_gantry_pb.StopRequest; + readonly responseType: typeof component_gantry_v1_gantry_pb.StopResponse; +}; + +export class GantryService { + static readonly serviceName: string; + static readonly GetPosition: GantryServiceGetPosition; + static readonly MoveToPosition: GantryServiceMoveToPosition; + static readonly GetLengths: GantryServiceGetLengths; + static readonly Stop: GantryServiceStop; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class GantryServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getPosition( + requestMessage: component_gantry_v1_gantry_pb.GetPositionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_gantry_v1_gantry_pb.GetPositionResponse|null) => void + ): UnaryResponse; + getPosition( + requestMessage: component_gantry_v1_gantry_pb.GetPositionRequest, + callback: (error: ServiceError|null, responseMessage: component_gantry_v1_gantry_pb.GetPositionResponse|null) => void + ): UnaryResponse; + moveToPosition( + requestMessage: component_gantry_v1_gantry_pb.MoveToPositionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_gantry_v1_gantry_pb.MoveToPositionResponse|null) => void + ): UnaryResponse; + moveToPosition( + requestMessage: component_gantry_v1_gantry_pb.MoveToPositionRequest, + callback: (error: ServiceError|null, responseMessage: component_gantry_v1_gantry_pb.MoveToPositionResponse|null) => void + ): UnaryResponse; + getLengths( + requestMessage: component_gantry_v1_gantry_pb.GetLengthsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_gantry_v1_gantry_pb.GetLengthsResponse|null) => void + ): UnaryResponse; + getLengths( + requestMessage: component_gantry_v1_gantry_pb.GetLengthsRequest, + callback: (error: ServiceError|null, responseMessage: component_gantry_v1_gantry_pb.GetLengthsResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_gantry_v1_gantry_pb.StopRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_gantry_v1_gantry_pb.StopResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_gantry_v1_gantry_pb.StopRequest, + callback: (error: ServiceError|null, responseMessage: component_gantry_v1_gantry_pb.StopResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/gantry/v1/gantry_pb_service.js b/gen/js/component/gantry/v1/gantry_pb_service.js new file mode 100644 index 000000000..8a7e491f9 --- /dev/null +++ b/gen/js/component/gantry/v1/gantry_pb_service.js @@ -0,0 +1,181 @@ +// package: viam.component.gantry.v1 +// file: component/gantry/v1/gantry.proto + +var component_gantry_v1_gantry_pb = require("../../../component/gantry/v1/gantry_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var GantryService = (function () { + function GantryService() {} + GantryService.serviceName = "viam.component.gantry.v1.GantryService"; + return GantryService; +}()); + +GantryService.GetPosition = { + methodName: "GetPosition", + service: GantryService, + requestStream: false, + responseStream: false, + requestType: component_gantry_v1_gantry_pb.GetPositionRequest, + responseType: component_gantry_v1_gantry_pb.GetPositionResponse +}; + +GantryService.MoveToPosition = { + methodName: "MoveToPosition", + service: GantryService, + requestStream: false, + responseStream: false, + requestType: component_gantry_v1_gantry_pb.MoveToPositionRequest, + responseType: component_gantry_v1_gantry_pb.MoveToPositionResponse +}; + +GantryService.GetLengths = { + methodName: "GetLengths", + service: GantryService, + requestStream: false, + responseStream: false, + requestType: component_gantry_v1_gantry_pb.GetLengthsRequest, + responseType: component_gantry_v1_gantry_pb.GetLengthsResponse +}; + +GantryService.Stop = { + methodName: "Stop", + service: GantryService, + requestStream: false, + responseStream: false, + requestType: component_gantry_v1_gantry_pb.StopRequest, + responseType: component_gantry_v1_gantry_pb.StopResponse +}; + +exports.GantryService = GantryService; + +function GantryServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +GantryServiceClient.prototype.getPosition = function getPosition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GantryService.GetPosition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +GantryServiceClient.prototype.moveToPosition = function moveToPosition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GantryService.MoveToPosition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +GantryServiceClient.prototype.getLengths = function getLengths(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GantryService.GetLengths, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +GantryServiceClient.prototype.stop = function stop(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GantryService.Stop, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.GantryServiceClient = GantryServiceClient; + diff --git a/gen/js/component/generic/v1/generic_grpc_web_pb.js b/gen/js/component/generic/v1/generic_grpc_web_pb.js new file mode 100644 index 000000000..883ae0141 --- /dev/null +++ b/gen/js/component/generic/v1/generic_grpc_web_pb.js @@ -0,0 +1,142 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.generic.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.generic = {}; +proto.viam.component.generic.v1 = require('./generic_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.generic.v1.GenericServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.generic.v1.GenericServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.generic.v1.DoCommandRequest, + * !proto.viam.component.generic.v1.DoCommandResponse>} + */ +const methodDescriptor_GenericService_DoCommand = new grpc.web.MethodDescriptor( + '/viam.component.generic.v1.GenericService/DoCommand', + grpc.web.MethodType.UNARY, + proto.viam.component.generic.v1.DoCommandRequest, + proto.viam.component.generic.v1.DoCommandResponse, + /** + * @param {!proto.viam.component.generic.v1.DoCommandRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.generic.v1.DoCommandResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.generic.v1.DoCommandRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.generic.v1.DoCommandResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.generic.v1.GenericServiceClient.prototype.doCommand = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.generic.v1.GenericService/DoCommand', + request, + metadata || {}, + methodDescriptor_GenericService_DoCommand, + callback); +}; + + +/** + * @param {!proto.viam.component.generic.v1.DoCommandRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.generic.v1.GenericServicePromiseClient.prototype.doCommand = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.generic.v1.GenericService/DoCommand', + request, + metadata || {}, + methodDescriptor_GenericService_DoCommand); +}; + + +module.exports = proto.viam.component.generic.v1; + diff --git a/gen/js/component/generic/v1/generic_pb.d.ts b/gen/js/component/generic/v1/generic_pb.d.ts new file mode 100644 index 000000000..1a2b4761b --- /dev/null +++ b/gen/js/component/generic/v1/generic_pb.d.ts @@ -0,0 +1,55 @@ +// package: viam.component.generic.v1 +// file: component/generic/v1/generic.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class DoCommandRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasCommand(): boolean; + clearCommand(): void; + getCommand(): google_protobuf_struct_pb.Struct | undefined; + setCommand(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DoCommandRequest.AsObject; + static toObject(includeInstance: boolean, msg: DoCommandRequest): DoCommandRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DoCommandRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DoCommandRequest; + static deserializeBinaryFromReader(message: DoCommandRequest, reader: jspb.BinaryReader): DoCommandRequest; +} + +export namespace DoCommandRequest { + export type AsObject = { + name: string, + command?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class DoCommandResponse extends jspb.Message { + hasResult(): boolean; + clearResult(): void; + getResult(): google_protobuf_struct_pb.Struct | undefined; + setResult(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DoCommandResponse.AsObject; + static toObject(includeInstance: boolean, msg: DoCommandResponse): DoCommandResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DoCommandResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DoCommandResponse; + static deserializeBinaryFromReader(message: DoCommandResponse, reader: jspb.BinaryReader): DoCommandResponse; +} + +export namespace DoCommandResponse { + export type AsObject = { + result?: google_protobuf_struct_pb.Struct.AsObject, + } +} + diff --git a/gen/js/component/generic/v1/generic_pb.js b/gen/js/component/generic/v1/generic_pb.js new file mode 100644 index 000000000..26207d28b --- /dev/null +++ b/gen/js/component/generic/v1/generic_pb.js @@ -0,0 +1,398 @@ +// source: component/generic/v1/generic.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.component.generic.v1.DoCommandRequest', null, global); +goog.exportSymbol('proto.viam.component.generic.v1.DoCommandResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.generic.v1.DoCommandRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.generic.v1.DoCommandRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.generic.v1.DoCommandRequest.displayName = 'proto.viam.component.generic.v1.DoCommandRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.generic.v1.DoCommandResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.generic.v1.DoCommandResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.generic.v1.DoCommandResponse.displayName = 'proto.viam.component.generic.v1.DoCommandResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.generic.v1.DoCommandRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.generic.v1.DoCommandRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.generic.v1.DoCommandRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.generic.v1.DoCommandRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + command: (f = msg.getCommand()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.generic.v1.DoCommandRequest} + */ +proto.viam.component.generic.v1.DoCommandRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.generic.v1.DoCommandRequest; + return proto.viam.component.generic.v1.DoCommandRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.generic.v1.DoCommandRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.generic.v1.DoCommandRequest} + */ +proto.viam.component.generic.v1.DoCommandRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setCommand(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.generic.v1.DoCommandRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.generic.v1.DoCommandRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.generic.v1.DoCommandRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.generic.v1.DoCommandRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCommand(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.generic.v1.DoCommandRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.generic.v1.DoCommandRequest} returns this + */ +proto.viam.component.generic.v1.DoCommandRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct command = 2; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.generic.v1.DoCommandRequest.prototype.getCommand = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.generic.v1.DoCommandRequest} returns this +*/ +proto.viam.component.generic.v1.DoCommandRequest.prototype.setCommand = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.generic.v1.DoCommandRequest} returns this + */ +proto.viam.component.generic.v1.DoCommandRequest.prototype.clearCommand = function() { + return this.setCommand(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.generic.v1.DoCommandRequest.prototype.hasCommand = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.generic.v1.DoCommandResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.generic.v1.DoCommandResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.generic.v1.DoCommandResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.generic.v1.DoCommandResponse.toObject = function(includeInstance, msg) { + var f, obj = { + result: (f = msg.getResult()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.generic.v1.DoCommandResponse} + */ +proto.viam.component.generic.v1.DoCommandResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.generic.v1.DoCommandResponse; + return proto.viam.component.generic.v1.DoCommandResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.generic.v1.DoCommandResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.generic.v1.DoCommandResponse} + */ +proto.viam.component.generic.v1.DoCommandResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.generic.v1.DoCommandResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.generic.v1.DoCommandResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.generic.v1.DoCommandResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.generic.v1.DoCommandResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Struct result = 1; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.generic.v1.DoCommandResponse.prototype.getResult = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.generic.v1.DoCommandResponse} returns this +*/ +proto.viam.component.generic.v1.DoCommandResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.generic.v1.DoCommandResponse} returns this + */ +proto.viam.component.generic.v1.DoCommandResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.generic.v1.DoCommandResponse.prototype.hasResult = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.viam.component.generic.v1); diff --git a/gen/js/component/generic/v1/generic_pb_service.d.ts b/gen/js/component/generic/v1/generic_pb_service.d.ts new file mode 100644 index 000000000..6bb47170f --- /dev/null +++ b/gen/js/component/generic/v1/generic_pb_service.d.ts @@ -0,0 +1,63 @@ +// package: viam.component.generic.v1 +// file: component/generic/v1/generic.proto + +import * as component_generic_v1_generic_pb from "../../../component/generic/v1/generic_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type GenericServiceDoCommand = { + readonly methodName: string; + readonly service: typeof GenericService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_generic_v1_generic_pb.DoCommandRequest; + readonly responseType: typeof component_generic_v1_generic_pb.DoCommandResponse; +}; + +export class GenericService { + static readonly serviceName: string; + static readonly DoCommand: GenericServiceDoCommand; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class GenericServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + doCommand( + requestMessage: component_generic_v1_generic_pb.DoCommandRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_generic_v1_generic_pb.DoCommandResponse|null) => void + ): UnaryResponse; + doCommand( + requestMessage: component_generic_v1_generic_pb.DoCommandRequest, + callback: (error: ServiceError|null, responseMessage: component_generic_v1_generic_pb.DoCommandResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/generic/v1/generic_pb_service.js b/gen/js/component/generic/v1/generic_pb_service.js new file mode 100644 index 000000000..ce831dc69 --- /dev/null +++ b/gen/js/component/generic/v1/generic_pb_service.js @@ -0,0 +1,61 @@ +// package: viam.component.generic.v1 +// file: component/generic/v1/generic.proto + +var component_generic_v1_generic_pb = require("../../../component/generic/v1/generic_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var GenericService = (function () { + function GenericService() {} + GenericService.serviceName = "viam.component.generic.v1.GenericService"; + return GenericService; +}()); + +GenericService.DoCommand = { + methodName: "DoCommand", + service: GenericService, + requestStream: false, + responseStream: false, + requestType: component_generic_v1_generic_pb.DoCommandRequest, + responseType: component_generic_v1_generic_pb.DoCommandResponse +}; + +exports.GenericService = GenericService; + +function GenericServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +GenericServiceClient.prototype.doCommand = function doCommand(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GenericService.DoCommand, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.GenericServiceClient = GenericServiceClient; + diff --git a/gen/js/component/gripper/v1/gripper_grpc_web_pb.js b/gen/js/component/gripper/v1/gripper_grpc_web_pb.js new file mode 100644 index 000000000..04973e0c4 --- /dev/null +++ b/gen/js/component/gripper/v1/gripper_grpc_web_pb.js @@ -0,0 +1,262 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.gripper.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.gripper = {}; +proto.viam.component.gripper.v1 = require('./gripper_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.gripper.v1.GripperServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.gripper.v1.GripperServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.gripper.v1.OpenRequest, + * !proto.viam.component.gripper.v1.OpenResponse>} + */ +const methodDescriptor_GripperService_Open = new grpc.web.MethodDescriptor( + '/viam.component.gripper.v1.GripperService/Open', + grpc.web.MethodType.UNARY, + proto.viam.component.gripper.v1.OpenRequest, + proto.viam.component.gripper.v1.OpenResponse, + /** + * @param {!proto.viam.component.gripper.v1.OpenRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.gripper.v1.OpenResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.gripper.v1.OpenRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.gripper.v1.OpenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.gripper.v1.GripperServiceClient.prototype.open = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.gripper.v1.GripperService/Open', + request, + metadata || {}, + methodDescriptor_GripperService_Open, + callback); +}; + + +/** + * @param {!proto.viam.component.gripper.v1.OpenRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.gripper.v1.GripperServicePromiseClient.prototype.open = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.gripper.v1.GripperService/Open', + request, + metadata || {}, + methodDescriptor_GripperService_Open); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.gripper.v1.GrabRequest, + * !proto.viam.component.gripper.v1.GrabResponse>} + */ +const methodDescriptor_GripperService_Grab = new grpc.web.MethodDescriptor( + '/viam.component.gripper.v1.GripperService/Grab', + grpc.web.MethodType.UNARY, + proto.viam.component.gripper.v1.GrabRequest, + proto.viam.component.gripper.v1.GrabResponse, + /** + * @param {!proto.viam.component.gripper.v1.GrabRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.gripper.v1.GrabResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.gripper.v1.GrabRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.gripper.v1.GrabResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.gripper.v1.GripperServiceClient.prototype.grab = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.gripper.v1.GripperService/Grab', + request, + metadata || {}, + methodDescriptor_GripperService_Grab, + callback); +}; + + +/** + * @param {!proto.viam.component.gripper.v1.GrabRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.gripper.v1.GripperServicePromiseClient.prototype.grab = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.gripper.v1.GripperService/Grab', + request, + metadata || {}, + methodDescriptor_GripperService_Grab); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.gripper.v1.StopRequest, + * !proto.viam.component.gripper.v1.StopResponse>} + */ +const methodDescriptor_GripperService_Stop = new grpc.web.MethodDescriptor( + '/viam.component.gripper.v1.GripperService/Stop', + grpc.web.MethodType.UNARY, + proto.viam.component.gripper.v1.StopRequest, + proto.viam.component.gripper.v1.StopResponse, + /** + * @param {!proto.viam.component.gripper.v1.StopRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.gripper.v1.StopResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.gripper.v1.StopRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.gripper.v1.StopResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.gripper.v1.GripperServiceClient.prototype.stop = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.gripper.v1.GripperService/Stop', + request, + metadata || {}, + methodDescriptor_GripperService_Stop, + callback); +}; + + +/** + * @param {!proto.viam.component.gripper.v1.StopRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.gripper.v1.GripperServicePromiseClient.prototype.stop = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.gripper.v1.GripperService/Stop', + request, + metadata || {}, + methodDescriptor_GripperService_Stop); +}; + + +module.exports = proto.viam.component.gripper.v1; + diff --git a/gen/js/component/gripper/v1/gripper_pb.d.ts b/gen/js/component/gripper/v1/gripper_pb.d.ts new file mode 100644 index 000000000..b5a74cf6d --- /dev/null +++ b/gen/js/component/gripper/v1/gripper_pb.d.ts @@ -0,0 +1,118 @@ +// package: viam.component.gripper.v1 +// file: component/gripper/v1/gripper.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; + +export class OpenRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OpenRequest.AsObject; + static toObject(includeInstance: boolean, msg: OpenRequest): OpenRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OpenRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OpenRequest; + static deserializeBinaryFromReader(message: OpenRequest, reader: jspb.BinaryReader): OpenRequest; +} + +export namespace OpenRequest { + export type AsObject = { + name: string, + } +} + +export class OpenResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OpenResponse.AsObject; + static toObject(includeInstance: boolean, msg: OpenResponse): OpenResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OpenResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OpenResponse; + static deserializeBinaryFromReader(message: OpenResponse, reader: jspb.BinaryReader): OpenResponse; +} + +export namespace OpenResponse { + export type AsObject = { + } +} + +export class GrabRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GrabRequest.AsObject; + static toObject(includeInstance: boolean, msg: GrabRequest): GrabRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GrabRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GrabRequest; + static deserializeBinaryFromReader(message: GrabRequest, reader: jspb.BinaryReader): GrabRequest; +} + +export namespace GrabRequest { + export type AsObject = { + name: string, + } +} + +export class GrabResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GrabResponse.AsObject; + static toObject(includeInstance: boolean, msg: GrabResponse): GrabResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GrabResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GrabResponse; + static deserializeBinaryFromReader(message: GrabResponse, reader: jspb.BinaryReader): GrabResponse; +} + +export namespace GrabResponse { + export type AsObject = { + success: boolean, + } +} + +export class StopRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopRequest.AsObject; + static toObject(includeInstance: boolean, msg: StopRequest): StopRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopRequest; + static deserializeBinaryFromReader(message: StopRequest, reader: jspb.BinaryReader): StopRequest; +} + +export namespace StopRequest { + export type AsObject = { + name: string, + } +} + +export class StopResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopResponse.AsObject; + static toObject(includeInstance: boolean, msg: StopResponse): StopResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopResponse; + static deserializeBinaryFromReader(message: StopResponse, reader: jspb.BinaryReader): StopResponse; +} + +export namespace StopResponse { + export type AsObject = { + } +} + diff --git a/gen/js/component/gripper/v1/gripper_pb.js b/gen/js/component/gripper/v1/gripper_pb.js new file mode 100644 index 000000000..69c1020a0 --- /dev/null +++ b/gen/js/component/gripper/v1/gripper_pb.js @@ -0,0 +1,874 @@ +// source: component/gripper/v1/gripper.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.viam.component.gripper.v1.GrabRequest', null, global); +goog.exportSymbol('proto.viam.component.gripper.v1.GrabResponse', null, global); +goog.exportSymbol('proto.viam.component.gripper.v1.OpenRequest', null, global); +goog.exportSymbol('proto.viam.component.gripper.v1.OpenResponse', null, global); +goog.exportSymbol('proto.viam.component.gripper.v1.StopRequest', null, global); +goog.exportSymbol('proto.viam.component.gripper.v1.StopResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gripper.v1.OpenRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gripper.v1.OpenRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gripper.v1.OpenRequest.displayName = 'proto.viam.component.gripper.v1.OpenRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gripper.v1.OpenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gripper.v1.OpenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gripper.v1.OpenResponse.displayName = 'proto.viam.component.gripper.v1.OpenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gripper.v1.GrabRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gripper.v1.GrabRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gripper.v1.GrabRequest.displayName = 'proto.viam.component.gripper.v1.GrabRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gripper.v1.GrabResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gripper.v1.GrabResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gripper.v1.GrabResponse.displayName = 'proto.viam.component.gripper.v1.GrabResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gripper.v1.StopRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gripper.v1.StopRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gripper.v1.StopRequest.displayName = 'proto.viam.component.gripper.v1.StopRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.gripper.v1.StopResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.gripper.v1.StopResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.gripper.v1.StopResponse.displayName = 'proto.viam.component.gripper.v1.StopResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gripper.v1.OpenRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gripper.v1.OpenRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gripper.v1.OpenRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.OpenRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gripper.v1.OpenRequest} + */ +proto.viam.component.gripper.v1.OpenRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gripper.v1.OpenRequest; + return proto.viam.component.gripper.v1.OpenRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gripper.v1.OpenRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gripper.v1.OpenRequest} + */ +proto.viam.component.gripper.v1.OpenRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gripper.v1.OpenRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gripper.v1.OpenRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gripper.v1.OpenRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.OpenRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.gripper.v1.OpenRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.gripper.v1.OpenRequest} returns this + */ +proto.viam.component.gripper.v1.OpenRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gripper.v1.OpenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gripper.v1.OpenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gripper.v1.OpenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.OpenResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gripper.v1.OpenResponse} + */ +proto.viam.component.gripper.v1.OpenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gripper.v1.OpenResponse; + return proto.viam.component.gripper.v1.OpenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gripper.v1.OpenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gripper.v1.OpenResponse} + */ +proto.viam.component.gripper.v1.OpenResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gripper.v1.OpenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gripper.v1.OpenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gripper.v1.OpenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.OpenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gripper.v1.GrabRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gripper.v1.GrabRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gripper.v1.GrabRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.GrabRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gripper.v1.GrabRequest} + */ +proto.viam.component.gripper.v1.GrabRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gripper.v1.GrabRequest; + return proto.viam.component.gripper.v1.GrabRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gripper.v1.GrabRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gripper.v1.GrabRequest} + */ +proto.viam.component.gripper.v1.GrabRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gripper.v1.GrabRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gripper.v1.GrabRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gripper.v1.GrabRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.GrabRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.gripper.v1.GrabRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.gripper.v1.GrabRequest} returns this + */ +proto.viam.component.gripper.v1.GrabRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gripper.v1.GrabResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gripper.v1.GrabResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gripper.v1.GrabResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.GrabResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gripper.v1.GrabResponse} + */ +proto.viam.component.gripper.v1.GrabResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gripper.v1.GrabResponse; + return proto.viam.component.gripper.v1.GrabResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gripper.v1.GrabResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gripper.v1.GrabResponse} + */ +proto.viam.component.gripper.v1.GrabResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gripper.v1.GrabResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gripper.v1.GrabResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gripper.v1.GrabResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.GrabResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.viam.component.gripper.v1.GrabResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.gripper.v1.GrabResponse} returns this + */ +proto.viam.component.gripper.v1.GrabResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gripper.v1.StopRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gripper.v1.StopRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gripper.v1.StopRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.StopRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gripper.v1.StopRequest} + */ +proto.viam.component.gripper.v1.StopRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gripper.v1.StopRequest; + return proto.viam.component.gripper.v1.StopRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gripper.v1.StopRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gripper.v1.StopRequest} + */ +proto.viam.component.gripper.v1.StopRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gripper.v1.StopRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gripper.v1.StopRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gripper.v1.StopRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.StopRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.gripper.v1.StopRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.gripper.v1.StopRequest} returns this + */ +proto.viam.component.gripper.v1.StopRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.gripper.v1.StopResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.gripper.v1.StopResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.gripper.v1.StopResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.StopResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.gripper.v1.StopResponse} + */ +proto.viam.component.gripper.v1.StopResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.gripper.v1.StopResponse; + return proto.viam.component.gripper.v1.StopResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.gripper.v1.StopResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.gripper.v1.StopResponse} + */ +proto.viam.component.gripper.v1.StopResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.gripper.v1.StopResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.gripper.v1.StopResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.gripper.v1.StopResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.gripper.v1.StopResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.viam.component.gripper.v1); diff --git a/gen/js/component/gripper/v1/gripper_pb_service.d.ts b/gen/js/component/gripper/v1/gripper_pb_service.d.ts new file mode 100644 index 000000000..454b4074a --- /dev/null +++ b/gen/js/component/gripper/v1/gripper_pb_service.d.ts @@ -0,0 +1,101 @@ +// package: viam.component.gripper.v1 +// file: component/gripper/v1/gripper.proto + +import * as component_gripper_v1_gripper_pb from "../../../component/gripper/v1/gripper_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type GripperServiceOpen = { + readonly methodName: string; + readonly service: typeof GripperService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_gripper_v1_gripper_pb.OpenRequest; + readonly responseType: typeof component_gripper_v1_gripper_pb.OpenResponse; +}; + +type GripperServiceGrab = { + readonly methodName: string; + readonly service: typeof GripperService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_gripper_v1_gripper_pb.GrabRequest; + readonly responseType: typeof component_gripper_v1_gripper_pb.GrabResponse; +}; + +type GripperServiceStop = { + readonly methodName: string; + readonly service: typeof GripperService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_gripper_v1_gripper_pb.StopRequest; + readonly responseType: typeof component_gripper_v1_gripper_pb.StopResponse; +}; + +export class GripperService { + static readonly serviceName: string; + static readonly Open: GripperServiceOpen; + static readonly Grab: GripperServiceGrab; + static readonly Stop: GripperServiceStop; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class GripperServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + open( + requestMessage: component_gripper_v1_gripper_pb.OpenRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_gripper_v1_gripper_pb.OpenResponse|null) => void + ): UnaryResponse; + open( + requestMessage: component_gripper_v1_gripper_pb.OpenRequest, + callback: (error: ServiceError|null, responseMessage: component_gripper_v1_gripper_pb.OpenResponse|null) => void + ): UnaryResponse; + grab( + requestMessage: component_gripper_v1_gripper_pb.GrabRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_gripper_v1_gripper_pb.GrabResponse|null) => void + ): UnaryResponse; + grab( + requestMessage: component_gripper_v1_gripper_pb.GrabRequest, + callback: (error: ServiceError|null, responseMessage: component_gripper_v1_gripper_pb.GrabResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_gripper_v1_gripper_pb.StopRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_gripper_v1_gripper_pb.StopResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_gripper_v1_gripper_pb.StopRequest, + callback: (error: ServiceError|null, responseMessage: component_gripper_v1_gripper_pb.StopResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/gripper/v1/gripper_pb_service.js b/gen/js/component/gripper/v1/gripper_pb_service.js new file mode 100644 index 000000000..5ed38e601 --- /dev/null +++ b/gen/js/component/gripper/v1/gripper_pb_service.js @@ -0,0 +1,141 @@ +// package: viam.component.gripper.v1 +// file: component/gripper/v1/gripper.proto + +var component_gripper_v1_gripper_pb = require("../../../component/gripper/v1/gripper_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var GripperService = (function () { + function GripperService() {} + GripperService.serviceName = "viam.component.gripper.v1.GripperService"; + return GripperService; +}()); + +GripperService.Open = { + methodName: "Open", + service: GripperService, + requestStream: false, + responseStream: false, + requestType: component_gripper_v1_gripper_pb.OpenRequest, + responseType: component_gripper_v1_gripper_pb.OpenResponse +}; + +GripperService.Grab = { + methodName: "Grab", + service: GripperService, + requestStream: false, + responseStream: false, + requestType: component_gripper_v1_gripper_pb.GrabRequest, + responseType: component_gripper_v1_gripper_pb.GrabResponse +}; + +GripperService.Stop = { + methodName: "Stop", + service: GripperService, + requestStream: false, + responseStream: false, + requestType: component_gripper_v1_gripper_pb.StopRequest, + responseType: component_gripper_v1_gripper_pb.StopResponse +}; + +exports.GripperService = GripperService; + +function GripperServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +GripperServiceClient.prototype.open = function open(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GripperService.Open, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +GripperServiceClient.prototype.grab = function grab(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GripperService.Grab, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +GripperServiceClient.prototype.stop = function stop(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(GripperService.Stop, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.GripperServiceClient = GripperServiceClient; + diff --git a/gen/js/component/inputcontroller/v1/input_controller_grpc_web_pb.js b/gen/js/component/inputcontroller/v1/input_controller_grpc_web_pb.js new file mode 100644 index 000000000..0677a6684 --- /dev/null +++ b/gen/js/component/inputcontroller/v1/input_controller_grpc_web_pb.js @@ -0,0 +1,320 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.inputcontroller.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.inputcontroller = {}; +proto.viam.component.inputcontroller.v1 = require('./input_controller_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.inputcontroller.v1.InputControllerServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.inputcontroller.v1.InputControllerServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.inputcontroller.v1.GetControlsRequest, + * !proto.viam.component.inputcontroller.v1.GetControlsResponse>} + */ +const methodDescriptor_InputControllerService_GetControls = new grpc.web.MethodDescriptor( + '/viam.component.inputcontroller.v1.InputControllerService/GetControls', + grpc.web.MethodType.UNARY, + proto.viam.component.inputcontroller.v1.GetControlsRequest, + proto.viam.component.inputcontroller.v1.GetControlsResponse, + /** + * @param {!proto.viam.component.inputcontroller.v1.GetControlsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.inputcontroller.v1.GetControlsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.inputcontroller.v1.GetControlsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.inputcontroller.v1.GetControlsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.inputcontroller.v1.InputControllerServiceClient.prototype.getControls = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/GetControls', + request, + metadata || {}, + methodDescriptor_InputControllerService_GetControls, + callback); +}; + + +/** + * @param {!proto.viam.component.inputcontroller.v1.GetControlsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.inputcontroller.v1.InputControllerServicePromiseClient.prototype.getControls = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/GetControls', + request, + metadata || {}, + methodDescriptor_InputControllerService_GetControls); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.inputcontroller.v1.GetEventsRequest, + * !proto.viam.component.inputcontroller.v1.GetEventsResponse>} + */ +const methodDescriptor_InputControllerService_GetEvents = new grpc.web.MethodDescriptor( + '/viam.component.inputcontroller.v1.InputControllerService/GetEvents', + grpc.web.MethodType.UNARY, + proto.viam.component.inputcontroller.v1.GetEventsRequest, + proto.viam.component.inputcontroller.v1.GetEventsResponse, + /** + * @param {!proto.viam.component.inputcontroller.v1.GetEventsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.inputcontroller.v1.GetEventsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.inputcontroller.v1.GetEventsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.inputcontroller.v1.GetEventsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.inputcontroller.v1.InputControllerServiceClient.prototype.getEvents = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/GetEvents', + request, + metadata || {}, + methodDescriptor_InputControllerService_GetEvents, + callback); +}; + + +/** + * @param {!proto.viam.component.inputcontroller.v1.GetEventsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.inputcontroller.v1.InputControllerServicePromiseClient.prototype.getEvents = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/GetEvents', + request, + metadata || {}, + methodDescriptor_InputControllerService_GetEvents); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.inputcontroller.v1.StreamEventsRequest, + * !proto.viam.component.inputcontroller.v1.StreamEventsResponse>} + */ +const methodDescriptor_InputControllerService_StreamEvents = new grpc.web.MethodDescriptor( + '/viam.component.inputcontroller.v1.InputControllerService/StreamEvents', + grpc.web.MethodType.SERVER_STREAMING, + proto.viam.component.inputcontroller.v1.StreamEventsRequest, + proto.viam.component.inputcontroller.v1.StreamEventsResponse, + /** + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.inputcontroller.v1.StreamEventsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} request The request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!grpc.web.ClientReadableStream} + * The XHR Node Readable Stream + */ +proto.viam.component.inputcontroller.v1.InputControllerServiceClient.prototype.streamEvents = + function(request, metadata) { + return this.client_.serverStreaming(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/StreamEvents', + request, + metadata || {}, + methodDescriptor_InputControllerService_StreamEvents); +}; + + +/** + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} request The request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!grpc.web.ClientReadableStream} + * The XHR Node Readable Stream + */ +proto.viam.component.inputcontroller.v1.InputControllerServicePromiseClient.prototype.streamEvents = + function(request, metadata) { + return this.client_.serverStreaming(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/StreamEvents', + request, + metadata || {}, + methodDescriptor_InputControllerService_StreamEvents); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.inputcontroller.v1.TriggerEventRequest, + * !proto.viam.component.inputcontroller.v1.TriggerEventResponse>} + */ +const methodDescriptor_InputControllerService_TriggerEvent = new grpc.web.MethodDescriptor( + '/viam.component.inputcontroller.v1.InputControllerService/TriggerEvent', + grpc.web.MethodType.UNARY, + proto.viam.component.inputcontroller.v1.TriggerEventRequest, + proto.viam.component.inputcontroller.v1.TriggerEventResponse, + /** + * @param {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.inputcontroller.v1.TriggerEventResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.inputcontroller.v1.TriggerEventResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.inputcontroller.v1.InputControllerServiceClient.prototype.triggerEvent = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/TriggerEvent', + request, + metadata || {}, + methodDescriptor_InputControllerService_TriggerEvent, + callback); +}; + + +/** + * @param {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.inputcontroller.v1.InputControllerServicePromiseClient.prototype.triggerEvent = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.inputcontroller.v1.InputControllerService/TriggerEvent', + request, + metadata || {}, + methodDescriptor_InputControllerService_TriggerEvent); +}; + + +module.exports = proto.viam.component.inputcontroller.v1; + diff --git a/gen/js/component/inputcontroller/v1/input_controller_pb.d.ts b/gen/js/component/inputcontroller/v1/input_controller_pb.d.ts new file mode 100644 index 000000000..e23371a90 --- /dev/null +++ b/gen/js/component/inputcontroller/v1/input_controller_pb.d.ts @@ -0,0 +1,269 @@ +// package: viam.component.inputcontroller.v1 +// file: component/inputcontroller/v1/input_controller.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class GetControlsRequest extends jspb.Message { + getController(): string; + setController(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetControlsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetControlsRequest): GetControlsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetControlsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetControlsRequest; + static deserializeBinaryFromReader(message: GetControlsRequest, reader: jspb.BinaryReader): GetControlsRequest; +} + +export namespace GetControlsRequest { + export type AsObject = { + controller: string, + } +} + +export class GetControlsResponse extends jspb.Message { + clearControlsList(): void; + getControlsList(): Array; + setControlsList(value: Array): void; + addControls(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetControlsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetControlsResponse): GetControlsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetControlsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetControlsResponse; + static deserializeBinaryFromReader(message: GetControlsResponse, reader: jspb.BinaryReader): GetControlsResponse; +} + +export namespace GetControlsResponse { + export type AsObject = { + controlsList: Array, + } +} + +export class GetEventsRequest extends jspb.Message { + getController(): string; + setController(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEventsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetEventsRequest): GetEventsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEventsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEventsRequest; + static deserializeBinaryFromReader(message: GetEventsRequest, reader: jspb.BinaryReader): GetEventsRequest; +} + +export namespace GetEventsRequest { + export type AsObject = { + controller: string, + } +} + +export class GetEventsResponse extends jspb.Message { + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value?: Event, index?: number): Event; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetEventsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetEventsResponse): GetEventsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetEventsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetEventsResponse; + static deserializeBinaryFromReader(message: GetEventsResponse, reader: jspb.BinaryReader): GetEventsResponse; +} + +export namespace GetEventsResponse { + export type AsObject = { + eventsList: Array, + } +} + +export class TriggerEventRequest extends jspb.Message { + getController(): string; + setController(value: string): void; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): Event | undefined; + setEvent(value?: Event): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TriggerEventRequest.AsObject; + static toObject(includeInstance: boolean, msg: TriggerEventRequest): TriggerEventRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TriggerEventRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TriggerEventRequest; + static deserializeBinaryFromReader(message: TriggerEventRequest, reader: jspb.BinaryReader): TriggerEventRequest; +} + +export namespace TriggerEventRequest { + export type AsObject = { + controller: string, + event?: Event.AsObject, + } +} + +export class TriggerEventResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TriggerEventResponse.AsObject; + static toObject(includeInstance: boolean, msg: TriggerEventResponse): TriggerEventResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TriggerEventResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TriggerEventResponse; + static deserializeBinaryFromReader(message: TriggerEventResponse, reader: jspb.BinaryReader): TriggerEventResponse; +} + +export namespace TriggerEventResponse { + export type AsObject = { + } +} + +export class Event extends jspb.Message { + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getEvent(): string; + setEvent(value: string): void; + + getControl(): string; + setControl(value: string): void; + + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Event.AsObject; + static toObject(includeInstance: boolean, msg: Event): Event.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Event; + static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event; +} + +export namespace Event { + export type AsObject = { + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + event: string, + control: string, + value: number, + } +} + +export class StreamEventsRequest extends jspb.Message { + getController(): string; + setController(value: string): void; + + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value?: StreamEventsRequest.Events, index?: number): StreamEventsRequest.Events; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamEventsRequest.AsObject; + static toObject(includeInstance: boolean, msg: StreamEventsRequest): StreamEventsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamEventsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamEventsRequest; + static deserializeBinaryFromReader(message: StreamEventsRequest, reader: jspb.BinaryReader): StreamEventsRequest; +} + +export namespace StreamEventsRequest { + export type AsObject = { + controller: string, + eventsList: Array, + } + + export class Events extends jspb.Message { + getControl(): string; + setControl(value: string): void; + + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value: string, index?: number): string; + + clearCancelledEventsList(): void; + getCancelledEventsList(): Array; + setCancelledEventsList(value: Array): void; + addCancelledEvents(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Events.AsObject; + static toObject(includeInstance: boolean, msg: Events): Events.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Events, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Events; + static deserializeBinaryFromReader(message: Events, reader: jspb.BinaryReader): Events; + } + + export namespace Events { + export type AsObject = { + control: string, + eventsList: Array, + cancelledEventsList: Array, + } + } +} + +export class StreamEventsResponse extends jspb.Message { + hasEvent(): boolean; + clearEvent(): void; + getEvent(): Event | undefined; + setEvent(value?: Event): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamEventsResponse.AsObject; + static toObject(includeInstance: boolean, msg: StreamEventsResponse): StreamEventsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamEventsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamEventsResponse; + static deserializeBinaryFromReader(message: StreamEventsResponse, reader: jspb.BinaryReader): StreamEventsResponse; +} + +export namespace StreamEventsResponse { + export type AsObject = { + event?: Event.AsObject, + } +} + +export class Status extends jspb.Message { + clearEventsList(): void; + getEventsList(): Array; + setEventsList(value: Array): void; + addEvents(value?: Event, index?: number): Event; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; +} + +export namespace Status { + export type AsObject = { + eventsList: Array, + } +} + diff --git a/gen/js/component/inputcontroller/v1/input_controller_pb.js b/gen/js/component/inputcontroller/v1/input_controller_pb.js new file mode 100644 index 000000000..dd1a303e1 --- /dev/null +++ b/gen/js/component/inputcontroller/v1/input_controller_pb.js @@ -0,0 +1,2099 @@ +// source: component/inputcontroller/v1/input_controller.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.Event', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.GetControlsRequest', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.GetControlsResponse', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.GetEventsRequest', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.GetEventsResponse', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.Status', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.StreamEventsRequest', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.StreamEventsResponse', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.TriggerEventRequest', null, global); +goog.exportSymbol('proto.viam.component.inputcontroller.v1.TriggerEventResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.GetControlsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.GetControlsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.GetControlsRequest.displayName = 'proto.viam.component.inputcontroller.v1.GetControlsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.inputcontroller.v1.GetControlsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.GetControlsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.GetControlsResponse.displayName = 'proto.viam.component.inputcontroller.v1.GetControlsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.GetEventsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.GetEventsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.GetEventsRequest.displayName = 'proto.viam.component.inputcontroller.v1.GetEventsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.inputcontroller.v1.GetEventsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.GetEventsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.GetEventsResponse.displayName = 'proto.viam.component.inputcontroller.v1.GetEventsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.TriggerEventRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.TriggerEventRequest.displayName = 'proto.viam.component.inputcontroller.v1.TriggerEventRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.TriggerEventResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.TriggerEventResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.TriggerEventResponse.displayName = 'proto.viam.component.inputcontroller.v1.TriggerEventResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.Event = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.Event, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.Event.displayName = 'proto.viam.component.inputcontroller.v1.Event'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.inputcontroller.v1.StreamEventsRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.StreamEventsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.StreamEventsRequest.displayName = 'proto.viam.component.inputcontroller.v1.StreamEventsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.displayName = 'proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.StreamEventsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.StreamEventsResponse.displayName = 'proto.viam.component.inputcontroller.v1.StreamEventsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.inputcontroller.v1.Status = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.inputcontroller.v1.Status.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.inputcontroller.v1.Status, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.inputcontroller.v1.Status.displayName = 'proto.viam.component.inputcontroller.v1.Status'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.GetControlsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.GetControlsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.GetControlsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.GetControlsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + controller: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.GetControlsRequest} + */ +proto.viam.component.inputcontroller.v1.GetControlsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.GetControlsRequest; + return proto.viam.component.inputcontroller.v1.GetControlsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.GetControlsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.GetControlsRequest} + */ +proto.viam.component.inputcontroller.v1.GetControlsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setController(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.GetControlsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.GetControlsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.GetControlsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.GetControlsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getController(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string controller = 1; + * @return {string} + */ +proto.viam.component.inputcontroller.v1.GetControlsRequest.prototype.getController = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.inputcontroller.v1.GetControlsRequest} returns this + */ +proto.viam.component.inputcontroller.v1.GetControlsRequest.prototype.setController = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.GetControlsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.GetControlsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + controlsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.GetControlsResponse} + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.GetControlsResponse; + return proto.viam.component.inputcontroller.v1.GetControlsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.GetControlsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.GetControlsResponse} + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addControls(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.GetControlsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.GetControlsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getControlsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string controls = 1; + * @return {!Array} + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.prototype.getControlsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.inputcontroller.v1.GetControlsResponse} returns this + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.prototype.setControlsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.component.inputcontroller.v1.GetControlsResponse} returns this + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.prototype.addControls = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.inputcontroller.v1.GetControlsResponse} returns this + */ +proto.viam.component.inputcontroller.v1.GetControlsResponse.prototype.clearControlsList = function() { + return this.setControlsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.GetEventsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.GetEventsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.GetEventsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.GetEventsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + controller: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.GetEventsRequest} + */ +proto.viam.component.inputcontroller.v1.GetEventsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.GetEventsRequest; + return proto.viam.component.inputcontroller.v1.GetEventsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.GetEventsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.GetEventsRequest} + */ +proto.viam.component.inputcontroller.v1.GetEventsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setController(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.GetEventsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.GetEventsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.GetEventsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.GetEventsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getController(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string controller = 1; + * @return {string} + */ +proto.viam.component.inputcontroller.v1.GetEventsRequest.prototype.getController = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.inputcontroller.v1.GetEventsRequest} returns this + */ +proto.viam.component.inputcontroller.v1.GetEventsRequest.prototype.setController = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.GetEventsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.GetEventsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.viam.component.inputcontroller.v1.Event.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.GetEventsResponse} + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.GetEventsResponse; + return proto.viam.component.inputcontroller.v1.GetEventsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.GetEventsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.GetEventsResponse} + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.component.inputcontroller.v1.Event; + reader.readMessage(value,proto.viam.component.inputcontroller.v1.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.GetEventsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.GetEventsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.component.inputcontroller.v1.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Event events = 1; + * @return {!Array} + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.component.inputcontroller.v1.Event, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.inputcontroller.v1.GetEventsResponse} returns this +*/ +proto.viam.component.inputcontroller.v1.GetEventsResponse.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.component.inputcontroller.v1.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.component.inputcontroller.v1.Event} + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.component.inputcontroller.v1.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.inputcontroller.v1.GetEventsResponse} returns this + */ +proto.viam.component.inputcontroller.v1.GetEventsResponse.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.TriggerEventRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.toObject = function(includeInstance, msg) { + var f, obj = { + controller: jspb.Message.getFieldWithDefault(msg, 1, ""), + event: (f = msg.getEvent()) && proto.viam.component.inputcontroller.v1.Event.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.TriggerEventRequest; + return proto.viam.component.inputcontroller.v1.TriggerEventRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setController(value); + break; + case 2: + var value = new proto.viam.component.inputcontroller.v1.Event; + reader.readMessage(value,proto.viam.component.inputcontroller.v1.Event.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.TriggerEventRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getController(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.viam.component.inputcontroller.v1.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string controller = 1; + * @return {string} + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.prototype.getController = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} returns this + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.prototype.setController = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Event event = 2; + * @return {?proto.viam.component.inputcontroller.v1.Event} + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.prototype.getEvent = function() { + return /** @type{?proto.viam.component.inputcontroller.v1.Event} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.inputcontroller.v1.Event, 2)); +}; + + +/** + * @param {?proto.viam.component.inputcontroller.v1.Event|undefined} value + * @return {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} returns this +*/ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.prototype.setEvent = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.inputcontroller.v1.TriggerEventRequest} returns this + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.prototype.clearEvent = function() { + return this.setEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.inputcontroller.v1.TriggerEventRequest.prototype.hasEvent = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.TriggerEventResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.TriggerEventResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.TriggerEventResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.TriggerEventResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.TriggerEventResponse} + */ +proto.viam.component.inputcontroller.v1.TriggerEventResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.TriggerEventResponse; + return proto.viam.component.inputcontroller.v1.TriggerEventResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.TriggerEventResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.TriggerEventResponse} + */ +proto.viam.component.inputcontroller.v1.TriggerEventResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.TriggerEventResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.TriggerEventResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.TriggerEventResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.TriggerEventResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.Event.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.Event.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.Event} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.Event.toObject = function(includeInstance, msg) { + var f, obj = { + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + event: jspb.Message.getFieldWithDefault(msg, 2, ""), + control: jspb.Message.getFieldWithDefault(msg, 3, ""), + value: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.Event} + */ +proto.viam.component.inputcontroller.v1.Event.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.Event; + return proto.viam.component.inputcontroller.v1.Event.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.Event} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.Event} + */ +proto.viam.component.inputcontroller.v1.Event.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setEvent(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setControl(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.Event.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.Event.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.Event} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.Event.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getControl(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getValue(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.component.inputcontroller.v1.Event.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.component.inputcontroller.v1.Event} returns this +*/ +proto.viam.component.inputcontroller.v1.Event.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.inputcontroller.v1.Event} returns this + */ +proto.viam.component.inputcontroller.v1.Event.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.inputcontroller.v1.Event.prototype.hasTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string event = 2; + * @return {string} + */ +proto.viam.component.inputcontroller.v1.Event.prototype.getEvent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.inputcontroller.v1.Event} returns this + */ +proto.viam.component.inputcontroller.v1.Event.prototype.setEvent = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string control = 3; + * @return {string} + */ +proto.viam.component.inputcontroller.v1.Event.prototype.getControl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.inputcontroller.v1.Event} returns this + */ +proto.viam.component.inputcontroller.v1.Event.prototype.setControl = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional double value = 4; + * @return {number} + */ +proto.viam.component.inputcontroller.v1.Event.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.inputcontroller.v1.Event} returns this + */ +proto.viam.component.inputcontroller.v1.Event.prototype.setValue = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.StreamEventsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + controller: jspb.Message.getFieldWithDefault(msg, 1, ""), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.StreamEventsRequest; + return proto.viam.component.inputcontroller.v1.StreamEventsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setController(value); + break; + case 2: + var value = new proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events; + reader.readMessage(value,proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.deserializeBinaryFromReader); + msg.addEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.StreamEventsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getController(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.toObject = function(includeInstance, msg) { + var f, obj = { + control: jspb.Message.getFieldWithDefault(msg, 1, ""), + eventsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + cancelledEventsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events; + return proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setControl(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addEvents(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addCancelledEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getControl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getCancelledEventsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional string control = 1; + * @return {string} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.getControl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.setControl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string events = 2; + * @return {!Array} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.getEventsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.setEventsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.addEvents = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +/** + * repeated string cancelled_events = 3; + * @return {!Array} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.getCancelledEventsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.setCancelledEventsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.addCancelledEvents = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events.prototype.clearCancelledEventsList = function() { + return this.setCancelledEventsList([]); +}; + + +/** + * optional string controller = 1; + * @return {string} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.prototype.getController = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.prototype.setController = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Events events = 2; + * @return {!Array} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} returns this +*/ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events} + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.viam.component.inputcontroller.v1.StreamEventsRequest.Events, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsRequest} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsRequest.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.StreamEventsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + event: (f = msg.getEvent()) && proto.viam.component.inputcontroller.v1.Event.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsResponse} + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.StreamEventsResponse; + return proto.viam.component.inputcontroller.v1.StreamEventsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsResponse} + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.component.inputcontroller.v1.Event; + reader.readMessage(value,proto.viam.component.inputcontroller.v1.Event.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.StreamEventsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.StreamEventsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.component.inputcontroller.v1.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Event event = 1; + * @return {?proto.viam.component.inputcontroller.v1.Event} + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.prototype.getEvent = function() { + return /** @type{?proto.viam.component.inputcontroller.v1.Event} */ ( + jspb.Message.getWrapperField(this, proto.viam.component.inputcontroller.v1.Event, 1)); +}; + + +/** + * @param {?proto.viam.component.inputcontroller.v1.Event|undefined} value + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsResponse} returns this +*/ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.prototype.setEvent = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.inputcontroller.v1.StreamEventsResponse} returns this + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.prototype.clearEvent = function() { + return this.setEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.inputcontroller.v1.StreamEventsResponse.prototype.hasEvent = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.inputcontroller.v1.Status.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.inputcontroller.v1.Status.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.inputcontroller.v1.Status.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.inputcontroller.v1.Status} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.Status.toObject = function(includeInstance, msg) { + var f, obj = { + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.viam.component.inputcontroller.v1.Event.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.inputcontroller.v1.Status} + */ +proto.viam.component.inputcontroller.v1.Status.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.inputcontroller.v1.Status; + return proto.viam.component.inputcontroller.v1.Status.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.inputcontroller.v1.Status} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.inputcontroller.v1.Status} + */ +proto.viam.component.inputcontroller.v1.Status.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.component.inputcontroller.v1.Event; + reader.readMessage(value,proto.viam.component.inputcontroller.v1.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.inputcontroller.v1.Status.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.inputcontroller.v1.Status.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.inputcontroller.v1.Status} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.inputcontroller.v1.Status.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.component.inputcontroller.v1.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Event events = 1; + * @return {!Array} + */ +proto.viam.component.inputcontroller.v1.Status.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.component.inputcontroller.v1.Event, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.inputcontroller.v1.Status} returns this +*/ +proto.viam.component.inputcontroller.v1.Status.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.component.inputcontroller.v1.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.component.inputcontroller.v1.Event} + */ +proto.viam.component.inputcontroller.v1.Status.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.component.inputcontroller.v1.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.inputcontroller.v1.Status} returns this + */ +proto.viam.component.inputcontroller.v1.Status.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +goog.object.extend(exports, proto.viam.component.inputcontroller.v1); diff --git a/gen/js/component/inputcontroller/v1/input_controller_pb_service.d.ts b/gen/js/component/inputcontroller/v1/input_controller_pb_service.d.ts new file mode 100644 index 000000000..127917449 --- /dev/null +++ b/gen/js/component/inputcontroller/v1/input_controller_pb_service.d.ts @@ -0,0 +1,112 @@ +// package: viam.component.inputcontroller.v1 +// file: component/inputcontroller/v1/input_controller.proto + +import * as component_inputcontroller_v1_input_controller_pb from "../../../component/inputcontroller/v1/input_controller_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type InputControllerServiceGetControls = { + readonly methodName: string; + readonly service: typeof InputControllerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_inputcontroller_v1_input_controller_pb.GetControlsRequest; + readonly responseType: typeof component_inputcontroller_v1_input_controller_pb.GetControlsResponse; +}; + +type InputControllerServiceGetEvents = { + readonly methodName: string; + readonly service: typeof InputControllerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_inputcontroller_v1_input_controller_pb.GetEventsRequest; + readonly responseType: typeof component_inputcontroller_v1_input_controller_pb.GetEventsResponse; +}; + +type InputControllerServiceStreamEvents = { + readonly methodName: string; + readonly service: typeof InputControllerService; + readonly requestStream: false; + readonly responseStream: true; + readonly requestType: typeof component_inputcontroller_v1_input_controller_pb.StreamEventsRequest; + readonly responseType: typeof component_inputcontroller_v1_input_controller_pb.StreamEventsResponse; +}; + +type InputControllerServiceTriggerEvent = { + readonly methodName: string; + readonly service: typeof InputControllerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_inputcontroller_v1_input_controller_pb.TriggerEventRequest; + readonly responseType: typeof component_inputcontroller_v1_input_controller_pb.TriggerEventResponse; +}; + +export class InputControllerService { + static readonly serviceName: string; + static readonly GetControls: InputControllerServiceGetControls; + static readonly GetEvents: InputControllerServiceGetEvents; + static readonly StreamEvents: InputControllerServiceStreamEvents; + static readonly TriggerEvent: InputControllerServiceTriggerEvent; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class InputControllerServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getControls( + requestMessage: component_inputcontroller_v1_input_controller_pb.GetControlsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_inputcontroller_v1_input_controller_pb.GetControlsResponse|null) => void + ): UnaryResponse; + getControls( + requestMessage: component_inputcontroller_v1_input_controller_pb.GetControlsRequest, + callback: (error: ServiceError|null, responseMessage: component_inputcontroller_v1_input_controller_pb.GetControlsResponse|null) => void + ): UnaryResponse; + getEvents( + requestMessage: component_inputcontroller_v1_input_controller_pb.GetEventsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_inputcontroller_v1_input_controller_pb.GetEventsResponse|null) => void + ): UnaryResponse; + getEvents( + requestMessage: component_inputcontroller_v1_input_controller_pb.GetEventsRequest, + callback: (error: ServiceError|null, responseMessage: component_inputcontroller_v1_input_controller_pb.GetEventsResponse|null) => void + ): UnaryResponse; + streamEvents(requestMessage: component_inputcontroller_v1_input_controller_pb.StreamEventsRequest, metadata?: grpc.Metadata): ResponseStream; + triggerEvent( + requestMessage: component_inputcontroller_v1_input_controller_pb.TriggerEventRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_inputcontroller_v1_input_controller_pb.TriggerEventResponse|null) => void + ): UnaryResponse; + triggerEvent( + requestMessage: component_inputcontroller_v1_input_controller_pb.TriggerEventRequest, + callback: (error: ServiceError|null, responseMessage: component_inputcontroller_v1_input_controller_pb.TriggerEventResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/inputcontroller/v1/input_controller_pb_service.js b/gen/js/component/inputcontroller/v1/input_controller_pb_service.js new file mode 100644 index 000000000..d46c0ea26 --- /dev/null +++ b/gen/js/component/inputcontroller/v1/input_controller_pb_service.js @@ -0,0 +1,189 @@ +// package: viam.component.inputcontroller.v1 +// file: component/inputcontroller/v1/input_controller.proto + +var component_inputcontroller_v1_input_controller_pb = require("../../../component/inputcontroller/v1/input_controller_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var InputControllerService = (function () { + function InputControllerService() {} + InputControllerService.serviceName = "viam.component.inputcontroller.v1.InputControllerService"; + return InputControllerService; +}()); + +InputControllerService.GetControls = { + methodName: "GetControls", + service: InputControllerService, + requestStream: false, + responseStream: false, + requestType: component_inputcontroller_v1_input_controller_pb.GetControlsRequest, + responseType: component_inputcontroller_v1_input_controller_pb.GetControlsResponse +}; + +InputControllerService.GetEvents = { + methodName: "GetEvents", + service: InputControllerService, + requestStream: false, + responseStream: false, + requestType: component_inputcontroller_v1_input_controller_pb.GetEventsRequest, + responseType: component_inputcontroller_v1_input_controller_pb.GetEventsResponse +}; + +InputControllerService.StreamEvents = { + methodName: "StreamEvents", + service: InputControllerService, + requestStream: false, + responseStream: true, + requestType: component_inputcontroller_v1_input_controller_pb.StreamEventsRequest, + responseType: component_inputcontroller_v1_input_controller_pb.StreamEventsResponse +}; + +InputControllerService.TriggerEvent = { + methodName: "TriggerEvent", + service: InputControllerService, + requestStream: false, + responseStream: false, + requestType: component_inputcontroller_v1_input_controller_pb.TriggerEventRequest, + responseType: component_inputcontroller_v1_input_controller_pb.TriggerEventResponse +}; + +exports.InputControllerService = InputControllerService; + +function InputControllerServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +InputControllerServiceClient.prototype.getControls = function getControls(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(InputControllerService.GetControls, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +InputControllerServiceClient.prototype.getEvents = function getEvents(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(InputControllerService.GetEvents, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +InputControllerServiceClient.prototype.streamEvents = function streamEvents(requestMessage, metadata) { + var listeners = { + data: [], + end: [], + status: [] + }; + var client = grpc.invoke(InputControllerService.StreamEvents, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onMessage: function (responseMessage) { + listeners.data.forEach(function (handler) { + handler(responseMessage); + }); + }, + onEnd: function (status, statusMessage, trailers) { + listeners.status.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners.end.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners = null; + } + }); + return { + on: function (type, handler) { + listeners[type].push(handler); + return this; + }, + cancel: function () { + listeners = null; + client.close(); + } + }; +}; + +InputControllerServiceClient.prototype.triggerEvent = function triggerEvent(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(InputControllerService.TriggerEvent, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.InputControllerServiceClient = InputControllerServiceClient; + diff --git a/gen/js/component/motor/v1/motor_grpc_web_pb.js b/gen/js/component/motor/v1/motor_grpc_web_pb.js new file mode 100644 index 000000000..4e71b7d38 --- /dev/null +++ b/gen/js/component/motor/v1/motor_grpc_web_pb.js @@ -0,0 +1,569 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.motor.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.motor = {}; +proto.viam.component.motor.v1 = require('./motor_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.motor.v1.MotorServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.motor.v1.MotorServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.motor.v1.SetPowerRequest, + * !proto.viam.component.motor.v1.SetPowerResponse>} + */ +const methodDescriptor_MotorService_SetPower = new grpc.web.MethodDescriptor( + '/viam.component.motor.v1.MotorService/SetPower', + grpc.web.MethodType.UNARY, + proto.viam.component.motor.v1.SetPowerRequest, + proto.viam.component.motor.v1.SetPowerResponse, + /** + * @param {!proto.viam.component.motor.v1.SetPowerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.motor.v1.SetPowerResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.motor.v1.SetPowerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.motor.v1.SetPowerResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.motor.v1.MotorServiceClient.prototype.setPower = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/SetPower', + request, + metadata || {}, + methodDescriptor_MotorService_SetPower, + callback); +}; + + +/** + * @param {!proto.viam.component.motor.v1.SetPowerRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.setPower = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/SetPower', + request, + metadata || {}, + methodDescriptor_MotorService_SetPower); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.motor.v1.GoForRequest, + * !proto.viam.component.motor.v1.GoForResponse>} + */ +const methodDescriptor_MotorService_GoFor = new grpc.web.MethodDescriptor( + '/viam.component.motor.v1.MotorService/GoFor', + grpc.web.MethodType.UNARY, + proto.viam.component.motor.v1.GoForRequest, + proto.viam.component.motor.v1.GoForResponse, + /** + * @param {!proto.viam.component.motor.v1.GoForRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.motor.v1.GoForResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.motor.v1.GoForRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.motor.v1.GoForResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.motor.v1.MotorServiceClient.prototype.goFor = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GoFor', + request, + metadata || {}, + methodDescriptor_MotorService_GoFor, + callback); +}; + + +/** + * @param {!proto.viam.component.motor.v1.GoForRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.goFor = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GoFor', + request, + metadata || {}, + methodDescriptor_MotorService_GoFor); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.motor.v1.GoToRequest, + * !proto.viam.component.motor.v1.GoToResponse>} + */ +const methodDescriptor_MotorService_GoTo = new grpc.web.MethodDescriptor( + '/viam.component.motor.v1.MotorService/GoTo', + grpc.web.MethodType.UNARY, + proto.viam.component.motor.v1.GoToRequest, + proto.viam.component.motor.v1.GoToResponse, + /** + * @param {!proto.viam.component.motor.v1.GoToRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.motor.v1.GoToResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.motor.v1.GoToRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.motor.v1.GoToResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.motor.v1.MotorServiceClient.prototype.goTo = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GoTo', + request, + metadata || {}, + methodDescriptor_MotorService_GoTo, + callback); +}; + + +/** + * @param {!proto.viam.component.motor.v1.GoToRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.goTo = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GoTo', + request, + metadata || {}, + methodDescriptor_MotorService_GoTo); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.motor.v1.ResetZeroPositionRequest, + * !proto.viam.component.motor.v1.ResetZeroPositionResponse>} + */ +const methodDescriptor_MotorService_ResetZeroPosition = new grpc.web.MethodDescriptor( + '/viam.component.motor.v1.MotorService/ResetZeroPosition', + grpc.web.MethodType.UNARY, + proto.viam.component.motor.v1.ResetZeroPositionRequest, + proto.viam.component.motor.v1.ResetZeroPositionResponse, + /** + * @param {!proto.viam.component.motor.v1.ResetZeroPositionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.motor.v1.ResetZeroPositionResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.motor.v1.ResetZeroPositionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.motor.v1.ResetZeroPositionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.motor.v1.MotorServiceClient.prototype.resetZeroPosition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/ResetZeroPosition', + request, + metadata || {}, + methodDescriptor_MotorService_ResetZeroPosition, + callback); +}; + + +/** + * @param {!proto.viam.component.motor.v1.ResetZeroPositionRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.resetZeroPosition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/ResetZeroPosition', + request, + metadata || {}, + methodDescriptor_MotorService_ResetZeroPosition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.motor.v1.GetPositionRequest, + * !proto.viam.component.motor.v1.GetPositionResponse>} + */ +const methodDescriptor_MotorService_GetPosition = new grpc.web.MethodDescriptor( + '/viam.component.motor.v1.MotorService/GetPosition', + grpc.web.MethodType.UNARY, + proto.viam.component.motor.v1.GetPositionRequest, + proto.viam.component.motor.v1.GetPositionResponse, + /** + * @param {!proto.viam.component.motor.v1.GetPositionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.motor.v1.GetPositionResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.motor.v1.GetPositionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.motor.v1.GetPositionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.motor.v1.MotorServiceClient.prototype.getPosition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GetPosition', + request, + metadata || {}, + methodDescriptor_MotorService_GetPosition, + callback); +}; + + +/** + * @param {!proto.viam.component.motor.v1.GetPositionRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.getPosition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GetPosition', + request, + metadata || {}, + methodDescriptor_MotorService_GetPosition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.motor.v1.GetPropertiesRequest, + * !proto.viam.component.motor.v1.GetPropertiesResponse>} + */ +const methodDescriptor_MotorService_GetProperties = new grpc.web.MethodDescriptor( + '/viam.component.motor.v1.MotorService/GetProperties', + grpc.web.MethodType.UNARY, + proto.viam.component.motor.v1.GetPropertiesRequest, + proto.viam.component.motor.v1.GetPropertiesResponse, + /** + * @param {!proto.viam.component.motor.v1.GetPropertiesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.motor.v1.GetPropertiesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.motor.v1.GetPropertiesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.motor.v1.GetPropertiesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.motor.v1.MotorServiceClient.prototype.getProperties = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GetProperties', + request, + metadata || {}, + methodDescriptor_MotorService_GetProperties, + callback); +}; + + +/** + * @param {!proto.viam.component.motor.v1.GetPropertiesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.getProperties = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/GetProperties', + request, + metadata || {}, + methodDescriptor_MotorService_GetProperties); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.motor.v1.StopRequest, + * !proto.viam.component.motor.v1.StopResponse>} + */ +const methodDescriptor_MotorService_Stop = new grpc.web.MethodDescriptor( + '/viam.component.motor.v1.MotorService/Stop', + grpc.web.MethodType.UNARY, + proto.viam.component.motor.v1.StopRequest, + proto.viam.component.motor.v1.StopResponse, + /** + * @param {!proto.viam.component.motor.v1.StopRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.motor.v1.StopResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.motor.v1.StopRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.motor.v1.StopResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.motor.v1.MotorServiceClient.prototype.stop = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/Stop', + request, + metadata || {}, + methodDescriptor_MotorService_Stop, + callback); +}; + + +/** + * @param {!proto.viam.component.motor.v1.StopRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.stop = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/Stop', + request, + metadata || {}, + methodDescriptor_MotorService_Stop); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.motor.v1.IsPoweredRequest, + * !proto.viam.component.motor.v1.IsPoweredResponse>} + */ +const methodDescriptor_MotorService_IsPowered = new grpc.web.MethodDescriptor( + '/viam.component.motor.v1.MotorService/IsPowered', + grpc.web.MethodType.UNARY, + proto.viam.component.motor.v1.IsPoweredRequest, + proto.viam.component.motor.v1.IsPoweredResponse, + /** + * @param {!proto.viam.component.motor.v1.IsPoweredRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.motor.v1.IsPoweredResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.motor.v1.IsPoweredRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.motor.v1.IsPoweredResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.motor.v1.MotorServiceClient.prototype.isPowered = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/IsPowered', + request, + metadata || {}, + methodDescriptor_MotorService_IsPowered, + callback); +}; + + +/** + * @param {!proto.viam.component.motor.v1.IsPoweredRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.motor.v1.MotorServicePromiseClient.prototype.isPowered = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.motor.v1.MotorService/IsPowered', + request, + metadata || {}, + methodDescriptor_MotorService_IsPowered); +}; + + +module.exports = proto.viam.component.motor.v1; + diff --git a/gen/js/component/motor/v1/motor_pb.d.ts b/gen/js/component/motor/v1/motor_pb.d.ts new file mode 100644 index 000000000..0534d361f --- /dev/null +++ b/gen/js/component/motor/v1/motor_pb.d.ts @@ -0,0 +1,411 @@ +// package: viam.component.motor.v1 +// file: component/motor/v1/motor.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class SetPowerRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getPowerPct(): number; + setPowerPct(value: number): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetPowerRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetPowerRequest): SetPowerRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetPowerRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetPowerRequest; + static deserializeBinaryFromReader(message: SetPowerRequest, reader: jspb.BinaryReader): SetPowerRequest; +} + +export namespace SetPowerRequest { + export type AsObject = { + name: string, + powerPct: number, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class SetPowerResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetPowerResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetPowerResponse): SetPowerResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetPowerResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetPowerResponse; + static deserializeBinaryFromReader(message: SetPowerResponse, reader: jspb.BinaryReader): SetPowerResponse; +} + +export namespace SetPowerResponse { + export type AsObject = { + } +} + +export class GoForRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getRpm(): number; + setRpm(value: number): void; + + getRevolutions(): number; + setRevolutions(value: number): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GoForRequest.AsObject; + static toObject(includeInstance: boolean, msg: GoForRequest): GoForRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GoForRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GoForRequest; + static deserializeBinaryFromReader(message: GoForRequest, reader: jspb.BinaryReader): GoForRequest; +} + +export namespace GoForRequest { + export type AsObject = { + name: string, + rpm: number, + revolutions: number, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GoForResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GoForResponse.AsObject; + static toObject(includeInstance: boolean, msg: GoForResponse): GoForResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GoForResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GoForResponse; + static deserializeBinaryFromReader(message: GoForResponse, reader: jspb.BinaryReader): GoForResponse; +} + +export namespace GoForResponse { + export type AsObject = { + } +} + +export class GoToRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getRpm(): number; + setRpm(value: number): void; + + getPositionRevolutions(): number; + setPositionRevolutions(value: number): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GoToRequest.AsObject; + static toObject(includeInstance: boolean, msg: GoToRequest): GoToRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GoToRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GoToRequest; + static deserializeBinaryFromReader(message: GoToRequest, reader: jspb.BinaryReader): GoToRequest; +} + +export namespace GoToRequest { + export type AsObject = { + name: string, + rpm: number, + positionRevolutions: number, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GoToResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GoToResponse.AsObject; + static toObject(includeInstance: boolean, msg: GoToResponse): GoToResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GoToResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GoToResponse; + static deserializeBinaryFromReader(message: GoToResponse, reader: jspb.BinaryReader): GoToResponse; +} + +export namespace GoToResponse { + export type AsObject = { + } +} + +export class ResetZeroPositionRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getOffset(): number; + setOffset(value: number): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResetZeroPositionRequest.AsObject; + static toObject(includeInstance: boolean, msg: ResetZeroPositionRequest): ResetZeroPositionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResetZeroPositionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResetZeroPositionRequest; + static deserializeBinaryFromReader(message: ResetZeroPositionRequest, reader: jspb.BinaryReader): ResetZeroPositionRequest; +} + +export namespace ResetZeroPositionRequest { + export type AsObject = { + name: string, + offset: number, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class ResetZeroPositionResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResetZeroPositionResponse.AsObject; + static toObject(includeInstance: boolean, msg: ResetZeroPositionResponse): ResetZeroPositionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResetZeroPositionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResetZeroPositionResponse; + static deserializeBinaryFromReader(message: ResetZeroPositionResponse, reader: jspb.BinaryReader): ResetZeroPositionResponse; +} + +export namespace ResetZeroPositionResponse { + export type AsObject = { + } +} + +export class GetPositionRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionRequest): GetPositionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionRequest; + static deserializeBinaryFromReader(message: GetPositionRequest, reader: jspb.BinaryReader): GetPositionRequest; +} + +export namespace GetPositionRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetPositionResponse extends jspb.Message { + getPosition(): number; + setPosition(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionResponse): GetPositionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionResponse; + static deserializeBinaryFromReader(message: GetPositionResponse, reader: jspb.BinaryReader): GetPositionResponse; +} + +export namespace GetPositionResponse { + export type AsObject = { + position: number, + } +} + +export class StopRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopRequest.AsObject; + static toObject(includeInstance: boolean, msg: StopRequest): StopRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopRequest; + static deserializeBinaryFromReader(message: StopRequest, reader: jspb.BinaryReader): StopRequest; +} + +export namespace StopRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class StopResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopResponse.AsObject; + static toObject(includeInstance: boolean, msg: StopResponse): StopResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopResponse; + static deserializeBinaryFromReader(message: StopResponse, reader: jspb.BinaryReader): StopResponse; +} + +export namespace StopResponse { + export type AsObject = { + } +} + +export class IsPoweredRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IsPoweredRequest.AsObject; + static toObject(includeInstance: boolean, msg: IsPoweredRequest): IsPoweredRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IsPoweredRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IsPoweredRequest; + static deserializeBinaryFromReader(message: IsPoweredRequest, reader: jspb.BinaryReader): IsPoweredRequest; +} + +export namespace IsPoweredRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class IsPoweredResponse extends jspb.Message { + getIsOn(): boolean; + setIsOn(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IsPoweredResponse.AsObject; + static toObject(includeInstance: boolean, msg: IsPoweredResponse): IsPoweredResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IsPoweredResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IsPoweredResponse; + static deserializeBinaryFromReader(message: IsPoweredResponse, reader: jspb.BinaryReader): IsPoweredResponse; +} + +export namespace IsPoweredResponse { + export type AsObject = { + isOn: boolean, + } +} + +export class GetPropertiesRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPropertiesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPropertiesRequest): GetPropertiesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPropertiesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPropertiesRequest; + static deserializeBinaryFromReader(message: GetPropertiesRequest, reader: jspb.BinaryReader): GetPropertiesRequest; +} + +export namespace GetPropertiesRequest { + export type AsObject = { + name: string, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetPropertiesResponse extends jspb.Message { + getPositionReporting(): boolean; + setPositionReporting(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPropertiesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPropertiesResponse): GetPropertiesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPropertiesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPropertiesResponse; + static deserializeBinaryFromReader(message: GetPropertiesResponse, reader: jspb.BinaryReader): GetPropertiesResponse; +} + +export namespace GetPropertiesResponse { + export type AsObject = { + positionReporting: boolean, + } +} + +export class Status extends jspb.Message { + getIsPowered(): boolean; + setIsPowered(value: boolean): void; + + getPositionReporting(): boolean; + setPositionReporting(value: boolean): void; + + getPosition(): number; + setPosition(value: number): void; + + getIsMoving(): boolean; + setIsMoving(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; +} + +export namespace Status { + export type AsObject = { + isPowered: boolean, + positionReporting: boolean, + position: number, + isMoving: boolean, + } +} + diff --git a/gen/js/component/motor/v1/motor_pb.js b/gen/js/component/motor/v1/motor_pb.js new file mode 100644 index 000000000..42eef9286 --- /dev/null +++ b/gen/js/component/motor/v1/motor_pb.js @@ -0,0 +1,3139 @@ +// source: component/motor/v1/motor.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.component.motor.v1.GetPositionRequest', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.GetPositionResponse', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.GetPropertiesRequest', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.GetPropertiesResponse', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.GoForRequest', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.GoForResponse', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.GoToRequest', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.GoToResponse', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.IsPoweredRequest', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.IsPoweredResponse', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.ResetZeroPositionRequest', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.ResetZeroPositionResponse', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.SetPowerRequest', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.SetPowerResponse', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.Status', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.StopRequest', null, global); +goog.exportSymbol('proto.viam.component.motor.v1.StopResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.SetPowerRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.SetPowerRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.SetPowerRequest.displayName = 'proto.viam.component.motor.v1.SetPowerRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.SetPowerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.SetPowerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.SetPowerResponse.displayName = 'proto.viam.component.motor.v1.SetPowerResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.GoForRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.GoForRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.GoForRequest.displayName = 'proto.viam.component.motor.v1.GoForRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.GoForResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.GoForResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.GoForResponse.displayName = 'proto.viam.component.motor.v1.GoForResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.GoToRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.GoToRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.GoToRequest.displayName = 'proto.viam.component.motor.v1.GoToRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.GoToResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.GoToResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.GoToResponse.displayName = 'proto.viam.component.motor.v1.GoToResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.ResetZeroPositionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.ResetZeroPositionRequest.displayName = 'proto.viam.component.motor.v1.ResetZeroPositionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.ResetZeroPositionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.ResetZeroPositionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.ResetZeroPositionResponse.displayName = 'proto.viam.component.motor.v1.ResetZeroPositionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.GetPositionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.GetPositionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.GetPositionRequest.displayName = 'proto.viam.component.motor.v1.GetPositionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.GetPositionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.GetPositionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.GetPositionResponse.displayName = 'proto.viam.component.motor.v1.GetPositionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.StopRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.StopRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.StopRequest.displayName = 'proto.viam.component.motor.v1.StopRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.StopResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.StopResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.StopResponse.displayName = 'proto.viam.component.motor.v1.StopResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.IsPoweredRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.IsPoweredRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.IsPoweredRequest.displayName = 'proto.viam.component.motor.v1.IsPoweredRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.IsPoweredResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.IsPoweredResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.IsPoweredResponse.displayName = 'proto.viam.component.motor.v1.IsPoweredResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.GetPropertiesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.GetPropertiesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.GetPropertiesRequest.displayName = 'proto.viam.component.motor.v1.GetPropertiesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.GetPropertiesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.GetPropertiesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.GetPropertiesResponse.displayName = 'proto.viam.component.motor.v1.GetPropertiesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.motor.v1.Status = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.motor.v1.Status, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.motor.v1.Status.displayName = 'proto.viam.component.motor.v1.Status'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.SetPowerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.SetPowerRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.SetPowerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.SetPowerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + powerPct: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.SetPowerRequest} + */ +proto.viam.component.motor.v1.SetPowerRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.SetPowerRequest; + return proto.viam.component.motor.v1.SetPowerRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.SetPowerRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.SetPowerRequest} + */ +proto.viam.component.motor.v1.SetPowerRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setPowerPct(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.SetPowerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.SetPowerRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.SetPowerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.SetPowerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPowerPct(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.motor.v1.SetPowerRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.motor.v1.SetPowerRequest} returns this + */ +proto.viam.component.motor.v1.SetPowerRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional double power_pct = 2; + * @return {number} + */ +proto.viam.component.motor.v1.SetPowerRequest.prototype.getPowerPct = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.motor.v1.SetPowerRequest} returns this + */ +proto.viam.component.motor.v1.SetPowerRequest.prototype.setPowerPct = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.motor.v1.SetPowerRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.motor.v1.SetPowerRequest} returns this +*/ +proto.viam.component.motor.v1.SetPowerRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.motor.v1.SetPowerRequest} returns this + */ +proto.viam.component.motor.v1.SetPowerRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.motor.v1.SetPowerRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.SetPowerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.SetPowerResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.SetPowerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.SetPowerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.SetPowerResponse} + */ +proto.viam.component.motor.v1.SetPowerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.SetPowerResponse; + return proto.viam.component.motor.v1.SetPowerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.SetPowerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.SetPowerResponse} + */ +proto.viam.component.motor.v1.SetPowerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.SetPowerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.SetPowerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.SetPowerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.SetPowerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.GoForRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.GoForRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.GoForRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GoForRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + rpm: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + revolutions: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.GoForRequest} + */ +proto.viam.component.motor.v1.GoForRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.GoForRequest; + return proto.viam.component.motor.v1.GoForRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.GoForRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.GoForRequest} + */ +proto.viam.component.motor.v1.GoForRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setRpm(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setRevolutions(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.GoForRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.GoForRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.GoForRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GoForRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRpm(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getRevolutions(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.motor.v1.GoForRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.motor.v1.GoForRequest} returns this + */ +proto.viam.component.motor.v1.GoForRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional double rpm = 2; + * @return {number} + */ +proto.viam.component.motor.v1.GoForRequest.prototype.getRpm = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.motor.v1.GoForRequest} returns this + */ +proto.viam.component.motor.v1.GoForRequest.prototype.setRpm = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double revolutions = 3; + * @return {number} + */ +proto.viam.component.motor.v1.GoForRequest.prototype.getRevolutions = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.motor.v1.GoForRequest} returns this + */ +proto.viam.component.motor.v1.GoForRequest.prototype.setRevolutions = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.motor.v1.GoForRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.motor.v1.GoForRequest} returns this +*/ +proto.viam.component.motor.v1.GoForRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.motor.v1.GoForRequest} returns this + */ +proto.viam.component.motor.v1.GoForRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.motor.v1.GoForRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.GoForResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.GoForResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.GoForResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GoForResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.GoForResponse} + */ +proto.viam.component.motor.v1.GoForResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.GoForResponse; + return proto.viam.component.motor.v1.GoForResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.GoForResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.GoForResponse} + */ +proto.viam.component.motor.v1.GoForResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.GoForResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.GoForResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.GoForResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GoForResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.GoToRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.GoToRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.GoToRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GoToRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + rpm: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + positionRevolutions: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.GoToRequest} + */ +proto.viam.component.motor.v1.GoToRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.GoToRequest; + return proto.viam.component.motor.v1.GoToRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.GoToRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.GoToRequest} + */ +proto.viam.component.motor.v1.GoToRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setRpm(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setPositionRevolutions(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.GoToRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.GoToRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.GoToRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GoToRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRpm(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getPositionRevolutions(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.motor.v1.GoToRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.motor.v1.GoToRequest} returns this + */ +proto.viam.component.motor.v1.GoToRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional double rpm = 2; + * @return {number} + */ +proto.viam.component.motor.v1.GoToRequest.prototype.getRpm = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.motor.v1.GoToRequest} returns this + */ +proto.viam.component.motor.v1.GoToRequest.prototype.setRpm = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double position_revolutions = 3; + * @return {number} + */ +proto.viam.component.motor.v1.GoToRequest.prototype.getPositionRevolutions = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.motor.v1.GoToRequest} returns this + */ +proto.viam.component.motor.v1.GoToRequest.prototype.setPositionRevolutions = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.motor.v1.GoToRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.motor.v1.GoToRequest} returns this +*/ +proto.viam.component.motor.v1.GoToRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.motor.v1.GoToRequest} returns this + */ +proto.viam.component.motor.v1.GoToRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.motor.v1.GoToRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.GoToResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.GoToResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.GoToResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GoToResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.GoToResponse} + */ +proto.viam.component.motor.v1.GoToResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.GoToResponse; + return proto.viam.component.motor.v1.GoToResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.GoToResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.GoToResponse} + */ +proto.viam.component.motor.v1.GoToResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.GoToResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.GoToResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.GoToResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GoToResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.ResetZeroPositionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.ResetZeroPositionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + offset: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.ResetZeroPositionRequest} + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.ResetZeroPositionRequest; + return proto.viam.component.motor.v1.ResetZeroPositionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.ResetZeroPositionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.ResetZeroPositionRequest} + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setOffset(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.ResetZeroPositionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.ResetZeroPositionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOffset(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.motor.v1.ResetZeroPositionRequest} returns this + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional double offset = 2; + * @return {number} + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.motor.v1.ResetZeroPositionRequest} returns this + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.setOffset = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.motor.v1.ResetZeroPositionRequest} returns this +*/ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.motor.v1.ResetZeroPositionRequest} returns this + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.motor.v1.ResetZeroPositionRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.ResetZeroPositionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.ResetZeroPositionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.ResetZeroPositionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.ResetZeroPositionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.ResetZeroPositionResponse} + */ +proto.viam.component.motor.v1.ResetZeroPositionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.ResetZeroPositionResponse; + return proto.viam.component.motor.v1.ResetZeroPositionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.ResetZeroPositionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.ResetZeroPositionResponse} + */ +proto.viam.component.motor.v1.ResetZeroPositionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.ResetZeroPositionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.ResetZeroPositionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.ResetZeroPositionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.ResetZeroPositionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.GetPositionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.GetPositionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.GetPositionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GetPositionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.GetPositionRequest} + */ +proto.viam.component.motor.v1.GetPositionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.GetPositionRequest; + return proto.viam.component.motor.v1.GetPositionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.GetPositionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.GetPositionRequest} + */ +proto.viam.component.motor.v1.GetPositionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.GetPositionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.GetPositionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.GetPositionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GetPositionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.motor.v1.GetPositionRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.motor.v1.GetPositionRequest} returns this + */ +proto.viam.component.motor.v1.GetPositionRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.motor.v1.GetPositionRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.motor.v1.GetPositionRequest} returns this +*/ +proto.viam.component.motor.v1.GetPositionRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.motor.v1.GetPositionRequest} returns this + */ +proto.viam.component.motor.v1.GetPositionRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.motor.v1.GetPositionRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.GetPositionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.GetPositionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.GetPositionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GetPositionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + position: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.GetPositionResponse} + */ +proto.viam.component.motor.v1.GetPositionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.GetPositionResponse; + return proto.viam.component.motor.v1.GetPositionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.GetPositionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.GetPositionResponse} + */ +proto.viam.component.motor.v1.GetPositionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setPosition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.GetPositionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.GetPositionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.GetPositionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GetPositionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPosition(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } +}; + + +/** + * optional double position = 1; + * @return {number} + */ +proto.viam.component.motor.v1.GetPositionResponse.prototype.getPosition = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.motor.v1.GetPositionResponse} returns this + */ +proto.viam.component.motor.v1.GetPositionResponse.prototype.setPosition = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.StopRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.StopRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.StopRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.StopRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.StopRequest} + */ +proto.viam.component.motor.v1.StopRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.StopRequest; + return proto.viam.component.motor.v1.StopRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.StopRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.StopRequest} + */ +proto.viam.component.motor.v1.StopRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.StopRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.StopRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.StopRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.StopRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.motor.v1.StopRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.motor.v1.StopRequest} returns this + */ +proto.viam.component.motor.v1.StopRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.motor.v1.StopRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.motor.v1.StopRequest} returns this +*/ +proto.viam.component.motor.v1.StopRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.motor.v1.StopRequest} returns this + */ +proto.viam.component.motor.v1.StopRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.motor.v1.StopRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.StopResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.StopResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.StopResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.StopResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.StopResponse} + */ +proto.viam.component.motor.v1.StopResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.StopResponse; + return proto.viam.component.motor.v1.StopResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.StopResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.StopResponse} + */ +proto.viam.component.motor.v1.StopResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.StopResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.StopResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.StopResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.StopResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.IsPoweredRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.IsPoweredRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.IsPoweredRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.IsPoweredRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.IsPoweredRequest} + */ +proto.viam.component.motor.v1.IsPoweredRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.IsPoweredRequest; + return proto.viam.component.motor.v1.IsPoweredRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.IsPoweredRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.IsPoweredRequest} + */ +proto.viam.component.motor.v1.IsPoweredRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.IsPoweredRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.IsPoweredRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.IsPoweredRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.IsPoweredRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.motor.v1.IsPoweredRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.motor.v1.IsPoweredRequest} returns this + */ +proto.viam.component.motor.v1.IsPoweredRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.motor.v1.IsPoweredRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.motor.v1.IsPoweredRequest} returns this +*/ +proto.viam.component.motor.v1.IsPoweredRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.motor.v1.IsPoweredRequest} returns this + */ +proto.viam.component.motor.v1.IsPoweredRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.motor.v1.IsPoweredRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.IsPoweredResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.IsPoweredResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.IsPoweredResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.IsPoweredResponse.toObject = function(includeInstance, msg) { + var f, obj = { + isOn: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.IsPoweredResponse} + */ +proto.viam.component.motor.v1.IsPoweredResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.IsPoweredResponse; + return proto.viam.component.motor.v1.IsPoweredResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.IsPoweredResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.IsPoweredResponse} + */ +proto.viam.component.motor.v1.IsPoweredResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsOn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.IsPoweredResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.IsPoweredResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.IsPoweredResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.IsPoweredResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsOn(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool is_on = 1; + * @return {boolean} + */ +proto.viam.component.motor.v1.IsPoweredResponse.prototype.getIsOn = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.motor.v1.IsPoweredResponse} returns this + */ +proto.viam.component.motor.v1.IsPoweredResponse.prototype.setIsOn = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.GetPropertiesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.GetPropertiesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.GetPropertiesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GetPropertiesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.GetPropertiesRequest} + */ +proto.viam.component.motor.v1.GetPropertiesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.GetPropertiesRequest; + return proto.viam.component.motor.v1.GetPropertiesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.GetPropertiesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.GetPropertiesRequest} + */ +proto.viam.component.motor.v1.GetPropertiesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.GetPropertiesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.GetPropertiesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.GetPropertiesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GetPropertiesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.motor.v1.GetPropertiesRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.motor.v1.GetPropertiesRequest} returns this + */ +proto.viam.component.motor.v1.GetPropertiesRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.component.motor.v1.GetPropertiesRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.component.motor.v1.GetPropertiesRequest} returns this +*/ +proto.viam.component.motor.v1.GetPropertiesRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.motor.v1.GetPropertiesRequest} returns this + */ +proto.viam.component.motor.v1.GetPropertiesRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.motor.v1.GetPropertiesRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.GetPropertiesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.GetPropertiesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.GetPropertiesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GetPropertiesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + positionReporting: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.GetPropertiesResponse} + */ +proto.viam.component.motor.v1.GetPropertiesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.GetPropertiesResponse; + return proto.viam.component.motor.v1.GetPropertiesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.GetPropertiesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.GetPropertiesResponse} + */ +proto.viam.component.motor.v1.GetPropertiesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPositionReporting(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.GetPropertiesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.GetPropertiesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.GetPropertiesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.GetPropertiesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPositionReporting(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool position_reporting = 1; + * @return {boolean} + */ +proto.viam.component.motor.v1.GetPropertiesResponse.prototype.getPositionReporting = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.motor.v1.GetPropertiesResponse} returns this + */ +proto.viam.component.motor.v1.GetPropertiesResponse.prototype.setPositionReporting = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.motor.v1.Status.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.motor.v1.Status.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.motor.v1.Status} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.Status.toObject = function(includeInstance, msg) { + var f, obj = { + isPowered: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + positionReporting: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + position: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + isMoving: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.motor.v1.Status} + */ +proto.viam.component.motor.v1.Status.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.motor.v1.Status; + return proto.viam.component.motor.v1.Status.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.motor.v1.Status} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.motor.v1.Status} + */ +proto.viam.component.motor.v1.Status.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsPowered(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPositionReporting(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setPosition(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsMoving(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.motor.v1.Status.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.motor.v1.Status.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.motor.v1.Status} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.motor.v1.Status.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsPowered(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getPositionReporting(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getPosition(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getIsMoving(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional bool is_powered = 1; + * @return {boolean} + */ +proto.viam.component.motor.v1.Status.prototype.getIsPowered = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.motor.v1.Status} returns this + */ +proto.viam.component.motor.v1.Status.prototype.setIsPowered = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional bool position_reporting = 2; + * @return {boolean} + */ +proto.viam.component.motor.v1.Status.prototype.getPositionReporting = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.motor.v1.Status} returns this + */ +proto.viam.component.motor.v1.Status.prototype.setPositionReporting = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional double position = 3; + * @return {number} + */ +proto.viam.component.motor.v1.Status.prototype.getPosition = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.motor.v1.Status} returns this + */ +proto.viam.component.motor.v1.Status.prototype.setPosition = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional bool is_moving = 4; + * @return {boolean} + */ +proto.viam.component.motor.v1.Status.prototype.getIsMoving = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.motor.v1.Status} returns this + */ +proto.viam.component.motor.v1.Status.prototype.setIsMoving = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +goog.object.extend(exports, proto.viam.component.motor.v1); diff --git a/gen/js/component/motor/v1/motor_pb_service.d.ts b/gen/js/component/motor/v1/motor_pb_service.d.ts new file mode 100644 index 000000000..70ef1aaf4 --- /dev/null +++ b/gen/js/component/motor/v1/motor_pb_service.d.ts @@ -0,0 +1,196 @@ +// package: viam.component.motor.v1 +// file: component/motor/v1/motor.proto + +import * as component_motor_v1_motor_pb from "../../../component/motor/v1/motor_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MotorServiceSetPower = { + readonly methodName: string; + readonly service: typeof MotorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_motor_v1_motor_pb.SetPowerRequest; + readonly responseType: typeof component_motor_v1_motor_pb.SetPowerResponse; +}; + +type MotorServiceGoFor = { + readonly methodName: string; + readonly service: typeof MotorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_motor_v1_motor_pb.GoForRequest; + readonly responseType: typeof component_motor_v1_motor_pb.GoForResponse; +}; + +type MotorServiceGoTo = { + readonly methodName: string; + readonly service: typeof MotorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_motor_v1_motor_pb.GoToRequest; + readonly responseType: typeof component_motor_v1_motor_pb.GoToResponse; +}; + +type MotorServiceResetZeroPosition = { + readonly methodName: string; + readonly service: typeof MotorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_motor_v1_motor_pb.ResetZeroPositionRequest; + readonly responseType: typeof component_motor_v1_motor_pb.ResetZeroPositionResponse; +}; + +type MotorServiceGetPosition = { + readonly methodName: string; + readonly service: typeof MotorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_motor_v1_motor_pb.GetPositionRequest; + readonly responseType: typeof component_motor_v1_motor_pb.GetPositionResponse; +}; + +type MotorServiceGetProperties = { + readonly methodName: string; + readonly service: typeof MotorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_motor_v1_motor_pb.GetPropertiesRequest; + readonly responseType: typeof component_motor_v1_motor_pb.GetPropertiesResponse; +}; + +type MotorServiceStop = { + readonly methodName: string; + readonly service: typeof MotorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_motor_v1_motor_pb.StopRequest; + readonly responseType: typeof component_motor_v1_motor_pb.StopResponse; +}; + +type MotorServiceIsPowered = { + readonly methodName: string; + readonly service: typeof MotorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_motor_v1_motor_pb.IsPoweredRequest; + readonly responseType: typeof component_motor_v1_motor_pb.IsPoweredResponse; +}; + +export class MotorService { + static readonly serviceName: string; + static readonly SetPower: MotorServiceSetPower; + static readonly GoFor: MotorServiceGoFor; + static readonly GoTo: MotorServiceGoTo; + static readonly ResetZeroPosition: MotorServiceResetZeroPosition; + static readonly GetPosition: MotorServiceGetPosition; + static readonly GetProperties: MotorServiceGetProperties; + static readonly Stop: MotorServiceStop; + static readonly IsPowered: MotorServiceIsPowered; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MotorServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + setPower( + requestMessage: component_motor_v1_motor_pb.SetPowerRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.SetPowerResponse|null) => void + ): UnaryResponse; + setPower( + requestMessage: component_motor_v1_motor_pb.SetPowerRequest, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.SetPowerResponse|null) => void + ): UnaryResponse; + goFor( + requestMessage: component_motor_v1_motor_pb.GoForRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.GoForResponse|null) => void + ): UnaryResponse; + goFor( + requestMessage: component_motor_v1_motor_pb.GoForRequest, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.GoForResponse|null) => void + ): UnaryResponse; + goTo( + requestMessage: component_motor_v1_motor_pb.GoToRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.GoToResponse|null) => void + ): UnaryResponse; + goTo( + requestMessage: component_motor_v1_motor_pb.GoToRequest, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.GoToResponse|null) => void + ): UnaryResponse; + resetZeroPosition( + requestMessage: component_motor_v1_motor_pb.ResetZeroPositionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.ResetZeroPositionResponse|null) => void + ): UnaryResponse; + resetZeroPosition( + requestMessage: component_motor_v1_motor_pb.ResetZeroPositionRequest, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.ResetZeroPositionResponse|null) => void + ): UnaryResponse; + getPosition( + requestMessage: component_motor_v1_motor_pb.GetPositionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.GetPositionResponse|null) => void + ): UnaryResponse; + getPosition( + requestMessage: component_motor_v1_motor_pb.GetPositionRequest, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.GetPositionResponse|null) => void + ): UnaryResponse; + getProperties( + requestMessage: component_motor_v1_motor_pb.GetPropertiesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.GetPropertiesResponse|null) => void + ): UnaryResponse; + getProperties( + requestMessage: component_motor_v1_motor_pb.GetPropertiesRequest, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.GetPropertiesResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_motor_v1_motor_pb.StopRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.StopResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_motor_v1_motor_pb.StopRequest, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.StopResponse|null) => void + ): UnaryResponse; + isPowered( + requestMessage: component_motor_v1_motor_pb.IsPoweredRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.IsPoweredResponse|null) => void + ): UnaryResponse; + isPowered( + requestMessage: component_motor_v1_motor_pb.IsPoweredRequest, + callback: (error: ServiceError|null, responseMessage: component_motor_v1_motor_pb.IsPoweredResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/motor/v1/motor_pb_service.js b/gen/js/component/motor/v1/motor_pb_service.js new file mode 100644 index 000000000..bbd0fbc33 --- /dev/null +++ b/gen/js/component/motor/v1/motor_pb_service.js @@ -0,0 +1,341 @@ +// package: viam.component.motor.v1 +// file: component/motor/v1/motor.proto + +var component_motor_v1_motor_pb = require("../../../component/motor/v1/motor_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var MotorService = (function () { + function MotorService() {} + MotorService.serviceName = "viam.component.motor.v1.MotorService"; + return MotorService; +}()); + +MotorService.SetPower = { + methodName: "SetPower", + service: MotorService, + requestStream: false, + responseStream: false, + requestType: component_motor_v1_motor_pb.SetPowerRequest, + responseType: component_motor_v1_motor_pb.SetPowerResponse +}; + +MotorService.GoFor = { + methodName: "GoFor", + service: MotorService, + requestStream: false, + responseStream: false, + requestType: component_motor_v1_motor_pb.GoForRequest, + responseType: component_motor_v1_motor_pb.GoForResponse +}; + +MotorService.GoTo = { + methodName: "GoTo", + service: MotorService, + requestStream: false, + responseStream: false, + requestType: component_motor_v1_motor_pb.GoToRequest, + responseType: component_motor_v1_motor_pb.GoToResponse +}; + +MotorService.ResetZeroPosition = { + methodName: "ResetZeroPosition", + service: MotorService, + requestStream: false, + responseStream: false, + requestType: component_motor_v1_motor_pb.ResetZeroPositionRequest, + responseType: component_motor_v1_motor_pb.ResetZeroPositionResponse +}; + +MotorService.GetPosition = { + methodName: "GetPosition", + service: MotorService, + requestStream: false, + responseStream: false, + requestType: component_motor_v1_motor_pb.GetPositionRequest, + responseType: component_motor_v1_motor_pb.GetPositionResponse +}; + +MotorService.GetProperties = { + methodName: "GetProperties", + service: MotorService, + requestStream: false, + responseStream: false, + requestType: component_motor_v1_motor_pb.GetPropertiesRequest, + responseType: component_motor_v1_motor_pb.GetPropertiesResponse +}; + +MotorService.Stop = { + methodName: "Stop", + service: MotorService, + requestStream: false, + responseStream: false, + requestType: component_motor_v1_motor_pb.StopRequest, + responseType: component_motor_v1_motor_pb.StopResponse +}; + +MotorService.IsPowered = { + methodName: "IsPowered", + service: MotorService, + requestStream: false, + responseStream: false, + requestType: component_motor_v1_motor_pb.IsPoweredRequest, + responseType: component_motor_v1_motor_pb.IsPoweredResponse +}; + +exports.MotorService = MotorService; + +function MotorServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MotorServiceClient.prototype.setPower = function setPower(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotorService.SetPower, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MotorServiceClient.prototype.goFor = function goFor(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotorService.GoFor, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MotorServiceClient.prototype.goTo = function goTo(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotorService.GoTo, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MotorServiceClient.prototype.resetZeroPosition = function resetZeroPosition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotorService.ResetZeroPosition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MotorServiceClient.prototype.getPosition = function getPosition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotorService.GetPosition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MotorServiceClient.prototype.getProperties = function getProperties(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotorService.GetProperties, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MotorServiceClient.prototype.stop = function stop(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotorService.Stop, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MotorServiceClient.prototype.isPowered = function isPowered(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotorService.IsPowered, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MotorServiceClient = MotorServiceClient; + diff --git a/gen/js/component/movementsensor/v1/movementsensor_grpc_web_pb.js b/gen/js/component/movementsensor/v1/movementsensor_grpc_web_pb.js new file mode 100644 index 000000000..638e37529 --- /dev/null +++ b/gen/js/component/movementsensor/v1/movementsensor_grpc_web_pb.js @@ -0,0 +1,508 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.movementsensor.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.movementsensor = {}; +proto.viam.component.movementsensor.v1 = require('./movementsensor_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.movementsensor.v1.MovementSensorServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.movementsensor.v1.GetLinearVelocityRequest, + * !proto.viam.component.movementsensor.v1.GetLinearVelocityResponse>} + */ +const methodDescriptor_MovementSensorService_GetLinearVelocity = new grpc.web.MethodDescriptor( + '/viam.component.movementsensor.v1.MovementSensorService/GetLinearVelocity', + grpc.web.MethodType.UNARY, + proto.viam.component.movementsensor.v1.GetLinearVelocityRequest, + proto.viam.component.movementsensor.v1.GetLinearVelocityResponse, + /** + * @param {!proto.viam.component.movementsensor.v1.GetLinearVelocityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetLinearVelocityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.movementsensor.v1.GetLinearVelocityResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.movementsensor.v1.MovementSensorServiceClient.prototype.getLinearVelocity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetLinearVelocity', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetLinearVelocity, + callback); +}; + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetLinearVelocityRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient.prototype.getLinearVelocity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetLinearVelocity', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetLinearVelocity); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.movementsensor.v1.GetAngularVelocityRequest, + * !proto.viam.component.movementsensor.v1.GetAngularVelocityResponse>} + */ +const methodDescriptor_MovementSensorService_GetAngularVelocity = new grpc.web.MethodDescriptor( + '/viam.component.movementsensor.v1.MovementSensorService/GetAngularVelocity', + grpc.web.MethodType.UNARY, + proto.viam.component.movementsensor.v1.GetAngularVelocityRequest, + proto.viam.component.movementsensor.v1.GetAngularVelocityResponse, + /** + * @param {!proto.viam.component.movementsensor.v1.GetAngularVelocityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetAngularVelocityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.movementsensor.v1.GetAngularVelocityResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.movementsensor.v1.MovementSensorServiceClient.prototype.getAngularVelocity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetAngularVelocity', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetAngularVelocity, + callback); +}; + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetAngularVelocityRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient.prototype.getAngularVelocity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetAngularVelocity', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetAngularVelocity); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.movementsensor.v1.GetCompassHeadingRequest, + * !proto.viam.component.movementsensor.v1.GetCompassHeadingResponse>} + */ +const methodDescriptor_MovementSensorService_GetCompassHeading = new grpc.web.MethodDescriptor( + '/viam.component.movementsensor.v1.MovementSensorService/GetCompassHeading', + grpc.web.MethodType.UNARY, + proto.viam.component.movementsensor.v1.GetCompassHeadingRequest, + proto.viam.component.movementsensor.v1.GetCompassHeadingResponse, + /** + * @param {!proto.viam.component.movementsensor.v1.GetCompassHeadingRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetCompassHeadingRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.movementsensor.v1.GetCompassHeadingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.movementsensor.v1.MovementSensorServiceClient.prototype.getCompassHeading = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetCompassHeading', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetCompassHeading, + callback); +}; + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetCompassHeadingRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient.prototype.getCompassHeading = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetCompassHeading', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetCompassHeading); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.movementsensor.v1.GetOrientationRequest, + * !proto.viam.component.movementsensor.v1.GetOrientationResponse>} + */ +const methodDescriptor_MovementSensorService_GetOrientation = new grpc.web.MethodDescriptor( + '/viam.component.movementsensor.v1.MovementSensorService/GetOrientation', + grpc.web.MethodType.UNARY, + proto.viam.component.movementsensor.v1.GetOrientationRequest, + proto.viam.component.movementsensor.v1.GetOrientationResponse, + /** + * @param {!proto.viam.component.movementsensor.v1.GetOrientationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.movementsensor.v1.GetOrientationResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetOrientationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.movementsensor.v1.GetOrientationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.movementsensor.v1.MovementSensorServiceClient.prototype.getOrientation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetOrientation', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetOrientation, + callback); +}; + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetOrientationRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient.prototype.getOrientation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetOrientation', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetOrientation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.movementsensor.v1.GetPositionRequest, + * !proto.viam.component.movementsensor.v1.GetPositionResponse>} + */ +const methodDescriptor_MovementSensorService_GetPosition = new grpc.web.MethodDescriptor( + '/viam.component.movementsensor.v1.MovementSensorService/GetPosition', + grpc.web.MethodType.UNARY, + proto.viam.component.movementsensor.v1.GetPositionRequest, + proto.viam.component.movementsensor.v1.GetPositionResponse, + /** + * @param {!proto.viam.component.movementsensor.v1.GetPositionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.movementsensor.v1.GetPositionResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetPositionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.movementsensor.v1.GetPositionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.movementsensor.v1.MovementSensorServiceClient.prototype.getPosition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetPosition', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetPosition, + callback); +}; + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetPositionRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient.prototype.getPosition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetPosition', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetPosition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.movementsensor.v1.GetPropertiesRequest, + * !proto.viam.component.movementsensor.v1.GetPropertiesResponse>} + */ +const methodDescriptor_MovementSensorService_GetProperties = new grpc.web.MethodDescriptor( + '/viam.component.movementsensor.v1.MovementSensorService/GetProperties', + grpc.web.MethodType.UNARY, + proto.viam.component.movementsensor.v1.GetPropertiesRequest, + proto.viam.component.movementsensor.v1.GetPropertiesResponse, + /** + * @param {!proto.viam.component.movementsensor.v1.GetPropertiesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.movementsensor.v1.GetPropertiesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetPropertiesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.movementsensor.v1.GetPropertiesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.movementsensor.v1.MovementSensorServiceClient.prototype.getProperties = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetProperties', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetProperties, + callback); +}; + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetPropertiesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient.prototype.getProperties = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetProperties', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetProperties); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.movementsensor.v1.GetAccuracyRequest, + * !proto.viam.component.movementsensor.v1.GetAccuracyResponse>} + */ +const methodDescriptor_MovementSensorService_GetAccuracy = new grpc.web.MethodDescriptor( + '/viam.component.movementsensor.v1.MovementSensorService/GetAccuracy', + grpc.web.MethodType.UNARY, + proto.viam.component.movementsensor.v1.GetAccuracyRequest, + proto.viam.component.movementsensor.v1.GetAccuracyResponse, + /** + * @param {!proto.viam.component.movementsensor.v1.GetAccuracyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.movementsensor.v1.GetAccuracyResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetAccuracyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.movementsensor.v1.GetAccuracyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.movementsensor.v1.MovementSensorServiceClient.prototype.getAccuracy = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetAccuracy', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetAccuracy, + callback); +}; + + +/** + * @param {!proto.viam.component.movementsensor.v1.GetAccuracyRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.movementsensor.v1.MovementSensorServicePromiseClient.prototype.getAccuracy = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.movementsensor.v1.MovementSensorService/GetAccuracy', + request, + metadata || {}, + methodDescriptor_MovementSensorService_GetAccuracy); +}; + + +module.exports = proto.viam.component.movementsensor.v1; + diff --git a/gen/js/component/movementsensor/v1/movementsensor_pb.d.ts b/gen/js/component/movementsensor/v1/movementsensor_pb.d.ts new file mode 100644 index 000000000..994d7ae12 --- /dev/null +++ b/gen/js/component/movementsensor/v1/movementsensor_pb.d.ts @@ -0,0 +1,314 @@ +// package: viam.component.movementsensor.v1 +// file: component/movementsensor/v1/movementsensor.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; + +export class GetLinearVelocityRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLinearVelocityRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetLinearVelocityRequest): GetLinearVelocityRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetLinearVelocityRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLinearVelocityRequest; + static deserializeBinaryFromReader(message: GetLinearVelocityRequest, reader: jspb.BinaryReader): GetLinearVelocityRequest; +} + +export namespace GetLinearVelocityRequest { + export type AsObject = { + name: string, + } +} + +export class GetLinearVelocityResponse extends jspb.Message { + hasLinearVelocity(): boolean; + clearLinearVelocity(): void; + getLinearVelocity(): common_v1_common_pb.Vector3 | undefined; + setLinearVelocity(value?: common_v1_common_pb.Vector3): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLinearVelocityResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetLinearVelocityResponse): GetLinearVelocityResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetLinearVelocityResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLinearVelocityResponse; + static deserializeBinaryFromReader(message: GetLinearVelocityResponse, reader: jspb.BinaryReader): GetLinearVelocityResponse; +} + +export namespace GetLinearVelocityResponse { + export type AsObject = { + linearVelocity?: common_v1_common_pb.Vector3.AsObject, + } +} + +export class GetAngularVelocityRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetAngularVelocityRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetAngularVelocityRequest): GetAngularVelocityRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetAngularVelocityRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetAngularVelocityRequest; + static deserializeBinaryFromReader(message: GetAngularVelocityRequest, reader: jspb.BinaryReader): GetAngularVelocityRequest; +} + +export namespace GetAngularVelocityRequest { + export type AsObject = { + name: string, + } +} + +export class GetAngularVelocityResponse extends jspb.Message { + hasAngularVelocity(): boolean; + clearAngularVelocity(): void; + getAngularVelocity(): common_v1_common_pb.Vector3 | undefined; + setAngularVelocity(value?: common_v1_common_pb.Vector3): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetAngularVelocityResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetAngularVelocityResponse): GetAngularVelocityResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetAngularVelocityResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetAngularVelocityResponse; + static deserializeBinaryFromReader(message: GetAngularVelocityResponse, reader: jspb.BinaryReader): GetAngularVelocityResponse; +} + +export namespace GetAngularVelocityResponse { + export type AsObject = { + angularVelocity?: common_v1_common_pb.Vector3.AsObject, + } +} + +export class GetCompassHeadingRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetCompassHeadingRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetCompassHeadingRequest): GetCompassHeadingRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetCompassHeadingRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetCompassHeadingRequest; + static deserializeBinaryFromReader(message: GetCompassHeadingRequest, reader: jspb.BinaryReader): GetCompassHeadingRequest; +} + +export namespace GetCompassHeadingRequest { + export type AsObject = { + name: string, + } +} + +export class GetCompassHeadingResponse extends jspb.Message { + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetCompassHeadingResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetCompassHeadingResponse): GetCompassHeadingResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetCompassHeadingResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetCompassHeadingResponse; + static deserializeBinaryFromReader(message: GetCompassHeadingResponse, reader: jspb.BinaryReader): GetCompassHeadingResponse; +} + +export namespace GetCompassHeadingResponse { + export type AsObject = { + value: number, + } +} + +export class GetOrientationRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetOrientationRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetOrientationRequest): GetOrientationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetOrientationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetOrientationRequest; + static deserializeBinaryFromReader(message: GetOrientationRequest, reader: jspb.BinaryReader): GetOrientationRequest; +} + +export namespace GetOrientationRequest { + export type AsObject = { + name: string, + } +} + +export class GetOrientationResponse extends jspb.Message { + hasOrientation(): boolean; + clearOrientation(): void; + getOrientation(): common_v1_common_pb.Orientation | undefined; + setOrientation(value?: common_v1_common_pb.Orientation): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetOrientationResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetOrientationResponse): GetOrientationResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetOrientationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetOrientationResponse; + static deserializeBinaryFromReader(message: GetOrientationResponse, reader: jspb.BinaryReader): GetOrientationResponse; +} + +export namespace GetOrientationResponse { + export type AsObject = { + orientation?: common_v1_common_pb.Orientation.AsObject, + } +} + +export class GetPositionRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionRequest): GetPositionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionRequest; + static deserializeBinaryFromReader(message: GetPositionRequest, reader: jspb.BinaryReader): GetPositionRequest; +} + +export namespace GetPositionRequest { + export type AsObject = { + name: string, + } +} + +export class GetPositionResponse extends jspb.Message { + hasCoordinate(): boolean; + clearCoordinate(): void; + getCoordinate(): common_v1_common_pb.GeoPoint | undefined; + setCoordinate(value?: common_v1_common_pb.GeoPoint): void; + + getAltitudeMm(): number; + setAltitudeMm(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionResponse): GetPositionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionResponse; + static deserializeBinaryFromReader(message: GetPositionResponse, reader: jspb.BinaryReader): GetPositionResponse; +} + +export namespace GetPositionResponse { + export type AsObject = { + coordinate?: common_v1_common_pb.GeoPoint.AsObject, + altitudeMm: number, + } +} + +export class GetPropertiesRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPropertiesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPropertiesRequest): GetPropertiesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPropertiesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPropertiesRequest; + static deserializeBinaryFromReader(message: GetPropertiesRequest, reader: jspb.BinaryReader): GetPropertiesRequest; +} + +export namespace GetPropertiesRequest { + export type AsObject = { + name: string, + } +} + +export class GetPropertiesResponse extends jspb.Message { + getLinearVelocitySupported(): boolean; + setLinearVelocitySupported(value: boolean): void; + + getAngularVelocitySupported(): boolean; + setAngularVelocitySupported(value: boolean): void; + + getOrientationSupported(): boolean; + setOrientationSupported(value: boolean): void; + + getPositionSupported(): boolean; + setPositionSupported(value: boolean): void; + + getCompassHeadingSupported(): boolean; + setCompassHeadingSupported(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPropertiesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPropertiesResponse): GetPropertiesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPropertiesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPropertiesResponse; + static deserializeBinaryFromReader(message: GetPropertiesResponse, reader: jspb.BinaryReader): GetPropertiesResponse; +} + +export namespace GetPropertiesResponse { + export type AsObject = { + linearVelocitySupported: boolean, + angularVelocitySupported: boolean, + orientationSupported: boolean, + positionSupported: boolean, + compassHeadingSupported: boolean, + } +} + +export class GetAccuracyRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetAccuracyRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetAccuracyRequest): GetAccuracyRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetAccuracyRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetAccuracyRequest; + static deserializeBinaryFromReader(message: GetAccuracyRequest, reader: jspb.BinaryReader): GetAccuracyRequest; +} + +export namespace GetAccuracyRequest { + export type AsObject = { + name: string, + } +} + +export class GetAccuracyResponse extends jspb.Message { + getAccuracyMmMap(): jspb.Map; + clearAccuracyMmMap(): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetAccuracyResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetAccuracyResponse): GetAccuracyResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetAccuracyResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetAccuracyResponse; + static deserializeBinaryFromReader(message: GetAccuracyResponse, reader: jspb.BinaryReader): GetAccuracyResponse; +} + +export namespace GetAccuracyResponse { + export type AsObject = { + accuracyMmMap: Array<[string, number]>, + } +} + diff --git a/gen/js/component/movementsensor/v1/movementsensor_pb.js b/gen/js/component/movementsensor/v1/movementsensor_pb.js new file mode 100644 index 000000000..6b81ab9dc --- /dev/null +++ b/gen/js/component/movementsensor/v1/movementsensor_pb.js @@ -0,0 +1,2387 @@ +// source: component/movementsensor/v1/movementsensor.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetAccuracyRequest', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetAccuracyResponse', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetAngularVelocityRequest', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetAngularVelocityResponse', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetCompassHeadingRequest', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetCompassHeadingResponse', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetLinearVelocityRequest', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetLinearVelocityResponse', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetOrientationRequest', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetOrientationResponse', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetPositionRequest', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetPositionResponse', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetPropertiesRequest', null, global); +goog.exportSymbol('proto.viam.component.movementsensor.v1.GetPropertiesResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetLinearVelocityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.displayName = 'proto.viam.component.movementsensor.v1.GetLinearVelocityRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetLinearVelocityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.displayName = 'proto.viam.component.movementsensor.v1.GetLinearVelocityResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetAngularVelocityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.displayName = 'proto.viam.component.movementsensor.v1.GetAngularVelocityRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetAngularVelocityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.displayName = 'proto.viam.component.movementsensor.v1.GetAngularVelocityResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetCompassHeadingRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.displayName = 'proto.viam.component.movementsensor.v1.GetCompassHeadingRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetCompassHeadingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.displayName = 'proto.viam.component.movementsensor.v1.GetCompassHeadingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetOrientationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetOrientationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetOrientationRequest.displayName = 'proto.viam.component.movementsensor.v1.GetOrientationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetOrientationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetOrientationResponse.displayName = 'proto.viam.component.movementsensor.v1.GetOrientationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetPositionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetPositionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetPositionRequest.displayName = 'proto.viam.component.movementsensor.v1.GetPositionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetPositionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetPositionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetPositionResponse.displayName = 'proto.viam.component.movementsensor.v1.GetPositionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetPropertiesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetPropertiesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetPropertiesRequest.displayName = 'proto.viam.component.movementsensor.v1.GetPropertiesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetPropertiesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetPropertiesResponse.displayName = 'proto.viam.component.movementsensor.v1.GetPropertiesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetAccuracyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetAccuracyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetAccuracyRequest.displayName = 'proto.viam.component.movementsensor.v1.GetAccuracyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.movementsensor.v1.GetAccuracyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.movementsensor.v1.GetAccuracyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.movementsensor.v1.GetAccuracyResponse.displayName = 'proto.viam.component.movementsensor.v1.GetAccuracyResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetLinearVelocityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetLinearVelocityRequest} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetLinearVelocityRequest; + return proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetLinearVelocityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetLinearVelocityRequest} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetLinearVelocityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.movementsensor.v1.GetLinearVelocityRequest} returns this + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetLinearVelocityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + linearVelocity: (f = msg.getLinearVelocity()) && common_v1_common_pb.Vector3.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetLinearVelocityResponse} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetLinearVelocityResponse; + return proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetLinearVelocityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetLinearVelocityResponse} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.Vector3; + reader.readMessage(value,common_v1_common_pb.Vector3.deserializeBinaryFromReader); + msg.setLinearVelocity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetLinearVelocityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLinearVelocity(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.Vector3.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.Vector3 linear_velocity = 1; + * @return {?proto.viam.common.v1.Vector3} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.prototype.getLinearVelocity = function() { + return /** @type{?proto.viam.common.v1.Vector3} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Vector3, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.Vector3|undefined} value + * @return {!proto.viam.component.movementsensor.v1.GetLinearVelocityResponse} returns this +*/ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.prototype.setLinearVelocity = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.movementsensor.v1.GetLinearVelocityResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.prototype.clearLinearVelocity = function() { + return this.setLinearVelocity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.movementsensor.v1.GetLinearVelocityResponse.prototype.hasLinearVelocity = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetAngularVelocityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetAngularVelocityRequest} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetAngularVelocityRequest; + return proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetAngularVelocityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetAngularVelocityRequest} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetAngularVelocityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.movementsensor.v1.GetAngularVelocityRequest} returns this + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetAngularVelocityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + angularVelocity: (f = msg.getAngularVelocity()) && common_v1_common_pb.Vector3.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetAngularVelocityResponse} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetAngularVelocityResponse; + return proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetAngularVelocityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetAngularVelocityResponse} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.Vector3; + reader.readMessage(value,common_v1_common_pb.Vector3.deserializeBinaryFromReader); + msg.setAngularVelocity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetAngularVelocityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAngularVelocity(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.Vector3.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.Vector3 angular_velocity = 1; + * @return {?proto.viam.common.v1.Vector3} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.prototype.getAngularVelocity = function() { + return /** @type{?proto.viam.common.v1.Vector3} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Vector3, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.Vector3|undefined} value + * @return {!proto.viam.component.movementsensor.v1.GetAngularVelocityResponse} returns this +*/ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.prototype.setAngularVelocity = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.movementsensor.v1.GetAngularVelocityResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.prototype.clearAngularVelocity = function() { + return this.setAngularVelocity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.movementsensor.v1.GetAngularVelocityResponse.prototype.hasAngularVelocity = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetCompassHeadingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetCompassHeadingRequest} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetCompassHeadingRequest; + return proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetCompassHeadingRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetCompassHeadingRequest} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetCompassHeadingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.movementsensor.v1.GetCompassHeadingRequest} returns this + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetCompassHeadingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetCompassHeadingResponse} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetCompassHeadingResponse; + return proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetCompassHeadingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetCompassHeadingResponse} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetCompassHeadingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } +}; + + +/** + * optional double value = 1; + * @return {number} + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.movementsensor.v1.GetCompassHeadingResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetCompassHeadingResponse.prototype.setValue = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetOrientationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetOrientationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetOrientationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetOrientationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetOrientationRequest} + */ +proto.viam.component.movementsensor.v1.GetOrientationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetOrientationRequest; + return proto.viam.component.movementsensor.v1.GetOrientationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetOrientationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetOrientationRequest} + */ +proto.viam.component.movementsensor.v1.GetOrientationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetOrientationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetOrientationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetOrientationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetOrientationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.movementsensor.v1.GetOrientationRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.movementsensor.v1.GetOrientationRequest} returns this + */ +proto.viam.component.movementsensor.v1.GetOrientationRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetOrientationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetOrientationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + orientation: (f = msg.getOrientation()) && common_v1_common_pb.Orientation.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetOrientationResponse} + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetOrientationResponse; + return proto.viam.component.movementsensor.v1.GetOrientationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetOrientationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetOrientationResponse} + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.Orientation; + reader.readMessage(value,common_v1_common_pb.Orientation.deserializeBinaryFromReader); + msg.setOrientation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetOrientationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetOrientationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOrientation(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.Orientation.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.Orientation orientation = 1; + * @return {?proto.viam.common.v1.Orientation} + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse.prototype.getOrientation = function() { + return /** @type{?proto.viam.common.v1.Orientation} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Orientation, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.Orientation|undefined} value + * @return {!proto.viam.component.movementsensor.v1.GetOrientationResponse} returns this +*/ +proto.viam.component.movementsensor.v1.GetOrientationResponse.prototype.setOrientation = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.movementsensor.v1.GetOrientationResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse.prototype.clearOrientation = function() { + return this.setOrientation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.movementsensor.v1.GetOrientationResponse.prototype.hasOrientation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetPositionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetPositionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetPositionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetPositionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetPositionRequest} + */ +proto.viam.component.movementsensor.v1.GetPositionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetPositionRequest; + return proto.viam.component.movementsensor.v1.GetPositionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetPositionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetPositionRequest} + */ +proto.viam.component.movementsensor.v1.GetPositionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetPositionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetPositionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetPositionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetPositionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.movementsensor.v1.GetPositionRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.movementsensor.v1.GetPositionRequest} returns this + */ +proto.viam.component.movementsensor.v1.GetPositionRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetPositionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetPositionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + coordinate: (f = msg.getCoordinate()) && common_v1_common_pb.GeoPoint.toObject(includeInstance, f), + altitudeMm: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetPositionResponse} + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetPositionResponse; + return proto.viam.component.movementsensor.v1.GetPositionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetPositionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetPositionResponse} + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.GeoPoint; + reader.readMessage(value,common_v1_common_pb.GeoPoint.deserializeBinaryFromReader); + msg.setCoordinate(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFloat()); + msg.setAltitudeMm(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetPositionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetPositionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCoordinate(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.GeoPoint.serializeBinaryToWriter + ); + } + f = message.getAltitudeMm(); + if (f !== 0.0) { + writer.writeFloat( + 2, + f + ); + } +}; + + +/** + * optional viam.common.v1.GeoPoint coordinate = 1; + * @return {?proto.viam.common.v1.GeoPoint} + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.prototype.getCoordinate = function() { + return /** @type{?proto.viam.common.v1.GeoPoint} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.GeoPoint, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.GeoPoint|undefined} value + * @return {!proto.viam.component.movementsensor.v1.GetPositionResponse} returns this +*/ +proto.viam.component.movementsensor.v1.GetPositionResponse.prototype.setCoordinate = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.component.movementsensor.v1.GetPositionResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.prototype.clearCoordinate = function() { + return this.setCoordinate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.prototype.hasCoordinate = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional float altitude_mm = 2; + * @return {number} + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.prototype.getAltitudeMm = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.movementsensor.v1.GetPositionResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetPositionResponse.prototype.setAltitudeMm = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetPropertiesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetPropertiesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetPropertiesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetPropertiesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesRequest} + */ +proto.viam.component.movementsensor.v1.GetPropertiesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetPropertiesRequest; + return proto.viam.component.movementsensor.v1.GetPropertiesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetPropertiesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesRequest} + */ +proto.viam.component.movementsensor.v1.GetPropertiesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetPropertiesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetPropertiesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetPropertiesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetPropertiesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.movementsensor.v1.GetPropertiesRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesRequest} returns this + */ +proto.viam.component.movementsensor.v1.GetPropertiesRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetPropertiesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + linearVelocitySupported: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + angularVelocitySupported: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + orientationSupported: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + positionSupported: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + compassHeadingSupported: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetPropertiesResponse; + return proto.viam.component.movementsensor.v1.GetPropertiesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLinearVelocitySupported(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAngularVelocitySupported(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOrientationSupported(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPositionSupported(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCompassHeadingSupported(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetPropertiesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLinearVelocitySupported(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getAngularVelocitySupported(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getOrientationSupported(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getPositionSupported(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getCompassHeadingSupported(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional bool linear_velocity_supported = 1; + * @return {boolean} + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.getLinearVelocitySupported = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.setLinearVelocitySupported = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional bool angular_velocity_supported = 2; + * @return {boolean} + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.getAngularVelocitySupported = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.setAngularVelocitySupported = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bool orientation_supported = 3; + * @return {boolean} + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.getOrientationSupported = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.setOrientationSupported = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional bool position_supported = 4; + * @return {boolean} + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.getPositionSupported = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.setPositionSupported = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool compass_heading_supported = 5; + * @return {boolean} + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.getCompassHeadingSupported = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.movementsensor.v1.GetPropertiesResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetPropertiesResponse.prototype.setCompassHeadingSupported = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetAccuracyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetAccuracyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetAccuracyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetAccuracyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetAccuracyRequest} + */ +proto.viam.component.movementsensor.v1.GetAccuracyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetAccuracyRequest; + return proto.viam.component.movementsensor.v1.GetAccuracyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetAccuracyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetAccuracyRequest} + */ +proto.viam.component.movementsensor.v1.GetAccuracyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetAccuracyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetAccuracyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetAccuracyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetAccuracyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.movementsensor.v1.GetAccuracyRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.movementsensor.v1.GetAccuracyRequest} returns this + */ +proto.viam.component.movementsensor.v1.GetAccuracyRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.movementsensor.v1.GetAccuracyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.movementsensor.v1.GetAccuracyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.movementsensor.v1.GetAccuracyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetAccuracyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + accuracyMmMap: (f = msg.getAccuracyMmMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.movementsensor.v1.GetAccuracyResponse} + */ +proto.viam.component.movementsensor.v1.GetAccuracyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.movementsensor.v1.GetAccuracyResponse; + return proto.viam.component.movementsensor.v1.GetAccuracyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.movementsensor.v1.GetAccuracyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.movementsensor.v1.GetAccuracyResponse} + */ +proto.viam.component.movementsensor.v1.GetAccuracyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getAccuracyMmMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readFloat, null, "", 0.0); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.movementsensor.v1.GetAccuracyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.movementsensor.v1.GetAccuracyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.movementsensor.v1.GetAccuracyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.movementsensor.v1.GetAccuracyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccuracyMmMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeFloat); + } +}; + + +/** + * map accuracy_mm = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.component.movementsensor.v1.GetAccuracyResponse.prototype.getAccuracyMmMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.component.movementsensor.v1.GetAccuracyResponse} returns this + */ +proto.viam.component.movementsensor.v1.GetAccuracyResponse.prototype.clearAccuracyMmMap = function() { + this.getAccuracyMmMap().clear(); + return this;}; + + +goog.object.extend(exports, proto.viam.component.movementsensor.v1); diff --git a/gen/js/component/movementsensor/v1/movementsensor_pb_service.d.ts b/gen/js/component/movementsensor/v1/movementsensor_pb_service.d.ts new file mode 100644 index 000000000..94364730c --- /dev/null +++ b/gen/js/component/movementsensor/v1/movementsensor_pb_service.d.ts @@ -0,0 +1,177 @@ +// package: viam.component.movementsensor.v1 +// file: component/movementsensor/v1/movementsensor.proto + +import * as component_movementsensor_v1_movementsensor_pb from "../../../component/movementsensor/v1/movementsensor_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MovementSensorServiceGetLinearVelocity = { + readonly methodName: string; + readonly service: typeof MovementSensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_movementsensor_v1_movementsensor_pb.GetLinearVelocityRequest; + readonly responseType: typeof component_movementsensor_v1_movementsensor_pb.GetLinearVelocityResponse; +}; + +type MovementSensorServiceGetAngularVelocity = { + readonly methodName: string; + readonly service: typeof MovementSensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_movementsensor_v1_movementsensor_pb.GetAngularVelocityRequest; + readonly responseType: typeof component_movementsensor_v1_movementsensor_pb.GetAngularVelocityResponse; +}; + +type MovementSensorServiceGetCompassHeading = { + readonly methodName: string; + readonly service: typeof MovementSensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_movementsensor_v1_movementsensor_pb.GetCompassHeadingRequest; + readonly responseType: typeof component_movementsensor_v1_movementsensor_pb.GetCompassHeadingResponse; +}; + +type MovementSensorServiceGetOrientation = { + readonly methodName: string; + readonly service: typeof MovementSensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_movementsensor_v1_movementsensor_pb.GetOrientationRequest; + readonly responseType: typeof component_movementsensor_v1_movementsensor_pb.GetOrientationResponse; +}; + +type MovementSensorServiceGetPosition = { + readonly methodName: string; + readonly service: typeof MovementSensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_movementsensor_v1_movementsensor_pb.GetPositionRequest; + readonly responseType: typeof component_movementsensor_v1_movementsensor_pb.GetPositionResponse; +}; + +type MovementSensorServiceGetProperties = { + readonly methodName: string; + readonly service: typeof MovementSensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_movementsensor_v1_movementsensor_pb.GetPropertiesRequest; + readonly responseType: typeof component_movementsensor_v1_movementsensor_pb.GetPropertiesResponse; +}; + +type MovementSensorServiceGetAccuracy = { + readonly methodName: string; + readonly service: typeof MovementSensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_movementsensor_v1_movementsensor_pb.GetAccuracyRequest; + readonly responseType: typeof component_movementsensor_v1_movementsensor_pb.GetAccuracyResponse; +}; + +export class MovementSensorService { + static readonly serviceName: string; + static readonly GetLinearVelocity: MovementSensorServiceGetLinearVelocity; + static readonly GetAngularVelocity: MovementSensorServiceGetAngularVelocity; + static readonly GetCompassHeading: MovementSensorServiceGetCompassHeading; + static readonly GetOrientation: MovementSensorServiceGetOrientation; + static readonly GetPosition: MovementSensorServiceGetPosition; + static readonly GetProperties: MovementSensorServiceGetProperties; + static readonly GetAccuracy: MovementSensorServiceGetAccuracy; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MovementSensorServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getLinearVelocity( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetLinearVelocityRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetLinearVelocityResponse|null) => void + ): UnaryResponse; + getLinearVelocity( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetLinearVelocityRequest, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetLinearVelocityResponse|null) => void + ): UnaryResponse; + getAngularVelocity( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetAngularVelocityRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetAngularVelocityResponse|null) => void + ): UnaryResponse; + getAngularVelocity( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetAngularVelocityRequest, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetAngularVelocityResponse|null) => void + ): UnaryResponse; + getCompassHeading( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetCompassHeadingRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetCompassHeadingResponse|null) => void + ): UnaryResponse; + getCompassHeading( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetCompassHeadingRequest, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetCompassHeadingResponse|null) => void + ): UnaryResponse; + getOrientation( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetOrientationRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetOrientationResponse|null) => void + ): UnaryResponse; + getOrientation( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetOrientationRequest, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetOrientationResponse|null) => void + ): UnaryResponse; + getPosition( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetPositionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetPositionResponse|null) => void + ): UnaryResponse; + getPosition( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetPositionRequest, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetPositionResponse|null) => void + ): UnaryResponse; + getProperties( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetPropertiesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetPropertiesResponse|null) => void + ): UnaryResponse; + getProperties( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetPropertiesRequest, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetPropertiesResponse|null) => void + ): UnaryResponse; + getAccuracy( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetAccuracyRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetAccuracyResponse|null) => void + ): UnaryResponse; + getAccuracy( + requestMessage: component_movementsensor_v1_movementsensor_pb.GetAccuracyRequest, + callback: (error: ServiceError|null, responseMessage: component_movementsensor_v1_movementsensor_pb.GetAccuracyResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/movementsensor/v1/movementsensor_pb_service.js b/gen/js/component/movementsensor/v1/movementsensor_pb_service.js new file mode 100644 index 000000000..885e500c0 --- /dev/null +++ b/gen/js/component/movementsensor/v1/movementsensor_pb_service.js @@ -0,0 +1,301 @@ +// package: viam.component.movementsensor.v1 +// file: component/movementsensor/v1/movementsensor.proto + +var component_movementsensor_v1_movementsensor_pb = require("../../../component/movementsensor/v1/movementsensor_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var MovementSensorService = (function () { + function MovementSensorService() {} + MovementSensorService.serviceName = "viam.component.movementsensor.v1.MovementSensorService"; + return MovementSensorService; +}()); + +MovementSensorService.GetLinearVelocity = { + methodName: "GetLinearVelocity", + service: MovementSensorService, + requestStream: false, + responseStream: false, + requestType: component_movementsensor_v1_movementsensor_pb.GetLinearVelocityRequest, + responseType: component_movementsensor_v1_movementsensor_pb.GetLinearVelocityResponse +}; + +MovementSensorService.GetAngularVelocity = { + methodName: "GetAngularVelocity", + service: MovementSensorService, + requestStream: false, + responseStream: false, + requestType: component_movementsensor_v1_movementsensor_pb.GetAngularVelocityRequest, + responseType: component_movementsensor_v1_movementsensor_pb.GetAngularVelocityResponse +}; + +MovementSensorService.GetCompassHeading = { + methodName: "GetCompassHeading", + service: MovementSensorService, + requestStream: false, + responseStream: false, + requestType: component_movementsensor_v1_movementsensor_pb.GetCompassHeadingRequest, + responseType: component_movementsensor_v1_movementsensor_pb.GetCompassHeadingResponse +}; + +MovementSensorService.GetOrientation = { + methodName: "GetOrientation", + service: MovementSensorService, + requestStream: false, + responseStream: false, + requestType: component_movementsensor_v1_movementsensor_pb.GetOrientationRequest, + responseType: component_movementsensor_v1_movementsensor_pb.GetOrientationResponse +}; + +MovementSensorService.GetPosition = { + methodName: "GetPosition", + service: MovementSensorService, + requestStream: false, + responseStream: false, + requestType: component_movementsensor_v1_movementsensor_pb.GetPositionRequest, + responseType: component_movementsensor_v1_movementsensor_pb.GetPositionResponse +}; + +MovementSensorService.GetProperties = { + methodName: "GetProperties", + service: MovementSensorService, + requestStream: false, + responseStream: false, + requestType: component_movementsensor_v1_movementsensor_pb.GetPropertiesRequest, + responseType: component_movementsensor_v1_movementsensor_pb.GetPropertiesResponse +}; + +MovementSensorService.GetAccuracy = { + methodName: "GetAccuracy", + service: MovementSensorService, + requestStream: false, + responseStream: false, + requestType: component_movementsensor_v1_movementsensor_pb.GetAccuracyRequest, + responseType: component_movementsensor_v1_movementsensor_pb.GetAccuracyResponse +}; + +exports.MovementSensorService = MovementSensorService; + +function MovementSensorServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MovementSensorServiceClient.prototype.getLinearVelocity = function getLinearVelocity(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MovementSensorService.GetLinearVelocity, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MovementSensorServiceClient.prototype.getAngularVelocity = function getAngularVelocity(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MovementSensorService.GetAngularVelocity, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MovementSensorServiceClient.prototype.getCompassHeading = function getCompassHeading(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MovementSensorService.GetCompassHeading, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MovementSensorServiceClient.prototype.getOrientation = function getOrientation(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MovementSensorService.GetOrientation, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MovementSensorServiceClient.prototype.getPosition = function getPosition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MovementSensorService.GetPosition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MovementSensorServiceClient.prototype.getProperties = function getProperties(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MovementSensorService.GetProperties, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MovementSensorServiceClient.prototype.getAccuracy = function getAccuracy(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MovementSensorService.GetAccuracy, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MovementSensorServiceClient = MovementSensorServiceClient; + diff --git a/gen/js/component/posetracker/v1/pose_tracker_grpc_web_pb.js b/gen/js/component/posetracker/v1/pose_tracker_grpc_web_pb.js new file mode 100644 index 000000000..1242c7301 --- /dev/null +++ b/gen/js/component/posetracker/v1/pose_tracker_grpc_web_pb.js @@ -0,0 +1,142 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.posetracker.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.posetracker = {}; +proto.viam.component.posetracker.v1 = require('./pose_tracker_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.posetracker.v1.PoseTrackerServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.posetracker.v1.PoseTrackerServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.posetracker.v1.GetPosesRequest, + * !proto.viam.component.posetracker.v1.GetPosesResponse>} + */ +const methodDescriptor_PoseTrackerService_GetPoses = new grpc.web.MethodDescriptor( + '/viam.component.posetracker.v1.PoseTrackerService/GetPoses', + grpc.web.MethodType.UNARY, + proto.viam.component.posetracker.v1.GetPosesRequest, + proto.viam.component.posetracker.v1.GetPosesResponse, + /** + * @param {!proto.viam.component.posetracker.v1.GetPosesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.posetracker.v1.GetPosesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.posetracker.v1.GetPosesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.posetracker.v1.GetPosesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.posetracker.v1.PoseTrackerServiceClient.prototype.getPoses = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.posetracker.v1.PoseTrackerService/GetPoses', + request, + metadata || {}, + methodDescriptor_PoseTrackerService_GetPoses, + callback); +}; + + +/** + * @param {!proto.viam.component.posetracker.v1.GetPosesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.posetracker.v1.PoseTrackerServicePromiseClient.prototype.getPoses = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.posetracker.v1.PoseTrackerService/GetPoses', + request, + metadata || {}, + methodDescriptor_PoseTrackerService_GetPoses); +}; + + +module.exports = proto.viam.component.posetracker.v1; + diff --git a/gen/js/component/posetracker/v1/pose_tracker_pb.d.ts b/gen/js/component/posetracker/v1/pose_tracker_pb.d.ts new file mode 100644 index 000000000..f98382dd9 --- /dev/null +++ b/gen/js/component/posetracker/v1/pose_tracker_pb.d.ts @@ -0,0 +1,52 @@ +// package: viam.component.posetracker.v1 +// file: component/posetracker/v1/pose_tracker.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; + +export class GetPosesRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearBodyNamesList(): void; + getBodyNamesList(): Array; + setBodyNamesList(value: Array): void; + addBodyNames(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPosesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPosesRequest): GetPosesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPosesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPosesRequest; + static deserializeBinaryFromReader(message: GetPosesRequest, reader: jspb.BinaryReader): GetPosesRequest; +} + +export namespace GetPosesRequest { + export type AsObject = { + name: string, + bodyNamesList: Array, + } +} + +export class GetPosesResponse extends jspb.Message { + getBodyPosesMap(): jspb.Map; + clearBodyPosesMap(): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPosesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPosesResponse): GetPosesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPosesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPosesResponse; + static deserializeBinaryFromReader(message: GetPosesResponse, reader: jspb.BinaryReader): GetPosesResponse; +} + +export namespace GetPosesResponse { + export type AsObject = { + bodyPosesMap: Array<[string, common_v1_common_pb.PoseInFrame.AsObject]>, + } +} + diff --git a/gen/js/component/posetracker/v1/pose_tracker_pb.js b/gen/js/component/posetracker/v1/pose_tracker_pb.js new file mode 100644 index 000000000..70d94ece3 --- /dev/null +++ b/gen/js/component/posetracker/v1/pose_tracker_pb.js @@ -0,0 +1,385 @@ +// source: component/posetracker/v1/pose_tracker.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.viam.component.posetracker.v1.GetPosesRequest', null, global); +goog.exportSymbol('proto.viam.component.posetracker.v1.GetPosesResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.posetracker.v1.GetPosesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.component.posetracker.v1.GetPosesRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.component.posetracker.v1.GetPosesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.posetracker.v1.GetPosesRequest.displayName = 'proto.viam.component.posetracker.v1.GetPosesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.posetracker.v1.GetPosesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.posetracker.v1.GetPosesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.posetracker.v1.GetPosesResponse.displayName = 'proto.viam.component.posetracker.v1.GetPosesResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.component.posetracker.v1.GetPosesRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.posetracker.v1.GetPosesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.posetracker.v1.GetPosesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.posetracker.v1.GetPosesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.posetracker.v1.GetPosesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + bodyNamesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.posetracker.v1.GetPosesRequest} + */ +proto.viam.component.posetracker.v1.GetPosesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.posetracker.v1.GetPosesRequest; + return proto.viam.component.posetracker.v1.GetPosesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.posetracker.v1.GetPosesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.posetracker.v1.GetPosesRequest} + */ +proto.viam.component.posetracker.v1.GetPosesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addBodyNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.posetracker.v1.GetPosesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.posetracker.v1.GetPosesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.posetracker.v1.GetPosesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.posetracker.v1.GetPosesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBodyNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.posetracker.v1.GetPosesRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.posetracker.v1.GetPosesRequest} returns this + */ +proto.viam.component.posetracker.v1.GetPosesRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string body_names = 2; + * @return {!Array} + */ +proto.viam.component.posetracker.v1.GetPosesRequest.prototype.getBodyNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.component.posetracker.v1.GetPosesRequest} returns this + */ +proto.viam.component.posetracker.v1.GetPosesRequest.prototype.setBodyNamesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.component.posetracker.v1.GetPosesRequest} returns this + */ +proto.viam.component.posetracker.v1.GetPosesRequest.prototype.addBodyNames = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.component.posetracker.v1.GetPosesRequest} returns this + */ +proto.viam.component.posetracker.v1.GetPosesRequest.prototype.clearBodyNamesList = function() { + return this.setBodyNamesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.posetracker.v1.GetPosesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.posetracker.v1.GetPosesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.posetracker.v1.GetPosesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.posetracker.v1.GetPosesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + bodyPosesMap: (f = msg.getBodyPosesMap()) ? f.toObject(includeInstance, proto.viam.common.v1.PoseInFrame.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.posetracker.v1.GetPosesResponse} + */ +proto.viam.component.posetracker.v1.GetPosesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.posetracker.v1.GetPosesResponse; + return proto.viam.component.posetracker.v1.GetPosesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.posetracker.v1.GetPosesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.posetracker.v1.GetPosesResponse} + */ +proto.viam.component.posetracker.v1.GetPosesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getBodyPosesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.viam.common.v1.PoseInFrame.deserializeBinaryFromReader, "", new proto.viam.common.v1.PoseInFrame()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.posetracker.v1.GetPosesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.posetracker.v1.GetPosesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.posetracker.v1.GetPosesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.posetracker.v1.GetPosesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBodyPosesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.viam.common.v1.PoseInFrame.serializeBinaryToWriter); + } +}; + + +/** + * map body_poses = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.component.posetracker.v1.GetPosesResponse.prototype.getBodyPosesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.viam.common.v1.PoseInFrame)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.component.posetracker.v1.GetPosesResponse} returns this + */ +proto.viam.component.posetracker.v1.GetPosesResponse.prototype.clearBodyPosesMap = function() { + this.getBodyPosesMap().clear(); + return this;}; + + +goog.object.extend(exports, proto.viam.component.posetracker.v1); diff --git a/gen/js/component/posetracker/v1/pose_tracker_pb_service.d.ts b/gen/js/component/posetracker/v1/pose_tracker_pb_service.d.ts new file mode 100644 index 000000000..740b0f261 --- /dev/null +++ b/gen/js/component/posetracker/v1/pose_tracker_pb_service.d.ts @@ -0,0 +1,63 @@ +// package: viam.component.posetracker.v1 +// file: component/posetracker/v1/pose_tracker.proto + +import * as component_posetracker_v1_pose_tracker_pb from "../../../component/posetracker/v1/pose_tracker_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type PoseTrackerServiceGetPoses = { + readonly methodName: string; + readonly service: typeof PoseTrackerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_posetracker_v1_pose_tracker_pb.GetPosesRequest; + readonly responseType: typeof component_posetracker_v1_pose_tracker_pb.GetPosesResponse; +}; + +export class PoseTrackerService { + static readonly serviceName: string; + static readonly GetPoses: PoseTrackerServiceGetPoses; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class PoseTrackerServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getPoses( + requestMessage: component_posetracker_v1_pose_tracker_pb.GetPosesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_posetracker_v1_pose_tracker_pb.GetPosesResponse|null) => void + ): UnaryResponse; + getPoses( + requestMessage: component_posetracker_v1_pose_tracker_pb.GetPosesRequest, + callback: (error: ServiceError|null, responseMessage: component_posetracker_v1_pose_tracker_pb.GetPosesResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/posetracker/v1/pose_tracker_pb_service.js b/gen/js/component/posetracker/v1/pose_tracker_pb_service.js new file mode 100644 index 000000000..435377c02 --- /dev/null +++ b/gen/js/component/posetracker/v1/pose_tracker_pb_service.js @@ -0,0 +1,61 @@ +// package: viam.component.posetracker.v1 +// file: component/posetracker/v1/pose_tracker.proto + +var component_posetracker_v1_pose_tracker_pb = require("../../../component/posetracker/v1/pose_tracker_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var PoseTrackerService = (function () { + function PoseTrackerService() {} + PoseTrackerService.serviceName = "viam.component.posetracker.v1.PoseTrackerService"; + return PoseTrackerService; +}()); + +PoseTrackerService.GetPoses = { + methodName: "GetPoses", + service: PoseTrackerService, + requestStream: false, + responseStream: false, + requestType: component_posetracker_v1_pose_tracker_pb.GetPosesRequest, + responseType: component_posetracker_v1_pose_tracker_pb.GetPosesResponse +}; + +exports.PoseTrackerService = PoseTrackerService; + +function PoseTrackerServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +PoseTrackerServiceClient.prototype.getPoses = function getPoses(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(PoseTrackerService.GetPoses, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.PoseTrackerServiceClient = PoseTrackerServiceClient; + diff --git a/gen/js/component/sensor/v1/sensor_grpc_web_pb.js b/gen/js/component/sensor/v1/sensor_grpc_web_pb.js new file mode 100644 index 000000000..bbe13e513 --- /dev/null +++ b/gen/js/component/sensor/v1/sensor_grpc_web_pb.js @@ -0,0 +1,142 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.sensor.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.sensor = {}; +proto.viam.component.sensor.v1 = require('./sensor_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.sensor.v1.SensorServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.sensor.v1.SensorServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.sensor.v1.GetReadingsRequest, + * !proto.viam.component.sensor.v1.GetReadingsResponse>} + */ +const methodDescriptor_SensorService_GetReadings = new grpc.web.MethodDescriptor( + '/viam.component.sensor.v1.SensorService/GetReadings', + grpc.web.MethodType.UNARY, + proto.viam.component.sensor.v1.GetReadingsRequest, + proto.viam.component.sensor.v1.GetReadingsResponse, + /** + * @param {!proto.viam.component.sensor.v1.GetReadingsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.sensor.v1.GetReadingsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.sensor.v1.GetReadingsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.sensor.v1.GetReadingsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.sensor.v1.SensorServiceClient.prototype.getReadings = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.sensor.v1.SensorService/GetReadings', + request, + metadata || {}, + methodDescriptor_SensorService_GetReadings, + callback); +}; + + +/** + * @param {!proto.viam.component.sensor.v1.GetReadingsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.sensor.v1.SensorServicePromiseClient.prototype.getReadings = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.sensor.v1.SensorService/GetReadings', + request, + metadata || {}, + methodDescriptor_SensorService_GetReadings); +}; + + +module.exports = proto.viam.component.sensor.v1; + diff --git a/gen/js/component/sensor/v1/sensor_pb.d.ts b/gen/js/component/sensor/v1/sensor_pb.d.ts new file mode 100644 index 000000000..4be67e3ce --- /dev/null +++ b/gen/js/component/sensor/v1/sensor_pb.d.ts @@ -0,0 +1,46 @@ +// package: viam.component.sensor.v1 +// file: component/sensor/v1/sensor.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class GetReadingsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetReadingsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetReadingsRequest): GetReadingsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetReadingsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetReadingsRequest; + static deserializeBinaryFromReader(message: GetReadingsRequest, reader: jspb.BinaryReader): GetReadingsRequest; +} + +export namespace GetReadingsRequest { + export type AsObject = { + name: string, + } +} + +export class GetReadingsResponse extends jspb.Message { + getReadingsMap(): jspb.Map; + clearReadingsMap(): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetReadingsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetReadingsResponse): GetReadingsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetReadingsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetReadingsResponse; + static deserializeBinaryFromReader(message: GetReadingsResponse, reader: jspb.BinaryReader): GetReadingsResponse; +} + +export namespace GetReadingsResponse { + export type AsObject = { + readingsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + diff --git a/gen/js/component/sensor/v1/sensor_pb.js b/gen/js/component/sensor/v1/sensor_pb.js new file mode 100644 index 000000000..0db752000 --- /dev/null +++ b/gen/js/component/sensor/v1/sensor_pb.js @@ -0,0 +1,329 @@ +// source: component/sensor/v1/sensor.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.component.sensor.v1.GetReadingsRequest', null, global); +goog.exportSymbol('proto.viam.component.sensor.v1.GetReadingsResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.sensor.v1.GetReadingsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.sensor.v1.GetReadingsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.sensor.v1.GetReadingsRequest.displayName = 'proto.viam.component.sensor.v1.GetReadingsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.sensor.v1.GetReadingsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.sensor.v1.GetReadingsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.sensor.v1.GetReadingsResponse.displayName = 'proto.viam.component.sensor.v1.GetReadingsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.sensor.v1.GetReadingsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.sensor.v1.GetReadingsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.sensor.v1.GetReadingsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.sensor.v1.GetReadingsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.sensor.v1.GetReadingsRequest} + */ +proto.viam.component.sensor.v1.GetReadingsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.sensor.v1.GetReadingsRequest; + return proto.viam.component.sensor.v1.GetReadingsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.sensor.v1.GetReadingsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.sensor.v1.GetReadingsRequest} + */ +proto.viam.component.sensor.v1.GetReadingsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.sensor.v1.GetReadingsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.sensor.v1.GetReadingsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.sensor.v1.GetReadingsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.sensor.v1.GetReadingsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.sensor.v1.GetReadingsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.sensor.v1.GetReadingsRequest} returns this + */ +proto.viam.component.sensor.v1.GetReadingsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.sensor.v1.GetReadingsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.sensor.v1.GetReadingsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.sensor.v1.GetReadingsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.sensor.v1.GetReadingsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + readingsMap: (f = msg.getReadingsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.sensor.v1.GetReadingsResponse} + */ +proto.viam.component.sensor.v1.GetReadingsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.sensor.v1.GetReadingsResponse; + return proto.viam.component.sensor.v1.GetReadingsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.sensor.v1.GetReadingsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.sensor.v1.GetReadingsResponse} + */ +proto.viam.component.sensor.v1.GetReadingsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getReadingsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.sensor.v1.GetReadingsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.sensor.v1.GetReadingsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.sensor.v1.GetReadingsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.sensor.v1.GetReadingsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReadingsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * map readings = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.component.sensor.v1.GetReadingsResponse.prototype.getReadingsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.component.sensor.v1.GetReadingsResponse} returns this + */ +proto.viam.component.sensor.v1.GetReadingsResponse.prototype.clearReadingsMap = function() { + this.getReadingsMap().clear(); + return this;}; + + +goog.object.extend(exports, proto.viam.component.sensor.v1); diff --git a/gen/js/component/sensor/v1/sensor_pb_service.d.ts b/gen/js/component/sensor/v1/sensor_pb_service.d.ts new file mode 100644 index 000000000..96d41e597 --- /dev/null +++ b/gen/js/component/sensor/v1/sensor_pb_service.d.ts @@ -0,0 +1,63 @@ +// package: viam.component.sensor.v1 +// file: component/sensor/v1/sensor.proto + +import * as component_sensor_v1_sensor_pb from "../../../component/sensor/v1/sensor_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type SensorServiceGetReadings = { + readonly methodName: string; + readonly service: typeof SensorService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_sensor_v1_sensor_pb.GetReadingsRequest; + readonly responseType: typeof component_sensor_v1_sensor_pb.GetReadingsResponse; +}; + +export class SensorService { + static readonly serviceName: string; + static readonly GetReadings: SensorServiceGetReadings; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class SensorServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getReadings( + requestMessage: component_sensor_v1_sensor_pb.GetReadingsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_sensor_v1_sensor_pb.GetReadingsResponse|null) => void + ): UnaryResponse; + getReadings( + requestMessage: component_sensor_v1_sensor_pb.GetReadingsRequest, + callback: (error: ServiceError|null, responseMessage: component_sensor_v1_sensor_pb.GetReadingsResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/sensor/v1/sensor_pb_service.js b/gen/js/component/sensor/v1/sensor_pb_service.js new file mode 100644 index 000000000..c07f01ba1 --- /dev/null +++ b/gen/js/component/sensor/v1/sensor_pb_service.js @@ -0,0 +1,61 @@ +// package: viam.component.sensor.v1 +// file: component/sensor/v1/sensor.proto + +var component_sensor_v1_sensor_pb = require("../../../component/sensor/v1/sensor_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var SensorService = (function () { + function SensorService() {} + SensorService.serviceName = "viam.component.sensor.v1.SensorService"; + return SensorService; +}()); + +SensorService.GetReadings = { + methodName: "GetReadings", + service: SensorService, + requestStream: false, + responseStream: false, + requestType: component_sensor_v1_sensor_pb.GetReadingsRequest, + responseType: component_sensor_v1_sensor_pb.GetReadingsResponse +}; + +exports.SensorService = SensorService; + +function SensorServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +SensorServiceClient.prototype.getReadings = function getReadings(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SensorService.GetReadings, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.SensorServiceClient = SensorServiceClient; + diff --git a/gen/js/component/servo/v1/servo_grpc_web_pb.js b/gen/js/component/servo/v1/servo_grpc_web_pb.js new file mode 100644 index 000000000..61d32a8c6 --- /dev/null +++ b/gen/js/component/servo/v1/servo_grpc_web_pb.js @@ -0,0 +1,262 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.component.servo.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.component = {}; +proto.viam.component.servo = {}; +proto.viam.component.servo.v1 = require('./servo_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.servo.v1.ServoServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.component.servo.v1.ServoServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.servo.v1.MoveRequest, + * !proto.viam.component.servo.v1.MoveResponse>} + */ +const methodDescriptor_ServoService_Move = new grpc.web.MethodDescriptor( + '/viam.component.servo.v1.ServoService/Move', + grpc.web.MethodType.UNARY, + proto.viam.component.servo.v1.MoveRequest, + proto.viam.component.servo.v1.MoveResponse, + /** + * @param {!proto.viam.component.servo.v1.MoveRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.servo.v1.MoveResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.servo.v1.MoveRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.servo.v1.MoveResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.servo.v1.ServoServiceClient.prototype.move = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.servo.v1.ServoService/Move', + request, + metadata || {}, + methodDescriptor_ServoService_Move, + callback); +}; + + +/** + * @param {!proto.viam.component.servo.v1.MoveRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.servo.v1.ServoServicePromiseClient.prototype.move = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.servo.v1.ServoService/Move', + request, + metadata || {}, + methodDescriptor_ServoService_Move); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.servo.v1.GetPositionRequest, + * !proto.viam.component.servo.v1.GetPositionResponse>} + */ +const methodDescriptor_ServoService_GetPosition = new grpc.web.MethodDescriptor( + '/viam.component.servo.v1.ServoService/GetPosition', + grpc.web.MethodType.UNARY, + proto.viam.component.servo.v1.GetPositionRequest, + proto.viam.component.servo.v1.GetPositionResponse, + /** + * @param {!proto.viam.component.servo.v1.GetPositionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.servo.v1.GetPositionResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.servo.v1.GetPositionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.servo.v1.GetPositionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.servo.v1.ServoServiceClient.prototype.getPosition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.servo.v1.ServoService/GetPosition', + request, + metadata || {}, + methodDescriptor_ServoService_GetPosition, + callback); +}; + + +/** + * @param {!proto.viam.component.servo.v1.GetPositionRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.servo.v1.ServoServicePromiseClient.prototype.getPosition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.servo.v1.ServoService/GetPosition', + request, + metadata || {}, + methodDescriptor_ServoService_GetPosition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.component.servo.v1.StopRequest, + * !proto.viam.component.servo.v1.StopResponse>} + */ +const methodDescriptor_ServoService_Stop = new grpc.web.MethodDescriptor( + '/viam.component.servo.v1.ServoService/Stop', + grpc.web.MethodType.UNARY, + proto.viam.component.servo.v1.StopRequest, + proto.viam.component.servo.v1.StopResponse, + /** + * @param {!proto.viam.component.servo.v1.StopRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.component.servo.v1.StopResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.component.servo.v1.StopRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.component.servo.v1.StopResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.component.servo.v1.ServoServiceClient.prototype.stop = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.component.servo.v1.ServoService/Stop', + request, + metadata || {}, + methodDescriptor_ServoService_Stop, + callback); +}; + + +/** + * @param {!proto.viam.component.servo.v1.StopRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.component.servo.v1.ServoServicePromiseClient.prototype.stop = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.component.servo.v1.ServoService/Stop', + request, + metadata || {}, + methodDescriptor_ServoService_Stop); +}; + + +module.exports = proto.viam.component.servo.v1; + diff --git a/gen/js/component/servo/v1/servo_pb.d.ts b/gen/js/component/servo/v1/servo_pb.d.ts new file mode 100644 index 000000000..4e4c711a7 --- /dev/null +++ b/gen/js/component/servo/v1/servo_pb.d.ts @@ -0,0 +1,146 @@ +// package: viam.component.servo.v1 +// file: component/servo/v1/servo.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; + +export class MoveRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getAngleDeg(): number; + setAngleDeg(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveRequest.AsObject; + static toObject(includeInstance: boolean, msg: MoveRequest): MoveRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveRequest; + static deserializeBinaryFromReader(message: MoveRequest, reader: jspb.BinaryReader): MoveRequest; +} + +export namespace MoveRequest { + export type AsObject = { + name: string, + angleDeg: number, + } +} + +export class MoveResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveResponse.AsObject; + static toObject(includeInstance: boolean, msg: MoveResponse): MoveResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveResponse; + static deserializeBinaryFromReader(message: MoveResponse, reader: jspb.BinaryReader): MoveResponse; +} + +export namespace MoveResponse { + export type AsObject = { + } +} + +export class GetPositionRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionRequest): GetPositionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionRequest; + static deserializeBinaryFromReader(message: GetPositionRequest, reader: jspb.BinaryReader): GetPositionRequest; +} + +export namespace GetPositionRequest { + export type AsObject = { + name: string, + } +} + +export class GetPositionResponse extends jspb.Message { + getPositionDeg(): number; + setPositionDeg(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionResponse): GetPositionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionResponse; + static deserializeBinaryFromReader(message: GetPositionResponse, reader: jspb.BinaryReader): GetPositionResponse; +} + +export namespace GetPositionResponse { + export type AsObject = { + positionDeg: number, + } +} + +export class StopRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopRequest.AsObject; + static toObject(includeInstance: boolean, msg: StopRequest): StopRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopRequest; + static deserializeBinaryFromReader(message: StopRequest, reader: jspb.BinaryReader): StopRequest; +} + +export namespace StopRequest { + export type AsObject = { + name: string, + } +} + +export class StopResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopResponse.AsObject; + static toObject(includeInstance: boolean, msg: StopResponse): StopResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopResponse; + static deserializeBinaryFromReader(message: StopResponse, reader: jspb.BinaryReader): StopResponse; +} + +export namespace StopResponse { + export type AsObject = { + } +} + +export class Status extends jspb.Message { + getPositionDeg(): number; + setPositionDeg(value: number): void; + + getIsMoving(): boolean; + setIsMoving(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; +} + +export namespace Status { + export type AsObject = { + positionDeg: number, + isMoving: boolean, + } +} + diff --git a/gen/js/component/servo/v1/servo_pb.js b/gen/js/component/servo/v1/servo_pb.js new file mode 100644 index 000000000..8ebde93d4 --- /dev/null +++ b/gen/js/component/servo/v1/servo_pb.js @@ -0,0 +1,1086 @@ +// source: component/servo/v1/servo.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.viam.component.servo.v1.GetPositionRequest', null, global); +goog.exportSymbol('proto.viam.component.servo.v1.GetPositionResponse', null, global); +goog.exportSymbol('proto.viam.component.servo.v1.MoveRequest', null, global); +goog.exportSymbol('proto.viam.component.servo.v1.MoveResponse', null, global); +goog.exportSymbol('proto.viam.component.servo.v1.Status', null, global); +goog.exportSymbol('proto.viam.component.servo.v1.StopRequest', null, global); +goog.exportSymbol('proto.viam.component.servo.v1.StopResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.servo.v1.MoveRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.servo.v1.MoveRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.servo.v1.MoveRequest.displayName = 'proto.viam.component.servo.v1.MoveRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.servo.v1.MoveResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.servo.v1.MoveResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.servo.v1.MoveResponse.displayName = 'proto.viam.component.servo.v1.MoveResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.servo.v1.GetPositionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.servo.v1.GetPositionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.servo.v1.GetPositionRequest.displayName = 'proto.viam.component.servo.v1.GetPositionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.servo.v1.GetPositionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.servo.v1.GetPositionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.servo.v1.GetPositionResponse.displayName = 'proto.viam.component.servo.v1.GetPositionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.servo.v1.StopRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.servo.v1.StopRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.servo.v1.StopRequest.displayName = 'proto.viam.component.servo.v1.StopRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.servo.v1.StopResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.servo.v1.StopResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.servo.v1.StopResponse.displayName = 'proto.viam.component.servo.v1.StopResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.component.servo.v1.Status = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.component.servo.v1.Status, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.component.servo.v1.Status.displayName = 'proto.viam.component.servo.v1.Status'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.servo.v1.MoveRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.servo.v1.MoveRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.servo.v1.MoveRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.MoveRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + angleDeg: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.servo.v1.MoveRequest} + */ +proto.viam.component.servo.v1.MoveRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.servo.v1.MoveRequest; + return proto.viam.component.servo.v1.MoveRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.servo.v1.MoveRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.servo.v1.MoveRequest} + */ +proto.viam.component.servo.v1.MoveRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setAngleDeg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.servo.v1.MoveRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.servo.v1.MoveRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.servo.v1.MoveRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.MoveRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAngleDeg(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.servo.v1.MoveRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.servo.v1.MoveRequest} returns this + */ +proto.viam.component.servo.v1.MoveRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint32 angle_deg = 2; + * @return {number} + */ +proto.viam.component.servo.v1.MoveRequest.prototype.getAngleDeg = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.servo.v1.MoveRequest} returns this + */ +proto.viam.component.servo.v1.MoveRequest.prototype.setAngleDeg = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.servo.v1.MoveResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.servo.v1.MoveResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.servo.v1.MoveResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.MoveResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.servo.v1.MoveResponse} + */ +proto.viam.component.servo.v1.MoveResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.servo.v1.MoveResponse; + return proto.viam.component.servo.v1.MoveResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.servo.v1.MoveResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.servo.v1.MoveResponse} + */ +proto.viam.component.servo.v1.MoveResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.servo.v1.MoveResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.servo.v1.MoveResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.servo.v1.MoveResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.MoveResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.servo.v1.GetPositionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.servo.v1.GetPositionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.servo.v1.GetPositionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.GetPositionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.servo.v1.GetPositionRequest} + */ +proto.viam.component.servo.v1.GetPositionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.servo.v1.GetPositionRequest; + return proto.viam.component.servo.v1.GetPositionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.servo.v1.GetPositionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.servo.v1.GetPositionRequest} + */ +proto.viam.component.servo.v1.GetPositionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.servo.v1.GetPositionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.servo.v1.GetPositionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.servo.v1.GetPositionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.GetPositionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.servo.v1.GetPositionRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.servo.v1.GetPositionRequest} returns this + */ +proto.viam.component.servo.v1.GetPositionRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.servo.v1.GetPositionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.servo.v1.GetPositionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.servo.v1.GetPositionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.GetPositionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + positionDeg: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.servo.v1.GetPositionResponse} + */ +proto.viam.component.servo.v1.GetPositionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.servo.v1.GetPositionResponse; + return proto.viam.component.servo.v1.GetPositionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.servo.v1.GetPositionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.servo.v1.GetPositionResponse} + */ +proto.viam.component.servo.v1.GetPositionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPositionDeg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.servo.v1.GetPositionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.servo.v1.GetPositionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.servo.v1.GetPositionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.GetPositionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPositionDeg(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } +}; + + +/** + * optional uint32 position_deg = 1; + * @return {number} + */ +proto.viam.component.servo.v1.GetPositionResponse.prototype.getPositionDeg = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.servo.v1.GetPositionResponse} returns this + */ +proto.viam.component.servo.v1.GetPositionResponse.prototype.setPositionDeg = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.servo.v1.StopRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.servo.v1.StopRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.servo.v1.StopRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.StopRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.servo.v1.StopRequest} + */ +proto.viam.component.servo.v1.StopRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.servo.v1.StopRequest; + return proto.viam.component.servo.v1.StopRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.servo.v1.StopRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.servo.v1.StopRequest} + */ +proto.viam.component.servo.v1.StopRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.servo.v1.StopRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.servo.v1.StopRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.servo.v1.StopRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.StopRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.component.servo.v1.StopRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.component.servo.v1.StopRequest} returns this + */ +proto.viam.component.servo.v1.StopRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.servo.v1.StopResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.servo.v1.StopResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.servo.v1.StopResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.StopResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.servo.v1.StopResponse} + */ +proto.viam.component.servo.v1.StopResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.servo.v1.StopResponse; + return proto.viam.component.servo.v1.StopResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.servo.v1.StopResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.servo.v1.StopResponse} + */ +proto.viam.component.servo.v1.StopResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.servo.v1.StopResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.servo.v1.StopResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.servo.v1.StopResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.StopResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.component.servo.v1.Status.prototype.toObject = function(opt_includeInstance) { + return proto.viam.component.servo.v1.Status.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.component.servo.v1.Status} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.Status.toObject = function(includeInstance, msg) { + var f, obj = { + positionDeg: jspb.Message.getFieldWithDefault(msg, 1, 0), + isMoving: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.component.servo.v1.Status} + */ +proto.viam.component.servo.v1.Status.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.component.servo.v1.Status; + return proto.viam.component.servo.v1.Status.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.component.servo.v1.Status} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.component.servo.v1.Status} + */ +proto.viam.component.servo.v1.Status.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPositionDeg(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsMoving(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.component.servo.v1.Status.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.component.servo.v1.Status.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.component.servo.v1.Status} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.component.servo.v1.Status.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPositionDeg(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getIsMoving(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint32 position_deg = 1; + * @return {number} + */ +proto.viam.component.servo.v1.Status.prototype.getPositionDeg = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.component.servo.v1.Status} returns this + */ +proto.viam.component.servo.v1.Status.prototype.setPositionDeg = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool is_moving = 2; + * @return {boolean} + */ +proto.viam.component.servo.v1.Status.prototype.getIsMoving = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.component.servo.v1.Status} returns this + */ +proto.viam.component.servo.v1.Status.prototype.setIsMoving = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +goog.object.extend(exports, proto.viam.component.servo.v1); diff --git a/gen/js/component/servo/v1/servo_pb_service.d.ts b/gen/js/component/servo/v1/servo_pb_service.d.ts new file mode 100644 index 000000000..40a20d240 --- /dev/null +++ b/gen/js/component/servo/v1/servo_pb_service.d.ts @@ -0,0 +1,101 @@ +// package: viam.component.servo.v1 +// file: component/servo/v1/servo.proto + +import * as component_servo_v1_servo_pb from "../../../component/servo/v1/servo_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type ServoServiceMove = { + readonly methodName: string; + readonly service: typeof ServoService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_servo_v1_servo_pb.MoveRequest; + readonly responseType: typeof component_servo_v1_servo_pb.MoveResponse; +}; + +type ServoServiceGetPosition = { + readonly methodName: string; + readonly service: typeof ServoService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_servo_v1_servo_pb.GetPositionRequest; + readonly responseType: typeof component_servo_v1_servo_pb.GetPositionResponse; +}; + +type ServoServiceStop = { + readonly methodName: string; + readonly service: typeof ServoService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof component_servo_v1_servo_pb.StopRequest; + readonly responseType: typeof component_servo_v1_servo_pb.StopResponse; +}; + +export class ServoService { + static readonly serviceName: string; + static readonly Move: ServoServiceMove; + static readonly GetPosition: ServoServiceGetPosition; + static readonly Stop: ServoServiceStop; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class ServoServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + move( + requestMessage: component_servo_v1_servo_pb.MoveRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_servo_v1_servo_pb.MoveResponse|null) => void + ): UnaryResponse; + move( + requestMessage: component_servo_v1_servo_pb.MoveRequest, + callback: (error: ServiceError|null, responseMessage: component_servo_v1_servo_pb.MoveResponse|null) => void + ): UnaryResponse; + getPosition( + requestMessage: component_servo_v1_servo_pb.GetPositionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_servo_v1_servo_pb.GetPositionResponse|null) => void + ): UnaryResponse; + getPosition( + requestMessage: component_servo_v1_servo_pb.GetPositionRequest, + callback: (error: ServiceError|null, responseMessage: component_servo_v1_servo_pb.GetPositionResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_servo_v1_servo_pb.StopRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: component_servo_v1_servo_pb.StopResponse|null) => void + ): UnaryResponse; + stop( + requestMessage: component_servo_v1_servo_pb.StopRequest, + callback: (error: ServiceError|null, responseMessage: component_servo_v1_servo_pb.StopResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/component/servo/v1/servo_pb_service.js b/gen/js/component/servo/v1/servo_pb_service.js new file mode 100644 index 000000000..7dc9f0a65 --- /dev/null +++ b/gen/js/component/servo/v1/servo_pb_service.js @@ -0,0 +1,141 @@ +// package: viam.component.servo.v1 +// file: component/servo/v1/servo.proto + +var component_servo_v1_servo_pb = require("../../../component/servo/v1/servo_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var ServoService = (function () { + function ServoService() {} + ServoService.serviceName = "viam.component.servo.v1.ServoService"; + return ServoService; +}()); + +ServoService.Move = { + methodName: "Move", + service: ServoService, + requestStream: false, + responseStream: false, + requestType: component_servo_v1_servo_pb.MoveRequest, + responseType: component_servo_v1_servo_pb.MoveResponse +}; + +ServoService.GetPosition = { + methodName: "GetPosition", + service: ServoService, + requestStream: false, + responseStream: false, + requestType: component_servo_v1_servo_pb.GetPositionRequest, + responseType: component_servo_v1_servo_pb.GetPositionResponse +}; + +ServoService.Stop = { + methodName: "Stop", + service: ServoService, + requestStream: false, + responseStream: false, + requestType: component_servo_v1_servo_pb.StopRequest, + responseType: component_servo_v1_servo_pb.StopResponse +}; + +exports.ServoService = ServoService; + +function ServoServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +ServoServiceClient.prototype.move = function move(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ServoService.Move, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ServoServiceClient.prototype.getPosition = function getPosition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ServoService.GetPosition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +ServoServiceClient.prototype.stop = function stop(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ServoService.Stop, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.ServoServiceClient = ServoServiceClient; + diff --git a/gen/js/google/api/annotations_pb.d.ts b/gen/js/google/api/annotations_pb.d.ts new file mode 100644 index 000000000..adf3b88c3 --- /dev/null +++ b/gen/js/google/api/annotations_pb.d.ts @@ -0,0 +1,9 @@ +// package: google.api +// file: google/api/annotations.proto + +import * as jspb from "google-protobuf"; +import * as google_api_http_pb from "../../google/api/http_pb"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + + export const http: jspb.ExtensionFieldInfo; + diff --git a/gen/js/google/api/annotations_pb.js b/gen/js/google/api/annotations_pb.js new file mode 100644 index 000000000..58397dcb5 --- /dev/null +++ b/gen/js/google/api/annotations_pb.js @@ -0,0 +1,48 @@ +// source: google/api/annotations.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_http_pb = require('../../google/api/http_pb.js'); +goog.object.extend(proto, google_api_http_pb); +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.http', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `http`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.http = new jspb.ExtensionFieldInfo( + 72295728, + {http: 0}, + google_api_http_pb.HttpRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + google_api_http_pb.HttpRule.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.http, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + google_api_http_pb.HttpRule.serializeBinaryToWriter, + google_api_http_pb.HttpRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http; + +goog.object.extend(exports, proto.google.api); diff --git a/gen/js/google/api/annotations_pb_service.d.ts b/gen/js/google/api/annotations_pb_service.d.ts new file mode 100644 index 000000000..a2a92a7fc --- /dev/null +++ b/gen/js/google/api/annotations_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/annotations.proto + diff --git a/gen/js/google/api/annotations_pb_service.js b/gen/js/google/api/annotations_pb_service.js new file mode 100644 index 000000000..a2a92a7fc --- /dev/null +++ b/gen/js/google/api/annotations_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/annotations.proto + diff --git a/gen/js/google/api/client_pb.d.ts b/gen/js/google/api/client_pb.d.ts new file mode 100644 index 000000000..29d8eec8e --- /dev/null +++ b/gen/js/google/api/client_pb.d.ts @@ -0,0 +1,12 @@ +// package: google.api +// file: google/api/client.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + + export const methodSignature: jspb.ExtensionFieldInfo; + + export const defaultHost: jspb.ExtensionFieldInfo; + + export const oauthScopes: jspb.ExtensionFieldInfo; + diff --git a/gen/js/google/api/client_pb.js b/gen/js/google/api/client_pb.js new file mode 100644 index 000000000..844040ff7 --- /dev/null +++ b/gen/js/google/api/client_pb.js @@ -0,0 +1,98 @@ +// source: google/api/client.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.defaultHost', null, global); +goog.exportSymbol('proto.google.api.methodSignatureList', null, global); +goog.exportSymbol('proto.google.api.oauthScopes', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `methodSignatureList`. + * @type {!jspb.ExtensionFieldInfo>} + */ +proto.google.api.methodSignatureList = new jspb.ExtensionFieldInfo( + 1051, + {methodSignatureList: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 1); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[1051] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.methodSignatureList, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeRepeatedString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[1051] = proto.google.api.methodSignatureList; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `defaultHost`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.defaultHost = new jspb.ExtensionFieldInfo( + 1049, + {defaultHost: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[1049] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.defaultHost, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.ServiceOptions.extensions[1049] = proto.google.api.defaultHost; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `oauthScopes`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.oauthScopes = new jspb.ExtensionFieldInfo( + 1050, + {oauthScopes: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[1050] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.oauthScopes, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.ServiceOptions.extensions[1050] = proto.google.api.oauthScopes; + +goog.object.extend(exports, proto.google.api); diff --git a/gen/js/google/api/client_pb_service.d.ts b/gen/js/google/api/client_pb_service.d.ts new file mode 100644 index 000000000..365b5cc83 --- /dev/null +++ b/gen/js/google/api/client_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/client.proto + diff --git a/gen/js/google/api/client_pb_service.js b/gen/js/google/api/client_pb_service.js new file mode 100644 index 000000000..365b5cc83 --- /dev/null +++ b/gen/js/google/api/client_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/client.proto + diff --git a/gen/js/google/api/expr/v1alpha1/checked_pb.d.ts b/gen/js/google/api/expr/v1alpha1/checked_pb.d.ts new file mode 100644 index 000000000..fa466f981 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/checked_pb.d.ts @@ -0,0 +1,454 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/checked.proto + +import * as jspb from "google-protobuf"; +import * as google_api_expr_v1alpha1_syntax_pb from "../../../../google/api/expr/v1alpha1/syntax_pb"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class CheckedExpr extends jspb.Message { + getReferenceMapMap(): jspb.Map; + clearReferenceMapMap(): void; + getTypeMapMap(): jspb.Map; + clearTypeMapMap(): void; + hasSourceInfo(): boolean; + clearSourceInfo(): void; + getSourceInfo(): google_api_expr_v1alpha1_syntax_pb.SourceInfo | undefined; + setSourceInfo(value?: google_api_expr_v1alpha1_syntax_pb.SourceInfo): void; + + getExprVersion(): string; + setExprVersion(value: string): void; + + hasExpr(): boolean; + clearExpr(): void; + getExpr(): google_api_expr_v1alpha1_syntax_pb.Expr | undefined; + setExpr(value?: google_api_expr_v1alpha1_syntax_pb.Expr): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckedExpr.AsObject; + static toObject(includeInstance: boolean, msg: CheckedExpr): CheckedExpr.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CheckedExpr, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckedExpr; + static deserializeBinaryFromReader(message: CheckedExpr, reader: jspb.BinaryReader): CheckedExpr; +} + +export namespace CheckedExpr { + export type AsObject = { + referenceMapMap: Array<[number, Reference.AsObject]>, + typeMapMap: Array<[number, Type.AsObject]>, + sourceInfo?: google_api_expr_v1alpha1_syntax_pb.SourceInfo.AsObject, + exprVersion: string, + expr?: google_api_expr_v1alpha1_syntax_pb.Expr.AsObject, + } +} + +export class Type extends jspb.Message { + hasDyn(): boolean; + clearDyn(): void; + getDyn(): google_protobuf_empty_pb.Empty | undefined; + setDyn(value?: google_protobuf_empty_pb.Empty): void; + + hasNull(): boolean; + clearNull(): void; + getNull(): google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]; + setNull(value: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]): void; + + hasPrimitive(): boolean; + clearPrimitive(): void; + getPrimitive(): Type.PrimitiveTypeMap[keyof Type.PrimitiveTypeMap]; + setPrimitive(value: Type.PrimitiveTypeMap[keyof Type.PrimitiveTypeMap]): void; + + hasWrapper(): boolean; + clearWrapper(): void; + getWrapper(): Type.PrimitiveTypeMap[keyof Type.PrimitiveTypeMap]; + setWrapper(value: Type.PrimitiveTypeMap[keyof Type.PrimitiveTypeMap]): void; + + hasWellKnown(): boolean; + clearWellKnown(): void; + getWellKnown(): Type.WellKnownTypeMap[keyof Type.WellKnownTypeMap]; + setWellKnown(value: Type.WellKnownTypeMap[keyof Type.WellKnownTypeMap]): void; + + hasListType(): boolean; + clearListType(): void; + getListType(): Type.ListType | undefined; + setListType(value?: Type.ListType): void; + + hasMapType(): boolean; + clearMapType(): void; + getMapType(): Type.MapType | undefined; + setMapType(value?: Type.MapType): void; + + hasFunction(): boolean; + clearFunction(): void; + getFunction(): Type.FunctionType | undefined; + setFunction(value?: Type.FunctionType): void; + + hasMessageType(): boolean; + clearMessageType(): void; + getMessageType(): string; + setMessageType(value: string): void; + + hasTypeParam(): boolean; + clearTypeParam(): void; + getTypeParam(): string; + setTypeParam(value: string): void; + + hasType(): boolean; + clearType(): void; + getType(): Type | undefined; + setType(value?: Type): void; + + hasError(): boolean; + clearError(): void; + getError(): google_protobuf_empty_pb.Empty | undefined; + setError(value?: google_protobuf_empty_pb.Empty): void; + + hasAbstractType(): boolean; + clearAbstractType(): void; + getAbstractType(): Type.AbstractType | undefined; + setAbstractType(value?: Type.AbstractType): void; + + getTypeKindCase(): Type.TypeKindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Type.AsObject; + static toObject(includeInstance: boolean, msg: Type): Type.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Type, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Type; + static deserializeBinaryFromReader(message: Type, reader: jspb.BinaryReader): Type; +} + +export namespace Type { + export type AsObject = { + dyn?: google_protobuf_empty_pb.Empty.AsObject, + pb_null: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap], + primitive: Type.PrimitiveTypeMap[keyof Type.PrimitiveTypeMap], + wrapper: Type.PrimitiveTypeMap[keyof Type.PrimitiveTypeMap], + wellKnown: Type.WellKnownTypeMap[keyof Type.WellKnownTypeMap], + listType?: Type.ListType.AsObject, + mapType?: Type.MapType.AsObject, + pb_function?: Type.FunctionType.AsObject, + messageType: string, + typeParam: string, + type?: Type.AsObject, + error?: google_protobuf_empty_pb.Empty.AsObject, + abstractType?: Type.AbstractType.AsObject, + } + + export class ListType extends jspb.Message { + hasElemType(): boolean; + clearElemType(): void; + getElemType(): Type | undefined; + setElemType(value?: Type): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListType.AsObject; + static toObject(includeInstance: boolean, msg: ListType): ListType.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListType, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListType; + static deserializeBinaryFromReader(message: ListType, reader: jspb.BinaryReader): ListType; + } + + export namespace ListType { + export type AsObject = { + elemType?: Type.AsObject, + } + } + + export class MapType extends jspb.Message { + hasKeyType(): boolean; + clearKeyType(): void; + getKeyType(): Type | undefined; + setKeyType(value?: Type): void; + + hasValueType(): boolean; + clearValueType(): void; + getValueType(): Type | undefined; + setValueType(value?: Type): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MapType.AsObject; + static toObject(includeInstance: boolean, msg: MapType): MapType.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MapType, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MapType; + static deserializeBinaryFromReader(message: MapType, reader: jspb.BinaryReader): MapType; + } + + export namespace MapType { + export type AsObject = { + keyType?: Type.AsObject, + valueType?: Type.AsObject, + } + } + + export class FunctionType extends jspb.Message { + hasResultType(): boolean; + clearResultType(): void; + getResultType(): Type | undefined; + setResultType(value?: Type): void; + + clearArgTypesList(): void; + getArgTypesList(): Array; + setArgTypesList(value: Array): void; + addArgTypes(value?: Type, index?: number): Type; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FunctionType.AsObject; + static toObject(includeInstance: boolean, msg: FunctionType): FunctionType.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FunctionType, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FunctionType; + static deserializeBinaryFromReader(message: FunctionType, reader: jspb.BinaryReader): FunctionType; + } + + export namespace FunctionType { + export type AsObject = { + resultType?: Type.AsObject, + argTypesList: Array, + } + } + + export class AbstractType extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearParameterTypesList(): void; + getParameterTypesList(): Array; + setParameterTypesList(value: Array): void; + addParameterTypes(value?: Type, index?: number): Type; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AbstractType.AsObject; + static toObject(includeInstance: boolean, msg: AbstractType): AbstractType.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AbstractType, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AbstractType; + static deserializeBinaryFromReader(message: AbstractType, reader: jspb.BinaryReader): AbstractType; + } + + export namespace AbstractType { + export type AsObject = { + name: string, + parameterTypesList: Array, + } + } + + export interface PrimitiveTypeMap { + PRIMITIVE_TYPE_UNSPECIFIED: 0; + BOOL: 1; + INT64: 2; + UINT64: 3; + DOUBLE: 4; + STRING: 5; + BYTES: 6; + } + + export const PrimitiveType: PrimitiveTypeMap; + + export interface WellKnownTypeMap { + WELL_KNOWN_TYPE_UNSPECIFIED: 0; + ANY: 1; + TIMESTAMP: 2; + DURATION: 3; + } + + export const WellKnownType: WellKnownTypeMap; + + export enum TypeKindCase { + TYPE_KIND_NOT_SET = 0, + DYN = 1, + NULL = 2, + PRIMITIVE = 3, + WRAPPER = 4, + WELL_KNOWN = 5, + LIST_TYPE = 6, + MAP_TYPE = 7, + FUNCTION = 8, + MESSAGE_TYPE = 9, + TYPE_PARAM = 10, + TYPE = 11, + ERROR = 12, + ABSTRACT_TYPE = 14, + } +} + +export class Decl extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasIdent(): boolean; + clearIdent(): void; + getIdent(): Decl.IdentDecl | undefined; + setIdent(value?: Decl.IdentDecl): void; + + hasFunction(): boolean; + clearFunction(): void; + getFunction(): Decl.FunctionDecl | undefined; + setFunction(value?: Decl.FunctionDecl): void; + + getDeclKindCase(): Decl.DeclKindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Decl.AsObject; + static toObject(includeInstance: boolean, msg: Decl): Decl.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Decl, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Decl; + static deserializeBinaryFromReader(message: Decl, reader: jspb.BinaryReader): Decl; +} + +export namespace Decl { + export type AsObject = { + name: string, + ident?: Decl.IdentDecl.AsObject, + pb_function?: Decl.FunctionDecl.AsObject, + } + + export class IdentDecl extends jspb.Message { + hasType(): boolean; + clearType(): void; + getType(): Type | undefined; + setType(value?: Type): void; + + hasValue(): boolean; + clearValue(): void; + getValue(): google_api_expr_v1alpha1_syntax_pb.Constant | undefined; + setValue(value?: google_api_expr_v1alpha1_syntax_pb.Constant): void; + + getDoc(): string; + setDoc(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentDecl.AsObject; + static toObject(includeInstance: boolean, msg: IdentDecl): IdentDecl.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentDecl, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentDecl; + static deserializeBinaryFromReader(message: IdentDecl, reader: jspb.BinaryReader): IdentDecl; + } + + export namespace IdentDecl { + export type AsObject = { + type?: Type.AsObject, + value?: google_api_expr_v1alpha1_syntax_pb.Constant.AsObject, + doc: string, + } + } + + export class FunctionDecl extends jspb.Message { + clearOverloadsList(): void; + getOverloadsList(): Array; + setOverloadsList(value: Array): void; + addOverloads(value?: Decl.FunctionDecl.Overload, index?: number): Decl.FunctionDecl.Overload; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FunctionDecl.AsObject; + static toObject(includeInstance: boolean, msg: FunctionDecl): FunctionDecl.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FunctionDecl, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FunctionDecl; + static deserializeBinaryFromReader(message: FunctionDecl, reader: jspb.BinaryReader): FunctionDecl; + } + + export namespace FunctionDecl { + export type AsObject = { + overloadsList: Array, + } + + export class Overload extends jspb.Message { + getOverloadId(): string; + setOverloadId(value: string): void; + + clearParamsList(): void; + getParamsList(): Array; + setParamsList(value: Array): void; + addParams(value?: Type, index?: number): Type; + + clearTypeParamsList(): void; + getTypeParamsList(): Array; + setTypeParamsList(value: Array): void; + addTypeParams(value: string, index?: number): string; + + hasResultType(): boolean; + clearResultType(): void; + getResultType(): Type | undefined; + setResultType(value?: Type): void; + + getIsInstanceFunction(): boolean; + setIsInstanceFunction(value: boolean): void; + + getDoc(): string; + setDoc(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Overload.AsObject; + static toObject(includeInstance: boolean, msg: Overload): Overload.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Overload, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Overload; + static deserializeBinaryFromReader(message: Overload, reader: jspb.BinaryReader): Overload; + } + + export namespace Overload { + export type AsObject = { + overloadId: string, + paramsList: Array, + typeParamsList: Array, + resultType?: Type.AsObject, + isInstanceFunction: boolean, + doc: string, + } + } + } + + export enum DeclKindCase { + DECL_KIND_NOT_SET = 0, + IDENT = 2, + FUNCTION = 3, + } +} + +export class Reference extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearOverloadIdList(): void; + getOverloadIdList(): Array; + setOverloadIdList(value: Array): void; + addOverloadId(value: string, index?: number): string; + + hasValue(): boolean; + clearValue(): void; + getValue(): google_api_expr_v1alpha1_syntax_pb.Constant | undefined; + setValue(value?: google_api_expr_v1alpha1_syntax_pb.Constant): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Reference.AsObject; + static toObject(includeInstance: boolean, msg: Reference): Reference.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Reference, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Reference; + static deserializeBinaryFromReader(message: Reference, reader: jspb.BinaryReader): Reference; +} + +export namespace Reference { + export type AsObject = { + name: string, + overloadIdList: Array, + value?: google_api_expr_v1alpha1_syntax_pb.Constant.AsObject, + } +} + diff --git a/gen/js/google/api/expr/v1alpha1/checked_pb.js b/gen/js/google/api/expr/v1alpha1/checked_pb.js new file mode 100644 index 000000000..370837f25 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/checked_pb.js @@ -0,0 +1,3364 @@ +// source: google/api/expr/v1alpha1/checked.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_expr_v1alpha1_syntax_pb = require('../../../../google/api/expr/v1alpha1/syntax_pb.js'); +goog.object.extend(proto, google_api_expr_v1alpha1_syntax_pb); +var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); +goog.object.extend(proto, google_protobuf_empty_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.google.api.expr.v1alpha1.CheckedExpr', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Decl', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Decl.DeclKindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Decl.FunctionDecl', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Decl.IdentDecl', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Reference', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Type', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Type.AbstractType', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Type.FunctionType', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Type.ListType', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Type.MapType', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Type.PrimitiveType', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Type.TypeKindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Type.WellKnownType', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.CheckedExpr = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.CheckedExpr, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.CheckedExpr.displayName = 'proto.google.api.expr.v1alpha1.CheckedExpr'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Type = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.Type.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Type, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Type.displayName = 'proto.google.api.expr.v1alpha1.Type'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Type.ListType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Type.ListType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Type.ListType.displayName = 'proto.google.api.expr.v1alpha1.Type.ListType'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Type.MapType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Type.MapType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Type.MapType.displayName = 'proto.google.api.expr.v1alpha1.Type.MapType'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Type.FunctionType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Type.FunctionType.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Type.FunctionType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Type.FunctionType.displayName = 'proto.google.api.expr.v1alpha1.Type.FunctionType'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Type.AbstractType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Type.AbstractType.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Type.AbstractType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Type.AbstractType.displayName = 'proto.google.api.expr.v1alpha1.Type.AbstractType'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Decl = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.Decl.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Decl, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Decl.displayName = 'proto.google.api.expr.v1alpha1.Decl'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Decl.IdentDecl, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Decl.IdentDecl.displayName = 'proto.google.api.expr.v1alpha1.Decl.IdentDecl'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Decl.FunctionDecl.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Decl.FunctionDecl, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Decl.FunctionDecl.displayName = 'proto.google.api.expr.v1alpha1.Decl.FunctionDecl'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.displayName = 'proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Reference = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Reference.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Reference, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Reference.displayName = 'proto.google.api.expr.v1alpha1.Reference'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.CheckedExpr.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.CheckedExpr} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.CheckedExpr.toObject = function(includeInstance, msg) { + var f, obj = { + referenceMapMap: (f = msg.getReferenceMapMap()) ? f.toObject(includeInstance, proto.google.api.expr.v1alpha1.Reference.toObject) : [], + typeMapMap: (f = msg.getTypeMapMap()) ? f.toObject(includeInstance, proto.google.api.expr.v1alpha1.Type.toObject) : [], + sourceInfo: (f = msg.getSourceInfo()) && google_api_expr_v1alpha1_syntax_pb.SourceInfo.toObject(includeInstance, f), + exprVersion: jspb.Message.getFieldWithDefault(msg, 6, ""), + expr: (f = msg.getExpr()) && google_api_expr_v1alpha1_syntax_pb.Expr.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.CheckedExpr} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.CheckedExpr; + return proto.google.api.expr.v1alpha1.CheckedExpr.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.CheckedExpr} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.CheckedExpr} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = msg.getReferenceMapMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readMessage, proto.google.api.expr.v1alpha1.Reference.deserializeBinaryFromReader, 0, new proto.google.api.expr.v1alpha1.Reference()); + }); + break; + case 3: + var value = msg.getTypeMapMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readMessage, proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader, 0, new proto.google.api.expr.v1alpha1.Type()); + }); + break; + case 5: + var value = new google_api_expr_v1alpha1_syntax_pb.SourceInfo; + reader.readMessage(value,google_api_expr_v1alpha1_syntax_pb.SourceInfo.deserializeBinaryFromReader); + msg.setSourceInfo(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setExprVersion(value); + break; + case 4: + var value = new google_api_expr_v1alpha1_syntax_pb.Expr; + reader.readMessage(value,google_api_expr_v1alpha1_syntax_pb.Expr.deserializeBinaryFromReader); + msg.setExpr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.CheckedExpr.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.CheckedExpr} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.CheckedExpr.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReferenceMapMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeMessage, proto.google.api.expr.v1alpha1.Reference.serializeBinaryToWriter); + } + f = message.getTypeMapMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeMessage, proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter); + } + f = message.getSourceInfo(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_api_expr_v1alpha1_syntax_pb.SourceInfo.serializeBinaryToWriter + ); + } + f = message.getExprVersion(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getExpr(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_api_expr_v1alpha1_syntax_pb.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * map reference_map = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.getReferenceMapMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + proto.google.api.expr.v1alpha1.Reference)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.api.expr.v1alpha1.CheckedExpr} returns this + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.clearReferenceMapMap = function() { + this.getReferenceMapMap().clear(); + return this;}; + + +/** + * map type_map = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.getTypeMapMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + proto.google.api.expr.v1alpha1.Type)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.api.expr.v1alpha1.CheckedExpr} returns this + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.clearTypeMapMap = function() { + this.getTypeMapMap().clear(); + return this;}; + + +/** + * optional SourceInfo source_info = 5; + * @return {?proto.google.api.expr.v1alpha1.SourceInfo} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.getSourceInfo = function() { + return /** @type{?proto.google.api.expr.v1alpha1.SourceInfo} */ ( + jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_syntax_pb.SourceInfo, 5)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.SourceInfo|undefined} value + * @return {!proto.google.api.expr.v1alpha1.CheckedExpr} returns this +*/ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.setSourceInfo = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.CheckedExpr} returns this + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.clearSourceInfo = function() { + return this.setSourceInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.hasSourceInfo = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string expr_version = 6; + * @return {string} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.getExprVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.CheckedExpr} returns this + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.setExprVersion = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional Expr expr = 4; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.getExpr = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_syntax_pb.Expr, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.CheckedExpr} returns this +*/ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.setExpr = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.CheckedExpr} returns this + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.clearExpr = function() { + return this.setExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.CheckedExpr.prototype.hasExpr = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1alpha1.Type.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,14]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1alpha1.Type.TypeKindCase = { + TYPE_KIND_NOT_SET: 0, + DYN: 1, + NULL: 2, + PRIMITIVE: 3, + WRAPPER: 4, + WELL_KNOWN: 5, + LIST_TYPE: 6, + MAP_TYPE: 7, + FUNCTION: 8, + MESSAGE_TYPE: 9, + TYPE_PARAM: 10, + TYPE: 11, + ERROR: 12, + ABSTRACT_TYPE: 14 +}; + +/** + * @return {proto.google.api.expr.v1alpha1.Type.TypeKindCase} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getTypeKindCase = function() { + return /** @type {proto.google.api.expr.v1alpha1.Type.TypeKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Type.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Type.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Type} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.toObject = function(includeInstance, msg) { + var f, obj = { + dyn: (f = msg.getDyn()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f), + pb_null: jspb.Message.getFieldWithDefault(msg, 2, 0), + primitive: jspb.Message.getFieldWithDefault(msg, 3, 0), + wrapper: jspb.Message.getFieldWithDefault(msg, 4, 0), + wellKnown: jspb.Message.getFieldWithDefault(msg, 5, 0), + listType: (f = msg.getListType()) && proto.google.api.expr.v1alpha1.Type.ListType.toObject(includeInstance, f), + mapType: (f = msg.getMapType()) && proto.google.api.expr.v1alpha1.Type.MapType.toObject(includeInstance, f), + pb_function: (f = msg.getFunction()) && proto.google.api.expr.v1alpha1.Type.FunctionType.toObject(includeInstance, f), + messageType: jspb.Message.getFieldWithDefault(msg, 9, ""), + typeParam: jspb.Message.getFieldWithDefault(msg, 10, ""), + type: (f = msg.getType()) && proto.google.api.expr.v1alpha1.Type.toObject(includeInstance, f), + error: (f = msg.getError()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f), + abstractType: (f = msg.getAbstractType()) && proto.google.api.expr.v1alpha1.Type.AbstractType.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Type.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Type; + return proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Type} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_empty_pb.Empty; + reader.readMessage(value,google_protobuf_empty_pb.Empty.deserializeBinaryFromReader); + msg.setDyn(value); + break; + case 2: + var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum()); + msg.setNull(value); + break; + case 3: + var value = /** @type {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} */ (reader.readEnum()); + msg.setPrimitive(value); + break; + case 4: + var value = /** @type {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} */ (reader.readEnum()); + msg.setWrapper(value); + break; + case 5: + var value = /** @type {!proto.google.api.expr.v1alpha1.Type.WellKnownType} */ (reader.readEnum()); + msg.setWellKnown(value); + break; + case 6: + var value = new proto.google.api.expr.v1alpha1.Type.ListType; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.ListType.deserializeBinaryFromReader); + msg.setListType(value); + break; + case 7: + var value = new proto.google.api.expr.v1alpha1.Type.MapType; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.MapType.deserializeBinaryFromReader); + msg.setMapType(value); + break; + case 8: + var value = new proto.google.api.expr.v1alpha1.Type.FunctionType; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.FunctionType.deserializeBinaryFromReader); + msg.setFunction(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setMessageType(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setTypeParam(value); + break; + case 11: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.setType(value); + break; + case 12: + var value = new google_protobuf_empty_pb.Empty; + reader.readMessage(value,google_protobuf_empty_pb.Empty.deserializeBinaryFromReader); + msg.setError(value); + break; + case 14: + var value = new proto.google.api.expr.v1alpha1.Type.AbstractType; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.AbstractType.deserializeBinaryFromReader); + msg.setAbstractType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Type.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Type} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDyn(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_empty_pb.Empty.serializeBinaryToWriter + ); + } + f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeEnum( + 2, + f + ); + } + f = /** @type {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } + f = /** @type {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeEnum( + 4, + f + ); + } + f = /** @type {!proto.google.api.expr.v1alpha1.Type.WellKnownType} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeEnum( + 5, + f + ); + } + f = message.getListType(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.google.api.expr.v1alpha1.Type.ListType.serializeBinaryToWriter + ); + } + f = message.getMapType(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.api.expr.v1alpha1.Type.MapType.serializeBinaryToWriter + ); + } + f = message.getFunction(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.api.expr.v1alpha1.Type.FunctionType.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, + f + ); + } + f = message.getType(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 12, + f, + google_protobuf_empty_pb.Empty.serializeBinaryToWriter + ); + } + f = message.getAbstractType(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.google.api.expr.v1alpha1.Type.AbstractType.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.google.api.expr.v1alpha1.Type.PrimitiveType = { + PRIMITIVE_TYPE_UNSPECIFIED: 0, + BOOL: 1, + INT64: 2, + UINT64: 3, + DOUBLE: 4, + STRING: 5, + BYTES: 6 +}; + +/** + * @enum {number} + */ +proto.google.api.expr.v1alpha1.Type.WellKnownType = { + WELL_KNOWN_TYPE_UNSPECIFIED: 0, + ANY: 1, + TIMESTAMP: 2, + DURATION: 3 +}; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Type.ListType.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Type.ListType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Type.ListType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.ListType.toObject = function(includeInstance, msg) { + var f, obj = { + elemType: (f = msg.getElemType()) && proto.google.api.expr.v1alpha1.Type.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Type.ListType} + */ +proto.google.api.expr.v1alpha1.Type.ListType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Type.ListType; + return proto.google.api.expr.v1alpha1.Type.ListType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Type.ListType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Type.ListType} + */ +proto.google.api.expr.v1alpha1.Type.ListType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.setElemType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Type.ListType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Type.ListType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Type.ListType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.ListType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getElemType(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Type elem_type = 1; + * @return {?proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Type.ListType.prototype.getElemType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type.ListType} returns this +*/ +proto.google.api.expr.v1alpha1.Type.ListType.prototype.setElemType = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type.ListType} returns this + */ +proto.google.api.expr.v1alpha1.Type.ListType.prototype.clearElemType = function() { + return this.setElemType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.ListType.prototype.hasElemType = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Type.MapType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Type.MapType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.MapType.toObject = function(includeInstance, msg) { + var f, obj = { + keyType: (f = msg.getKeyType()) && proto.google.api.expr.v1alpha1.Type.toObject(includeInstance, f), + valueType: (f = msg.getValueType()) && proto.google.api.expr.v1alpha1.Type.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Type.MapType} + */ +proto.google.api.expr.v1alpha1.Type.MapType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Type.MapType; + return proto.google.api.expr.v1alpha1.Type.MapType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Type.MapType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Type.MapType} + */ +proto.google.api.expr.v1alpha1.Type.MapType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.setKeyType(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.setValueType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Type.MapType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Type.MapType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.MapType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyType(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } + f = message.getValueType(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Type key_type = 1; + * @return {?proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.getKeyType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type.MapType} returns this +*/ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.setKeyType = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type.MapType} returns this + */ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.clearKeyType = function() { + return this.setKeyType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.hasKeyType = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Type value_type = 2; + * @return {?proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.getValueType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type.MapType} returns this +*/ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.setValueType = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type.MapType} returns this + */ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.clearValueType = function() { + return this.setValueType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.MapType.prototype.hasValueType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Type.FunctionType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Type.FunctionType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.toObject = function(includeInstance, msg) { + var f, obj = { + resultType: (f = msg.getResultType()) && proto.google.api.expr.v1alpha1.Type.toObject(includeInstance, f), + argTypesList: jspb.Message.toObjectList(msg.getArgTypesList(), + proto.google.api.expr.v1alpha1.Type.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Type.FunctionType} + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Type.FunctionType; + return proto.google.api.expr.v1alpha1.Type.FunctionType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Type.FunctionType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Type.FunctionType} + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.setResultType(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.addArgTypes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Type.FunctionType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Type.FunctionType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResultType(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } + f = message.getArgTypesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Type result_type = 1; + * @return {?proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.getResultType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type.FunctionType} returns this +*/ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.setResultType = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type.FunctionType} returns this + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.clearResultType = function() { + return this.setResultType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.hasResultType = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Type arg_types = 2; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.getArgTypesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Type, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Type.FunctionType} returns this +*/ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.setArgTypesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Type=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.addArgTypes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.expr.v1alpha1.Type, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Type.FunctionType} returns this + */ +proto.google.api.expr.v1alpha1.Type.FunctionType.prototype.clearArgTypesList = function() { + return this.setArgTypesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Type.AbstractType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Type.AbstractType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + parameterTypesList: jspb.Message.toObjectList(msg.getParameterTypesList(), + proto.google.api.expr.v1alpha1.Type.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Type.AbstractType} + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Type.AbstractType; + return proto.google.api.expr.v1alpha1.Type.AbstractType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Type.AbstractType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Type.AbstractType} + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.addParameterTypes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Type.AbstractType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Type.AbstractType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParameterTypesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Type.AbstractType} returns this + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Type parameter_types = 2; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.prototype.getParameterTypesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Type, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Type.AbstractType} returns this +*/ +proto.google.api.expr.v1alpha1.Type.AbstractType.prototype.setParameterTypesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Type=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.prototype.addParameterTypes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.expr.v1alpha1.Type, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Type.AbstractType} returns this + */ +proto.google.api.expr.v1alpha1.Type.AbstractType.prototype.clearParameterTypesList = function() { + return this.setParameterTypesList([]); +}; + + +/** + * optional google.protobuf.Empty dyn = 1; + * @return {?proto.google.protobuf.Empty} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getDyn = function() { + return /** @type{?proto.google.protobuf.Empty} */ ( + jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Empty|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this +*/ +proto.google.api.expr.v1alpha1.Type.prototype.setDyn = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearDyn = function() { + return this.setDyn(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasDyn = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.NullValue null = 2; + * @return {!proto.google.protobuf.NullValue} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getNull = function() { + return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.google.protobuf.NullValue} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.setNull = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearNull = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasNull = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional PrimitiveType primitive = 3; + * @return {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getPrimitive = function() { + return /** @type {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.setPrimitive = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearPrimitive = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasPrimitive = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional PrimitiveType wrapper = 4; + * @return {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getWrapper = function() { + return /** @type {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Type.PrimitiveType} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.setWrapper = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearWrapper = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasWrapper = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional WellKnownType well_known = 5; + * @return {!proto.google.api.expr.v1alpha1.Type.WellKnownType} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getWellKnown = function() { + return /** @type {!proto.google.api.expr.v1alpha1.Type.WellKnownType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Type.WellKnownType} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.setWellKnown = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearWellKnown = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasWellKnown = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ListType list_type = 6; + * @return {?proto.google.api.expr.v1alpha1.Type.ListType} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getListType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type.ListType} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type.ListType, 6)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type.ListType|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this +*/ +proto.google.api.expr.v1alpha1.Type.prototype.setListType = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearListType = function() { + return this.setListType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasListType = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional MapType map_type = 7; + * @return {?proto.google.api.expr.v1alpha1.Type.MapType} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getMapType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type.MapType} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type.MapType, 7)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type.MapType|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this +*/ +proto.google.api.expr.v1alpha1.Type.prototype.setMapType = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearMapType = function() { + return this.setMapType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasMapType = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional FunctionType function = 8; + * @return {?proto.google.api.expr.v1alpha1.Type.FunctionType} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getFunction = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type.FunctionType} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type.FunctionType, 8)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type.FunctionType|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this +*/ +proto.google.api.expr.v1alpha1.Type.prototype.setFunction = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearFunction = function() { + return this.setFunction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasFunction = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string message_type = 9; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getMessageType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.setMessageType = function(value) { + return jspb.Message.setOneofField(this, 9, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearMessageType = function() { + return jspb.Message.setOneofField(this, 9, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasMessageType = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string type_param = 10; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getTypeParam = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.setTypeParam = function(value) { + return jspb.Message.setOneofField(this, 10, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearTypeParam = function() { + return jspb.Message.setOneofField(this, 10, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasTypeParam = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional Type type = 11; + * @return {?proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type, 11)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this +*/ +proto.google.api.expr.v1alpha1.Type.prototype.setType = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearType = function() { + return this.setType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasType = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional google.protobuf.Empty error = 12; + * @return {?proto.google.protobuf.Empty} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getError = function() { + return /** @type{?proto.google.protobuf.Empty} */ ( + jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 12)); +}; + + +/** + * @param {?proto.google.protobuf.Empty|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this +*/ +proto.google.api.expr.v1alpha1.Type.prototype.setError = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasError = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional AbstractType abstract_type = 14; + * @return {?proto.google.api.expr.v1alpha1.Type.AbstractType} + */ +proto.google.api.expr.v1alpha1.Type.prototype.getAbstractType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type.AbstractType} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type.AbstractType, 14)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type.AbstractType|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Type} returns this +*/ +proto.google.api.expr.v1alpha1.Type.prototype.setAbstractType = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.google.api.expr.v1alpha1.Type.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Type} returns this + */ +proto.google.api.expr.v1alpha1.Type.prototype.clearAbstractType = function() { + return this.setAbstractType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Type.prototype.hasAbstractType = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1alpha1.Decl.oneofGroups_ = [[2,3]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1alpha1.Decl.DeclKindCase = { + DECL_KIND_NOT_SET: 0, + IDENT: 2, + FUNCTION: 3 +}; + +/** + * @return {proto.google.api.expr.v1alpha1.Decl.DeclKindCase} + */ +proto.google.api.expr.v1alpha1.Decl.prototype.getDeclKindCase = function() { + return /** @type {proto.google.api.expr.v1alpha1.Decl.DeclKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.Decl.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Decl.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Decl.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Decl} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Decl.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + ident: (f = msg.getIdent()) && proto.google.api.expr.v1alpha1.Decl.IdentDecl.toObject(includeInstance, f), + pb_function: (f = msg.getFunction()) && proto.google.api.expr.v1alpha1.Decl.FunctionDecl.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Decl} + */ +proto.google.api.expr.v1alpha1.Decl.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Decl; + return proto.google.api.expr.v1alpha1.Decl.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Decl} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Decl} + */ +proto.google.api.expr.v1alpha1.Decl.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.Decl.IdentDecl; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Decl.IdentDecl.deserializeBinaryFromReader); + msg.setIdent(value); + break; + case 3: + var value = new proto.google.api.expr.v1alpha1.Decl.FunctionDecl; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Decl.FunctionDecl.deserializeBinaryFromReader); + msg.setFunction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Decl.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Decl.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Decl} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Decl.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIdent(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Decl.IdentDecl.serializeBinaryToWriter + ); + } + f = message.getFunction(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.expr.v1alpha1.Decl.FunctionDecl.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Decl.IdentDecl.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.toObject = function(includeInstance, msg) { + var f, obj = { + type: (f = msg.getType()) && proto.google.api.expr.v1alpha1.Type.toObject(includeInstance, f), + value: (f = msg.getValue()) && google_api_expr_v1alpha1_syntax_pb.Constant.toObject(includeInstance, f), + doc: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Decl.IdentDecl; + return proto.google.api.expr.v1alpha1.Decl.IdentDecl.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.setType(value); + break; + case 2: + var value = new google_api_expr_v1alpha1_syntax_pb.Constant; + reader.readMessage(value,google_api_expr_v1alpha1_syntax_pb.Constant.deserializeBinaryFromReader); + msg.setValue(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDoc(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Decl.IdentDecl.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_api_expr_v1alpha1_syntax_pb.Constant.serializeBinaryToWriter + ); + } + f = message.getDoc(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Type type = 1; + * @return {?proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.getType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} returns this +*/ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.setType = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} returns this + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.clearType = function() { + return this.setType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.hasType = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Constant value = 2; + * @return {?proto.google.api.expr.v1alpha1.Constant} + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.getValue = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Constant} */ ( + jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_syntax_pb.Constant, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Constant|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} returns this +*/ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} returns this + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.hasValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string doc = 3; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.getDoc = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Decl.IdentDecl} returns this + */ +proto.google.api.expr.v1alpha1.Decl.IdentDecl.prototype.setDoc = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Decl.FunctionDecl.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.toObject = function(includeInstance, msg) { + var f, obj = { + overloadsList: jspb.Message.toObjectList(msg.getOverloadsList(), + proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Decl.FunctionDecl; + return proto.google.api.expr.v1alpha1.Decl.FunctionDecl.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.deserializeBinaryFromReader); + msg.addOverloads(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Decl.FunctionDecl.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOverloadsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.toObject = function(includeInstance, msg) { + var f, obj = { + overloadId: jspb.Message.getFieldWithDefault(msg, 1, ""), + paramsList: jspb.Message.toObjectList(msg.getParamsList(), + proto.google.api.expr.v1alpha1.Type.toObject, includeInstance), + typeParamsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + resultType: (f = msg.getResultType()) && proto.google.api.expr.v1alpha1.Type.toObject(includeInstance, f), + isInstanceFunction: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + doc: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload; + return proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOverloadId(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.addParams(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addTypeParams(value); + break; + case 4: + var value = new proto.google.api.expr.v1alpha1.Type; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Type.deserializeBinaryFromReader); + msg.setResultType(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsInstanceFunction(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setDoc(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOverloadId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getParamsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } + f = message.getTypeParamsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getResultType(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.api.expr.v1alpha1.Type.serializeBinaryToWriter + ); + } + f = message.getIsInstanceFunction(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getDoc(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string overload_id = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.getOverloadId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.setOverloadId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Type params = 2; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.getParamsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Type, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this +*/ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.setParamsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Type=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.addParams = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.expr.v1alpha1.Type, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.clearParamsList = function() { + return this.setParamsList([]); +}; + + +/** + * repeated string type_params = 3; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.getTypeParamsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.setTypeParamsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.addTypeParams = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.clearTypeParamsList = function() { + return this.setTypeParamsList([]); +}; + + +/** + * optional Type result_type = 4; + * @return {?proto.google.api.expr.v1alpha1.Type} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.getResultType = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Type} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Type, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Type|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this +*/ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.setResultType = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.clearResultType = function() { + return this.setResultType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.hasResultType = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool is_instance_function = 5; + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.getIsInstanceFunction = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.setIsInstanceFunction = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional string doc = 6; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.getDoc = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} returns this + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload.prototype.setDoc = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * repeated Overload overloads = 1; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.prototype.getOverloadsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl} returns this +*/ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.prototype.setOverloadsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload} + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.prototype.addOverloads = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1alpha1.Decl.FunctionDecl.Overload, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Decl.FunctionDecl} returns this + */ +proto.google.api.expr.v1alpha1.Decl.FunctionDecl.prototype.clearOverloadsList = function() { + return this.setOverloadsList([]); +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Decl.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Decl} returns this + */ +proto.google.api.expr.v1alpha1.Decl.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional IdentDecl ident = 2; + * @return {?proto.google.api.expr.v1alpha1.Decl.IdentDecl} + */ +proto.google.api.expr.v1alpha1.Decl.prototype.getIdent = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Decl.IdentDecl} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Decl.IdentDecl, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Decl.IdentDecl|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Decl} returns this +*/ +proto.google.api.expr.v1alpha1.Decl.prototype.setIdent = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.google.api.expr.v1alpha1.Decl.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Decl} returns this + */ +proto.google.api.expr.v1alpha1.Decl.prototype.clearIdent = function() { + return this.setIdent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Decl.prototype.hasIdent = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional FunctionDecl function = 3; + * @return {?proto.google.api.expr.v1alpha1.Decl.FunctionDecl} + */ +proto.google.api.expr.v1alpha1.Decl.prototype.getFunction = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Decl.FunctionDecl} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Decl.FunctionDecl, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Decl.FunctionDecl|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Decl} returns this +*/ +proto.google.api.expr.v1alpha1.Decl.prototype.setFunction = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.expr.v1alpha1.Decl.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Decl} returns this + */ +proto.google.api.expr.v1alpha1.Decl.prototype.clearFunction = function() { + return this.setFunction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Decl.prototype.hasFunction = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.Reference.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Reference.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Reference.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Reference} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Reference.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + overloadIdList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + value: (f = msg.getValue()) && google_api_expr_v1alpha1_syntax_pb.Constant.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Reference} + */ +proto.google.api.expr.v1alpha1.Reference.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Reference; + return proto.google.api.expr.v1alpha1.Reference.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Reference} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Reference} + */ +proto.google.api.expr.v1alpha1.Reference.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addOverloadId(value); + break; + case 4: + var value = new google_api_expr_v1alpha1_syntax_pb.Constant; + reader.readMessage(value,google_api_expr_v1alpha1_syntax_pb.Constant.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Reference.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Reference.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Reference} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Reference.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOverloadIdList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_api_expr_v1alpha1_syntax_pb.Constant.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Reference.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Reference} returns this + */ +proto.google.api.expr.v1alpha1.Reference.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string overload_id = 3; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Reference.prototype.getOverloadIdList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Reference} returns this + */ +proto.google.api.expr.v1alpha1.Reference.prototype.setOverloadIdList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Reference} returns this + */ +proto.google.api.expr.v1alpha1.Reference.prototype.addOverloadId = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Reference} returns this + */ +proto.google.api.expr.v1alpha1.Reference.prototype.clearOverloadIdList = function() { + return this.setOverloadIdList([]); +}; + + +/** + * optional Constant value = 4; + * @return {?proto.google.api.expr.v1alpha1.Constant} + */ +proto.google.api.expr.v1alpha1.Reference.prototype.getValue = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Constant} */ ( + jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_syntax_pb.Constant, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Constant|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Reference} returns this +*/ +proto.google.api.expr.v1alpha1.Reference.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Reference} returns this + */ +proto.google.api.expr.v1alpha1.Reference.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Reference.prototype.hasValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.google.api.expr.v1alpha1); diff --git a/gen/js/google/api/expr/v1alpha1/checked_pb_service.d.ts b/gen/js/google/api/expr/v1alpha1/checked_pb_service.d.ts new file mode 100644 index 000000000..ad58956bf --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/checked_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/checked.proto + diff --git a/gen/js/google/api/expr/v1alpha1/checked_pb_service.js b/gen/js/google/api/expr/v1alpha1/checked_pb_service.js new file mode 100644 index 000000000..ad58956bf --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/checked_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/checked.proto + diff --git a/gen/js/google/api/expr/v1alpha1/eval_pb.d.ts b/gen/js/google/api/expr/v1alpha1/eval_pb.d.ts new file mode 100644 index 000000000..a44b1fb51 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/eval_pb.d.ts @@ -0,0 +1,145 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/eval.proto + +import * as jspb from "google-protobuf"; +import * as google_api_expr_v1alpha1_value_pb from "../../../../google/api/expr/v1alpha1/value_pb"; +import * as google_rpc_status_pb from "../../../../google/rpc/status_pb"; + +export class EvalState extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value?: ExprValue, index?: number): ExprValue; + + clearResultsList(): void; + getResultsList(): Array; + setResultsList(value: Array): void; + addResults(value?: EvalState.Result, index?: number): EvalState.Result; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EvalState.AsObject; + static toObject(includeInstance: boolean, msg: EvalState): EvalState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EvalState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EvalState; + static deserializeBinaryFromReader(message: EvalState, reader: jspb.BinaryReader): EvalState; +} + +export namespace EvalState { + export type AsObject = { + valuesList: Array, + resultsList: Array, + } + + export class Result extends jspb.Message { + getExpr(): number; + setExpr(value: number): void; + + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result; + } + + export namespace Result { + export type AsObject = { + expr: number, + value: number, + } + } +} + +export class ExprValue extends jspb.Message { + hasValue(): boolean; + clearValue(): void; + getValue(): google_api_expr_v1alpha1_value_pb.Value | undefined; + setValue(value?: google_api_expr_v1alpha1_value_pb.Value): void; + + hasError(): boolean; + clearError(): void; + getError(): ErrorSet | undefined; + setError(value?: ErrorSet): void; + + hasUnknown(): boolean; + clearUnknown(): void; + getUnknown(): UnknownSet | undefined; + setUnknown(value?: UnknownSet): void; + + getKindCase(): ExprValue.KindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExprValue.AsObject; + static toObject(includeInstance: boolean, msg: ExprValue): ExprValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExprValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExprValue; + static deserializeBinaryFromReader(message: ExprValue, reader: jspb.BinaryReader): ExprValue; +} + +export namespace ExprValue { + export type AsObject = { + value?: google_api_expr_v1alpha1_value_pb.Value.AsObject, + error?: ErrorSet.AsObject, + unknown?: UnknownSet.AsObject, + } + + export enum KindCase { + KIND_NOT_SET = 0, + VALUE = 1, + ERROR = 2, + UNKNOWN = 3, + } +} + +export class ErrorSet extends jspb.Message { + clearErrorsList(): void; + getErrorsList(): Array; + setErrorsList(value: Array): void; + addErrors(value?: google_rpc_status_pb.Status, index?: number): google_rpc_status_pb.Status; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ErrorSet.AsObject; + static toObject(includeInstance: boolean, msg: ErrorSet): ErrorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ErrorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ErrorSet; + static deserializeBinaryFromReader(message: ErrorSet, reader: jspb.BinaryReader): ErrorSet; +} + +export namespace ErrorSet { + export type AsObject = { + errorsList: Array, + } +} + +export class UnknownSet extends jspb.Message { + clearExprsList(): void; + getExprsList(): Array; + setExprsList(value: Array): void; + addExprs(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UnknownSet.AsObject; + static toObject(includeInstance: boolean, msg: UnknownSet): UnknownSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UnknownSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UnknownSet; + static deserializeBinaryFromReader(message: UnknownSet, reader: jspb.BinaryReader): UnknownSet; +} + +export namespace UnknownSet { + export type AsObject = { + exprsList: Array, + } +} + diff --git a/gen/js/google/api/expr/v1alpha1/eval_pb.js b/gen/js/google/api/expr/v1alpha1/eval_pb.js new file mode 100644 index 000000000..9a60c759e --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/eval_pb.js @@ -0,0 +1,1104 @@ +// source: google/api/expr/v1alpha1/eval.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_expr_v1alpha1_value_pb = require('../../../../google/api/expr/v1alpha1/value_pb.js'); +goog.object.extend(proto, google_api_expr_v1alpha1_value_pb); +var google_rpc_status_pb = require('../../../../google/rpc/status_pb.js'); +goog.object.extend(proto, google_rpc_status_pb); +goog.exportSymbol('proto.google.api.expr.v1alpha1.ErrorSet', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.EvalState', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.EvalState.Result', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.ExprValue', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.ExprValue.KindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.UnknownSet', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.EvalState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.EvalState.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.EvalState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.EvalState.displayName = 'proto.google.api.expr.v1alpha1.EvalState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.EvalState.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.EvalState.Result, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.EvalState.Result.displayName = 'proto.google.api.expr.v1alpha1.EvalState.Result'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.ExprValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.ExprValue.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1alpha1.ExprValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.ExprValue.displayName = 'proto.google.api.expr.v1alpha1.ExprValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.ErrorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.ErrorSet.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.ErrorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.ErrorSet.displayName = 'proto.google.api.expr.v1alpha1.ErrorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.UnknownSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.UnknownSet.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.UnknownSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.UnknownSet.displayName = 'proto.google.api.expr.v1alpha1.UnknownSet'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.EvalState.repeatedFields_ = [1,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.EvalState.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.EvalState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.EvalState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.EvalState.toObject = function(includeInstance, msg) { + var f, obj = { + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + proto.google.api.expr.v1alpha1.ExprValue.toObject, includeInstance), + resultsList: jspb.Message.toObjectList(msg.getResultsList(), + proto.google.api.expr.v1alpha1.EvalState.Result.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.EvalState} + */ +proto.google.api.expr.v1alpha1.EvalState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.EvalState; + return proto.google.api.expr.v1alpha1.EvalState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.EvalState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.EvalState} + */ +proto.google.api.expr.v1alpha1.EvalState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.ExprValue; + reader.readMessage(value,proto.google.api.expr.v1alpha1.ExprValue.deserializeBinaryFromReader); + msg.addValues(value); + break; + case 3: + var value = new proto.google.api.expr.v1alpha1.EvalState.Result; + reader.readMessage(value,proto.google.api.expr.v1alpha1.EvalState.Result.deserializeBinaryFromReader); + msg.addResults(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.EvalState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.EvalState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.EvalState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.EvalState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1alpha1.ExprValue.serializeBinaryToWriter + ); + } + f = message.getResultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.google.api.expr.v1alpha1.EvalState.Result.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.EvalState.Result.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.EvalState.Result.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.EvalState.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.EvalState.Result.toObject = function(includeInstance, msg) { + var f, obj = { + expr: jspb.Message.getFieldWithDefault(msg, 1, 0), + value: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.EvalState.Result} + */ +proto.google.api.expr.v1alpha1.EvalState.Result.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.EvalState.Result; + return proto.google.api.expr.v1alpha1.EvalState.Result.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.EvalState.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.EvalState.Result} + */ +proto.google.api.expr.v1alpha1.EvalState.Result.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpr(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.EvalState.Result.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.EvalState.Result.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.EvalState.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.EvalState.Result.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExpr(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 expr = 1; + * @return {number} + */ +proto.google.api.expr.v1alpha1.EvalState.Result.prototype.getExpr = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.EvalState.Result} returns this + */ +proto.google.api.expr.v1alpha1.EvalState.Result.prototype.setExpr = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 value = 2; + * @return {number} + */ +proto.google.api.expr.v1alpha1.EvalState.Result.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.EvalState.Result} returns this + */ +proto.google.api.expr.v1alpha1.EvalState.Result.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated ExprValue values = 1; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.EvalState.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.ExprValue, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.EvalState} returns this +*/ +proto.google.api.expr.v1alpha1.EvalState.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.ExprValue=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.ExprValue} + */ +proto.google.api.expr.v1alpha1.EvalState.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1alpha1.ExprValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.EvalState} returns this + */ +proto.google.api.expr.v1alpha1.EvalState.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + +/** + * repeated Result results = 3; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.EvalState.prototype.getResultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.EvalState.Result, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.EvalState} returns this +*/ +proto.google.api.expr.v1alpha1.EvalState.prototype.setResultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.EvalState.Result=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.EvalState.Result} + */ +proto.google.api.expr.v1alpha1.EvalState.prototype.addResults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.api.expr.v1alpha1.EvalState.Result, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.EvalState} returns this + */ +proto.google.api.expr.v1alpha1.EvalState.prototype.clearResultsList = function() { + return this.setResultsList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1alpha1.ExprValue.oneofGroups_ = [[1,2,3]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1alpha1.ExprValue.KindCase = { + KIND_NOT_SET: 0, + VALUE: 1, + ERROR: 2, + UNKNOWN: 3 +}; + +/** + * @return {proto.google.api.expr.v1alpha1.ExprValue.KindCase} + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.getKindCase = function() { + return /** @type {proto.google.api.expr.v1alpha1.ExprValue.KindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.ExprValue.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.ExprValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.ExprValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.ExprValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: (f = msg.getValue()) && google_api_expr_v1alpha1_value_pb.Value.toObject(includeInstance, f), + error: (f = msg.getError()) && proto.google.api.expr.v1alpha1.ErrorSet.toObject(includeInstance, f), + unknown: (f = msg.getUnknown()) && proto.google.api.expr.v1alpha1.UnknownSet.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.ExprValue} + */ +proto.google.api.expr.v1alpha1.ExprValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.ExprValue; + return proto.google.api.expr.v1alpha1.ExprValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.ExprValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.ExprValue} + */ +proto.google.api.expr.v1alpha1.ExprValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_api_expr_v1alpha1_value_pb.Value; + reader.readMessage(value,google_api_expr_v1alpha1_value_pb.Value.deserializeBinaryFromReader); + msg.setValue(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.ErrorSet; + reader.readMessage(value,proto.google.api.expr.v1alpha1.ErrorSet.deserializeBinaryFromReader); + msg.setError(value); + break; + case 3: + var value = new proto.google.api.expr.v1alpha1.UnknownSet; + reader.readMessage(value,proto.google.api.expr.v1alpha1.UnknownSet.deserializeBinaryFromReader); + msg.setUnknown(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.ExprValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.ExprValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.ExprValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_api_expr_v1alpha1_value_pb.Value.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1alpha1.ErrorSet.serializeBinaryToWriter + ); + } + f = message.getUnknown(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.expr.v1alpha1.UnknownSet.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Value value = 1; + * @return {?proto.google.api.expr.v1alpha1.Value} + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.getValue = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Value} */ ( + jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_value_pb.Value, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Value|undefined} value + * @return {!proto.google.api.expr.v1alpha1.ExprValue} returns this +*/ +proto.google.api.expr.v1alpha1.ExprValue.prototype.setValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.google.api.expr.v1alpha1.ExprValue.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.ExprValue} returns this + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.hasValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ErrorSet error = 2; + * @return {?proto.google.api.expr.v1alpha1.ErrorSet} + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.getError = function() { + return /** @type{?proto.google.api.expr.v1alpha1.ErrorSet} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.ErrorSet, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.ErrorSet|undefined} value + * @return {!proto.google.api.expr.v1alpha1.ExprValue} returns this +*/ +proto.google.api.expr.v1alpha1.ExprValue.prototype.setError = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.google.api.expr.v1alpha1.ExprValue.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.ExprValue} returns this + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.hasError = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional UnknownSet unknown = 3; + * @return {?proto.google.api.expr.v1alpha1.UnknownSet} + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.getUnknown = function() { + return /** @type{?proto.google.api.expr.v1alpha1.UnknownSet} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.UnknownSet, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.UnknownSet|undefined} value + * @return {!proto.google.api.expr.v1alpha1.ExprValue} returns this +*/ +proto.google.api.expr.v1alpha1.ExprValue.prototype.setUnknown = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.expr.v1alpha1.ExprValue.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.ExprValue} returns this + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.clearUnknown = function() { + return this.setUnknown(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.ExprValue.prototype.hasUnknown = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.ErrorSet.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.ErrorSet.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.ErrorSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.ErrorSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.ErrorSet.toObject = function(includeInstance, msg) { + var f, obj = { + errorsList: jspb.Message.toObjectList(msg.getErrorsList(), + google_rpc_status_pb.Status.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.ErrorSet} + */ +proto.google.api.expr.v1alpha1.ErrorSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.ErrorSet; + return proto.google.api.expr.v1alpha1.ErrorSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.ErrorSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.ErrorSet} + */ +proto.google.api.expr.v1alpha1.ErrorSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_rpc_status_pb.Status; + reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); + msg.addErrors(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.ErrorSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.ErrorSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.ErrorSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.ErrorSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getErrorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_rpc_status_pb.Status.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.rpc.Status errors = 1; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.ErrorSet.prototype.getErrorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_rpc_status_pb.Status, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.ErrorSet} returns this +*/ +proto.google.api.expr.v1alpha1.ErrorSet.prototype.setErrorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.rpc.Status=} opt_value + * @param {number=} opt_index + * @return {!proto.google.rpc.Status} + */ +proto.google.api.expr.v1alpha1.ErrorSet.prototype.addErrors = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.Status, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.ErrorSet} returns this + */ +proto.google.api.expr.v1alpha1.ErrorSet.prototype.clearErrorsList = function() { + return this.setErrorsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.UnknownSet.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.UnknownSet.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.UnknownSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.UnknownSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.UnknownSet.toObject = function(includeInstance, msg) { + var f, obj = { + exprsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.UnknownSet} + */ +proto.google.api.expr.v1alpha1.UnknownSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.UnknownSet; + return proto.google.api.expr.v1alpha1.UnknownSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.UnknownSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.UnknownSet} + */ +proto.google.api.expr.v1alpha1.UnknownSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addExprs(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.UnknownSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.UnknownSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.UnknownSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.UnknownSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExprsList(); + if (f.length > 0) { + writer.writePackedInt64( + 1, + f + ); + } +}; + + +/** + * repeated int64 exprs = 1; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.UnknownSet.prototype.getExprsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.UnknownSet} returns this + */ +proto.google.api.expr.v1alpha1.UnknownSet.prototype.setExprsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.UnknownSet} returns this + */ +proto.google.api.expr.v1alpha1.UnknownSet.prototype.addExprs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.UnknownSet} returns this + */ +proto.google.api.expr.v1alpha1.UnknownSet.prototype.clearExprsList = function() { + return this.setExprsList([]); +}; + + +goog.object.extend(exports, proto.google.api.expr.v1alpha1); diff --git a/gen/js/google/api/expr/v1alpha1/eval_pb_service.d.ts b/gen/js/google/api/expr/v1alpha1/eval_pb_service.d.ts new file mode 100644 index 000000000..fc277aa41 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/eval_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/eval.proto + diff --git a/gen/js/google/api/expr/v1alpha1/eval_pb_service.js b/gen/js/google/api/expr/v1alpha1/eval_pb_service.js new file mode 100644 index 000000000..fc277aa41 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/eval_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/eval.proto + diff --git a/gen/js/google/api/expr/v1alpha1/explain_pb.d.ts b/gen/js/google/api/expr/v1alpha1/explain_pb.d.ts new file mode 100644 index 000000000..7c752fff3 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/explain_pb.d.ts @@ -0,0 +1,58 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/explain.proto + +import * as jspb from "google-protobuf"; +import * as google_api_expr_v1alpha1_value_pb from "../../../../google/api/expr/v1alpha1/value_pb"; + +export class Explain extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value?: google_api_expr_v1alpha1_value_pb.Value, index?: number): google_api_expr_v1alpha1_value_pb.Value; + + clearExprStepsList(): void; + getExprStepsList(): Array; + setExprStepsList(value: Array): void; + addExprSteps(value?: Explain.ExprStep, index?: number): Explain.ExprStep; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Explain.AsObject; + static toObject(includeInstance: boolean, msg: Explain): Explain.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Explain, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Explain; + static deserializeBinaryFromReader(message: Explain, reader: jspb.BinaryReader): Explain; +} + +export namespace Explain { + export type AsObject = { + valuesList: Array, + exprStepsList: Array, + } + + export class ExprStep extends jspb.Message { + getId(): number; + setId(value: number): void; + + getValueIndex(): number; + setValueIndex(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExprStep.AsObject; + static toObject(includeInstance: boolean, msg: ExprStep): ExprStep.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExprStep, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExprStep; + static deserializeBinaryFromReader(message: ExprStep, reader: jspb.BinaryReader): ExprStep; + } + + export namespace ExprStep { + export type AsObject = { + id: number, + valueIndex: number, + } + } +} + diff --git a/gen/js/google/api/expr/v1alpha1/explain_pb.js b/gen/js/google/api/expr/v1alpha1/explain_pb.js new file mode 100644 index 000000000..b8bbc99aa --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/explain_pb.js @@ -0,0 +1,437 @@ +// source: google/api/expr/v1alpha1/explain.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_expr_v1alpha1_value_pb = require('../../../../google/api/expr/v1alpha1/value_pb.js'); +goog.object.extend(proto, google_api_expr_v1alpha1_value_pb); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Explain', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Explain.ExprStep', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Explain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Explain.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Explain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Explain.displayName = 'proto.google.api.expr.v1alpha1.Explain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Explain.ExprStep, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Explain.ExprStep.displayName = 'proto.google.api.expr.v1alpha1.Explain.ExprStep'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.Explain.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Explain.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Explain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Explain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Explain.toObject = function(includeInstance, msg) { + var f, obj = { + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + google_api_expr_v1alpha1_value_pb.Value.toObject, includeInstance), + exprStepsList: jspb.Message.toObjectList(msg.getExprStepsList(), + proto.google.api.expr.v1alpha1.Explain.ExprStep.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Explain} + */ +proto.google.api.expr.v1alpha1.Explain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Explain; + return proto.google.api.expr.v1alpha1.Explain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Explain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Explain} + */ +proto.google.api.expr.v1alpha1.Explain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_api_expr_v1alpha1_value_pb.Value; + reader.readMessage(value,google_api_expr_v1alpha1_value_pb.Value.deserializeBinaryFromReader); + msg.addValues(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.Explain.ExprStep; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Explain.ExprStep.deserializeBinaryFromReader); + msg.addExprSteps(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Explain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Explain.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Explain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Explain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_api_expr_v1alpha1_value_pb.Value.serializeBinaryToWriter + ); + } + f = message.getExprStepsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Explain.ExprStep.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Explain.ExprStep.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Explain.ExprStep} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + valueIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Explain.ExprStep} + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Explain.ExprStep; + return proto.google.api.expr.v1alpha1.Explain.ExprStep.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Explain.ExprStep} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Explain.ExprStep} + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setValueIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Explain.ExprStep.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Explain.ExprStep} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getValueIndex(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int64 id = 1; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Explain.ExprStep} returns this + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 value_index = 2; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.prototype.getValueIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Explain.ExprStep} returns this + */ +proto.google.api.expr.v1alpha1.Explain.ExprStep.prototype.setValueIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated Value values = 1; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Explain.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_api_expr_v1alpha1_value_pb.Value, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Explain} returns this +*/ +proto.google.api.expr.v1alpha1.Explain.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Value=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Value} + */ +proto.google.api.expr.v1alpha1.Explain.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1alpha1.Value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Explain} returns this + */ +proto.google.api.expr.v1alpha1.Explain.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + +/** + * repeated ExprStep expr_steps = 2; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Explain.prototype.getExprStepsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Explain.ExprStep, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Explain} returns this +*/ +proto.google.api.expr.v1alpha1.Explain.prototype.setExprStepsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Explain.ExprStep=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Explain.ExprStep} + */ +proto.google.api.expr.v1alpha1.Explain.prototype.addExprSteps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.expr.v1alpha1.Explain.ExprStep, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Explain} returns this + */ +proto.google.api.expr.v1alpha1.Explain.prototype.clearExprStepsList = function() { + return this.setExprStepsList([]); +}; + + +goog.object.extend(exports, proto.google.api.expr.v1alpha1); diff --git a/gen/js/google/api/expr/v1alpha1/explain_pb_service.d.ts b/gen/js/google/api/expr/v1alpha1/explain_pb_service.d.ts new file mode 100644 index 000000000..68d7d8dc0 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/explain_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/explain.proto + diff --git a/gen/js/google/api/expr/v1alpha1/explain_pb_service.js b/gen/js/google/api/expr/v1alpha1/explain_pb_service.js new file mode 100644 index 000000000..68d7d8dc0 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/explain_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/explain.proto + diff --git a/gen/js/google/api/expr/v1alpha1/syntax_pb.d.ts b/gen/js/google/api/expr/v1alpha1/syntax_pb.d.ts new file mode 100644 index 000000000..a3f81c99a --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/syntax_pb.d.ts @@ -0,0 +1,493 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/syntax.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class ParsedExpr extends jspb.Message { + hasExpr(): boolean; + clearExpr(): void; + getExpr(): Expr | undefined; + setExpr(value?: Expr): void; + + hasSourceInfo(): boolean; + clearSourceInfo(): void; + getSourceInfo(): SourceInfo | undefined; + setSourceInfo(value?: SourceInfo): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ParsedExpr.AsObject; + static toObject(includeInstance: boolean, msg: ParsedExpr): ParsedExpr.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ParsedExpr, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ParsedExpr; + static deserializeBinaryFromReader(message: ParsedExpr, reader: jspb.BinaryReader): ParsedExpr; +} + +export namespace ParsedExpr { + export type AsObject = { + expr?: Expr.AsObject, + sourceInfo?: SourceInfo.AsObject, + } +} + +export class Expr extends jspb.Message { + getId(): number; + setId(value: number): void; + + hasConstExpr(): boolean; + clearConstExpr(): void; + getConstExpr(): Constant | undefined; + setConstExpr(value?: Constant): void; + + hasIdentExpr(): boolean; + clearIdentExpr(): void; + getIdentExpr(): Expr.Ident | undefined; + setIdentExpr(value?: Expr.Ident): void; + + hasSelectExpr(): boolean; + clearSelectExpr(): void; + getSelectExpr(): Expr.Select | undefined; + setSelectExpr(value?: Expr.Select): void; + + hasCallExpr(): boolean; + clearCallExpr(): void; + getCallExpr(): Expr.Call | undefined; + setCallExpr(value?: Expr.Call): void; + + hasListExpr(): boolean; + clearListExpr(): void; + getListExpr(): Expr.CreateList | undefined; + setListExpr(value?: Expr.CreateList): void; + + hasStructExpr(): boolean; + clearStructExpr(): void; + getStructExpr(): Expr.CreateStruct | undefined; + setStructExpr(value?: Expr.CreateStruct): void; + + hasComprehensionExpr(): boolean; + clearComprehensionExpr(): void; + getComprehensionExpr(): Expr.Comprehension | undefined; + setComprehensionExpr(value?: Expr.Comprehension): void; + + getExprKindCase(): Expr.ExprKindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Expr.AsObject; + static toObject(includeInstance: boolean, msg: Expr): Expr.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Expr, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Expr; + static deserializeBinaryFromReader(message: Expr, reader: jspb.BinaryReader): Expr; +} + +export namespace Expr { + export type AsObject = { + id: number, + constExpr?: Constant.AsObject, + identExpr?: Expr.Ident.AsObject, + selectExpr?: Expr.Select.AsObject, + callExpr?: Expr.Call.AsObject, + listExpr?: Expr.CreateList.AsObject, + structExpr?: Expr.CreateStruct.AsObject, + comprehensionExpr?: Expr.Comprehension.AsObject, + } + + export class Ident extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Ident.AsObject; + static toObject(includeInstance: boolean, msg: Ident): Ident.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Ident, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Ident; + static deserializeBinaryFromReader(message: Ident, reader: jspb.BinaryReader): Ident; + } + + export namespace Ident { + export type AsObject = { + name: string, + } + } + + export class Select extends jspb.Message { + hasOperand(): boolean; + clearOperand(): void; + getOperand(): Expr | undefined; + setOperand(value?: Expr): void; + + getField(): string; + setField(value: string): void; + + getTestOnly(): boolean; + setTestOnly(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Select.AsObject; + static toObject(includeInstance: boolean, msg: Select): Select.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Select, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Select; + static deserializeBinaryFromReader(message: Select, reader: jspb.BinaryReader): Select; + } + + export namespace Select { + export type AsObject = { + operand?: Expr.AsObject, + field: string, + testOnly: boolean, + } + } + + export class Call extends jspb.Message { + hasTarget(): boolean; + clearTarget(): void; + getTarget(): Expr | undefined; + setTarget(value?: Expr): void; + + getFunction(): string; + setFunction(value: string): void; + + clearArgsList(): void; + getArgsList(): Array; + setArgsList(value: Array): void; + addArgs(value?: Expr, index?: number): Expr; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Call.AsObject; + static toObject(includeInstance: boolean, msg: Call): Call.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Call, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Call; + static deserializeBinaryFromReader(message: Call, reader: jspb.BinaryReader): Call; + } + + export namespace Call { + export type AsObject = { + target?: Expr.AsObject, + pb_function: string, + argsList: Array, + } + } + + export class CreateList extends jspb.Message { + clearElementsList(): void; + getElementsList(): Array; + setElementsList(value: Array): void; + addElements(value?: Expr, index?: number): Expr; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateList.AsObject; + static toObject(includeInstance: boolean, msg: CreateList): CreateList.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateList, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateList; + static deserializeBinaryFromReader(message: CreateList, reader: jspb.BinaryReader): CreateList; + } + + export namespace CreateList { + export type AsObject = { + elementsList: Array, + } + } + + export class CreateStruct extends jspb.Message { + getMessageName(): string; + setMessageName(value: string): void; + + clearEntriesList(): void; + getEntriesList(): Array; + setEntriesList(value: Array): void; + addEntries(value?: Expr.CreateStruct.Entry, index?: number): Expr.CreateStruct.Entry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateStruct.AsObject; + static toObject(includeInstance: boolean, msg: CreateStruct): CreateStruct.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateStruct, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateStruct; + static deserializeBinaryFromReader(message: CreateStruct, reader: jspb.BinaryReader): CreateStruct; + } + + export namespace CreateStruct { + export type AsObject = { + messageName: string, + entriesList: Array, + } + + export class Entry extends jspb.Message { + getId(): number; + setId(value: number): void; + + hasFieldKey(): boolean; + clearFieldKey(): void; + getFieldKey(): string; + setFieldKey(value: string): void; + + hasMapKey(): boolean; + clearMapKey(): void; + getMapKey(): Expr | undefined; + setMapKey(value?: Expr): void; + + hasValue(): boolean; + clearValue(): void; + getValue(): Expr | undefined; + setValue(value?: Expr): void; + + getKeyKindCase(): Entry.KeyKindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Entry.AsObject; + static toObject(includeInstance: boolean, msg: Entry): Entry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Entry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Entry; + static deserializeBinaryFromReader(message: Entry, reader: jspb.BinaryReader): Entry; + } + + export namespace Entry { + export type AsObject = { + id: number, + fieldKey: string, + mapKey?: Expr.AsObject, + value?: Expr.AsObject, + } + + export enum KeyKindCase { + KEY_KIND_NOT_SET = 0, + FIELD_KEY = 2, + MAP_KEY = 3, + } + } + } + + export class Comprehension extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): void; + + hasIterRange(): boolean; + clearIterRange(): void; + getIterRange(): Expr | undefined; + setIterRange(value?: Expr): void; + + getAccuVar(): string; + setAccuVar(value: string): void; + + hasAccuInit(): boolean; + clearAccuInit(): void; + getAccuInit(): Expr | undefined; + setAccuInit(value?: Expr): void; + + hasLoopCondition(): boolean; + clearLoopCondition(): void; + getLoopCondition(): Expr | undefined; + setLoopCondition(value?: Expr): void; + + hasLoopStep(): boolean; + clearLoopStep(): void; + getLoopStep(): Expr | undefined; + setLoopStep(value?: Expr): void; + + hasResult(): boolean; + clearResult(): void; + getResult(): Expr | undefined; + setResult(value?: Expr): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Comprehension.AsObject; + static toObject(includeInstance: boolean, msg: Comprehension): Comprehension.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Comprehension, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Comprehension; + static deserializeBinaryFromReader(message: Comprehension, reader: jspb.BinaryReader): Comprehension; + } + + export namespace Comprehension { + export type AsObject = { + iterVar: string, + iterRange?: Expr.AsObject, + accuVar: string, + accuInit?: Expr.AsObject, + loopCondition?: Expr.AsObject, + loopStep?: Expr.AsObject, + result?: Expr.AsObject, + } + } + + export enum ExprKindCase { + EXPR_KIND_NOT_SET = 0, + CONST_EXPR = 3, + IDENT_EXPR = 4, + SELECT_EXPR = 5, + CALL_EXPR = 6, + LIST_EXPR = 7, + STRUCT_EXPR = 8, + COMPREHENSION_EXPR = 9, + } +} + +export class Constant extends jspb.Message { + hasNullValue(): boolean; + clearNullValue(): void; + getNullValue(): google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]; + setNullValue(value: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]): void; + + hasBoolValue(): boolean; + clearBoolValue(): void; + getBoolValue(): boolean; + setBoolValue(value: boolean): void; + + hasInt64Value(): boolean; + clearInt64Value(): void; + getInt64Value(): number; + setInt64Value(value: number): void; + + hasUint64Value(): boolean; + clearUint64Value(): void; + getUint64Value(): number; + setUint64Value(value: number): void; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number; + setDoubleValue(value: number): void; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): string; + setStringValue(value: string): void; + + hasBytesValue(): boolean; + clearBytesValue(): void; + getBytesValue(): Uint8Array | string; + getBytesValue_asU8(): Uint8Array; + getBytesValue_asB64(): string; + setBytesValue(value: Uint8Array | string): void; + + hasDurationValue(): boolean; + clearDurationValue(): void; + getDurationValue(): google_protobuf_duration_pb.Duration | undefined; + setDurationValue(value?: google_protobuf_duration_pb.Duration): void; + + hasTimestampValue(): boolean; + clearTimestampValue(): void; + getTimestampValue(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTimestampValue(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getConstantKindCase(): Constant.ConstantKindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Constant.AsObject; + static toObject(includeInstance: boolean, msg: Constant): Constant.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Constant, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Constant; + static deserializeBinaryFromReader(message: Constant, reader: jspb.BinaryReader): Constant; +} + +export namespace Constant { + export type AsObject = { + nullValue: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap], + boolValue: boolean, + int64Value: number, + uint64Value: number, + doubleValue: number, + stringValue: string, + bytesValue: Uint8Array | string, + durationValue?: google_protobuf_duration_pb.Duration.AsObject, + timestampValue?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } + + export enum ConstantKindCase { + CONSTANT_KIND_NOT_SET = 0, + NULL_VALUE = 1, + BOOL_VALUE = 2, + INT64_VALUE = 3, + UINT64_VALUE = 4, + DOUBLE_VALUE = 5, + STRING_VALUE = 6, + BYTES_VALUE = 7, + DURATION_VALUE = 8, + TIMESTAMP_VALUE = 9, + } +} + +export class SourceInfo extends jspb.Message { + getSyntaxVersion(): string; + setSyntaxVersion(value: string): void; + + getLocation(): string; + setLocation(value: string): void; + + clearLineOffsetsList(): void; + getLineOffsetsList(): Array; + setLineOffsetsList(value: Array): void; + addLineOffsets(value: number, index?: number): number; + + getPositionsMap(): jspb.Map; + clearPositionsMap(): void; + getMacroCallsMap(): jspb.Map; + clearMacroCallsMap(): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourceInfo.AsObject; + static toObject(includeInstance: boolean, msg: SourceInfo): SourceInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourceInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceInfo; + static deserializeBinaryFromReader(message: SourceInfo, reader: jspb.BinaryReader): SourceInfo; +} + +export namespace SourceInfo { + export type AsObject = { + syntaxVersion: string, + location: string, + lineOffsetsList: Array, + positionsMap: Array<[number, number]>, + macroCallsMap: Array<[number, Expr.AsObject]>, + } +} + +export class SourcePosition extends jspb.Message { + getLocation(): string; + setLocation(value: string): void; + + getOffset(): number; + setOffset(value: number): void; + + getLine(): number; + setLine(value: number): void; + + getColumn(): number; + setColumn(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourcePosition.AsObject; + static toObject(includeInstance: boolean, msg: SourcePosition): SourcePosition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourcePosition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourcePosition; + static deserializeBinaryFromReader(message: SourcePosition, reader: jspb.BinaryReader): SourcePosition; +} + +export namespace SourcePosition { + export type AsObject = { + location: string, + offset: number, + line: number, + column: number, + } +} + diff --git a/gen/js/google/api/expr/v1alpha1/syntax_pb.js b/gen/js/google/api/expr/v1alpha1/syntax_pb.js new file mode 100644 index 000000000..7777f3dd4 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/syntax_pb.js @@ -0,0 +1,3763 @@ +// source: google/api/expr/v1alpha1/syntax.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Constant', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Constant.ConstantKindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.Call', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.Comprehension', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.CreateList', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.CreateStruct', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.KeyKindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.ExprKindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.Ident', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.Select', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.ParsedExpr', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.SourceInfo', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.SourcePosition', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.ParsedExpr = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.ParsedExpr, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.ParsedExpr.displayName = 'proto.google.api.expr.v1alpha1.ParsedExpr'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Expr = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.Expr.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Expr, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Expr.displayName = 'proto.google.api.expr.v1alpha1.Expr'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Expr.Ident = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Expr.Ident, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Expr.Ident.displayName = 'proto.google.api.expr.v1alpha1.Expr.Ident'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Expr.Select = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Expr.Select, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Expr.Select.displayName = 'proto.google.api.expr.v1alpha1.Expr.Select'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Expr.Call = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Expr.Call.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Expr.Call, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Expr.Call.displayName = 'proto.google.api.expr.v1alpha1.Expr.Call'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Expr.CreateList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Expr.CreateList.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Expr.CreateList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Expr.CreateList.displayName = 'proto.google.api.expr.v1alpha1.Expr.CreateList'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Expr.CreateStruct.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Expr.CreateStruct, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Expr.CreateStruct.displayName = 'proto.google.api.expr.v1alpha1.Expr.CreateStruct'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.displayName = 'proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Expr.Comprehension, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Expr.Comprehension.displayName = 'proto.google.api.expr.v1alpha1.Expr.Comprehension'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Constant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.Constant.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Constant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Constant.displayName = 'proto.google.api.expr.v1alpha1.Constant'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.SourceInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.SourceInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.SourceInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.SourceInfo.displayName = 'proto.google.api.expr.v1alpha1.SourceInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.SourcePosition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.SourcePosition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.SourcePosition.displayName = 'proto.google.api.expr.v1alpha1.SourcePosition'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.ParsedExpr.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.ParsedExpr} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.ParsedExpr.toObject = function(includeInstance, msg) { + var f, obj = { + expr: (f = msg.getExpr()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), + sourceInfo: (f = msg.getSourceInfo()) && proto.google.api.expr.v1alpha1.SourceInfo.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} + */ +proto.google.api.expr.v1alpha1.ParsedExpr.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.ParsedExpr; + return proto.google.api.expr.v1alpha1.ParsedExpr.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.ParsedExpr} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} + */ +proto.google.api.expr.v1alpha1.ParsedExpr.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setExpr(value); + break; + case 3: + var value = new proto.google.api.expr.v1alpha1.SourceInfo; + reader.readMessage(value,proto.google.api.expr.v1alpha1.SourceInfo.deserializeBinaryFromReader); + msg.setSourceInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.ParsedExpr.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.ParsedExpr} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.ParsedExpr.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExpr(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } + f = message.getSourceInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.expr.v1alpha1.SourceInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Expr expr = 2; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.getExpr = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} returns this +*/ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.setExpr = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} returns this + */ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.clearExpr = function() { + return this.setExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.hasExpr = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional SourceInfo source_info = 3; + * @return {?proto.google.api.expr.v1alpha1.SourceInfo} + */ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.getSourceInfo = function() { + return /** @type{?proto.google.api.expr.v1alpha1.SourceInfo} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.SourceInfo, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.SourceInfo|undefined} value + * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} returns this +*/ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.setSourceInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} returns this + */ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.clearSourceInfo = function() { + return this.setSourceInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.ParsedExpr.prototype.hasSourceInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1alpha1.Expr.oneofGroups_ = [[3,4,5,6,7,8,9]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1alpha1.Expr.ExprKindCase = { + EXPR_KIND_NOT_SET: 0, + CONST_EXPR: 3, + IDENT_EXPR: 4, + SELECT_EXPR: 5, + CALL_EXPR: 6, + LIST_EXPR: 7, + STRUCT_EXPR: 8, + COMPREHENSION_EXPR: 9 +}; + +/** + * @return {proto.google.api.expr.v1alpha1.Expr.ExprKindCase} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.getExprKindCase = function() { + return /** @type {proto.google.api.expr.v1alpha1.Expr.ExprKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Expr.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Expr} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 2, 0), + constExpr: (f = msg.getConstExpr()) && proto.google.api.expr.v1alpha1.Constant.toObject(includeInstance, f), + identExpr: (f = msg.getIdentExpr()) && proto.google.api.expr.v1alpha1.Expr.Ident.toObject(includeInstance, f), + selectExpr: (f = msg.getSelectExpr()) && proto.google.api.expr.v1alpha1.Expr.Select.toObject(includeInstance, f), + callExpr: (f = msg.getCallExpr()) && proto.google.api.expr.v1alpha1.Expr.Call.toObject(includeInstance, f), + listExpr: (f = msg.getListExpr()) && proto.google.api.expr.v1alpha1.Expr.CreateList.toObject(includeInstance, f), + structExpr: (f = msg.getStructExpr()) && proto.google.api.expr.v1alpha1.Expr.CreateStruct.toObject(includeInstance, f), + comprehensionExpr: (f = msg.getComprehensionExpr()) && proto.google.api.expr.v1alpha1.Expr.Comprehension.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Expr; + return proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Expr} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setId(value); + break; + case 3: + var value = new proto.google.api.expr.v1alpha1.Constant; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Constant.deserializeBinaryFromReader); + msg.setConstExpr(value); + break; + case 4: + var value = new proto.google.api.expr.v1alpha1.Expr.Ident; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.Ident.deserializeBinaryFromReader); + msg.setIdentExpr(value); + break; + case 5: + var value = new proto.google.api.expr.v1alpha1.Expr.Select; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.Select.deserializeBinaryFromReader); + msg.setSelectExpr(value); + break; + case 6: + var value = new proto.google.api.expr.v1alpha1.Expr.Call; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.Call.deserializeBinaryFromReader); + msg.setCallExpr(value); + break; + case 7: + var value = new proto.google.api.expr.v1alpha1.Expr.CreateList; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.CreateList.deserializeBinaryFromReader); + msg.setListExpr(value); + break; + case 8: + var value = new proto.google.api.expr.v1alpha1.Expr.CreateStruct; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.CreateStruct.deserializeBinaryFromReader); + msg.setStructExpr(value); + break; + case 9: + var value = new proto.google.api.expr.v1alpha1.Expr.Comprehension; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.Comprehension.deserializeBinaryFromReader); + msg.setComprehensionExpr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Expr} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getConstExpr(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.expr.v1alpha1.Constant.serializeBinaryToWriter + ); + } + f = message.getIdentExpr(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.api.expr.v1alpha1.Expr.Ident.serializeBinaryToWriter + ); + } + f = message.getSelectExpr(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.google.api.expr.v1alpha1.Expr.Select.serializeBinaryToWriter + ); + } + f = message.getCallExpr(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.google.api.expr.v1alpha1.Expr.Call.serializeBinaryToWriter + ); + } + f = message.getListExpr(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.api.expr.v1alpha1.Expr.CreateList.serializeBinaryToWriter + ); + } + f = message.getStructExpr(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.api.expr.v1alpha1.Expr.CreateStruct.serializeBinaryToWriter + ); + } + f = message.getComprehensionExpr(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.google.api.expr.v1alpha1.Expr.Comprehension.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Expr.Ident.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Expr.Ident.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Expr.Ident} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.Ident.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Expr.Ident} + */ +proto.google.api.expr.v1alpha1.Expr.Ident.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Expr.Ident; + return proto.google.api.expr.v1alpha1.Expr.Ident.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Expr.Ident} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Expr.Ident} + */ +proto.google.api.expr.v1alpha1.Expr.Ident.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Expr.Ident.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Expr.Ident.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Expr.Ident} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.Ident.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Expr.Ident.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Ident} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Ident.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Expr.Select.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Expr.Select} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.Select.toObject = function(includeInstance, msg) { + var f, obj = { + operand: (f = msg.getOperand()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), + field: jspb.Message.getFieldWithDefault(msg, 2, ""), + testOnly: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Expr.Select} + */ +proto.google.api.expr.v1alpha1.Expr.Select.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Expr.Select; + return proto.google.api.expr.v1alpha1.Expr.Select.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Expr.Select} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Expr.Select} + */ +proto.google.api.expr.v1alpha1.Expr.Select.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setOperand(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTestOnly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Expr.Select.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Expr.Select} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.Select.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOperand(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTestOnly(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional Expr operand = 1; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.getOperand = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Select} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.setOperand = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.Select} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.clearOperand = function() { + return this.setOperand(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.hasOperand = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string field = 2; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Select} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool test_only = 3; + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.getTestOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Select} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Select.prototype.setTestOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.Expr.Call.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Expr.Call.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Expr.Call} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.Call.toObject = function(includeInstance, msg) { + var f, obj = { + target: (f = msg.getTarget()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), + pb_function: jspb.Message.getFieldWithDefault(msg, 2, ""), + argsList: jspb.Message.toObjectList(msg.getArgsList(), + proto.google.api.expr.v1alpha1.Expr.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Expr.Call} + */ +proto.google.api.expr.v1alpha1.Expr.Call.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Expr.Call; + return proto.google.api.expr.v1alpha1.Expr.Call.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Expr.Call} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Expr.Call} + */ +proto.google.api.expr.v1alpha1.Expr.Call.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setTarget(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFunction(value); + break; + case 3: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.addArgs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Expr.Call.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Expr.Call} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.Call.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTarget(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } + f = message.getFunction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArgsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Expr target = 1; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.getTarget = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.setTarget = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.clearTarget = function() { + return this.setTarget(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.hasTarget = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string function = 2; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.getFunction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.setFunction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Expr args = 3; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.getArgsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.setArgsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Expr=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.addArgs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.api.expr.v1alpha1.Expr, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Call.prototype.clearArgsList = function() { + return this.setArgsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Expr.CreateList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.toObject = function(includeInstance, msg) { + var f, obj = { + elementsList: jspb.Message.toObjectList(msg.getElementsList(), + proto.google.api.expr.v1alpha1.Expr.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateList} + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Expr.CreateList; + return proto.google.api.expr.v1alpha1.Expr.CreateList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateList} + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.addElements(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Expr.CreateList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getElementsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Expr elements = 1; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.getElementsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateList} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.setElementsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Expr=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.addElements = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1alpha1.Expr, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateList} returns this + */ +proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.clearElementsList = function() { + return this.setElementsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Expr.CreateStruct.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.toObject = function(includeInstance, msg) { + var f, obj = { + messageName: jspb.Message.getFieldWithDefault(msg, 1, ""), + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Expr.CreateStruct; + return proto.google.api.expr.v1alpha1.Expr.CreateStruct.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessageName(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Expr.CreateStruct.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessageName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.serializeBinaryToWriter + ); + } +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_ = [[2,3]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.KeyKindCase = { + KEY_KIND_NOT_SET: 0, + FIELD_KEY: 2, + MAP_KEY: 3 +}; + +/** + * @return {proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.KeyKindCase} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getKeyKindCase = function() { + return /** @type {proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.KeyKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + fieldKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + mapKey: (f = msg.getMapKey()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), + value: (f = msg.getValue()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry; + return proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFieldKey(value); + break; + case 3: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setMapKey(value); + break; + case 4: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getMapKey(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 id = 1; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string field_key = 2; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getFieldKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.setFieldKey = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.clearFieldKey = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.hasFieldKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Expr map_key = 3; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getMapKey = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.setMapKey = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.clearMapKey = function() { + return this.setMapKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.hasMapKey = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Expr value = 4; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getValue = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.hasValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string message_name = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.getMessageName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} returns this + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.setMessageName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Entry entries = 2; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} returns this + */ +proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Expr.Comprehension.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Expr.Comprehension} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.toObject = function(includeInstance, msg) { + var f, obj = { + iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterRange: (f = msg.getIterRange()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), + accuVar: jspb.Message.getFieldWithDefault(msg, 3, ""), + accuInit: (f = msg.getAccuInit()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), + loopCondition: (f = msg.getLoopCondition()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), + loopStep: (f = msg.getLoopStep()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), + result: (f = msg.getResult()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Expr.Comprehension; + return proto.google.api.expr.v1alpha1.Expr.Comprehension.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Expr.Comprehension} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setIterVar(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setIterRange(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAccuVar(value); + break; + case 4: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setAccuInit(value); + break; + case 5: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setLoopCondition(value); + break; + case 6: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setLoopStep(value); + break; + case 7: + var value = new proto.google.api.expr.v1alpha1.Expr; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Expr.Comprehension.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Expr.Comprehension} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIterVar(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIterRange(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } + f = message.getAccuVar(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAccuInit(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } + f = message.getLoopCondition(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } + f = message.getLoopStep(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string iter_var = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getIterVar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setIterVar = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Expr iter_range = 2; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getIterRange = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setIterRange = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearIterRange = function() { + return this.setIterRange(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasIterRange = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string accu_var = 3; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getAccuVar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setAccuVar = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional Expr accu_init = 4; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getAccuInit = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setAccuInit = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearAccuInit = function() { + return this.setAccuInit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasAccuInit = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Expr loop_condition = 5; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getLoopCondition = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 5)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setLoopCondition = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearLoopCondition = function() { + return this.setLoopCondition(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasLoopCondition = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Expr loop_step = 6; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getLoopStep = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 6)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setLoopStep = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearLoopStep = function() { + return this.setLoopStep(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasLoopStep = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional Expr result = 7; + * @return {?proto.google.api.expr.v1alpha1.Expr} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getResult = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 7)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasResult = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional int64 id = 2; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this + */ +proto.google.api.expr.v1alpha1.Expr.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Constant const_expr = 3; + * @return {?proto.google.api.expr.v1alpha1.Constant} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.getConstExpr = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Constant} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Constant, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Constant|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.prototype.setConstExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this + */ +proto.google.api.expr.v1alpha1.Expr.prototype.clearConstExpr = function() { + return this.setConstExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.hasConstExpr = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Ident ident_expr = 4; + * @return {?proto.google.api.expr.v1alpha1.Expr.Ident} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.getIdentExpr = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr.Ident} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.Ident, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr.Ident|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.prototype.setIdentExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this + */ +proto.google.api.expr.v1alpha1.Expr.prototype.clearIdentExpr = function() { + return this.setIdentExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.hasIdentExpr = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Select select_expr = 5; + * @return {?proto.google.api.expr.v1alpha1.Expr.Select} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.getSelectExpr = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr.Select} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.Select, 5)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr.Select|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.prototype.setSelectExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this + */ +proto.google.api.expr.v1alpha1.Expr.prototype.clearSelectExpr = function() { + return this.setSelectExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.hasSelectExpr = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Call call_expr = 6; + * @return {?proto.google.api.expr.v1alpha1.Expr.Call} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.getCallExpr = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr.Call} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.Call, 6)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr.Call|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.prototype.setCallExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this + */ +proto.google.api.expr.v1alpha1.Expr.prototype.clearCallExpr = function() { + return this.setCallExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.hasCallExpr = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional CreateList list_expr = 7; + * @return {?proto.google.api.expr.v1alpha1.Expr.CreateList} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.getListExpr = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr.CreateList} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.CreateList, 7)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr.CreateList|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.prototype.setListExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this + */ +proto.google.api.expr.v1alpha1.Expr.prototype.clearListExpr = function() { + return this.setListExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.hasListExpr = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional CreateStruct struct_expr = 8; + * @return {?proto.google.api.expr.v1alpha1.Expr.CreateStruct} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.getStructExpr = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr.CreateStruct} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.CreateStruct, 8)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr.CreateStruct|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.prototype.setStructExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this + */ +proto.google.api.expr.v1alpha1.Expr.prototype.clearStructExpr = function() { + return this.setStructExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.hasStructExpr = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional Comprehension comprehension_expr = 9; + * @return {?proto.google.api.expr.v1alpha1.Expr.Comprehension} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.getComprehensionExpr = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Expr.Comprehension} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.Comprehension, 9)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Expr.Comprehension|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this +*/ +proto.google.api.expr.v1alpha1.Expr.prototype.setComprehensionExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Expr} returns this + */ +proto.google.api.expr.v1alpha1.Expr.prototype.clearComprehensionExpr = function() { + return this.setComprehensionExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Expr.prototype.hasComprehensionExpr = function() { + return jspb.Message.getField(this, 9) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1alpha1.Constant.oneofGroups_ = [[1,2,3,4,5,6,7,8,9]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1alpha1.Constant.ConstantKindCase = { + CONSTANT_KIND_NOT_SET: 0, + NULL_VALUE: 1, + BOOL_VALUE: 2, + INT64_VALUE: 3, + UINT64_VALUE: 4, + DOUBLE_VALUE: 5, + STRING_VALUE: 6, + BYTES_VALUE: 7, + DURATION_VALUE: 8, + TIMESTAMP_VALUE: 9 +}; + +/** + * @return {proto.google.api.expr.v1alpha1.Constant.ConstantKindCase} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getConstantKindCase = function() { + return /** @type {proto.google.api.expr.v1alpha1.Constant.ConstantKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Constant.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Constant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Constant.toObject = function(includeInstance, msg) { + var f, obj = { + nullValue: jspb.Message.getFieldWithDefault(msg, 1, 0), + boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + int64Value: jspb.Message.getFieldWithDefault(msg, 3, 0), + uint64Value: jspb.Message.getFieldWithDefault(msg, 4, 0), + doubleValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + stringValue: jspb.Message.getFieldWithDefault(msg, 6, ""), + bytesValue: msg.getBytesValue_asB64(), + durationValue: (f = msg.getDurationValue()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + timestampValue: (f = msg.getTimestampValue()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Constant} + */ +proto.google.api.expr.v1alpha1.Constant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Constant; + return proto.google.api.expr.v1alpha1.Constant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Constant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Constant} + */ +proto.google.api.expr.v1alpha1.Constant.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum()); + msg.setNullValue(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBoolValue(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInt64Value(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUint64Value(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDoubleValue(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setStringValue(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBytesValue(value); + break; + case 8: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setDurationValue(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestampValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Constant.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Constant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Constant.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeDouble( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = message.getDurationValue(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getTimestampValue(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.NullValue null_value = 1; + * @return {!proto.google.protobuf.NullValue} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getNullValue = function() { + return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.google.protobuf.NullValue} value + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.setNullValue = function(value) { + return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.clearNullValue = function() { + return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.hasNullValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool bool_value = 2; + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getBoolValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.setBoolValue = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.clearBoolValue = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.hasBoolValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 int64_value = 3; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getInt64Value = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.setInt64Value = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.clearInt64Value = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.hasInt64Value = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 uint64_value = 4; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getUint64Value = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.setUint64Value = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.clearUint64Value = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.hasUint64Value = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional double double_value = 5; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getDoubleValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.setDoubleValue = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.clearDoubleValue = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.hasDoubleValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string string_value = 6; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getStringValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.setStringValue = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.clearStringValue = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.hasStringValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes bytes_value = 7; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getBytesValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes bytes_value = 7; + * This is a type-conversion wrapper around `getBytesValue()` + * @return {string} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getBytesValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytesValue())); +}; + + +/** + * optional bytes bytes_value = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytesValue()` + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getBytesValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytesValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.setBytesValue = function(value) { + return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.clearBytesValue = function() { + return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.hasBytesValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional google.protobuf.Duration duration_value = 8; + * @return {?proto.google.protobuf.Duration} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getDurationValue = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this +*/ +proto.google.api.expr.v1alpha1.Constant.prototype.setDurationValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.clearDurationValue = function() { + return this.setDurationValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.hasDurationValue = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp_value = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.getTimestampValue = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this +*/ +proto.google.api.expr.v1alpha1.Constant.prototype.setTimestampValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Constant} returns this + */ +proto.google.api.expr.v1alpha1.Constant.prototype.clearTimestampValue = function() { + return this.setTimestampValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Constant.prototype.hasTimestampValue = function() { + return jspb.Message.getField(this, 9) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.SourceInfo.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.SourceInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.SourceInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.SourceInfo.toObject = function(includeInstance, msg) { + var f, obj = { + syntaxVersion: jspb.Message.getFieldWithDefault(msg, 1, ""), + location: jspb.Message.getFieldWithDefault(msg, 2, ""), + lineOffsetsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + positionsMap: (f = msg.getPositionsMap()) ? f.toObject(includeInstance, undefined) : [], + macroCallsMap: (f = msg.getMacroCallsMap()) ? f.toObject(includeInstance, proto.google.api.expr.v1alpha1.Expr.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.SourceInfo} + */ +proto.google.api.expr.v1alpha1.SourceInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.SourceInfo; + return proto.google.api.expr.v1alpha1.SourceInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.SourceInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.SourceInfo} + */ +proto.google.api.expr.v1alpha1.SourceInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSyntaxVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addLineOffsets(values[i]); + } + break; + case 4: + var value = msg.getPositionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readInt32, null, 0, 0); + }); + break; + case 5: + var value = msg.getMacroCallsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readMessage, proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader, 0, new proto.google.api.expr.v1alpha1.Expr()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.SourceInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.SourceInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.SourceInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSyntaxVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLineOffsetsList(); + if (f.length > 0) { + writer.writePackedInt32( + 3, + f + ); + } + f = message.getPositionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeInt32); + } + f = message.getMacroCallsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeMessage, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter); + } +}; + + +/** + * optional string syntax_version = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.getSyntaxVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.setSyntaxVersion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string location = 2; + * @return {string} + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated int32 line_offsets = 3; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.getLineOffsetsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.setLineOffsetsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.addLineOffsets = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.clearLineOffsetsList = function() { + return this.setLineOffsetsList([]); +}; + + +/** + * map positions = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.getPositionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.clearPositionsMap = function() { + this.getPositionsMap().clear(); + return this;}; + + +/** + * map macro_calls = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.getMacroCallsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + proto.google.api.expr.v1alpha1.Expr)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this + */ +proto.google.api.expr.v1alpha1.SourceInfo.prototype.clearMacroCallsMap = function() { + this.getMacroCallsMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.SourcePosition.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.SourcePosition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.SourcePosition.toObject = function(includeInstance, msg) { + var f, obj = { + location: jspb.Message.getFieldWithDefault(msg, 1, ""), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + line: jspb.Message.getFieldWithDefault(msg, 3, 0), + column: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.SourcePosition} + */ +proto.google.api.expr.v1alpha1.SourcePosition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.SourcePosition; + return proto.google.api.expr.v1alpha1.SourcePosition.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.SourcePosition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.SourcePosition} + */ +proto.google.api.expr.v1alpha1.SourcePosition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLine(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setColumn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.SourcePosition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.SourcePosition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.SourcePosition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOffset(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getLine(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getColumn(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional string location = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.SourcePosition} returns this + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 offset = 2; + * @return {number} + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.SourcePosition} returns this + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.setOffset = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 line = 3; + * @return {number} + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.getLine = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.SourcePosition} returns this + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.setLine = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 column = 4; + * @return {number} + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.getColumn = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.SourcePosition} returns this + */ +proto.google.api.expr.v1alpha1.SourcePosition.prototype.setColumn = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +goog.object.extend(exports, proto.google.api.expr.v1alpha1); diff --git a/gen/js/google/api/expr/v1alpha1/syntax_pb_service.d.ts b/gen/js/google/api/expr/v1alpha1/syntax_pb_service.d.ts new file mode 100644 index 000000000..efc5171f8 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/syntax_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/syntax.proto + diff --git a/gen/js/google/api/expr/v1alpha1/syntax_pb_service.js b/gen/js/google/api/expr/v1alpha1/syntax_pb_service.js new file mode 100644 index 000000000..efc5171f8 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/syntax_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/syntax.proto + diff --git a/gen/js/google/api/expr/v1alpha1/value_pb.d.ts b/gen/js/google/api/expr/v1alpha1/value_pb.d.ts new file mode 100644 index 000000000..097cc3969 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/value_pb.d.ts @@ -0,0 +1,210 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/value.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class Value extends jspb.Message { + hasNullValue(): boolean; + clearNullValue(): void; + getNullValue(): google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]; + setNullValue(value: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]): void; + + hasBoolValue(): boolean; + clearBoolValue(): void; + getBoolValue(): boolean; + setBoolValue(value: boolean): void; + + hasInt64Value(): boolean; + clearInt64Value(): void; + getInt64Value(): number; + setInt64Value(value: number): void; + + hasUint64Value(): boolean; + clearUint64Value(): void; + getUint64Value(): number; + setUint64Value(value: number): void; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number; + setDoubleValue(value: number): void; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): string; + setStringValue(value: string): void; + + hasBytesValue(): boolean; + clearBytesValue(): void; + getBytesValue(): Uint8Array | string; + getBytesValue_asU8(): Uint8Array; + getBytesValue_asB64(): string; + setBytesValue(value: Uint8Array | string): void; + + hasEnumValue(): boolean; + clearEnumValue(): void; + getEnumValue(): EnumValue | undefined; + setEnumValue(value?: EnumValue): void; + + hasObjectValue(): boolean; + clearObjectValue(): void; + getObjectValue(): google_protobuf_any_pb.Any | undefined; + setObjectValue(value?: google_protobuf_any_pb.Any): void; + + hasMapValue(): boolean; + clearMapValue(): void; + getMapValue(): MapValue | undefined; + setMapValue(value?: MapValue): void; + + hasListValue(): boolean; + clearListValue(): void; + getListValue(): ListValue | undefined; + setListValue(value?: ListValue): void; + + hasTypeValue(): boolean; + clearTypeValue(): void; + getTypeValue(): string; + setTypeValue(value: string): void; + + getKindCase(): Value.KindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Value.AsObject; + static toObject(includeInstance: boolean, msg: Value): Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Value; + static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; +} + +export namespace Value { + export type AsObject = { + nullValue: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap], + boolValue: boolean, + int64Value: number, + uint64Value: number, + doubleValue: number, + stringValue: string, + bytesValue: Uint8Array | string, + enumValue?: EnumValue.AsObject, + objectValue?: google_protobuf_any_pb.Any.AsObject, + mapValue?: MapValue.AsObject, + listValue?: ListValue.AsObject, + typeValue: string, + } + + export enum KindCase { + KIND_NOT_SET = 0, + NULL_VALUE = 1, + BOOL_VALUE = 2, + INT64_VALUE = 3, + UINT64_VALUE = 4, + DOUBLE_VALUE = 5, + STRING_VALUE = 6, + BYTES_VALUE = 7, + ENUM_VALUE = 9, + OBJECT_VALUE = 10, + MAP_VALUE = 11, + LIST_VALUE = 12, + TYPE_VALUE = 15, + } +} + +export class EnumValue extends jspb.Message { + getType(): string; + setType(value: string): void; + + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValue.AsObject; + static toObject(includeInstance: boolean, msg: EnumValue): EnumValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValue; + static deserializeBinaryFromReader(message: EnumValue, reader: jspb.BinaryReader): EnumValue; +} + +export namespace EnumValue { + export type AsObject = { + type: string, + value: number, + } +} + +export class ListValue extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value?: Value, index?: number): Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListValue.AsObject; + static toObject(includeInstance: boolean, msg: ListValue): ListValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListValue; + static deserializeBinaryFromReader(message: ListValue, reader: jspb.BinaryReader): ListValue; +} + +export namespace ListValue { + export type AsObject = { + valuesList: Array, + } +} + +export class MapValue extends jspb.Message { + clearEntriesList(): void; + getEntriesList(): Array; + setEntriesList(value: Array): void; + addEntries(value?: MapValue.Entry, index?: number): MapValue.Entry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MapValue.AsObject; + static toObject(includeInstance: boolean, msg: MapValue): MapValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MapValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MapValue; + static deserializeBinaryFromReader(message: MapValue, reader: jspb.BinaryReader): MapValue; +} + +export namespace MapValue { + export type AsObject = { + entriesList: Array, + } + + export class Entry extends jspb.Message { + hasKey(): boolean; + clearKey(): void; + getKey(): Value | undefined; + setKey(value?: Value): void; + + hasValue(): boolean; + clearValue(): void; + getValue(): Value | undefined; + setValue(value?: Value): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Entry.AsObject; + static toObject(includeInstance: boolean, msg: Entry): Entry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Entry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Entry; + static deserializeBinaryFromReader(message: Entry, reader: jspb.BinaryReader): Entry; + } + + export namespace Entry { + export type AsObject = { + key?: Value.AsObject, + value?: Value.AsObject, + } + } +} + diff --git a/gen/js/google/api/expr/v1alpha1/value_pb.js b/gen/js/google/api/expr/v1alpha1/value_pb.js new file mode 100644 index 000000000..e87a48c0a --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/value_pb.js @@ -0,0 +1,1563 @@ +// source: google/api/expr/v1alpha1/value.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.google.api.expr.v1alpha1.EnumValue', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.ListValue', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.MapValue', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.MapValue.Entry', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Value', null, global); +goog.exportSymbol('proto.google.api.expr.v1alpha1.Value.KindCase', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.Value = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.Value.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1alpha1.Value, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.Value.displayName = 'proto.google.api.expr.v1alpha1.Value'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.EnumValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.EnumValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.EnumValue.displayName = 'proto.google.api.expr.v1alpha1.EnumValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.ListValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.ListValue.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.ListValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.ListValue.displayName = 'proto.google.api.expr.v1alpha1.ListValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.MapValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.MapValue.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.MapValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.MapValue.displayName = 'proto.google.api.expr.v1alpha1.MapValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1alpha1.MapValue.Entry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1alpha1.MapValue.Entry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1alpha1.MapValue.Entry.displayName = 'proto.google.api.expr.v1alpha1.MapValue.Entry'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1alpha1.Value.oneofGroups_ = [[1,2,3,4,5,6,7,9,10,11,12,15]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1alpha1.Value.KindCase = { + KIND_NOT_SET: 0, + NULL_VALUE: 1, + BOOL_VALUE: 2, + INT64_VALUE: 3, + UINT64_VALUE: 4, + DOUBLE_VALUE: 5, + STRING_VALUE: 6, + BYTES_VALUE: 7, + ENUM_VALUE: 9, + OBJECT_VALUE: 10, + MAP_VALUE: 11, + LIST_VALUE: 12, + TYPE_VALUE: 15 +}; + +/** + * @return {proto.google.api.expr.v1alpha1.Value.KindCase} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getKindCase = function() { + return /** @type {proto.google.api.expr.v1alpha1.Value.KindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.Value.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.Value.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.Value} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Value.toObject = function(includeInstance, msg) { + var f, obj = { + nullValue: jspb.Message.getFieldWithDefault(msg, 1, 0), + boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + int64Value: jspb.Message.getFieldWithDefault(msg, 3, 0), + uint64Value: jspb.Message.getFieldWithDefault(msg, 4, 0), + doubleValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + stringValue: jspb.Message.getFieldWithDefault(msg, 6, ""), + bytesValue: msg.getBytesValue_asB64(), + enumValue: (f = msg.getEnumValue()) && proto.google.api.expr.v1alpha1.EnumValue.toObject(includeInstance, f), + objectValue: (f = msg.getObjectValue()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + mapValue: (f = msg.getMapValue()) && proto.google.api.expr.v1alpha1.MapValue.toObject(includeInstance, f), + listValue: (f = msg.getListValue()) && proto.google.api.expr.v1alpha1.ListValue.toObject(includeInstance, f), + typeValue: jspb.Message.getFieldWithDefault(msg, 15, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.Value} + */ +proto.google.api.expr.v1alpha1.Value.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.Value; + return proto.google.api.expr.v1alpha1.Value.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.Value} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.Value} + */ +proto.google.api.expr.v1alpha1.Value.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum()); + msg.setNullValue(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBoolValue(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInt64Value(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUint64Value(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDoubleValue(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setStringValue(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBytesValue(value); + break; + case 9: + var value = new proto.google.api.expr.v1alpha1.EnumValue; + reader.readMessage(value,proto.google.api.expr.v1alpha1.EnumValue.deserializeBinaryFromReader); + msg.setEnumValue(value); + break; + case 10: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setObjectValue(value); + break; + case 11: + var value = new proto.google.api.expr.v1alpha1.MapValue; + reader.readMessage(value,proto.google.api.expr.v1alpha1.MapValue.deserializeBinaryFromReader); + msg.setMapValue(value); + break; + case 12: + var value = new proto.google.api.expr.v1alpha1.ListValue; + reader.readMessage(value,proto.google.api.expr.v1alpha1.ListValue.deserializeBinaryFromReader); + msg.setListValue(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setTypeValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Value.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.Value.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.Value} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.Value.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeDouble( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = message.getEnumValue(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.google.api.expr.v1alpha1.EnumValue.serializeBinaryToWriter + ); + } + f = message.getObjectValue(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getMapValue(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.google.api.expr.v1alpha1.MapValue.serializeBinaryToWriter + ); + } + f = message.getListValue(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.google.api.expr.v1alpha1.ListValue.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeString( + 15, + f + ); + } +}; + + +/** + * optional google.protobuf.NullValue null_value = 1; + * @return {!proto.google.protobuf.NullValue} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getNullValue = function() { + return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.google.protobuf.NullValue} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.setNullValue = function(value) { + return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearNullValue = function() { + return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasNullValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool bool_value = 2; + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getBoolValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.setBoolValue = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearBoolValue = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasBoolValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 int64_value = 3; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getInt64Value = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.setInt64Value = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearInt64Value = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasInt64Value = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 uint64_value = 4; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getUint64Value = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.setUint64Value = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearUint64Value = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasUint64Value = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional double double_value = 5; + * @return {number} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getDoubleValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.setDoubleValue = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearDoubleValue = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasDoubleValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string string_value = 6; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getStringValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.setStringValue = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearStringValue = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasStringValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes bytes_value = 7; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getBytesValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes bytes_value = 7; + * This is a type-conversion wrapper around `getBytesValue()` + * @return {string} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getBytesValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytesValue())); +}; + + +/** + * optional bytes bytes_value = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytesValue()` + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getBytesValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytesValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.setBytesValue = function(value) { + return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearBytesValue = function() { + return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasBytesValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional EnumValue enum_value = 9; + * @return {?proto.google.api.expr.v1alpha1.EnumValue} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getEnumValue = function() { + return /** @type{?proto.google.api.expr.v1alpha1.EnumValue} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.EnumValue, 9)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.EnumValue|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this +*/ +proto.google.api.expr.v1alpha1.Value.prototype.setEnumValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearEnumValue = function() { + return this.setEnumValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasEnumValue = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional google.protobuf.Any object_value = 10; + * @return {?proto.google.protobuf.Any} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getObjectValue = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this +*/ +proto.google.api.expr.v1alpha1.Value.prototype.setObjectValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearObjectValue = function() { + return this.setObjectValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasObjectValue = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional MapValue map_value = 11; + * @return {?proto.google.api.expr.v1alpha1.MapValue} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getMapValue = function() { + return /** @type{?proto.google.api.expr.v1alpha1.MapValue} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.MapValue, 11)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.MapValue|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this +*/ +proto.google.api.expr.v1alpha1.Value.prototype.setMapValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearMapValue = function() { + return this.setMapValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasMapValue = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ListValue list_value = 12; + * @return {?proto.google.api.expr.v1alpha1.ListValue} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getListValue = function() { + return /** @type{?proto.google.api.expr.v1alpha1.ListValue} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.ListValue, 12)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.ListValue|undefined} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this +*/ +proto.google.api.expr.v1alpha1.Value.prototype.setListValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearListValue = function() { + return this.setListValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasListValue = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional string type_value = 15; + * @return {string} + */ +proto.google.api.expr.v1alpha1.Value.prototype.getTypeValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.setTypeValue = function(value) { + return jspb.Message.setOneofField(this, 15, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.Value} returns this + */ +proto.google.api.expr.v1alpha1.Value.prototype.clearTypeValue = function() { + return jspb.Message.setOneofField(this, 15, proto.google.api.expr.v1alpha1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.Value.prototype.hasTypeValue = function() { + return jspb.Message.getField(this, 15) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.EnumValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.EnumValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.EnumValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.EnumValue.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.EnumValue} + */ +proto.google.api.expr.v1alpha1.EnumValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.EnumValue; + return proto.google.api.expr.v1alpha1.EnumValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.EnumValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.EnumValue} + */ +proto.google.api.expr.v1alpha1.EnumValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.EnumValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.EnumValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.EnumValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.EnumValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.google.api.expr.v1alpha1.EnumValue.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1alpha1.EnumValue} returns this + */ +proto.google.api.expr.v1alpha1.EnumValue.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 value = 2; + * @return {number} + */ +proto.google.api.expr.v1alpha1.EnumValue.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1alpha1.EnumValue} returns this + */ +proto.google.api.expr.v1alpha1.EnumValue.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.ListValue.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.ListValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.ListValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.ListValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.ListValue.toObject = function(includeInstance, msg) { + var f, obj = { + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + proto.google.api.expr.v1alpha1.Value.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.ListValue} + */ +proto.google.api.expr.v1alpha1.ListValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.ListValue; + return proto.google.api.expr.v1alpha1.ListValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.ListValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.ListValue} + */ +proto.google.api.expr.v1alpha1.ListValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Value; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Value.deserializeBinaryFromReader); + msg.addValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.ListValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.ListValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.ListValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.ListValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Value.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Value values = 1; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.ListValue.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Value, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.ListValue} returns this +*/ +proto.google.api.expr.v1alpha1.ListValue.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.Value=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.Value} + */ +proto.google.api.expr.v1alpha1.ListValue.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1alpha1.Value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.ListValue} returns this + */ +proto.google.api.expr.v1alpha1.ListValue.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1alpha1.MapValue.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.MapValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.MapValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.MapValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.MapValue.toObject = function(includeInstance, msg) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.google.api.expr.v1alpha1.MapValue.Entry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.MapValue} + */ +proto.google.api.expr.v1alpha1.MapValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.MapValue; + return proto.google.api.expr.v1alpha1.MapValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.MapValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.MapValue} + */ +proto.google.api.expr.v1alpha1.MapValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.MapValue.Entry; + reader.readMessage(value,proto.google.api.expr.v1alpha1.MapValue.Entry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.MapValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.MapValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.MapValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.MapValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1alpha1.MapValue.Entry.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1alpha1.MapValue.Entry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1alpha1.MapValue.Entry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.toObject = function(includeInstance, msg) { + var f, obj = { + key: (f = msg.getKey()) && proto.google.api.expr.v1alpha1.Value.toObject(includeInstance, f), + value: (f = msg.getValue()) && proto.google.api.expr.v1alpha1.Value.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1alpha1.MapValue.Entry} + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1alpha1.MapValue.Entry; + return proto.google.api.expr.v1alpha1.MapValue.Entry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1alpha1.MapValue.Entry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1alpha1.MapValue.Entry} + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1alpha1.Value; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Value.deserializeBinaryFromReader); + msg.setKey(value); + break; + case 2: + var value = new proto.google.api.expr.v1alpha1.Value; + reader.readMessage(value,proto.google.api.expr.v1alpha1.Value.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1alpha1.MapValue.Entry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1alpha1.MapValue.Entry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1alpha1.Value.serializeBinaryToWriter + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1alpha1.Value.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Value key = 1; + * @return {?proto.google.api.expr.v1alpha1.Value} + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.getKey = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Value} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Value, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Value|undefined} value + * @return {!proto.google.api.expr.v1alpha1.MapValue.Entry} returns this +*/ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.setKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.MapValue.Entry} returns this + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.clearKey = function() { + return this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.hasKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Value value = 2; + * @return {?proto.google.api.expr.v1alpha1.Value} + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.getValue = function() { + return /** @type{?proto.google.api.expr.v1alpha1.Value} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Value, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1alpha1.Value|undefined} value + * @return {!proto.google.api.expr.v1alpha1.MapValue.Entry} returns this +*/ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1alpha1.MapValue.Entry} returns this + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1alpha1.MapValue.Entry.prototype.hasValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated Entry entries = 1; + * @return {!Array} + */ +proto.google.api.expr.v1alpha1.MapValue.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.MapValue.Entry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1alpha1.MapValue} returns this +*/ +proto.google.api.expr.v1alpha1.MapValue.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1alpha1.MapValue.Entry=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1alpha1.MapValue.Entry} + */ +proto.google.api.expr.v1alpha1.MapValue.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1alpha1.MapValue.Entry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1alpha1.MapValue} returns this + */ +proto.google.api.expr.v1alpha1.MapValue.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + +goog.object.extend(exports, proto.google.api.expr.v1alpha1); diff --git a/gen/js/google/api/expr/v1alpha1/value_pb_service.d.ts b/gen/js/google/api/expr/v1alpha1/value_pb_service.d.ts new file mode 100644 index 000000000..d18833303 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/value_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/value.proto + diff --git a/gen/js/google/api/expr/v1alpha1/value_pb_service.js b/gen/js/google/api/expr/v1alpha1/value_pb_service.js new file mode 100644 index 000000000..d18833303 --- /dev/null +++ b/gen/js/google/api/expr/v1alpha1/value_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1alpha1 +// file: google/api/expr/v1alpha1/value.proto + diff --git a/gen/js/google/api/expr/v1beta1/decl_pb.d.ts b/gen/js/google/api/expr/v1beta1/decl_pb.d.ts new file mode 100644 index 000000000..80c82ee14 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/decl_pb.d.ts @@ -0,0 +1,143 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/decl.proto + +import * as jspb from "google-protobuf"; +import * as google_api_expr_v1beta1_expr_pb from "../../../../google/api/expr/v1beta1/expr_pb"; + +export class Decl extends jspb.Message { + getId(): number; + setId(value: number): void; + + getName(): string; + setName(value: string): void; + + getDoc(): string; + setDoc(value: string): void; + + hasIdent(): boolean; + clearIdent(): void; + getIdent(): IdentDecl | undefined; + setIdent(value?: IdentDecl): void; + + hasFunction(): boolean; + clearFunction(): void; + getFunction(): FunctionDecl | undefined; + setFunction(value?: FunctionDecl): void; + + getKindCase(): Decl.KindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Decl.AsObject; + static toObject(includeInstance: boolean, msg: Decl): Decl.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Decl, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Decl; + static deserializeBinaryFromReader(message: Decl, reader: jspb.BinaryReader): Decl; +} + +export namespace Decl { + export type AsObject = { + id: number, + name: string, + doc: string, + ident?: IdentDecl.AsObject, + pb_function?: FunctionDecl.AsObject, + } + + export enum KindCase { + KIND_NOT_SET = 0, + IDENT = 4, + FUNCTION = 5, + } +} + +export class DeclType extends jspb.Message { + getId(): number; + setId(value: number): void; + + getType(): string; + setType(value: string): void; + + clearTypeParamsList(): void; + getTypeParamsList(): Array; + setTypeParamsList(value: Array): void; + addTypeParams(value?: DeclType, index?: number): DeclType; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeclType.AsObject; + static toObject(includeInstance: boolean, msg: DeclType): DeclType.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeclType, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeclType; + static deserializeBinaryFromReader(message: DeclType, reader: jspb.BinaryReader): DeclType; +} + +export namespace DeclType { + export type AsObject = { + id: number, + type: string, + typeParamsList: Array, + } +} + +export class IdentDecl extends jspb.Message { + hasType(): boolean; + clearType(): void; + getType(): DeclType | undefined; + setType(value?: DeclType): void; + + hasValue(): boolean; + clearValue(): void; + getValue(): google_api_expr_v1beta1_expr_pb.Expr | undefined; + setValue(value?: google_api_expr_v1beta1_expr_pb.Expr): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentDecl.AsObject; + static toObject(includeInstance: boolean, msg: IdentDecl): IdentDecl.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentDecl, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentDecl; + static deserializeBinaryFromReader(message: IdentDecl, reader: jspb.BinaryReader): IdentDecl; +} + +export namespace IdentDecl { + export type AsObject = { + type?: DeclType.AsObject, + value?: google_api_expr_v1beta1_expr_pb.Expr.AsObject, + } +} + +export class FunctionDecl extends jspb.Message { + clearArgsList(): void; + getArgsList(): Array; + setArgsList(value: Array): void; + addArgs(value?: IdentDecl, index?: number): IdentDecl; + + hasReturnType(): boolean; + clearReturnType(): void; + getReturnType(): DeclType | undefined; + setReturnType(value?: DeclType): void; + + getReceiverFunction(): boolean; + setReceiverFunction(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FunctionDecl.AsObject; + static toObject(includeInstance: boolean, msg: FunctionDecl): FunctionDecl.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FunctionDecl, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FunctionDecl; + static deserializeBinaryFromReader(message: FunctionDecl, reader: jspb.BinaryReader): FunctionDecl; +} + +export namespace FunctionDecl { + export type AsObject = { + argsList: Array, + returnType?: DeclType.AsObject, + receiverFunction: boolean, + } +} + diff --git a/gen/js/google/api/expr/v1beta1/decl_pb.js b/gen/js/google/api/expr/v1beta1/decl_pb.js new file mode 100644 index 000000000..4a6e2a1a2 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/decl_pb.js @@ -0,0 +1,1090 @@ +// source: google/api/expr/v1beta1/decl.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_expr_v1beta1_expr_pb = require('../../../../google/api/expr/v1beta1/expr_pb.js'); +goog.object.extend(proto, google_api_expr_v1beta1_expr_pb); +goog.exportSymbol('proto.google.api.expr.v1beta1.Decl', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Decl.KindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.DeclType', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.FunctionDecl', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.IdentDecl', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Decl = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1beta1.Decl.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1beta1.Decl, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Decl.displayName = 'proto.google.api.expr.v1beta1.Decl'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.DeclType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.DeclType.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.DeclType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.DeclType.displayName = 'proto.google.api.expr.v1beta1.DeclType'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.IdentDecl = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.IdentDecl, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.IdentDecl.displayName = 'proto.google.api.expr.v1beta1.IdentDecl'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.FunctionDecl = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.FunctionDecl.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.FunctionDecl, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.FunctionDecl.displayName = 'proto.google.api.expr.v1beta1.FunctionDecl'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1beta1.Decl.oneofGroups_ = [[4,5]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1beta1.Decl.KindCase = { + KIND_NOT_SET: 0, + IDENT: 4, + FUNCTION: 5 +}; + +/** + * @return {proto.google.api.expr.v1beta1.Decl.KindCase} + */ +proto.google.api.expr.v1beta1.Decl.prototype.getKindCase = function() { + return /** @type {proto.google.api.expr.v1beta1.Decl.KindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1beta1.Decl.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Decl.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Decl.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Decl} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Decl.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + doc: jspb.Message.getFieldWithDefault(msg, 3, ""), + ident: (f = msg.getIdent()) && proto.google.api.expr.v1beta1.IdentDecl.toObject(includeInstance, f), + pb_function: (f = msg.getFunction()) && proto.google.api.expr.v1beta1.FunctionDecl.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Decl} + */ +proto.google.api.expr.v1beta1.Decl.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Decl; + return proto.google.api.expr.v1beta1.Decl.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Decl} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Decl} + */ +proto.google.api.expr.v1beta1.Decl.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDoc(value); + break; + case 4: + var value = new proto.google.api.expr.v1beta1.IdentDecl; + reader.readMessage(value,proto.google.api.expr.v1beta1.IdentDecl.deserializeBinaryFromReader); + msg.setIdent(value); + break; + case 5: + var value = new proto.google.api.expr.v1beta1.FunctionDecl; + reader.readMessage(value,proto.google.api.expr.v1beta1.FunctionDecl.deserializeBinaryFromReader); + msg.setFunction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Decl.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Decl.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Decl} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Decl.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDoc(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIdent(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.api.expr.v1beta1.IdentDecl.serializeBinaryToWriter + ); + } + f = message.getFunction(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.google.api.expr.v1beta1.FunctionDecl.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 id = 1; + * @return {number} + */ +proto.google.api.expr.v1beta1.Decl.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.Decl} returns this + */ +proto.google.api.expr.v1beta1.Decl.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.google.api.expr.v1beta1.Decl.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Decl} returns this + */ +proto.google.api.expr.v1beta1.Decl.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string doc = 3; + * @return {string} + */ +proto.google.api.expr.v1beta1.Decl.prototype.getDoc = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Decl} returns this + */ +proto.google.api.expr.v1beta1.Decl.prototype.setDoc = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional IdentDecl ident = 4; + * @return {?proto.google.api.expr.v1beta1.IdentDecl} + */ +proto.google.api.expr.v1beta1.Decl.prototype.getIdent = function() { + return /** @type{?proto.google.api.expr.v1beta1.IdentDecl} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.IdentDecl, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.IdentDecl|undefined} value + * @return {!proto.google.api.expr.v1beta1.Decl} returns this +*/ +proto.google.api.expr.v1beta1.Decl.prototype.setIdent = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.google.api.expr.v1beta1.Decl.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Decl} returns this + */ +proto.google.api.expr.v1beta1.Decl.prototype.clearIdent = function() { + return this.setIdent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Decl.prototype.hasIdent = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional FunctionDecl function = 5; + * @return {?proto.google.api.expr.v1beta1.FunctionDecl} + */ +proto.google.api.expr.v1beta1.Decl.prototype.getFunction = function() { + return /** @type{?proto.google.api.expr.v1beta1.FunctionDecl} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.FunctionDecl, 5)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.FunctionDecl|undefined} value + * @return {!proto.google.api.expr.v1beta1.Decl} returns this +*/ +proto.google.api.expr.v1beta1.Decl.prototype.setFunction = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.google.api.expr.v1beta1.Decl.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Decl} returns this + */ +proto.google.api.expr.v1beta1.Decl.prototype.clearFunction = function() { + return this.setFunction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Decl.prototype.hasFunction = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.DeclType.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.DeclType.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.DeclType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.DeclType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.DeclType.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + typeParamsList: jspb.Message.toObjectList(msg.getTypeParamsList(), + proto.google.api.expr.v1beta1.DeclType.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.DeclType} + */ +proto.google.api.expr.v1beta1.DeclType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.DeclType; + return proto.google.api.expr.v1beta1.DeclType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.DeclType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.DeclType} + */ +proto.google.api.expr.v1beta1.DeclType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 4: + var value = new proto.google.api.expr.v1beta1.DeclType; + reader.readMessage(value,proto.google.api.expr.v1beta1.DeclType.deserializeBinaryFromReader); + msg.addTypeParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.DeclType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.DeclType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.DeclType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.DeclType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTypeParamsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.api.expr.v1beta1.DeclType.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 id = 1; + * @return {number} + */ +proto.google.api.expr.v1beta1.DeclType.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.DeclType} returns this + */ +proto.google.api.expr.v1beta1.DeclType.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string type = 2; + * @return {string} + */ +proto.google.api.expr.v1beta1.DeclType.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.DeclType} returns this + */ +proto.google.api.expr.v1beta1.DeclType.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated DeclType type_params = 4; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.DeclType.prototype.getTypeParamsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.DeclType, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.DeclType} returns this +*/ +proto.google.api.expr.v1beta1.DeclType.prototype.setTypeParamsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.DeclType=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.DeclType} + */ +proto.google.api.expr.v1beta1.DeclType.prototype.addTypeParams = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.api.expr.v1beta1.DeclType, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.DeclType} returns this + */ +proto.google.api.expr.v1beta1.DeclType.prototype.clearTypeParamsList = function() { + return this.setTypeParamsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.IdentDecl.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.IdentDecl.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.IdentDecl} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.IdentDecl.toObject = function(includeInstance, msg) { + var f, obj = { + type: (f = msg.getType()) && proto.google.api.expr.v1beta1.DeclType.toObject(includeInstance, f), + value: (f = msg.getValue()) && google_api_expr_v1beta1_expr_pb.Expr.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.IdentDecl} + */ +proto.google.api.expr.v1beta1.IdentDecl.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.IdentDecl; + return proto.google.api.expr.v1beta1.IdentDecl.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.IdentDecl} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.IdentDecl} + */ +proto.google.api.expr.v1beta1.IdentDecl.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = new proto.google.api.expr.v1beta1.DeclType; + reader.readMessage(value,proto.google.api.expr.v1beta1.DeclType.deserializeBinaryFromReader); + msg.setType(value); + break; + case 4: + var value = new google_api_expr_v1beta1_expr_pb.Expr; + reader.readMessage(value,google_api_expr_v1beta1_expr_pb.Expr.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.IdentDecl.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.IdentDecl.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.IdentDecl} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.IdentDecl.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.expr.v1beta1.DeclType.serializeBinaryToWriter + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_api_expr_v1beta1_expr_pb.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DeclType type = 3; + * @return {?proto.google.api.expr.v1beta1.DeclType} + */ +proto.google.api.expr.v1beta1.IdentDecl.prototype.getType = function() { + return /** @type{?proto.google.api.expr.v1beta1.DeclType} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.DeclType, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.DeclType|undefined} value + * @return {!proto.google.api.expr.v1beta1.IdentDecl} returns this +*/ +proto.google.api.expr.v1beta1.IdentDecl.prototype.setType = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.IdentDecl} returns this + */ +proto.google.api.expr.v1beta1.IdentDecl.prototype.clearType = function() { + return this.setType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.IdentDecl.prototype.hasType = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Expr value = 4; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.IdentDecl.prototype.getValue = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, google_api_expr_v1beta1_expr_pb.Expr, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.IdentDecl} returns this +*/ +proto.google.api.expr.v1beta1.IdentDecl.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.IdentDecl} returns this + */ +proto.google.api.expr.v1beta1.IdentDecl.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.IdentDecl.prototype.hasValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.FunctionDecl.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.FunctionDecl.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.FunctionDecl} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.FunctionDecl.toObject = function(includeInstance, msg) { + var f, obj = { + argsList: jspb.Message.toObjectList(msg.getArgsList(), + proto.google.api.expr.v1beta1.IdentDecl.toObject, includeInstance), + returnType: (f = msg.getReturnType()) && proto.google.api.expr.v1beta1.DeclType.toObject(includeInstance, f), + receiverFunction: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.FunctionDecl} + */ +proto.google.api.expr.v1beta1.FunctionDecl.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.FunctionDecl; + return proto.google.api.expr.v1beta1.FunctionDecl.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.FunctionDecl} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.FunctionDecl} + */ +proto.google.api.expr.v1beta1.FunctionDecl.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.IdentDecl; + reader.readMessage(value,proto.google.api.expr.v1beta1.IdentDecl.deserializeBinaryFromReader); + msg.addArgs(value); + break; + case 2: + var value = new proto.google.api.expr.v1beta1.DeclType; + reader.readMessage(value,proto.google.api.expr.v1beta1.DeclType.deserializeBinaryFromReader); + msg.setReturnType(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReceiverFunction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.FunctionDecl.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.FunctionDecl} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.FunctionDecl.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getArgsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1beta1.IdentDecl.serializeBinaryToWriter + ); + } + f = message.getReturnType(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1beta1.DeclType.serializeBinaryToWriter + ); + } + f = message.getReceiverFunction(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * repeated IdentDecl args = 1; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.getArgsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.IdentDecl, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.FunctionDecl} returns this +*/ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.setArgsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.IdentDecl=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.IdentDecl} + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.addArgs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1beta1.IdentDecl, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.FunctionDecl} returns this + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.clearArgsList = function() { + return this.setArgsList([]); +}; + + +/** + * optional DeclType return_type = 2; + * @return {?proto.google.api.expr.v1beta1.DeclType} + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.getReturnType = function() { + return /** @type{?proto.google.api.expr.v1beta1.DeclType} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.DeclType, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.DeclType|undefined} value + * @return {!proto.google.api.expr.v1beta1.FunctionDecl} returns this +*/ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.setReturnType = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.FunctionDecl} returns this + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.clearReturnType = function() { + return this.setReturnType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.hasReturnType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool receiver_function = 3; + * @return {boolean} + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.getReceiverFunction = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.expr.v1beta1.FunctionDecl} returns this + */ +proto.google.api.expr.v1beta1.FunctionDecl.prototype.setReceiverFunction = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +goog.object.extend(exports, proto.google.api.expr.v1beta1); diff --git a/gen/js/google/api/expr/v1beta1/decl_pb_service.d.ts b/gen/js/google/api/expr/v1beta1/decl_pb_service.d.ts new file mode 100644 index 000000000..882c2ac08 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/decl_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/decl.proto + diff --git a/gen/js/google/api/expr/v1beta1/decl_pb_service.js b/gen/js/google/api/expr/v1beta1/decl_pb_service.js new file mode 100644 index 000000000..882c2ac08 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/decl_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/decl.proto + diff --git a/gen/js/google/api/expr/v1beta1/eval_pb.d.ts b/gen/js/google/api/expr/v1beta1/eval_pb.d.ts new file mode 100644 index 000000000..7de189f3f --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/eval_pb.d.ts @@ -0,0 +1,167 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/eval.proto + +import * as jspb from "google-protobuf"; +import * as google_api_expr_v1beta1_value_pb from "../../../../google/api/expr/v1beta1/value_pb"; +import * as google_rpc_status_pb from "../../../../google/rpc/status_pb"; + +export class EvalState extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value?: ExprValue, index?: number): ExprValue; + + clearResultsList(): void; + getResultsList(): Array; + setResultsList(value: Array): void; + addResults(value?: EvalState.Result, index?: number): EvalState.Result; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EvalState.AsObject; + static toObject(includeInstance: boolean, msg: EvalState): EvalState.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EvalState, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EvalState; + static deserializeBinaryFromReader(message: EvalState, reader: jspb.BinaryReader): EvalState; +} + +export namespace EvalState { + export type AsObject = { + valuesList: Array, + resultsList: Array, + } + + export class Result extends jspb.Message { + hasExpr(): boolean; + clearExpr(): void; + getExpr(): IdRef | undefined; + setExpr(value?: IdRef): void; + + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Result, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader(message: Result, reader: jspb.BinaryReader): Result; + } + + export namespace Result { + export type AsObject = { + expr?: IdRef.AsObject, + value: number, + } + } +} + +export class ExprValue extends jspb.Message { + hasValue(): boolean; + clearValue(): void; + getValue(): google_api_expr_v1beta1_value_pb.Value | undefined; + setValue(value?: google_api_expr_v1beta1_value_pb.Value): void; + + hasError(): boolean; + clearError(): void; + getError(): ErrorSet | undefined; + setError(value?: ErrorSet): void; + + hasUnknown(): boolean; + clearUnknown(): void; + getUnknown(): UnknownSet | undefined; + setUnknown(value?: UnknownSet): void; + + getKindCase(): ExprValue.KindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExprValue.AsObject; + static toObject(includeInstance: boolean, msg: ExprValue): ExprValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExprValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExprValue; + static deserializeBinaryFromReader(message: ExprValue, reader: jspb.BinaryReader): ExprValue; +} + +export namespace ExprValue { + export type AsObject = { + value?: google_api_expr_v1beta1_value_pb.Value.AsObject, + error?: ErrorSet.AsObject, + unknown?: UnknownSet.AsObject, + } + + export enum KindCase { + KIND_NOT_SET = 0, + VALUE = 1, + ERROR = 2, + UNKNOWN = 3, + } +} + +export class ErrorSet extends jspb.Message { + clearErrorsList(): void; + getErrorsList(): Array; + setErrorsList(value: Array): void; + addErrors(value?: google_rpc_status_pb.Status, index?: number): google_rpc_status_pb.Status; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ErrorSet.AsObject; + static toObject(includeInstance: boolean, msg: ErrorSet): ErrorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ErrorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ErrorSet; + static deserializeBinaryFromReader(message: ErrorSet, reader: jspb.BinaryReader): ErrorSet; +} + +export namespace ErrorSet { + export type AsObject = { + errorsList: Array, + } +} + +export class UnknownSet extends jspb.Message { + clearExprsList(): void; + getExprsList(): Array; + setExprsList(value: Array): void; + addExprs(value?: IdRef, index?: number): IdRef; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UnknownSet.AsObject; + static toObject(includeInstance: boolean, msg: UnknownSet): UnknownSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UnknownSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UnknownSet; + static deserializeBinaryFromReader(message: UnknownSet, reader: jspb.BinaryReader): UnknownSet; +} + +export namespace UnknownSet { + export type AsObject = { + exprsList: Array, + } +} + +export class IdRef extends jspb.Message { + getId(): number; + setId(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdRef.AsObject; + static toObject(includeInstance: boolean, msg: IdRef): IdRef.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdRef, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdRef; + static deserializeBinaryFromReader(message: IdRef, reader: jspb.BinaryReader): IdRef; +} + +export namespace IdRef { + export type AsObject = { + id: number, + } +} + diff --git a/gen/js/google/api/expr/v1beta1/eval_pb.js b/gen/js/google/api/expr/v1beta1/eval_pb.js new file mode 100644 index 000000000..6e4a04cc2 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/eval_pb.js @@ -0,0 +1,1279 @@ +// source: google/api/expr/v1beta1/eval.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_expr_v1beta1_value_pb = require('../../../../google/api/expr/v1beta1/value_pb.js'); +goog.object.extend(proto, google_api_expr_v1beta1_value_pb); +var google_rpc_status_pb = require('../../../../google/rpc/status_pb.js'); +goog.object.extend(proto, google_rpc_status_pb); +goog.exportSymbol('proto.google.api.expr.v1beta1.ErrorSet', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.EvalState', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.EvalState.Result', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.ExprValue', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.ExprValue.KindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.IdRef', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.UnknownSet', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.EvalState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.EvalState.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.EvalState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.EvalState.displayName = 'proto.google.api.expr.v1beta1.EvalState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.EvalState.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.EvalState.Result, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.EvalState.Result.displayName = 'proto.google.api.expr.v1beta1.EvalState.Result'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.ExprValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1beta1.ExprValue.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1beta1.ExprValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.ExprValue.displayName = 'proto.google.api.expr.v1beta1.ExprValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.ErrorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.ErrorSet.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.ErrorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.ErrorSet.displayName = 'proto.google.api.expr.v1beta1.ErrorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.UnknownSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.UnknownSet.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.UnknownSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.UnknownSet.displayName = 'proto.google.api.expr.v1beta1.UnknownSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.IdRef = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.IdRef, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.IdRef.displayName = 'proto.google.api.expr.v1beta1.IdRef'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.EvalState.repeatedFields_ = [1,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.EvalState.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.EvalState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.EvalState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.EvalState.toObject = function(includeInstance, msg) { + var f, obj = { + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + proto.google.api.expr.v1beta1.ExprValue.toObject, includeInstance), + resultsList: jspb.Message.toObjectList(msg.getResultsList(), + proto.google.api.expr.v1beta1.EvalState.Result.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.EvalState} + */ +proto.google.api.expr.v1beta1.EvalState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.EvalState; + return proto.google.api.expr.v1beta1.EvalState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.EvalState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.EvalState} + */ +proto.google.api.expr.v1beta1.EvalState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.ExprValue; + reader.readMessage(value,proto.google.api.expr.v1beta1.ExprValue.deserializeBinaryFromReader); + msg.addValues(value); + break; + case 3: + var value = new proto.google.api.expr.v1beta1.EvalState.Result; + reader.readMessage(value,proto.google.api.expr.v1beta1.EvalState.Result.deserializeBinaryFromReader); + msg.addResults(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.EvalState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.EvalState.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.EvalState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.EvalState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1beta1.ExprValue.serializeBinaryToWriter + ); + } + f = message.getResultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.google.api.expr.v1beta1.EvalState.Result.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.EvalState.Result.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.EvalState.Result.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.EvalState.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.EvalState.Result.toObject = function(includeInstance, msg) { + var f, obj = { + expr: (f = msg.getExpr()) && proto.google.api.expr.v1beta1.IdRef.toObject(includeInstance, f), + value: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.EvalState.Result} + */ +proto.google.api.expr.v1beta1.EvalState.Result.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.EvalState.Result; + return proto.google.api.expr.v1beta1.EvalState.Result.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.EvalState.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.EvalState.Result} + */ +proto.google.api.expr.v1beta1.EvalState.Result.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.IdRef; + reader.readMessage(value,proto.google.api.expr.v1beta1.IdRef.deserializeBinaryFromReader); + msg.setExpr(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.EvalState.Result.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.EvalState.Result.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.EvalState.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.EvalState.Result.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExpr(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1beta1.IdRef.serializeBinaryToWriter + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional IdRef expr = 1; + * @return {?proto.google.api.expr.v1beta1.IdRef} + */ +proto.google.api.expr.v1beta1.EvalState.Result.prototype.getExpr = function() { + return /** @type{?proto.google.api.expr.v1beta1.IdRef} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.IdRef, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.IdRef|undefined} value + * @return {!proto.google.api.expr.v1beta1.EvalState.Result} returns this +*/ +proto.google.api.expr.v1beta1.EvalState.Result.prototype.setExpr = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.EvalState.Result} returns this + */ +proto.google.api.expr.v1beta1.EvalState.Result.prototype.clearExpr = function() { + return this.setExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.EvalState.Result.prototype.hasExpr = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 value = 2; + * @return {number} + */ +proto.google.api.expr.v1beta1.EvalState.Result.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.EvalState.Result} returns this + */ +proto.google.api.expr.v1beta1.EvalState.Result.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated ExprValue values = 1; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.EvalState.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.ExprValue, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.EvalState} returns this +*/ +proto.google.api.expr.v1beta1.EvalState.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.ExprValue=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.ExprValue} + */ +proto.google.api.expr.v1beta1.EvalState.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1beta1.ExprValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.EvalState} returns this + */ +proto.google.api.expr.v1beta1.EvalState.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + +/** + * repeated Result results = 3; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.EvalState.prototype.getResultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.EvalState.Result, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.EvalState} returns this +*/ +proto.google.api.expr.v1beta1.EvalState.prototype.setResultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.EvalState.Result=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.EvalState.Result} + */ +proto.google.api.expr.v1beta1.EvalState.prototype.addResults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.api.expr.v1beta1.EvalState.Result, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.EvalState} returns this + */ +proto.google.api.expr.v1beta1.EvalState.prototype.clearResultsList = function() { + return this.setResultsList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1beta1.ExprValue.oneofGroups_ = [[1,2,3]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1beta1.ExprValue.KindCase = { + KIND_NOT_SET: 0, + VALUE: 1, + ERROR: 2, + UNKNOWN: 3 +}; + +/** + * @return {proto.google.api.expr.v1beta1.ExprValue.KindCase} + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.getKindCase = function() { + return /** @type {proto.google.api.expr.v1beta1.ExprValue.KindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1beta1.ExprValue.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.ExprValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.ExprValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.ExprValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: (f = msg.getValue()) && google_api_expr_v1beta1_value_pb.Value.toObject(includeInstance, f), + error: (f = msg.getError()) && proto.google.api.expr.v1beta1.ErrorSet.toObject(includeInstance, f), + unknown: (f = msg.getUnknown()) && proto.google.api.expr.v1beta1.UnknownSet.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.ExprValue} + */ +proto.google.api.expr.v1beta1.ExprValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.ExprValue; + return proto.google.api.expr.v1beta1.ExprValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.ExprValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.ExprValue} + */ +proto.google.api.expr.v1beta1.ExprValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_api_expr_v1beta1_value_pb.Value; + reader.readMessage(value,google_api_expr_v1beta1_value_pb.Value.deserializeBinaryFromReader); + msg.setValue(value); + break; + case 2: + var value = new proto.google.api.expr.v1beta1.ErrorSet; + reader.readMessage(value,proto.google.api.expr.v1beta1.ErrorSet.deserializeBinaryFromReader); + msg.setError(value); + break; + case 3: + var value = new proto.google.api.expr.v1beta1.UnknownSet; + reader.readMessage(value,proto.google.api.expr.v1beta1.UnknownSet.deserializeBinaryFromReader); + msg.setUnknown(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.ExprValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.ExprValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.ExprValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_api_expr_v1beta1_value_pb.Value.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1beta1.ErrorSet.serializeBinaryToWriter + ); + } + f = message.getUnknown(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.expr.v1beta1.UnknownSet.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Value value = 1; + * @return {?proto.google.api.expr.v1beta1.Value} + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.getValue = function() { + return /** @type{?proto.google.api.expr.v1beta1.Value} */ ( + jspb.Message.getWrapperField(this, google_api_expr_v1beta1_value_pb.Value, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Value|undefined} value + * @return {!proto.google.api.expr.v1beta1.ExprValue} returns this +*/ +proto.google.api.expr.v1beta1.ExprValue.prototype.setValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.google.api.expr.v1beta1.ExprValue.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.ExprValue} returns this + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.hasValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ErrorSet error = 2; + * @return {?proto.google.api.expr.v1beta1.ErrorSet} + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.getError = function() { + return /** @type{?proto.google.api.expr.v1beta1.ErrorSet} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.ErrorSet, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.ErrorSet|undefined} value + * @return {!proto.google.api.expr.v1beta1.ExprValue} returns this +*/ +proto.google.api.expr.v1beta1.ExprValue.prototype.setError = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.google.api.expr.v1beta1.ExprValue.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.ExprValue} returns this + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.hasError = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional UnknownSet unknown = 3; + * @return {?proto.google.api.expr.v1beta1.UnknownSet} + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.getUnknown = function() { + return /** @type{?proto.google.api.expr.v1beta1.UnknownSet} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.UnknownSet, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.UnknownSet|undefined} value + * @return {!proto.google.api.expr.v1beta1.ExprValue} returns this +*/ +proto.google.api.expr.v1beta1.ExprValue.prototype.setUnknown = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.expr.v1beta1.ExprValue.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.ExprValue} returns this + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.clearUnknown = function() { + return this.setUnknown(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.ExprValue.prototype.hasUnknown = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.ErrorSet.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.ErrorSet.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.ErrorSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.ErrorSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.ErrorSet.toObject = function(includeInstance, msg) { + var f, obj = { + errorsList: jspb.Message.toObjectList(msg.getErrorsList(), + google_rpc_status_pb.Status.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.ErrorSet} + */ +proto.google.api.expr.v1beta1.ErrorSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.ErrorSet; + return proto.google.api.expr.v1beta1.ErrorSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.ErrorSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.ErrorSet} + */ +proto.google.api.expr.v1beta1.ErrorSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_rpc_status_pb.Status; + reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); + msg.addErrors(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.ErrorSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.ErrorSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.ErrorSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.ErrorSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getErrorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_rpc_status_pb.Status.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.rpc.Status errors = 1; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.ErrorSet.prototype.getErrorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_rpc_status_pb.Status, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.ErrorSet} returns this +*/ +proto.google.api.expr.v1beta1.ErrorSet.prototype.setErrorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.rpc.Status=} opt_value + * @param {number=} opt_index + * @return {!proto.google.rpc.Status} + */ +proto.google.api.expr.v1beta1.ErrorSet.prototype.addErrors = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.Status, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.ErrorSet} returns this + */ +proto.google.api.expr.v1beta1.ErrorSet.prototype.clearErrorsList = function() { + return this.setErrorsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.UnknownSet.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.UnknownSet.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.UnknownSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.UnknownSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.UnknownSet.toObject = function(includeInstance, msg) { + var f, obj = { + exprsList: jspb.Message.toObjectList(msg.getExprsList(), + proto.google.api.expr.v1beta1.IdRef.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.UnknownSet} + */ +proto.google.api.expr.v1beta1.UnknownSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.UnknownSet; + return proto.google.api.expr.v1beta1.UnknownSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.UnknownSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.UnknownSet} + */ +proto.google.api.expr.v1beta1.UnknownSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.IdRef; + reader.readMessage(value,proto.google.api.expr.v1beta1.IdRef.deserializeBinaryFromReader); + msg.addExprs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.UnknownSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.UnknownSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.UnknownSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.UnknownSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExprsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1beta1.IdRef.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdRef exprs = 1; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.UnknownSet.prototype.getExprsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.IdRef, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.UnknownSet} returns this +*/ +proto.google.api.expr.v1beta1.UnknownSet.prototype.setExprsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.IdRef=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.IdRef} + */ +proto.google.api.expr.v1beta1.UnknownSet.prototype.addExprs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1beta1.IdRef, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.UnknownSet} returns this + */ +proto.google.api.expr.v1beta1.UnknownSet.prototype.clearExprsList = function() { + return this.setExprsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.IdRef.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.IdRef.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.IdRef} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.IdRef.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.IdRef} + */ +proto.google.api.expr.v1beta1.IdRef.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.IdRef; + return proto.google.api.expr.v1beta1.IdRef.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.IdRef} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.IdRef} + */ +proto.google.api.expr.v1beta1.IdRef.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.IdRef.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.IdRef.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.IdRef} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.IdRef.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 id = 1; + * @return {number} + */ +proto.google.api.expr.v1beta1.IdRef.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.IdRef} returns this + */ +proto.google.api.expr.v1beta1.IdRef.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +goog.object.extend(exports, proto.google.api.expr.v1beta1); diff --git a/gen/js/google/api/expr/v1beta1/eval_pb_service.d.ts b/gen/js/google/api/expr/v1beta1/eval_pb_service.d.ts new file mode 100644 index 000000000..9dd9492f2 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/eval_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/eval.proto + diff --git a/gen/js/google/api/expr/v1beta1/eval_pb_service.js b/gen/js/google/api/expr/v1beta1/eval_pb_service.js new file mode 100644 index 000000000..9dd9492f2 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/eval_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/eval.proto + diff --git a/gen/js/google/api/expr/v1beta1/expr_pb.d.ts b/gen/js/google/api/expr/v1beta1/expr_pb.d.ts new file mode 100644 index 000000000..38079b40a --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/expr_pb.d.ts @@ -0,0 +1,414 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/expr.proto + +import * as jspb from "google-protobuf"; +import * as google_api_expr_v1beta1_source_pb from "../../../../google/api/expr/v1beta1/source_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class ParsedExpr extends jspb.Message { + hasExpr(): boolean; + clearExpr(): void; + getExpr(): Expr | undefined; + setExpr(value?: Expr): void; + + hasSourceInfo(): boolean; + clearSourceInfo(): void; + getSourceInfo(): google_api_expr_v1beta1_source_pb.SourceInfo | undefined; + setSourceInfo(value?: google_api_expr_v1beta1_source_pb.SourceInfo): void; + + getSyntaxVersion(): string; + setSyntaxVersion(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ParsedExpr.AsObject; + static toObject(includeInstance: boolean, msg: ParsedExpr): ParsedExpr.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ParsedExpr, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ParsedExpr; + static deserializeBinaryFromReader(message: ParsedExpr, reader: jspb.BinaryReader): ParsedExpr; +} + +export namespace ParsedExpr { + export type AsObject = { + expr?: Expr.AsObject, + sourceInfo?: google_api_expr_v1beta1_source_pb.SourceInfo.AsObject, + syntaxVersion: string, + } +} + +export class Expr extends jspb.Message { + getId(): number; + setId(value: number): void; + + hasLiteralExpr(): boolean; + clearLiteralExpr(): void; + getLiteralExpr(): Literal | undefined; + setLiteralExpr(value?: Literal): void; + + hasIdentExpr(): boolean; + clearIdentExpr(): void; + getIdentExpr(): Expr.Ident | undefined; + setIdentExpr(value?: Expr.Ident): void; + + hasSelectExpr(): boolean; + clearSelectExpr(): void; + getSelectExpr(): Expr.Select | undefined; + setSelectExpr(value?: Expr.Select): void; + + hasCallExpr(): boolean; + clearCallExpr(): void; + getCallExpr(): Expr.Call | undefined; + setCallExpr(value?: Expr.Call): void; + + hasListExpr(): boolean; + clearListExpr(): void; + getListExpr(): Expr.CreateList | undefined; + setListExpr(value?: Expr.CreateList): void; + + hasStructExpr(): boolean; + clearStructExpr(): void; + getStructExpr(): Expr.CreateStruct | undefined; + setStructExpr(value?: Expr.CreateStruct): void; + + hasComprehensionExpr(): boolean; + clearComprehensionExpr(): void; + getComprehensionExpr(): Expr.Comprehension | undefined; + setComprehensionExpr(value?: Expr.Comprehension): void; + + getExprKindCase(): Expr.ExprKindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Expr.AsObject; + static toObject(includeInstance: boolean, msg: Expr): Expr.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Expr, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Expr; + static deserializeBinaryFromReader(message: Expr, reader: jspb.BinaryReader): Expr; +} + +export namespace Expr { + export type AsObject = { + id: number, + literalExpr?: Literal.AsObject, + identExpr?: Expr.Ident.AsObject, + selectExpr?: Expr.Select.AsObject, + callExpr?: Expr.Call.AsObject, + listExpr?: Expr.CreateList.AsObject, + structExpr?: Expr.CreateStruct.AsObject, + comprehensionExpr?: Expr.Comprehension.AsObject, + } + + export class Ident extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Ident.AsObject; + static toObject(includeInstance: boolean, msg: Ident): Ident.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Ident, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Ident; + static deserializeBinaryFromReader(message: Ident, reader: jspb.BinaryReader): Ident; + } + + export namespace Ident { + export type AsObject = { + name: string, + } + } + + export class Select extends jspb.Message { + hasOperand(): boolean; + clearOperand(): void; + getOperand(): Expr | undefined; + setOperand(value?: Expr): void; + + getField(): string; + setField(value: string): void; + + getTestOnly(): boolean; + setTestOnly(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Select.AsObject; + static toObject(includeInstance: boolean, msg: Select): Select.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Select, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Select; + static deserializeBinaryFromReader(message: Select, reader: jspb.BinaryReader): Select; + } + + export namespace Select { + export type AsObject = { + operand?: Expr.AsObject, + field: string, + testOnly: boolean, + } + } + + export class Call extends jspb.Message { + hasTarget(): boolean; + clearTarget(): void; + getTarget(): Expr | undefined; + setTarget(value?: Expr): void; + + getFunction(): string; + setFunction(value: string): void; + + clearArgsList(): void; + getArgsList(): Array; + setArgsList(value: Array): void; + addArgs(value?: Expr, index?: number): Expr; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Call.AsObject; + static toObject(includeInstance: boolean, msg: Call): Call.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Call, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Call; + static deserializeBinaryFromReader(message: Call, reader: jspb.BinaryReader): Call; + } + + export namespace Call { + export type AsObject = { + target?: Expr.AsObject, + pb_function: string, + argsList: Array, + } + } + + export class CreateList extends jspb.Message { + clearElementsList(): void; + getElementsList(): Array; + setElementsList(value: Array): void; + addElements(value?: Expr, index?: number): Expr; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateList.AsObject; + static toObject(includeInstance: boolean, msg: CreateList): CreateList.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateList, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateList; + static deserializeBinaryFromReader(message: CreateList, reader: jspb.BinaryReader): CreateList; + } + + export namespace CreateList { + export type AsObject = { + elementsList: Array, + } + } + + export class CreateStruct extends jspb.Message { + getType(): string; + setType(value: string): void; + + clearEntriesList(): void; + getEntriesList(): Array; + setEntriesList(value: Array): void; + addEntries(value?: Expr.CreateStruct.Entry, index?: number): Expr.CreateStruct.Entry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateStruct.AsObject; + static toObject(includeInstance: boolean, msg: CreateStruct): CreateStruct.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateStruct, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateStruct; + static deserializeBinaryFromReader(message: CreateStruct, reader: jspb.BinaryReader): CreateStruct; + } + + export namespace CreateStruct { + export type AsObject = { + type: string, + entriesList: Array, + } + + export class Entry extends jspb.Message { + getId(): number; + setId(value: number): void; + + hasFieldKey(): boolean; + clearFieldKey(): void; + getFieldKey(): string; + setFieldKey(value: string): void; + + hasMapKey(): boolean; + clearMapKey(): void; + getMapKey(): Expr | undefined; + setMapKey(value?: Expr): void; + + hasValue(): boolean; + clearValue(): void; + getValue(): Expr | undefined; + setValue(value?: Expr): void; + + getKeyKindCase(): Entry.KeyKindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Entry.AsObject; + static toObject(includeInstance: boolean, msg: Entry): Entry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Entry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Entry; + static deserializeBinaryFromReader(message: Entry, reader: jspb.BinaryReader): Entry; + } + + export namespace Entry { + export type AsObject = { + id: number, + fieldKey: string, + mapKey?: Expr.AsObject, + value?: Expr.AsObject, + } + + export enum KeyKindCase { + KEY_KIND_NOT_SET = 0, + FIELD_KEY = 2, + MAP_KEY = 3, + } + } + } + + export class Comprehension extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): void; + + hasIterRange(): boolean; + clearIterRange(): void; + getIterRange(): Expr | undefined; + setIterRange(value?: Expr): void; + + getAccuVar(): string; + setAccuVar(value: string): void; + + hasAccuInit(): boolean; + clearAccuInit(): void; + getAccuInit(): Expr | undefined; + setAccuInit(value?: Expr): void; + + hasLoopCondition(): boolean; + clearLoopCondition(): void; + getLoopCondition(): Expr | undefined; + setLoopCondition(value?: Expr): void; + + hasLoopStep(): boolean; + clearLoopStep(): void; + getLoopStep(): Expr | undefined; + setLoopStep(value?: Expr): void; + + hasResult(): boolean; + clearResult(): void; + getResult(): Expr | undefined; + setResult(value?: Expr): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Comprehension.AsObject; + static toObject(includeInstance: boolean, msg: Comprehension): Comprehension.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Comprehension, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Comprehension; + static deserializeBinaryFromReader(message: Comprehension, reader: jspb.BinaryReader): Comprehension; + } + + export namespace Comprehension { + export type AsObject = { + iterVar: string, + iterRange?: Expr.AsObject, + accuVar: string, + accuInit?: Expr.AsObject, + loopCondition?: Expr.AsObject, + loopStep?: Expr.AsObject, + result?: Expr.AsObject, + } + } + + export enum ExprKindCase { + EXPR_KIND_NOT_SET = 0, + LITERAL_EXPR = 3, + IDENT_EXPR = 4, + SELECT_EXPR = 5, + CALL_EXPR = 6, + LIST_EXPR = 7, + STRUCT_EXPR = 8, + COMPREHENSION_EXPR = 9, + } +} + +export class Literal extends jspb.Message { + hasNullValue(): boolean; + clearNullValue(): void; + getNullValue(): google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]; + setNullValue(value: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]): void; + + hasBoolValue(): boolean; + clearBoolValue(): void; + getBoolValue(): boolean; + setBoolValue(value: boolean): void; + + hasInt64Value(): boolean; + clearInt64Value(): void; + getInt64Value(): number; + setInt64Value(value: number): void; + + hasUint64Value(): boolean; + clearUint64Value(): void; + getUint64Value(): number; + setUint64Value(value: number): void; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number; + setDoubleValue(value: number): void; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): string; + setStringValue(value: string): void; + + hasBytesValue(): boolean; + clearBytesValue(): void; + getBytesValue(): Uint8Array | string; + getBytesValue_asU8(): Uint8Array; + getBytesValue_asB64(): string; + setBytesValue(value: Uint8Array | string): void; + + getConstantKindCase(): Literal.ConstantKindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Literal.AsObject; + static toObject(includeInstance: boolean, msg: Literal): Literal.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Literal, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Literal; + static deserializeBinaryFromReader(message: Literal, reader: jspb.BinaryReader): Literal; +} + +export namespace Literal { + export type AsObject = { + nullValue: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap], + boolValue: boolean, + int64Value: number, + uint64Value: number, + doubleValue: number, + stringValue: string, + bytesValue: Uint8Array | string, + } + + export enum ConstantKindCase { + CONSTANT_KIND_NOT_SET = 0, + NULL_VALUE = 1, + BOOL_VALUE = 2, + INT64_VALUE = 3, + UINT64_VALUE = 4, + DOUBLE_VALUE = 5, + STRING_VALUE = 6, + BYTES_VALUE = 7, + } +} + diff --git a/gen/js/google/api/expr/v1beta1/expr_pb.js b/gen/js/google/api/expr/v1beta1/expr_pb.js new file mode 100644 index 000000000..fa983797e --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/expr_pb.js @@ -0,0 +1,3139 @@ +// source: google/api/expr/v1beta1/expr.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_expr_v1beta1_source_pb = require('../../../../google/api/expr/v1beta1/source_pb.js'); +goog.object.extend(proto, google_api_expr_v1beta1_source_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr.Call', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr.Comprehension', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr.CreateList', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr.CreateStruct', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.KeyKindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr.ExprKindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr.Ident', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Expr.Select', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Literal', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Literal.ConstantKindCase', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.ParsedExpr', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.ParsedExpr = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.ParsedExpr, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.ParsedExpr.displayName = 'proto.google.api.expr.v1beta1.ParsedExpr'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Expr = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1beta1.Expr.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1beta1.Expr, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Expr.displayName = 'proto.google.api.expr.v1beta1.Expr'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Expr.Ident = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.Expr.Ident, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Expr.Ident.displayName = 'proto.google.api.expr.v1beta1.Expr.Ident'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Expr.Select = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.Expr.Select, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Expr.Select.displayName = 'proto.google.api.expr.v1beta1.Expr.Select'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Expr.Call = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.Expr.Call.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.Expr.Call, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Expr.Call.displayName = 'proto.google.api.expr.v1beta1.Expr.Call'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Expr.CreateList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.Expr.CreateList.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.Expr.CreateList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Expr.CreateList.displayName = 'proto.google.api.expr.v1beta1.Expr.CreateList'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.Expr.CreateStruct.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.Expr.CreateStruct, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Expr.CreateStruct.displayName = 'proto.google.api.expr.v1beta1.Expr.CreateStruct'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.displayName = 'proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Expr.Comprehension = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.Expr.Comprehension, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Expr.Comprehension.displayName = 'proto.google.api.expr.v1beta1.Expr.Comprehension'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Literal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1beta1.Literal.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1beta1.Literal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Literal.displayName = 'proto.google.api.expr.v1beta1.Literal'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.ParsedExpr.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.ParsedExpr} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.ParsedExpr.toObject = function(includeInstance, msg) { + var f, obj = { + expr: (f = msg.getExpr()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f), + sourceInfo: (f = msg.getSourceInfo()) && google_api_expr_v1beta1_source_pb.SourceInfo.toObject(includeInstance, f), + syntaxVersion: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.ParsedExpr} + */ +proto.google.api.expr.v1beta1.ParsedExpr.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.ParsedExpr; + return proto.google.api.expr.v1beta1.ParsedExpr.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.ParsedExpr} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.ParsedExpr} + */ +proto.google.api.expr.v1beta1.ParsedExpr.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setExpr(value); + break; + case 3: + var value = new google_api_expr_v1beta1_source_pb.SourceInfo; + reader.readMessage(value,google_api_expr_v1beta1_source_pb.SourceInfo.deserializeBinaryFromReader); + msg.setSourceInfo(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSyntaxVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.ParsedExpr.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.ParsedExpr} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.ParsedExpr.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExpr(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } + f = message.getSourceInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_api_expr_v1beta1_source_pb.SourceInfo.serializeBinaryToWriter + ); + } + f = message.getSyntaxVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Expr expr = 2; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.getExpr = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.ParsedExpr} returns this +*/ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.setExpr = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.ParsedExpr} returns this + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.clearExpr = function() { + return this.setExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.hasExpr = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional SourceInfo source_info = 3; + * @return {?proto.google.api.expr.v1beta1.SourceInfo} + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.getSourceInfo = function() { + return /** @type{?proto.google.api.expr.v1beta1.SourceInfo} */ ( + jspb.Message.getWrapperField(this, google_api_expr_v1beta1_source_pb.SourceInfo, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.SourceInfo|undefined} value + * @return {!proto.google.api.expr.v1beta1.ParsedExpr} returns this +*/ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.setSourceInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.ParsedExpr} returns this + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.clearSourceInfo = function() { + return this.setSourceInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.hasSourceInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string syntax_version = 4; + * @return {string} + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.getSyntaxVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.ParsedExpr} returns this + */ +proto.google.api.expr.v1beta1.ParsedExpr.prototype.setSyntaxVersion = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1beta1.Expr.oneofGroups_ = [[3,4,5,6,7,8,9]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1beta1.Expr.ExprKindCase = { + EXPR_KIND_NOT_SET: 0, + LITERAL_EXPR: 3, + IDENT_EXPR: 4, + SELECT_EXPR: 5, + CALL_EXPR: 6, + LIST_EXPR: 7, + STRUCT_EXPR: 8, + COMPREHENSION_EXPR: 9 +}; + +/** + * @return {proto.google.api.expr.v1beta1.Expr.ExprKindCase} + */ +proto.google.api.expr.v1beta1.Expr.prototype.getExprKindCase = function() { + return /** @type {proto.google.api.expr.v1beta1.Expr.ExprKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1beta1.Expr.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Expr.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Expr.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Expr} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 2, 0), + literalExpr: (f = msg.getLiteralExpr()) && proto.google.api.expr.v1beta1.Literal.toObject(includeInstance, f), + identExpr: (f = msg.getIdentExpr()) && proto.google.api.expr.v1beta1.Expr.Ident.toObject(includeInstance, f), + selectExpr: (f = msg.getSelectExpr()) && proto.google.api.expr.v1beta1.Expr.Select.toObject(includeInstance, f), + callExpr: (f = msg.getCallExpr()) && proto.google.api.expr.v1beta1.Expr.Call.toObject(includeInstance, f), + listExpr: (f = msg.getListExpr()) && proto.google.api.expr.v1beta1.Expr.CreateList.toObject(includeInstance, f), + structExpr: (f = msg.getStructExpr()) && proto.google.api.expr.v1beta1.Expr.CreateStruct.toObject(includeInstance, f), + comprehensionExpr: (f = msg.getComprehensionExpr()) && proto.google.api.expr.v1beta1.Expr.Comprehension.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Expr; + return proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Expr} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setId(value); + break; + case 3: + var value = new proto.google.api.expr.v1beta1.Literal; + reader.readMessage(value,proto.google.api.expr.v1beta1.Literal.deserializeBinaryFromReader); + msg.setLiteralExpr(value); + break; + case 4: + var value = new proto.google.api.expr.v1beta1.Expr.Ident; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.Ident.deserializeBinaryFromReader); + msg.setIdentExpr(value); + break; + case 5: + var value = new proto.google.api.expr.v1beta1.Expr.Select; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.Select.deserializeBinaryFromReader); + msg.setSelectExpr(value); + break; + case 6: + var value = new proto.google.api.expr.v1beta1.Expr.Call; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.Call.deserializeBinaryFromReader); + msg.setCallExpr(value); + break; + case 7: + var value = new proto.google.api.expr.v1beta1.Expr.CreateList; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.CreateList.deserializeBinaryFromReader); + msg.setListExpr(value); + break; + case 8: + var value = new proto.google.api.expr.v1beta1.Expr.CreateStruct; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.CreateStruct.deserializeBinaryFromReader); + msg.setStructExpr(value); + break; + case 9: + var value = new proto.google.api.expr.v1beta1.Expr.Comprehension; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.Comprehension.deserializeBinaryFromReader); + msg.setComprehensionExpr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Expr.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Expr} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getLiteralExpr(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.expr.v1beta1.Literal.serializeBinaryToWriter + ); + } + f = message.getIdentExpr(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.api.expr.v1beta1.Expr.Ident.serializeBinaryToWriter + ); + } + f = message.getSelectExpr(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.google.api.expr.v1beta1.Expr.Select.serializeBinaryToWriter + ); + } + f = message.getCallExpr(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.google.api.expr.v1beta1.Expr.Call.serializeBinaryToWriter + ); + } + f = message.getListExpr(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.api.expr.v1beta1.Expr.CreateList.serializeBinaryToWriter + ); + } + f = message.getStructExpr(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.api.expr.v1beta1.Expr.CreateStruct.serializeBinaryToWriter + ); + } + f = message.getComprehensionExpr(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.google.api.expr.v1beta1.Expr.Comprehension.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Expr.Ident.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Expr.Ident.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Expr.Ident} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.Ident.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Expr.Ident} + */ +proto.google.api.expr.v1beta1.Expr.Ident.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Expr.Ident; + return proto.google.api.expr.v1beta1.Expr.Ident.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Expr.Ident} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Expr.Ident} + */ +proto.google.api.expr.v1beta1.Expr.Ident.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Expr.Ident.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Expr.Ident.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Expr.Ident} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.Ident.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.api.expr.v1beta1.Expr.Ident.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Expr.Ident} returns this + */ +proto.google.api.expr.v1beta1.Expr.Ident.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Expr.Select.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Expr.Select.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Expr.Select} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.Select.toObject = function(includeInstance, msg) { + var f, obj = { + operand: (f = msg.getOperand()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f), + field: jspb.Message.getFieldWithDefault(msg, 2, ""), + testOnly: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Expr.Select} + */ +proto.google.api.expr.v1beta1.Expr.Select.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Expr.Select; + return proto.google.api.expr.v1beta1.Expr.Select.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Expr.Select} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Expr.Select} + */ +proto.google.api.expr.v1beta1.Expr.Select.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setOperand(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTestOnly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Expr.Select.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Expr.Select.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Expr.Select} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.Select.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOperand(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTestOnly(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional Expr operand = 1; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.Select.prototype.getOperand = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr.Select} returns this +*/ +proto.google.api.expr.v1beta1.Expr.Select.prototype.setOperand = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.Select} returns this + */ +proto.google.api.expr.v1beta1.Expr.Select.prototype.clearOperand = function() { + return this.setOperand(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.Select.prototype.hasOperand = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string field = 2; + * @return {string} + */ +proto.google.api.expr.v1beta1.Expr.Select.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Expr.Select} returns this + */ +proto.google.api.expr.v1beta1.Expr.Select.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool test_only = 3; + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.Select.prototype.getTestOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.expr.v1beta1.Expr.Select} returns this + */ +proto.google.api.expr.v1beta1.Expr.Select.prototype.setTestOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.Expr.Call.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Expr.Call.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Expr.Call} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.Call.toObject = function(includeInstance, msg) { + var f, obj = { + target: (f = msg.getTarget()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f), + pb_function: jspb.Message.getFieldWithDefault(msg, 2, ""), + argsList: jspb.Message.toObjectList(msg.getArgsList(), + proto.google.api.expr.v1beta1.Expr.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Expr.Call} + */ +proto.google.api.expr.v1beta1.Expr.Call.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Expr.Call; + return proto.google.api.expr.v1beta1.Expr.Call.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Expr.Call} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Expr.Call} + */ +proto.google.api.expr.v1beta1.Expr.Call.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setTarget(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFunction(value); + break; + case 3: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.addArgs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Expr.Call.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Expr.Call} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.Call.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTarget(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } + f = message.getFunction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArgsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Expr target = 1; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.getTarget = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr.Call} returns this +*/ +proto.google.api.expr.v1beta1.Expr.Call.prototype.setTarget = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.Call} returns this + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.clearTarget = function() { + return this.setTarget(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.hasTarget = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string function = 2; + * @return {string} + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.getFunction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Expr.Call} returns this + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.setFunction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Expr args = 3; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.getArgsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.Expr, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.Expr.Call} returns this +*/ +proto.google.api.expr.v1beta1.Expr.Call.prototype.setArgsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.Expr=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.addArgs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.api.expr.v1beta1.Expr, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.Expr.Call} returns this + */ +proto.google.api.expr.v1beta1.Expr.Call.prototype.clearArgsList = function() { + return this.setArgsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.Expr.CreateList.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Expr.CreateList.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Expr.CreateList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Expr.CreateList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.CreateList.toObject = function(includeInstance, msg) { + var f, obj = { + elementsList: jspb.Message.toObjectList(msg.getElementsList(), + proto.google.api.expr.v1beta1.Expr.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateList} + */ +proto.google.api.expr.v1beta1.Expr.CreateList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Expr.CreateList; + return proto.google.api.expr.v1beta1.Expr.CreateList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Expr.CreateList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateList} + */ +proto.google.api.expr.v1beta1.Expr.CreateList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.addElements(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Expr.CreateList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Expr.CreateList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Expr.CreateList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.CreateList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getElementsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Expr elements = 1; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.Expr.CreateList.prototype.getElementsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.Expr, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.Expr.CreateList} returns this +*/ +proto.google.api.expr.v1beta1.Expr.CreateList.prototype.setElementsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.Expr=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.CreateList.prototype.addElements = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1beta1.Expr, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateList} returns this + */ +proto.google.api.expr.v1beta1.Expr.CreateList.prototype.clearElementsList = function() { + return this.setElementsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Expr.CreateStruct.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Expr.CreateStruct} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Expr.CreateStruct; + return proto.google.api.expr.v1beta1.Expr.CreateStruct.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Expr.CreateStruct} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = new proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Expr.CreateStruct.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Expr.CreateStruct} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.serializeBinaryToWriter + ); + } +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.oneofGroups_ = [[2,3]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.KeyKindCase = { + KEY_KIND_NOT_SET: 0, + FIELD_KEY: 2, + MAP_KEY: 3 +}; + +/** + * @return {proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.KeyKindCase} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.getKeyKindCase = function() { + return /** @type {proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.KeyKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + fieldKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + mapKey: (f = msg.getMapKey()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f), + value: (f = msg.getValue()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry; + return proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFieldKey(value); + break; + case 3: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setMapKey(value); + break; + case 4: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getMapKey(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 id = 1; + * @return {number} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string field_key = 2; + * @return {string} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.getFieldKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.setFieldKey = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.clearFieldKey = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.hasFieldKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Expr map_key = 3; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.getMapKey = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} returns this +*/ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.setMapKey = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.clearMapKey = function() { + return this.setMapKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.hasMapKey = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Expr value = 4; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.getValue = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} returns this +*/ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} returns this + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry.prototype.hasValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct} returns this + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Entry entries = 2; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct} returns this +*/ +proto.google.api.expr.v1beta1.Expr.CreateStruct.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry} + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.expr.v1beta1.Expr.CreateStruct.Entry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.Expr.CreateStruct} returns this + */ +proto.google.api.expr.v1beta1.Expr.CreateStruct.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Expr.Comprehension.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Expr.Comprehension} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.toObject = function(includeInstance, msg) { + var f, obj = { + iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterRange: (f = msg.getIterRange()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f), + accuVar: jspb.Message.getFieldWithDefault(msg, 3, ""), + accuInit: (f = msg.getAccuInit()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f), + loopCondition: (f = msg.getLoopCondition()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f), + loopStep: (f = msg.getLoopStep()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f), + result: (f = msg.getResult()) && proto.google.api.expr.v1beta1.Expr.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Expr.Comprehension; + return proto.google.api.expr.v1beta1.Expr.Comprehension.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Expr.Comprehension} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setIterVar(value); + break; + case 2: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setIterRange(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAccuVar(value); + break; + case 4: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setAccuInit(value); + break; + case 5: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setLoopCondition(value); + break; + case 6: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setLoopStep(value); + break; + case 7: + var value = new proto.google.api.expr.v1beta1.Expr; + reader.readMessage(value,proto.google.api.expr.v1beta1.Expr.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Expr.Comprehension.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Expr.Comprehension} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIterVar(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIterRange(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } + f = message.getAccuVar(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAccuInit(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } + f = message.getLoopCondition(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } + f = message.getLoopStep(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.api.expr.v1beta1.Expr.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string iter_var = 1; + * @return {string} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.getIterVar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.setIterVar = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Expr iter_range = 2; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.getIterRange = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.setIterRange = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.clearIterRange = function() { + return this.setIterRange(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.hasIterRange = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string accu_var = 3; + * @return {string} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.getAccuVar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.setAccuVar = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional Expr accu_init = 4; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.getAccuInit = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.setAccuInit = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.clearAccuInit = function() { + return this.setAccuInit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.hasAccuInit = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Expr loop_condition = 5; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.getLoopCondition = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 5)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.setLoopCondition = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.clearLoopCondition = function() { + return this.setLoopCondition(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.hasLoopCondition = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Expr loop_step = 6; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.getLoopStep = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 6)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.setLoopStep = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.clearLoopStep = function() { + return this.setLoopStep(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.hasLoopStep = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional Expr result = 7; + * @return {?proto.google.api.expr.v1beta1.Expr} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.getResult = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr, 7)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this +*/ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr.Comprehension} returns this + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.Comprehension.prototype.hasResult = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional int32 id = 2; + * @return {number} + */ +proto.google.api.expr.v1beta1.Expr.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.Expr} returns this + */ +proto.google.api.expr.v1beta1.Expr.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Literal literal_expr = 3; + * @return {?proto.google.api.expr.v1beta1.Literal} + */ +proto.google.api.expr.v1beta1.Expr.prototype.getLiteralExpr = function() { + return /** @type{?proto.google.api.expr.v1beta1.Literal} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Literal, 3)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Literal|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr} returns this +*/ +proto.google.api.expr.v1beta1.Expr.prototype.setLiteralExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.expr.v1beta1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr} returns this + */ +proto.google.api.expr.v1beta1.Expr.prototype.clearLiteralExpr = function() { + return this.setLiteralExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.prototype.hasLiteralExpr = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Ident ident_expr = 4; + * @return {?proto.google.api.expr.v1beta1.Expr.Ident} + */ +proto.google.api.expr.v1beta1.Expr.prototype.getIdentExpr = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr.Ident} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr.Ident, 4)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr.Ident|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr} returns this +*/ +proto.google.api.expr.v1beta1.Expr.prototype.setIdentExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.google.api.expr.v1beta1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr} returns this + */ +proto.google.api.expr.v1beta1.Expr.prototype.clearIdentExpr = function() { + return this.setIdentExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.prototype.hasIdentExpr = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Select select_expr = 5; + * @return {?proto.google.api.expr.v1beta1.Expr.Select} + */ +proto.google.api.expr.v1beta1.Expr.prototype.getSelectExpr = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr.Select} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr.Select, 5)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr.Select|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr} returns this +*/ +proto.google.api.expr.v1beta1.Expr.prototype.setSelectExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.google.api.expr.v1beta1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr} returns this + */ +proto.google.api.expr.v1beta1.Expr.prototype.clearSelectExpr = function() { + return this.setSelectExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.prototype.hasSelectExpr = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Call call_expr = 6; + * @return {?proto.google.api.expr.v1beta1.Expr.Call} + */ +proto.google.api.expr.v1beta1.Expr.prototype.getCallExpr = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr.Call} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr.Call, 6)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr.Call|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr} returns this +*/ +proto.google.api.expr.v1beta1.Expr.prototype.setCallExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.google.api.expr.v1beta1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr} returns this + */ +proto.google.api.expr.v1beta1.Expr.prototype.clearCallExpr = function() { + return this.setCallExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.prototype.hasCallExpr = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional CreateList list_expr = 7; + * @return {?proto.google.api.expr.v1beta1.Expr.CreateList} + */ +proto.google.api.expr.v1beta1.Expr.prototype.getListExpr = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr.CreateList} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr.CreateList, 7)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr.CreateList|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr} returns this +*/ +proto.google.api.expr.v1beta1.Expr.prototype.setListExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.google.api.expr.v1beta1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr} returns this + */ +proto.google.api.expr.v1beta1.Expr.prototype.clearListExpr = function() { + return this.setListExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.prototype.hasListExpr = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional CreateStruct struct_expr = 8; + * @return {?proto.google.api.expr.v1beta1.Expr.CreateStruct} + */ +proto.google.api.expr.v1beta1.Expr.prototype.getStructExpr = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr.CreateStruct} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr.CreateStruct, 8)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr.CreateStruct|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr} returns this +*/ +proto.google.api.expr.v1beta1.Expr.prototype.setStructExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.expr.v1beta1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr} returns this + */ +proto.google.api.expr.v1beta1.Expr.prototype.clearStructExpr = function() { + return this.setStructExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.prototype.hasStructExpr = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional Comprehension comprehension_expr = 9; + * @return {?proto.google.api.expr.v1beta1.Expr.Comprehension} + */ +proto.google.api.expr.v1beta1.Expr.prototype.getComprehensionExpr = function() { + return /** @type{?proto.google.api.expr.v1beta1.Expr.Comprehension} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Expr.Comprehension, 9)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Expr.Comprehension|undefined} value + * @return {!proto.google.api.expr.v1beta1.Expr} returns this +*/ +proto.google.api.expr.v1beta1.Expr.prototype.setComprehensionExpr = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.google.api.expr.v1beta1.Expr.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Expr} returns this + */ +proto.google.api.expr.v1beta1.Expr.prototype.clearComprehensionExpr = function() { + return this.setComprehensionExpr(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Expr.prototype.hasComprehensionExpr = function() { + return jspb.Message.getField(this, 9) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1beta1.Literal.oneofGroups_ = [[1,2,3,4,5,6,7]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1beta1.Literal.ConstantKindCase = { + CONSTANT_KIND_NOT_SET: 0, + NULL_VALUE: 1, + BOOL_VALUE: 2, + INT64_VALUE: 3, + UINT64_VALUE: 4, + DOUBLE_VALUE: 5, + STRING_VALUE: 6, + BYTES_VALUE: 7 +}; + +/** + * @return {proto.google.api.expr.v1beta1.Literal.ConstantKindCase} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getConstantKindCase = function() { + return /** @type {proto.google.api.expr.v1beta1.Literal.ConstantKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Literal.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Literal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Literal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Literal.toObject = function(includeInstance, msg) { + var f, obj = { + nullValue: jspb.Message.getFieldWithDefault(msg, 1, 0), + boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + int64Value: jspb.Message.getFieldWithDefault(msg, 3, 0), + uint64Value: jspb.Message.getFieldWithDefault(msg, 4, 0), + doubleValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + stringValue: jspb.Message.getFieldWithDefault(msg, 6, ""), + bytesValue: msg.getBytesValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Literal} + */ +proto.google.api.expr.v1beta1.Literal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Literal; + return proto.google.api.expr.v1beta1.Literal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Literal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Literal} + */ +proto.google.api.expr.v1beta1.Literal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum()); + msg.setNullValue(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBoolValue(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInt64Value(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUint64Value(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDoubleValue(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setStringValue(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBytesValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Literal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Literal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Literal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Literal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeDouble( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } +}; + + +/** + * optional google.protobuf.NullValue null_value = 1; + * @return {!proto.google.protobuf.NullValue} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getNullValue = function() { + return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.google.protobuf.NullValue} value + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.setNullValue = function(value) { + return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.clearNullValue = function() { + return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Literal.prototype.hasNullValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool bool_value = 2; + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getBoolValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.setBoolValue = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.clearBoolValue = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Literal.prototype.hasBoolValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 int64_value = 3; + * @return {number} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getInt64Value = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.setInt64Value = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.clearInt64Value = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Literal.prototype.hasInt64Value = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 uint64_value = 4; + * @return {number} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getUint64Value = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.setUint64Value = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.clearUint64Value = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Literal.prototype.hasUint64Value = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional double double_value = 5; + * @return {number} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getDoubleValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.setDoubleValue = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.clearDoubleValue = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Literal.prototype.hasDoubleValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string string_value = 6; + * @return {string} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getStringValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.setStringValue = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.clearStringValue = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Literal.prototype.hasStringValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes bytes_value = 7; + * @return {string} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getBytesValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes bytes_value = 7; + * This is a type-conversion wrapper around `getBytesValue()` + * @return {string} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getBytesValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytesValue())); +}; + + +/** + * optional bytes bytes_value = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytesValue()` + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Literal.prototype.getBytesValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytesValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.setBytesValue = function(value) { + return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Literal} returns this + */ +proto.google.api.expr.v1beta1.Literal.prototype.clearBytesValue = function() { + return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1beta1.Literal.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Literal.prototype.hasBytesValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +goog.object.extend(exports, proto.google.api.expr.v1beta1); diff --git a/gen/js/google/api/expr/v1beta1/expr_pb_service.d.ts b/gen/js/google/api/expr/v1beta1/expr_pb_service.d.ts new file mode 100644 index 000000000..0708dbbff --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/expr_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/expr.proto + diff --git a/gen/js/google/api/expr/v1beta1/expr_pb_service.js b/gen/js/google/api/expr/v1beta1/expr_pb_service.js new file mode 100644 index 000000000..0708dbbff --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/expr_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/expr.proto + diff --git a/gen/js/google/api/expr/v1beta1/source_pb.d.ts b/gen/js/google/api/expr/v1beta1/source_pb.d.ts new file mode 100644 index 000000000..dc29163f8 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/source_pb.d.ts @@ -0,0 +1,66 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/source.proto + +import * as jspb from "google-protobuf"; + +export class SourceInfo extends jspb.Message { + getLocation(): string; + setLocation(value: string): void; + + clearLineOffsetsList(): void; + getLineOffsetsList(): Array; + setLineOffsetsList(value: Array): void; + addLineOffsets(value: number, index?: number): number; + + getPositionsMap(): jspb.Map; + clearPositionsMap(): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourceInfo.AsObject; + static toObject(includeInstance: boolean, msg: SourceInfo): SourceInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourceInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceInfo; + static deserializeBinaryFromReader(message: SourceInfo, reader: jspb.BinaryReader): SourceInfo; +} + +export namespace SourceInfo { + export type AsObject = { + location: string, + lineOffsetsList: Array, + positionsMap: Array<[number, number]>, + } +} + +export class SourcePosition extends jspb.Message { + getLocation(): string; + setLocation(value: string): void; + + getOffset(): number; + setOffset(value: number): void; + + getLine(): number; + setLine(value: number): void; + + getColumn(): number; + setColumn(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourcePosition.AsObject; + static toObject(includeInstance: boolean, msg: SourcePosition): SourcePosition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourcePosition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourcePosition; + static deserializeBinaryFromReader(message: SourcePosition, reader: jspb.BinaryReader): SourcePosition; +} + +export namespace SourcePosition { + export type AsObject = { + location: string, + offset: number, + line: number, + column: number, + } +} + diff --git a/gen/js/google/api/expr/v1beta1/source_pb.js b/gen/js/google/api/expr/v1beta1/source_pb.js new file mode 100644 index 000000000..10a8bbf7f --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/source_pb.js @@ -0,0 +1,503 @@ +// source: google/api/expr/v1beta1/source.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.api.expr.v1beta1.SourceInfo', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.SourcePosition', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.SourceInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.SourceInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.SourceInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.SourceInfo.displayName = 'proto.google.api.expr.v1beta1.SourceInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.SourcePosition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.SourcePosition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.SourcePosition.displayName = 'proto.google.api.expr.v1beta1.SourcePosition'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.SourceInfo.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.SourceInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.SourceInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.SourceInfo.toObject = function(includeInstance, msg) { + var f, obj = { + location: jspb.Message.getFieldWithDefault(msg, 2, ""), + lineOffsetsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + positionsMap: (f = msg.getPositionsMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.SourceInfo} + */ +proto.google.api.expr.v1beta1.SourceInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.SourceInfo; + return proto.google.api.expr.v1beta1.SourceInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.SourceInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.SourceInfo} + */ +proto.google.api.expr.v1beta1.SourceInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addLineOffsets(values[i]); + } + break; + case 4: + var value = msg.getPositionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt32, null, 0, 0); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.SourceInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.SourceInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.SourceInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLineOffsetsList(); + if (f.length > 0) { + writer.writePackedInt32( + 3, + f + ); + } + f = message.getPositionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt32); + } +}; + + +/** + * optional string location = 2; + * @return {string} + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated int32 line_offsets = 3; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.getLineOffsetsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.setLineOffsetsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.addLineOffsets = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.clearLineOffsetsList = function() { + return this.setLineOffsetsList([]); +}; + + +/** + * map positions = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.getPositionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this + */ +proto.google.api.expr.v1beta1.SourceInfo.prototype.clearPositionsMap = function() { + this.getPositionsMap().clear(); + return this;}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.SourcePosition.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.SourcePosition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.SourcePosition.toObject = function(includeInstance, msg) { + var f, obj = { + location: jspb.Message.getFieldWithDefault(msg, 1, ""), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + line: jspb.Message.getFieldWithDefault(msg, 3, 0), + column: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.SourcePosition} + */ +proto.google.api.expr.v1beta1.SourcePosition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.SourcePosition; + return proto.google.api.expr.v1beta1.SourcePosition.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.SourcePosition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.SourcePosition} + */ +proto.google.api.expr.v1beta1.SourcePosition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLine(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setColumn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.SourcePosition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.SourcePosition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.SourcePosition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOffset(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getLine(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getColumn(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional string location = 1; + * @return {string} + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.SourcePosition} returns this + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 offset = 2; + * @return {number} + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.SourcePosition} returns this + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.setOffset = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 line = 3; + * @return {number} + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.getLine = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.SourcePosition} returns this + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.setLine = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 column = 4; + * @return {number} + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.getColumn = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.SourcePosition} returns this + */ +proto.google.api.expr.v1beta1.SourcePosition.prototype.setColumn = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +goog.object.extend(exports, proto.google.api.expr.v1beta1); diff --git a/gen/js/google/api/expr/v1beta1/source_pb_service.d.ts b/gen/js/google/api/expr/v1beta1/source_pb_service.d.ts new file mode 100644 index 000000000..563131d03 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/source_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/source.proto + diff --git a/gen/js/google/api/expr/v1beta1/source_pb_service.js b/gen/js/google/api/expr/v1beta1/source_pb_service.js new file mode 100644 index 000000000..563131d03 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/source_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/source.proto + diff --git a/gen/js/google/api/expr/v1beta1/value_pb.d.ts b/gen/js/google/api/expr/v1beta1/value_pb.d.ts new file mode 100644 index 000000000..6e156879f --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/value_pb.d.ts @@ -0,0 +1,210 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/value.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class Value extends jspb.Message { + hasNullValue(): boolean; + clearNullValue(): void; + getNullValue(): google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]; + setNullValue(value: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap]): void; + + hasBoolValue(): boolean; + clearBoolValue(): void; + getBoolValue(): boolean; + setBoolValue(value: boolean): void; + + hasInt64Value(): boolean; + clearInt64Value(): void; + getInt64Value(): number; + setInt64Value(value: number): void; + + hasUint64Value(): boolean; + clearUint64Value(): void; + getUint64Value(): number; + setUint64Value(value: number): void; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number; + setDoubleValue(value: number): void; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): string; + setStringValue(value: string): void; + + hasBytesValue(): boolean; + clearBytesValue(): void; + getBytesValue(): Uint8Array | string; + getBytesValue_asU8(): Uint8Array; + getBytesValue_asB64(): string; + setBytesValue(value: Uint8Array | string): void; + + hasEnumValue(): boolean; + clearEnumValue(): void; + getEnumValue(): EnumValue | undefined; + setEnumValue(value?: EnumValue): void; + + hasObjectValue(): boolean; + clearObjectValue(): void; + getObjectValue(): google_protobuf_any_pb.Any | undefined; + setObjectValue(value?: google_protobuf_any_pb.Any): void; + + hasMapValue(): boolean; + clearMapValue(): void; + getMapValue(): MapValue | undefined; + setMapValue(value?: MapValue): void; + + hasListValue(): boolean; + clearListValue(): void; + getListValue(): ListValue | undefined; + setListValue(value?: ListValue): void; + + hasTypeValue(): boolean; + clearTypeValue(): void; + getTypeValue(): string; + setTypeValue(value: string): void; + + getKindCase(): Value.KindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Value.AsObject; + static toObject(includeInstance: boolean, msg: Value): Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Value; + static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; +} + +export namespace Value { + export type AsObject = { + nullValue: google_protobuf_struct_pb.NullValueMap[keyof google_protobuf_struct_pb.NullValueMap], + boolValue: boolean, + int64Value: number, + uint64Value: number, + doubleValue: number, + stringValue: string, + bytesValue: Uint8Array | string, + enumValue?: EnumValue.AsObject, + objectValue?: google_protobuf_any_pb.Any.AsObject, + mapValue?: MapValue.AsObject, + listValue?: ListValue.AsObject, + typeValue: string, + } + + export enum KindCase { + KIND_NOT_SET = 0, + NULL_VALUE = 1, + BOOL_VALUE = 2, + INT64_VALUE = 3, + UINT64_VALUE = 4, + DOUBLE_VALUE = 5, + STRING_VALUE = 6, + BYTES_VALUE = 7, + ENUM_VALUE = 9, + OBJECT_VALUE = 10, + MAP_VALUE = 11, + LIST_VALUE = 12, + TYPE_VALUE = 15, + } +} + +export class EnumValue extends jspb.Message { + getType(): string; + setType(value: string): void; + + getValue(): number; + setValue(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValue.AsObject; + static toObject(includeInstance: boolean, msg: EnumValue): EnumValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValue; + static deserializeBinaryFromReader(message: EnumValue, reader: jspb.BinaryReader): EnumValue; +} + +export namespace EnumValue { + export type AsObject = { + type: string, + value: number, + } +} + +export class ListValue extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value?: Value, index?: number): Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListValue.AsObject; + static toObject(includeInstance: boolean, msg: ListValue): ListValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListValue; + static deserializeBinaryFromReader(message: ListValue, reader: jspb.BinaryReader): ListValue; +} + +export namespace ListValue { + export type AsObject = { + valuesList: Array, + } +} + +export class MapValue extends jspb.Message { + clearEntriesList(): void; + getEntriesList(): Array; + setEntriesList(value: Array): void; + addEntries(value?: MapValue.Entry, index?: number): MapValue.Entry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MapValue.AsObject; + static toObject(includeInstance: boolean, msg: MapValue): MapValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MapValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MapValue; + static deserializeBinaryFromReader(message: MapValue, reader: jspb.BinaryReader): MapValue; +} + +export namespace MapValue { + export type AsObject = { + entriesList: Array, + } + + export class Entry extends jspb.Message { + hasKey(): boolean; + clearKey(): void; + getKey(): Value | undefined; + setKey(value?: Value): void; + + hasValue(): boolean; + clearValue(): void; + getValue(): Value | undefined; + setValue(value?: Value): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Entry.AsObject; + static toObject(includeInstance: boolean, msg: Entry): Entry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Entry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Entry; + static deserializeBinaryFromReader(message: Entry, reader: jspb.BinaryReader): Entry; + } + + export namespace Entry { + export type AsObject = { + key?: Value.AsObject, + value?: Value.AsObject, + } + } +} + diff --git a/gen/js/google/api/expr/v1beta1/value_pb.js b/gen/js/google/api/expr/v1beta1/value_pb.js new file mode 100644 index 000000000..faab413aa --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/value_pb.js @@ -0,0 +1,1563 @@ +// source: google/api/expr/v1beta1/value.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.google.api.expr.v1beta1.EnumValue', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.ListValue', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.MapValue', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.MapValue.Entry', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Value', null, global); +goog.exportSymbol('proto.google.api.expr.v1beta1.Value.KindCase', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.Value = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1beta1.Value.oneofGroups_); +}; +goog.inherits(proto.google.api.expr.v1beta1.Value, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.Value.displayName = 'proto.google.api.expr.v1beta1.Value'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.EnumValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.EnumValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.EnumValue.displayName = 'proto.google.api.expr.v1beta1.EnumValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.ListValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.ListValue.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.ListValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.ListValue.displayName = 'proto.google.api.expr.v1beta1.ListValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.MapValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.MapValue.repeatedFields_, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.MapValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.MapValue.displayName = 'proto.google.api.expr.v1beta1.MapValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.expr.v1beta1.MapValue.Entry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.expr.v1beta1.MapValue.Entry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.expr.v1beta1.MapValue.Entry.displayName = 'proto.google.api.expr.v1beta1.MapValue.Entry'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.expr.v1beta1.Value.oneofGroups_ = [[1,2,3,4,5,6,7,9,10,11,12,15]]; + +/** + * @enum {number} + */ +proto.google.api.expr.v1beta1.Value.KindCase = { + KIND_NOT_SET: 0, + NULL_VALUE: 1, + BOOL_VALUE: 2, + INT64_VALUE: 3, + UINT64_VALUE: 4, + DOUBLE_VALUE: 5, + STRING_VALUE: 6, + BYTES_VALUE: 7, + ENUM_VALUE: 9, + OBJECT_VALUE: 10, + MAP_VALUE: 11, + LIST_VALUE: 12, + TYPE_VALUE: 15 +}; + +/** + * @return {proto.google.api.expr.v1beta1.Value.KindCase} + */ +proto.google.api.expr.v1beta1.Value.prototype.getKindCase = function() { + return /** @type {proto.google.api.expr.v1beta1.Value.KindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1beta1.Value.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.Value.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.Value.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.Value} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Value.toObject = function(includeInstance, msg) { + var f, obj = { + nullValue: jspb.Message.getFieldWithDefault(msg, 1, 0), + boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + int64Value: jspb.Message.getFieldWithDefault(msg, 3, 0), + uint64Value: jspb.Message.getFieldWithDefault(msg, 4, 0), + doubleValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + stringValue: jspb.Message.getFieldWithDefault(msg, 6, ""), + bytesValue: msg.getBytesValue_asB64(), + enumValue: (f = msg.getEnumValue()) && proto.google.api.expr.v1beta1.EnumValue.toObject(includeInstance, f), + objectValue: (f = msg.getObjectValue()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + mapValue: (f = msg.getMapValue()) && proto.google.api.expr.v1beta1.MapValue.toObject(includeInstance, f), + listValue: (f = msg.getListValue()) && proto.google.api.expr.v1beta1.ListValue.toObject(includeInstance, f), + typeValue: jspb.Message.getFieldWithDefault(msg, 15, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.Value} + */ +proto.google.api.expr.v1beta1.Value.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.Value; + return proto.google.api.expr.v1beta1.Value.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.Value} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.Value} + */ +proto.google.api.expr.v1beta1.Value.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum()); + msg.setNullValue(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBoolValue(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInt64Value(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUint64Value(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDoubleValue(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setStringValue(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBytesValue(value); + break; + case 9: + var value = new proto.google.api.expr.v1beta1.EnumValue; + reader.readMessage(value,proto.google.api.expr.v1beta1.EnumValue.deserializeBinaryFromReader); + msg.setEnumValue(value); + break; + case 10: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setObjectValue(value); + break; + case 11: + var value = new proto.google.api.expr.v1beta1.MapValue; + reader.readMessage(value,proto.google.api.expr.v1beta1.MapValue.deserializeBinaryFromReader); + msg.setMapValue(value); + break; + case 12: + var value = new proto.google.api.expr.v1beta1.ListValue; + reader.readMessage(value,proto.google.api.expr.v1beta1.ListValue.deserializeBinaryFromReader); + msg.setListValue(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setTypeValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Value.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.Value.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.Value} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.Value.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeDouble( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = message.getEnumValue(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.google.api.expr.v1beta1.EnumValue.serializeBinaryToWriter + ); + } + f = message.getObjectValue(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getMapValue(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.google.api.expr.v1beta1.MapValue.serializeBinaryToWriter + ); + } + f = message.getListValue(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.google.api.expr.v1beta1.ListValue.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeString( + 15, + f + ); + } +}; + + +/** + * optional google.protobuf.NullValue null_value = 1; + * @return {!proto.google.protobuf.NullValue} + */ +proto.google.api.expr.v1beta1.Value.prototype.getNullValue = function() { + return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.google.protobuf.NullValue} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.setNullValue = function(value) { + return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearNullValue = function() { + return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasNullValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool bool_value = 2; + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.getBoolValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.setBoolValue = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearBoolValue = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasBoolValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 int64_value = 3; + * @return {number} + */ +proto.google.api.expr.v1beta1.Value.prototype.getInt64Value = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.setInt64Value = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearInt64Value = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasInt64Value = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 uint64_value = 4; + * @return {number} + */ +proto.google.api.expr.v1beta1.Value.prototype.getUint64Value = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.setUint64Value = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearUint64Value = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasUint64Value = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional double double_value = 5; + * @return {number} + */ +proto.google.api.expr.v1beta1.Value.prototype.getDoubleValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.setDoubleValue = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearDoubleValue = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasDoubleValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string string_value = 6; + * @return {string} + */ +proto.google.api.expr.v1beta1.Value.prototype.getStringValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.setStringValue = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearStringValue = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasStringValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes bytes_value = 7; + * @return {string} + */ +proto.google.api.expr.v1beta1.Value.prototype.getBytesValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes bytes_value = 7; + * This is a type-conversion wrapper around `getBytesValue()` + * @return {string} + */ +proto.google.api.expr.v1beta1.Value.prototype.getBytesValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytesValue())); +}; + + +/** + * optional bytes bytes_value = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytesValue()` + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.Value.prototype.getBytesValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytesValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.setBytesValue = function(value) { + return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearBytesValue = function() { + return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasBytesValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional EnumValue enum_value = 9; + * @return {?proto.google.api.expr.v1beta1.EnumValue} + */ +proto.google.api.expr.v1beta1.Value.prototype.getEnumValue = function() { + return /** @type{?proto.google.api.expr.v1beta1.EnumValue} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.EnumValue, 9)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.EnumValue|undefined} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this +*/ +proto.google.api.expr.v1beta1.Value.prototype.setEnumValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearEnumValue = function() { + return this.setEnumValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasEnumValue = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional google.protobuf.Any object_value = 10; + * @return {?proto.google.protobuf.Any} + */ +proto.google.api.expr.v1beta1.Value.prototype.getObjectValue = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this +*/ +proto.google.api.expr.v1beta1.Value.prototype.setObjectValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearObjectValue = function() { + return this.setObjectValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasObjectValue = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional MapValue map_value = 11; + * @return {?proto.google.api.expr.v1beta1.MapValue} + */ +proto.google.api.expr.v1beta1.Value.prototype.getMapValue = function() { + return /** @type{?proto.google.api.expr.v1beta1.MapValue} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.MapValue, 11)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.MapValue|undefined} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this +*/ +proto.google.api.expr.v1beta1.Value.prototype.setMapValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearMapValue = function() { + return this.setMapValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasMapValue = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ListValue list_value = 12; + * @return {?proto.google.api.expr.v1beta1.ListValue} + */ +proto.google.api.expr.v1beta1.Value.prototype.getListValue = function() { + return /** @type{?proto.google.api.expr.v1beta1.ListValue} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.ListValue, 12)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.ListValue|undefined} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this +*/ +proto.google.api.expr.v1beta1.Value.prototype.setListValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearListValue = function() { + return this.setListValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasListValue = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional string type_value = 15; + * @return {string} + */ +proto.google.api.expr.v1beta1.Value.prototype.getTypeValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.setTypeValue = function(value) { + return jspb.Message.setOneofField(this, 15, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.expr.v1beta1.Value} returns this + */ +proto.google.api.expr.v1beta1.Value.prototype.clearTypeValue = function() { + return jspb.Message.setOneofField(this, 15, proto.google.api.expr.v1beta1.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.Value.prototype.hasTypeValue = function() { + return jspb.Message.getField(this, 15) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.EnumValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.EnumValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.EnumValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.EnumValue.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.EnumValue} + */ +proto.google.api.expr.v1beta1.EnumValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.EnumValue; + return proto.google.api.expr.v1beta1.EnumValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.EnumValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.EnumValue} + */ +proto.google.api.expr.v1beta1.EnumValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.EnumValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.EnumValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.EnumValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.EnumValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.google.api.expr.v1beta1.EnumValue.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.expr.v1beta1.EnumValue} returns this + */ +proto.google.api.expr.v1beta1.EnumValue.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 value = 2; + * @return {number} + */ +proto.google.api.expr.v1beta1.EnumValue.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.api.expr.v1beta1.EnumValue} returns this + */ +proto.google.api.expr.v1beta1.EnumValue.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.ListValue.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.ListValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.ListValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.ListValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.ListValue.toObject = function(includeInstance, msg) { + var f, obj = { + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + proto.google.api.expr.v1beta1.Value.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.ListValue} + */ +proto.google.api.expr.v1beta1.ListValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.ListValue; + return proto.google.api.expr.v1beta1.ListValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.ListValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.ListValue} + */ +proto.google.api.expr.v1beta1.ListValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.Value; + reader.readMessage(value,proto.google.api.expr.v1beta1.Value.deserializeBinaryFromReader); + msg.addValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.ListValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.ListValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.ListValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.ListValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1beta1.Value.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Value values = 1; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.ListValue.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.Value, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.ListValue} returns this +*/ +proto.google.api.expr.v1beta1.ListValue.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.Value=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.Value} + */ +proto.google.api.expr.v1beta1.ListValue.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1beta1.Value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.ListValue} returns this + */ +proto.google.api.expr.v1beta1.ListValue.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.expr.v1beta1.MapValue.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.MapValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.MapValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.MapValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.MapValue.toObject = function(includeInstance, msg) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.google.api.expr.v1beta1.MapValue.Entry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.MapValue} + */ +proto.google.api.expr.v1beta1.MapValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.MapValue; + return proto.google.api.expr.v1beta1.MapValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.MapValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.MapValue} + */ +proto.google.api.expr.v1beta1.MapValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.MapValue.Entry; + reader.readMessage(value,proto.google.api.expr.v1beta1.MapValue.Entry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.MapValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.MapValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.MapValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.MapValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.expr.v1beta1.MapValue.Entry.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.expr.v1beta1.MapValue.Entry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.expr.v1beta1.MapValue.Entry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.MapValue.Entry.toObject = function(includeInstance, msg) { + var f, obj = { + key: (f = msg.getKey()) && proto.google.api.expr.v1beta1.Value.toObject(includeInstance, f), + value: (f = msg.getValue()) && proto.google.api.expr.v1beta1.Value.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.expr.v1beta1.MapValue.Entry} + */ +proto.google.api.expr.v1beta1.MapValue.Entry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.expr.v1beta1.MapValue.Entry; + return proto.google.api.expr.v1beta1.MapValue.Entry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.expr.v1beta1.MapValue.Entry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.expr.v1beta1.MapValue.Entry} + */ +proto.google.api.expr.v1beta1.MapValue.Entry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.expr.v1beta1.Value; + reader.readMessage(value,proto.google.api.expr.v1beta1.Value.deserializeBinaryFromReader); + msg.setKey(value); + break; + case 2: + var value = new proto.google.api.expr.v1beta1.Value; + reader.readMessage(value,proto.google.api.expr.v1beta1.Value.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.expr.v1beta1.MapValue.Entry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.expr.v1beta1.MapValue.Entry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.expr.v1beta1.MapValue.Entry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.api.expr.v1beta1.Value.serializeBinaryToWriter + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.api.expr.v1beta1.Value.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Value key = 1; + * @return {?proto.google.api.expr.v1beta1.Value} + */ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.getKey = function() { + return /** @type{?proto.google.api.expr.v1beta1.Value} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Value, 1)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Value|undefined} value + * @return {!proto.google.api.expr.v1beta1.MapValue.Entry} returns this +*/ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.setKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.MapValue.Entry} returns this + */ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.clearKey = function() { + return this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.hasKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Value value = 2; + * @return {?proto.google.api.expr.v1beta1.Value} + */ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.getValue = function() { + return /** @type{?proto.google.api.expr.v1beta1.Value} */ ( + jspb.Message.getWrapperField(this, proto.google.api.expr.v1beta1.Value, 2)); +}; + + +/** + * @param {?proto.google.api.expr.v1beta1.Value|undefined} value + * @return {!proto.google.api.expr.v1beta1.MapValue.Entry} returns this +*/ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.expr.v1beta1.MapValue.Entry} returns this + */ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.expr.v1beta1.MapValue.Entry.prototype.hasValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated Entry entries = 1; + * @return {!Array} + */ +proto.google.api.expr.v1beta1.MapValue.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1beta1.MapValue.Entry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.expr.v1beta1.MapValue} returns this +*/ +proto.google.api.expr.v1beta1.MapValue.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.expr.v1beta1.MapValue.Entry=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.expr.v1beta1.MapValue.Entry} + */ +proto.google.api.expr.v1beta1.MapValue.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1beta1.MapValue.Entry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.expr.v1beta1.MapValue} returns this + */ +proto.google.api.expr.v1beta1.MapValue.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + +goog.object.extend(exports, proto.google.api.expr.v1beta1); diff --git a/gen/js/google/api/expr/v1beta1/value_pb_service.d.ts b/gen/js/google/api/expr/v1beta1/value_pb_service.d.ts new file mode 100644 index 000000000..b56a3d6d6 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/value_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/value.proto + diff --git a/gen/js/google/api/expr/v1beta1/value_pb_service.js b/gen/js/google/api/expr/v1beta1/value_pb_service.js new file mode 100644 index 000000000..b56a3d6d6 --- /dev/null +++ b/gen/js/google/api/expr/v1beta1/value_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api.expr.v1beta1 +// file: google/api/expr/v1beta1/value.proto + diff --git a/gen/js/google/api/field_behavior_pb.d.ts b/gen/js/google/api/field_behavior_pb.d.ts new file mode 100644 index 000000000..bf6910817 --- /dev/null +++ b/gen/js/google/api/field_behavior_pb.d.ts @@ -0,0 +1,21 @@ +// package: google.api +// file: google/api/field_behavior.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + + export const fieldBehavior: jspb.ExtensionFieldInfo; + +export interface FieldBehaviorMap { + FIELD_BEHAVIOR_UNSPECIFIED: 0; + OPTIONAL: 1; + REQUIRED: 2; + OUTPUT_ONLY: 3; + INPUT_ONLY: 4; + IMMUTABLE: 5; + UNORDERED_LIST: 6; + NON_EMPTY_DEFAULT: 7; +} + +export const FieldBehavior: FieldBehaviorMap; + diff --git a/gen/js/google/api/field_behavior_pb.js b/gen/js/google/api/field_behavior_pb.js new file mode 100644 index 000000000..49d9ee7b8 --- /dev/null +++ b/gen/js/google/api/field_behavior_pb.js @@ -0,0 +1,61 @@ +// source: google/api/field_behavior.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.FieldBehavior', null, global); +goog.exportSymbol('proto.google.api.fieldBehaviorList', null, global); +/** + * @enum {number} + */ +proto.google.api.FieldBehavior = { + FIELD_BEHAVIOR_UNSPECIFIED: 0, + OPTIONAL: 1, + REQUIRED: 2, + OUTPUT_ONLY: 3, + INPUT_ONLY: 4, + IMMUTABLE: 5, + UNORDERED_LIST: 6, + NON_EMPTY_DEFAULT: 7 +}; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `fieldBehaviorList`. + * @type {!jspb.ExtensionFieldInfo>} + */ +proto.google.api.fieldBehaviorList = new jspb.ExtensionFieldInfo( + 1052, + {fieldBehaviorList: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 1); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1052] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.fieldBehaviorList, + jspb.BinaryReader.prototype.readPackedEnum, + jspb.BinaryWriter.prototype.writePackedEnum, + undefined, + undefined, + true); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[1052] = proto.google.api.fieldBehaviorList; + +goog.object.extend(exports, proto.google.api); diff --git a/gen/js/google/api/field_behavior_pb_service.d.ts b/gen/js/google/api/field_behavior_pb_service.d.ts new file mode 100644 index 000000000..2ae12568a --- /dev/null +++ b/gen/js/google/api/field_behavior_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/field_behavior.proto + diff --git a/gen/js/google/api/field_behavior_pb_service.js b/gen/js/google/api/field_behavior_pb_service.js new file mode 100644 index 000000000..2ae12568a --- /dev/null +++ b/gen/js/google/api/field_behavior_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/field_behavior.proto + diff --git a/gen/js/google/api/http_pb.d.ts b/gen/js/google/api/http_pb.d.ts new file mode 100644 index 000000000..9236d7c31 --- /dev/null +++ b/gen/js/google/api/http_pb.d.ts @@ -0,0 +1,136 @@ +// package: google.api +// file: google/api/http.proto + +import * as jspb from "google-protobuf"; + +export class Http extends jspb.Message { + clearRulesList(): void; + getRulesList(): Array; + setRulesList(value: Array): void; + addRules(value?: HttpRule, index?: number): HttpRule; + + getFullyDecodeReservedExpansion(): boolean; + setFullyDecodeReservedExpansion(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Http.AsObject; + static toObject(includeInstance: boolean, msg: Http): Http.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Http, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Http; + static deserializeBinaryFromReader(message: Http, reader: jspb.BinaryReader): Http; +} + +export namespace Http { + export type AsObject = { + rulesList: Array, + fullyDecodeReservedExpansion: boolean, + } +} + +export class HttpRule extends jspb.Message { + getSelector(): string; + setSelector(value: string): void; + + hasGet(): boolean; + clearGet(): void; + getGet(): string; + setGet(value: string): void; + + hasPut(): boolean; + clearPut(): void; + getPut(): string; + setPut(value: string): void; + + hasPost(): boolean; + clearPost(): void; + getPost(): string; + setPost(value: string): void; + + hasDelete(): boolean; + clearDelete(): void; + getDelete(): string; + setDelete(value: string): void; + + hasPatch(): boolean; + clearPatch(): void; + getPatch(): string; + setPatch(value: string): void; + + hasCustom(): boolean; + clearCustom(): void; + getCustom(): CustomHttpPattern | undefined; + setCustom(value?: CustomHttpPattern): void; + + getBody(): string; + setBody(value: string): void; + + getResponseBody(): string; + setResponseBody(value: string): void; + + clearAdditionalBindingsList(): void; + getAdditionalBindingsList(): Array; + setAdditionalBindingsList(value: Array): void; + addAdditionalBindings(value?: HttpRule, index?: number): HttpRule; + + getPatternCase(): HttpRule.PatternCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HttpRule.AsObject; + static toObject(includeInstance: boolean, msg: HttpRule): HttpRule.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HttpRule, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HttpRule; + static deserializeBinaryFromReader(message: HttpRule, reader: jspb.BinaryReader): HttpRule; +} + +export namespace HttpRule { + export type AsObject = { + selector: string, + get: string, + put: string, + post: string, + pb_delete: string, + patch: string, + custom?: CustomHttpPattern.AsObject, + body: string, + responseBody: string, + additionalBindingsList: Array, + } + + export enum PatternCase { + PATTERN_NOT_SET = 0, + GET = 2, + PUT = 3, + POST = 4, + DELETE = 5, + PATCH = 6, + CUSTOM = 8, + } +} + +export class CustomHttpPattern extends jspb.Message { + getKind(): string; + setKind(value: string): void; + + getPath(): string; + setPath(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CustomHttpPattern.AsObject; + static toObject(includeInstance: boolean, msg: CustomHttpPattern): CustomHttpPattern.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CustomHttpPattern, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomHttpPattern; + static deserializeBinaryFromReader(message: CustomHttpPattern, reader: jspb.BinaryReader): CustomHttpPattern; +} + +export namespace CustomHttpPattern { + export type AsObject = { + kind: string, + path: string, + } +} + diff --git a/gen/js/google/api/http_pb.js b/gen/js/google/api/http_pb.js new file mode 100644 index 000000000..ea429932c --- /dev/null +++ b/gen/js/google/api/http_pb.js @@ -0,0 +1,1006 @@ +// source: google/api/http.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global); +goog.exportSymbol('proto.google.api.Http', null, global); +goog.exportSymbol('proto.google.api.HttpRule', null, global); +goog.exportSymbol('proto.google.api.HttpRule.PatternCase', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.Http = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null); +}; +goog.inherits(proto.google.api.Http, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.Http.displayName = 'proto.google.api.Http'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.HttpRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_); +}; +goog.inherits(proto.google.api.HttpRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.CustomHttpPattern = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.Http.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.Http.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.Http.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.Http} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.toObject = function(includeInstance, msg) { + var f, obj = { + rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.google.api.HttpRule.toObject, includeInstance), + fullyDecodeReservedExpansion: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.Http; + return proto.google.api.Http.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.Http} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullyDecodeReservedExpansion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.Http.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.Http.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.Http} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } + f = message.getFullyDecodeReservedExpansion(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated HttpRule rules = 1; + * @return {!Array} + */ +proto.google.api.Http.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.Http} returns this +*/ +proto.google.api.Http.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + +/** + * optional bool fully_decode_reserved_expansion = 2; + * @return {boolean} + */ +proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpRule.repeatedFields_ = [11]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]]; + +/** + * @enum {number} + */ +proto.google.api.HttpRule.PatternCase = { + PATTERN_NOT_SET: 0, + GET: 2, + PUT: 3, + POST: 4, + DELETE: 5, + PATCH: 6, + CUSTOM: 8 +}; + +/** + * @return {proto.google.api.HttpRule.PatternCase} + */ +proto.google.api.HttpRule.prototype.getPatternCase = function() { + return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpRule.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.toObject = function(includeInstance, msg) { + var f, obj = { + selector: jspb.Message.getFieldWithDefault(msg, 1, ""), + get: jspb.Message.getFieldWithDefault(msg, 2, ""), + put: jspb.Message.getFieldWithDefault(msg, 3, ""), + post: jspb.Message.getFieldWithDefault(msg, 4, ""), + pb_delete: jspb.Message.getFieldWithDefault(msg, 5, ""), + patch: jspb.Message.getFieldWithDefault(msg, 6, ""), + custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f), + body: jspb.Message.getFieldWithDefault(msg, 7, ""), + responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""), + additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(), + proto.google.api.HttpRule.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpRule; + return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSelector(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setGet(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPut(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPost(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDelete(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPatch(value); + break; + case 8: + var value = new proto.google.api.CustomHttpPattern; + reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader); + msg.setCustom(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setResponseBody(value); + break; + case 11: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addAdditionalBindings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSelector(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = message.getCustom(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.api.CustomHttpPattern.serializeBinaryToWriter + ); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getResponseBody(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getAdditionalBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string selector = 1; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getSelector = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setSelector = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string get = 2; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getGet = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setGet = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearGet = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasGet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string put = 3; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPut = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPut = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPut = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPut = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string post = 4; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPost = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPost = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPost = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string delete = 5; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getDelete = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setDelete = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearDelete = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasDelete = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string patch = 6; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPatch = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPatch = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPatch = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPatch = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional CustomHttpPattern custom = 8; + * @return {?proto.google.api.CustomHttpPattern} + */ +proto.google.api.HttpRule.prototype.getCustom = function() { + return /** @type{?proto.google.api.CustomHttpPattern} */ ( + jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8)); +}; + + +/** + * @param {?proto.google.api.CustomHttpPattern|undefined} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setCustom = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearCustom = function() { + return this.setCustom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasCustom = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string body = 7; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string response_body = 12; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getResponseBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setResponseBody = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * repeated HttpRule additional_bindings = 11; + * @return {!Array} + */ +proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() { + return this.setAdditionalBindingsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, ""), + path: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.CustomHttpPattern; + return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKind(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.CustomHttpPattern} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string kind = 1; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getKind = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setKind = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/gen/js/google/api/http_pb_service.d.ts b/gen/js/google/api/http_pb_service.d.ts new file mode 100644 index 000000000..4d2b6862f --- /dev/null +++ b/gen/js/google/api/http_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/http.proto + diff --git a/gen/js/google/api/http_pb_service.js b/gen/js/google/api/http_pb_service.js new file mode 100644 index 000000000..4d2b6862f --- /dev/null +++ b/gen/js/google/api/http_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/http.proto + diff --git a/gen/js/google/api/httpbody_pb.d.ts b/gen/js/google/api/httpbody_pb.d.ts new file mode 100644 index 000000000..f327f9b73 --- /dev/null +++ b/gen/js/google/api/httpbody_pb.d.ts @@ -0,0 +1,38 @@ +// package: google.api +// file: google/api/httpbody.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; + +export class HttpBody extends jspb.Message { + getContentType(): string; + setContentType(value: string): void; + + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + clearExtensionsList(): void; + getExtensionsList(): Array; + setExtensionsList(value: Array): void; + addExtensions(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HttpBody.AsObject; + static toObject(includeInstance: boolean, msg: HttpBody): HttpBody.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HttpBody, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HttpBody; + static deserializeBinaryFromReader(message: HttpBody, reader: jspb.BinaryReader): HttpBody; +} + +export namespace HttpBody { + export type AsObject = { + contentType: string, + data: Uint8Array | string, + extensionsList: Array, + } +} + diff --git a/gen/js/google/api/httpbody_pb.js b/gen/js/google/api/httpbody_pb.js new file mode 100644 index 000000000..efaaef4a3 --- /dev/null +++ b/gen/js/google/api/httpbody_pb.js @@ -0,0 +1,286 @@ +// source: google/api/httpbody.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.google.api.HttpBody', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.HttpBody = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpBody.repeatedFields_, null); +}; +goog.inherits(proto.google.api.HttpBody, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpBody.displayName = 'proto.google.api.HttpBody'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpBody.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.HttpBody.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpBody.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpBody} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpBody.toObject = function(includeInstance, msg) { + var f, obj = { + contentType: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64(), + extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(), + google_protobuf_any_pb.Any.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.HttpBody} + */ +proto.google.api.HttpBody.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpBody; + return proto.google.api.HttpBody.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpBody} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpBody} + */ +proto.google.api.HttpBody.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setContentType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addExtensions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpBody.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpBody.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpBody} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpBody.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getExtensionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string content_type = 1; + * @return {string} + */ +proto.google.api.HttpBody.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {string} + */ +proto.google.api.HttpBody.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes data = 2; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.google.api.HttpBody.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.google.api.HttpBody.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated google.protobuf.Any extensions = 3; + * @return {!Array} + */ +proto.google.api.HttpBody.prototype.getExtensionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpBody} returns this +*/ +proto.google.api.HttpBody.prototype.setExtensionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.google.api.HttpBody.prototype.addExtensions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.clearExtensionsList = function() { + return this.setExtensionsList([]); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/gen/js/google/api/httpbody_pb_service.d.ts b/gen/js/google/api/httpbody_pb_service.d.ts new file mode 100644 index 000000000..81d08d408 --- /dev/null +++ b/gen/js/google/api/httpbody_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/httpbody.proto + diff --git a/gen/js/google/api/httpbody_pb_service.js b/gen/js/google/api/httpbody_pb_service.js new file mode 100644 index 000000000..81d08d408 --- /dev/null +++ b/gen/js/google/api/httpbody_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/httpbody.proto + diff --git a/gen/js/google/api/resource_pb.d.ts b/gen/js/google/api/resource_pb.d.ts new file mode 100644 index 000000000..3336c7378 --- /dev/null +++ b/gen/js/google/api/resource_pb.d.ts @@ -0,0 +1,99 @@ +// package: google.api +// file: google/api/resource.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + +export class ResourceDescriptor extends jspb.Message { + getType(): string; + setType(value: string): void; + + clearPatternList(): void; + getPatternList(): Array; + setPatternList(value: Array): void; + addPattern(value: string, index?: number): string; + + getNameField(): string; + setNameField(value: string): void; + + getHistory(): ResourceDescriptor.HistoryMap[keyof ResourceDescriptor.HistoryMap]; + setHistory(value: ResourceDescriptor.HistoryMap[keyof ResourceDescriptor.HistoryMap]): void; + + getPlural(): string; + setPlural(value: string): void; + + getSingular(): string; + setSingular(value: string): void; + + clearStyleList(): void; + getStyleList(): Array; + setStyleList(value: Array): void; + addStyle(value: ResourceDescriptor.StyleMap[keyof ResourceDescriptor.StyleMap], index?: number): ResourceDescriptor.StyleMap[keyof ResourceDescriptor.StyleMap]; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceDescriptor.AsObject; + static toObject(includeInstance: boolean, msg: ResourceDescriptor): ResourceDescriptor.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceDescriptor, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceDescriptor; + static deserializeBinaryFromReader(message: ResourceDescriptor, reader: jspb.BinaryReader): ResourceDescriptor; +} + +export namespace ResourceDescriptor { + export type AsObject = { + type: string, + patternList: Array, + nameField: string, + history: ResourceDescriptor.HistoryMap[keyof ResourceDescriptor.HistoryMap], + plural: string, + singular: string, + styleList: Array, + } + + export interface HistoryMap { + HISTORY_UNSPECIFIED: 0; + ORIGINALLY_SINGLE_PATTERN: 1; + FUTURE_MULTI_PATTERN: 2; + } + + export const History: HistoryMap; + + export interface StyleMap { + STYLE_UNSPECIFIED: 0; + DECLARATIVE_FRIENDLY: 1; + } + + export const Style: StyleMap; +} + +export class ResourceReference extends jspb.Message { + getType(): string; + setType(value: string): void; + + getChildType(): string; + setChildType(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceReference.AsObject; + static toObject(includeInstance: boolean, msg: ResourceReference): ResourceReference.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceReference, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceReference; + static deserializeBinaryFromReader(message: ResourceReference, reader: jspb.BinaryReader): ResourceReference; +} + +export namespace ResourceReference { + export type AsObject = { + type: string, + childType: string, + } +} + + export const resourceReference: jspb.ExtensionFieldInfo; + + export const resourceDefinition: jspb.ExtensionFieldInfo; + + export const resource: jspb.ExtensionFieldInfo; + diff --git a/gen/js/google/api/resource_pb.js b/gen/js/google/api/resource_pb.js new file mode 100644 index 000000000..824563738 --- /dev/null +++ b/gen/js/google/api/resource_pb.js @@ -0,0 +1,678 @@ +// source: google/api/resource.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.ResourceDescriptor', null, global); +goog.exportSymbol('proto.google.api.ResourceDescriptor.History', null, global); +goog.exportSymbol('proto.google.api.ResourceDescriptor.Style', null, global); +goog.exportSymbol('proto.google.api.ResourceReference', null, global); +goog.exportSymbol('proto.google.api.resource', null, global); +goog.exportSymbol('proto.google.api.resourceDefinitionList', null, global); +goog.exportSymbol('proto.google.api.resourceReference', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.ResourceDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.ResourceDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.google.api.ResourceDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.ResourceDescriptor.displayName = 'proto.google.api.ResourceDescriptor'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.ResourceReference = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.ResourceReference, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.ResourceReference.displayName = 'proto.google.api.ResourceReference'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.ResourceDescriptor.repeatedFields_ = [2,10]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.ResourceDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.ResourceDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.ResourceDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.ResourceDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + patternList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + nameField: jspb.Message.getFieldWithDefault(msg, 3, ""), + history: jspb.Message.getFieldWithDefault(msg, 4, 0), + plural: jspb.Message.getFieldWithDefault(msg, 5, ""), + singular: jspb.Message.getFieldWithDefault(msg, 6, ""), + styleList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.ResourceDescriptor} + */ +proto.google.api.ResourceDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.ResourceDescriptor; + return proto.google.api.ResourceDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.ResourceDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.ResourceDescriptor} + */ +proto.google.api.ResourceDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addPattern(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setNameField(value); + break; + case 4: + var value = /** @type {!proto.google.api.ResourceDescriptor.History} */ (reader.readEnum()); + msg.setHistory(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setPlural(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSingular(value); + break; + case 10: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addStyle(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.ResourceDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.ResourceDescriptor.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.ResourceDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.ResourceDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPatternList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getNameField(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getHistory(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getPlural(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSingular(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getStyleList(); + if (f.length > 0) { + writer.writePackedEnum( + 10, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.google.api.ResourceDescriptor.History = { + HISTORY_UNSPECIFIED: 0, + ORIGINALLY_SINGLE_PATTERN: 1, + FUTURE_MULTI_PATTERN: 2 +}; + +/** + * @enum {number} + */ +proto.google.api.ResourceDescriptor.Style = { + STYLE_UNSPECIFIED: 0, + DECLARATIVE_FRIENDLY: 1 +}; + +/** + * optional string type = 1; + * @return {string} + */ +proto.google.api.ResourceDescriptor.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string pattern = 2; + * @return {!Array} + */ +proto.google.api.ResourceDescriptor.prototype.getPatternList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.setPatternList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.addPattern = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.clearPatternList = function() { + return this.setPatternList([]); +}; + + +/** + * optional string name_field = 3; + * @return {string} + */ +proto.google.api.ResourceDescriptor.prototype.getNameField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.setNameField = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional History history = 4; + * @return {!proto.google.api.ResourceDescriptor.History} + */ +proto.google.api.ResourceDescriptor.prototype.getHistory = function() { + return /** @type {!proto.google.api.ResourceDescriptor.History} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.google.api.ResourceDescriptor.History} value + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.setHistory = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional string plural = 5; + * @return {string} + */ +proto.google.api.ResourceDescriptor.prototype.getPlural = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.setPlural = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string singular = 6; + * @return {string} + */ +proto.google.api.ResourceDescriptor.prototype.getSingular = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.setSingular = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * repeated Style style = 10; + * @return {!Array} + */ +proto.google.api.ResourceDescriptor.prototype.getStyleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.setStyleList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {!proto.google.api.ResourceDescriptor.Style} value + * @param {number=} opt_index + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.addStyle = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.ResourceDescriptor} returns this + */ +proto.google.api.ResourceDescriptor.prototype.clearStyleList = function() { + return this.setStyleList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.ResourceReference.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.ResourceReference.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.ResourceReference} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.ResourceReference.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + childType: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.ResourceReference} + */ +proto.google.api.ResourceReference.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.ResourceReference; + return proto.google.api.ResourceReference.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.ResourceReference} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.ResourceReference} + */ +proto.google.api.ResourceReference.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChildType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.ResourceReference.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.ResourceReference.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.ResourceReference} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.ResourceReference.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChildType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.google.api.ResourceReference.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.ResourceReference} returns this + */ +proto.google.api.ResourceReference.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string child_type = 2; + * @return {string} + */ +proto.google.api.ResourceReference.prototype.getChildType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.ResourceReference} returns this + */ +proto.google.api.ResourceReference.prototype.setChildType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `resourceReference`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.resourceReference = new jspb.ExtensionFieldInfo( + 1055, + {resourceReference: 0}, + proto.google.api.ResourceReference, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.ResourceReference.toObject), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1055] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.resourceReference, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.ResourceReference.serializeBinaryToWriter, + proto.google.api.ResourceReference.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[1055] = proto.google.api.resourceReference; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `resourceDefinitionList`. + * @type {!jspb.ExtensionFieldInfo>} + */ +proto.google.api.resourceDefinitionList = new jspb.ExtensionFieldInfo( + 1053, + {resourceDefinitionList: 0}, + proto.google.api.ResourceDescriptor, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.ResourceDescriptor.toObject), + 1); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[1053] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.resourceDefinitionList, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeRepeatedMessage, + proto.google.api.ResourceDescriptor.serializeBinaryToWriter, + proto.google.api.ResourceDescriptor.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[1053] = proto.google.api.resourceDefinitionList; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `resource`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.resource = new jspb.ExtensionFieldInfo( + 1053, + {resource: 0}, + proto.google.api.ResourceDescriptor, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.ResourceDescriptor.toObject), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1053] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.resource, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.ResourceDescriptor.serializeBinaryToWriter, + proto.google.api.ResourceDescriptor.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[1053] = proto.google.api.resource; + +goog.object.extend(exports, proto.google.api); diff --git a/gen/js/google/api/resource_pb_service.d.ts b/gen/js/google/api/resource_pb_service.d.ts new file mode 100644 index 000000000..3785b6804 --- /dev/null +++ b/gen/js/google/api/resource_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/resource.proto + diff --git a/gen/js/google/api/resource_pb_service.js b/gen/js/google/api/resource_pb_service.js new file mode 100644 index 000000000..3785b6804 --- /dev/null +++ b/gen/js/google/api/resource_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/resource.proto + diff --git a/gen/js/google/api/visibility_pb.d.ts b/gen/js/google/api/visibility_pb.d.ts new file mode 100644 index 000000000..1de6b27f0 --- /dev/null +++ b/gen/js/google/api/visibility_pb.d.ts @@ -0,0 +1,64 @@ +// package: google.api +// file: google/api/visibility.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + +export class Visibility extends jspb.Message { + clearRulesList(): void; + getRulesList(): Array; + setRulesList(value: Array): void; + addRules(value?: VisibilityRule, index?: number): VisibilityRule; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Visibility.AsObject; + static toObject(includeInstance: boolean, msg: Visibility): Visibility.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Visibility, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Visibility; + static deserializeBinaryFromReader(message: Visibility, reader: jspb.BinaryReader): Visibility; +} + +export namespace Visibility { + export type AsObject = { + rulesList: Array, + } +} + +export class VisibilityRule extends jspb.Message { + getSelector(): string; + setSelector(value: string): void; + + getRestriction(): string; + setRestriction(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VisibilityRule.AsObject; + static toObject(includeInstance: boolean, msg: VisibilityRule): VisibilityRule.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VisibilityRule, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VisibilityRule; + static deserializeBinaryFromReader(message: VisibilityRule, reader: jspb.BinaryReader): VisibilityRule; +} + +export namespace VisibilityRule { + export type AsObject = { + selector: string, + restriction: string, + } +} + + export const enumVisibility: jspb.ExtensionFieldInfo; + + export const valueVisibility: jspb.ExtensionFieldInfo; + + export const fieldVisibility: jspb.ExtensionFieldInfo; + + export const messageVisibility: jspb.ExtensionFieldInfo; + + export const methodVisibility: jspb.ExtensionFieldInfo; + + export const apiVisibility: jspb.ExtensionFieldInfo; + diff --git a/gen/js/google/api/visibility_pb.js b/gen/js/google/api/visibility_pb.js new file mode 100644 index 000000000..84597f74f --- /dev/null +++ b/gen/js/google/api/visibility_pb.js @@ -0,0 +1,540 @@ +// source: google/api/visibility.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.Visibility', null, global); +goog.exportSymbol('proto.google.api.VisibilityRule', null, global); +goog.exportSymbol('proto.google.api.apiVisibility', null, global); +goog.exportSymbol('proto.google.api.enumVisibility', null, global); +goog.exportSymbol('proto.google.api.fieldVisibility', null, global); +goog.exportSymbol('proto.google.api.messageVisibility', null, global); +goog.exportSymbol('proto.google.api.methodVisibility', null, global); +goog.exportSymbol('proto.google.api.valueVisibility', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.Visibility = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Visibility.repeatedFields_, null); +}; +goog.inherits(proto.google.api.Visibility, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.Visibility.displayName = 'proto.google.api.Visibility'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.VisibilityRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.VisibilityRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.VisibilityRule.displayName = 'proto.google.api.VisibilityRule'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.Visibility.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.Visibility.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.Visibility.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.Visibility} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Visibility.toObject = function(includeInstance, msg) { + var f, obj = { + rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.google.api.VisibilityRule.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.Visibility} + */ +proto.google.api.Visibility.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.Visibility; + return proto.google.api.Visibility.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.Visibility} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.Visibility} + */ +proto.google.api.Visibility.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.VisibilityRule; + reader.readMessage(value,proto.google.api.VisibilityRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.Visibility.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.Visibility.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.Visibility} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Visibility.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.VisibilityRule.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated VisibilityRule rules = 1; + * @return {!Array} + */ +proto.google.api.Visibility.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.VisibilityRule, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.Visibility} returns this +*/ +proto.google.api.Visibility.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.VisibilityRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.VisibilityRule} + */ +proto.google.api.Visibility.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.VisibilityRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.Visibility} returns this + */ +proto.google.api.Visibility.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.VisibilityRule.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.VisibilityRule.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.VisibilityRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.VisibilityRule.toObject = function(includeInstance, msg) { + var f, obj = { + selector: jspb.Message.getFieldWithDefault(msg, 1, ""), + restriction: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.VisibilityRule} + */ +proto.google.api.VisibilityRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.VisibilityRule; + return proto.google.api.VisibilityRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.VisibilityRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.VisibilityRule} + */ +proto.google.api.VisibilityRule.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSelector(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRestriction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.VisibilityRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.VisibilityRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.VisibilityRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.VisibilityRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSelector(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRestriction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string selector = 1; + * @return {string} + */ +proto.google.api.VisibilityRule.prototype.getSelector = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.VisibilityRule} returns this + */ +proto.google.api.VisibilityRule.prototype.setSelector = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string restriction = 2; + * @return {string} + */ +proto.google.api.VisibilityRule.prototype.getRestriction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.VisibilityRule} returns this + */ +proto.google.api.VisibilityRule.prototype.setRestriction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.enumVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {enumVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.enumVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[72295727] = proto.google.api.enumVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `valueVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.valueVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {valueVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.valueVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumValueOptions.extensions[72295727] = proto.google.api.valueVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `fieldVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.fieldVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {fieldVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.fieldVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[72295727] = proto.google.api.fieldVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `messageVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.messageVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {messageVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.messageVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[72295727] = proto.google.api.messageVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `methodVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.methodVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {methodVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.methodVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[72295727] = proto.google.api.methodVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `apiVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.apiVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {apiVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.apiVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.ServiceOptions.extensions[72295727] = proto.google.api.apiVisibility; + +goog.object.extend(exports, proto.google.api); diff --git a/gen/js/google/api/visibility_pb_service.d.ts b/gen/js/google/api/visibility_pb_service.d.ts new file mode 100644 index 000000000..9b5398dac --- /dev/null +++ b/gen/js/google/api/visibility_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/visibility.proto + diff --git a/gen/js/google/api/visibility_pb_service.js b/gen/js/google/api/visibility_pb_service.js new file mode 100644 index 000000000..9b5398dac --- /dev/null +++ b/gen/js/google/api/visibility_pb_service.js @@ -0,0 +1,3 @@ +// package: google.api +// file: google/api/visibility.proto + diff --git a/gen/js/google/longrunning/operations_grpc_web_pb.js b/gen/js/google/longrunning/operations_grpc_web_pb.js new file mode 100644 index 000000000..5830bd28e --- /dev/null +++ b/gen/js/google/longrunning/operations_grpc_web_pb.js @@ -0,0 +1,394 @@ +/** + * @fileoverview gRPC-Web generated client stub for google.longrunning + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var google_api_client_pb = require('../../google/api/client_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js') + +var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js') + +var google_rpc_status_pb = require('../../google/rpc/status_pb.js') + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js') +const proto = {}; +proto.google = {}; +proto.google.longrunning = require('./operations_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.google.longrunning.OperationsClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.google.longrunning.OperationsPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.google.longrunning.ListOperationsRequest, + * !proto.google.longrunning.ListOperationsResponse>} + */ +const methodDescriptor_Operations_ListOperations = new grpc.web.MethodDescriptor( + '/google.longrunning.Operations/ListOperations', + grpc.web.MethodType.UNARY, + proto.google.longrunning.ListOperationsRequest, + proto.google.longrunning.ListOperationsResponse, + /** + * @param {!proto.google.longrunning.ListOperationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.google.longrunning.ListOperationsResponse.deserializeBinary +); + + +/** + * @param {!proto.google.longrunning.ListOperationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.google.longrunning.ListOperationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.google.longrunning.OperationsClient.prototype.listOperations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/google.longrunning.Operations/ListOperations', + request, + metadata || {}, + methodDescriptor_Operations_ListOperations, + callback); +}; + + +/** + * @param {!proto.google.longrunning.ListOperationsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.google.longrunning.OperationsPromiseClient.prototype.listOperations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/google.longrunning.Operations/ListOperations', + request, + metadata || {}, + methodDescriptor_Operations_ListOperations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.google.longrunning.GetOperationRequest, + * !proto.google.longrunning.Operation>} + */ +const methodDescriptor_Operations_GetOperation = new grpc.web.MethodDescriptor( + '/google.longrunning.Operations/GetOperation', + grpc.web.MethodType.UNARY, + proto.google.longrunning.GetOperationRequest, + proto.google.longrunning.Operation, + /** + * @param {!proto.google.longrunning.GetOperationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.google.longrunning.Operation.deserializeBinary +); + + +/** + * @param {!proto.google.longrunning.GetOperationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.google.longrunning.Operation)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.google.longrunning.OperationsClient.prototype.getOperation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/google.longrunning.Operations/GetOperation', + request, + metadata || {}, + methodDescriptor_Operations_GetOperation, + callback); +}; + + +/** + * @param {!proto.google.longrunning.GetOperationRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.google.longrunning.OperationsPromiseClient.prototype.getOperation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/google.longrunning.Operations/GetOperation', + request, + metadata || {}, + methodDescriptor_Operations_GetOperation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.google.longrunning.DeleteOperationRequest, + * !proto.google.protobuf.Empty>} + */ +const methodDescriptor_Operations_DeleteOperation = new grpc.web.MethodDescriptor( + '/google.longrunning.Operations/DeleteOperation', + grpc.web.MethodType.UNARY, + proto.google.longrunning.DeleteOperationRequest, + google_protobuf_empty_pb.Empty, + /** + * @param {!proto.google.longrunning.DeleteOperationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + google_protobuf_empty_pb.Empty.deserializeBinary +); + + +/** + * @param {!proto.google.longrunning.DeleteOperationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.google.protobuf.Empty)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.google.longrunning.OperationsClient.prototype.deleteOperation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/google.longrunning.Operations/DeleteOperation', + request, + metadata || {}, + methodDescriptor_Operations_DeleteOperation, + callback); +}; + + +/** + * @param {!proto.google.longrunning.DeleteOperationRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.google.longrunning.OperationsPromiseClient.prototype.deleteOperation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/google.longrunning.Operations/DeleteOperation', + request, + metadata || {}, + methodDescriptor_Operations_DeleteOperation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.google.longrunning.CancelOperationRequest, + * !proto.google.protobuf.Empty>} + */ +const methodDescriptor_Operations_CancelOperation = new grpc.web.MethodDescriptor( + '/google.longrunning.Operations/CancelOperation', + grpc.web.MethodType.UNARY, + proto.google.longrunning.CancelOperationRequest, + google_protobuf_empty_pb.Empty, + /** + * @param {!proto.google.longrunning.CancelOperationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + google_protobuf_empty_pb.Empty.deserializeBinary +); + + +/** + * @param {!proto.google.longrunning.CancelOperationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.google.protobuf.Empty)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.google.longrunning.OperationsClient.prototype.cancelOperation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/google.longrunning.Operations/CancelOperation', + request, + metadata || {}, + methodDescriptor_Operations_CancelOperation, + callback); +}; + + +/** + * @param {!proto.google.longrunning.CancelOperationRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.google.longrunning.OperationsPromiseClient.prototype.cancelOperation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/google.longrunning.Operations/CancelOperation', + request, + metadata || {}, + methodDescriptor_Operations_CancelOperation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.google.longrunning.WaitOperationRequest, + * !proto.google.longrunning.Operation>} + */ +const methodDescriptor_Operations_WaitOperation = new grpc.web.MethodDescriptor( + '/google.longrunning.Operations/WaitOperation', + grpc.web.MethodType.UNARY, + proto.google.longrunning.WaitOperationRequest, + proto.google.longrunning.Operation, + /** + * @param {!proto.google.longrunning.WaitOperationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.google.longrunning.Operation.deserializeBinary +); + + +/** + * @param {!proto.google.longrunning.WaitOperationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.google.longrunning.Operation)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.google.longrunning.OperationsClient.prototype.waitOperation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/google.longrunning.Operations/WaitOperation', + request, + metadata || {}, + methodDescriptor_Operations_WaitOperation, + callback); +}; + + +/** + * @param {!proto.google.longrunning.WaitOperationRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.google.longrunning.OperationsPromiseClient.prototype.waitOperation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/google.longrunning.Operations/WaitOperation', + request, + metadata || {}, + methodDescriptor_Operations_WaitOperation); +}; + + +module.exports = proto.google.longrunning; + diff --git a/gen/js/google/longrunning/operations_pb.d.ts b/gen/js/google/longrunning/operations_pb.d.ts new file mode 100644 index 000000000..cc78e3cb4 --- /dev/null +++ b/gen/js/google/longrunning/operations_pb.d.ts @@ -0,0 +1,231 @@ +// package: google.longrunning +// file: google/longrunning/operations.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../google/api/annotations_pb"; +import * as google_api_client_pb from "../../google/api/client_pb"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; +import * as google_rpc_status_pb from "../../google/rpc/status_pb"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + +export class Operation extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): google_protobuf_any_pb.Any | undefined; + setMetadata(value?: google_protobuf_any_pb.Any): void; + + getDone(): boolean; + setDone(value: boolean): void; + + hasError(): boolean; + clearError(): void; + getError(): google_rpc_status_pb.Status | undefined; + setError(value?: google_rpc_status_pb.Status): void; + + hasResponse(): boolean; + clearResponse(): void; + getResponse(): google_protobuf_any_pb.Any | undefined; + setResponse(value?: google_protobuf_any_pb.Any): void; + + getResultCase(): Operation.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Operation.AsObject; + static toObject(includeInstance: boolean, msg: Operation): Operation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Operation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Operation; + static deserializeBinaryFromReader(message: Operation, reader: jspb.BinaryReader): Operation; +} + +export namespace Operation { + export type AsObject = { + name: string, + metadata?: google_protobuf_any_pb.Any.AsObject, + done: boolean, + error?: google_rpc_status_pb.Status.AsObject, + response?: google_protobuf_any_pb.Any.AsObject, + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + ERROR = 4, + RESPONSE = 5, + } +} + +export class GetOperationRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetOperationRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetOperationRequest): GetOperationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetOperationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetOperationRequest; + static deserializeBinaryFromReader(message: GetOperationRequest, reader: jspb.BinaryReader): GetOperationRequest; +} + +export namespace GetOperationRequest { + export type AsObject = { + name: string, + } +} + +export class ListOperationsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getFilter(): string; + setFilter(value: string): void; + + getPageSize(): number; + setPageSize(value: number): void; + + getPageToken(): string; + setPageToken(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListOperationsRequest.AsObject; + static toObject(includeInstance: boolean, msg: ListOperationsRequest): ListOperationsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListOperationsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListOperationsRequest; + static deserializeBinaryFromReader(message: ListOperationsRequest, reader: jspb.BinaryReader): ListOperationsRequest; +} + +export namespace ListOperationsRequest { + export type AsObject = { + name: string, + filter: string, + pageSize: number, + pageToken: string, + } +} + +export class ListOperationsResponse extends jspb.Message { + clearOperationsList(): void; + getOperationsList(): Array; + setOperationsList(value: Array): void; + addOperations(value?: Operation, index?: number): Operation; + + getNextPageToken(): string; + setNextPageToken(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListOperationsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListOperationsResponse): ListOperationsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListOperationsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListOperationsResponse; + static deserializeBinaryFromReader(message: ListOperationsResponse, reader: jspb.BinaryReader): ListOperationsResponse; +} + +export namespace ListOperationsResponse { + export type AsObject = { + operationsList: Array, + nextPageToken: string, + } +} + +export class CancelOperationRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelOperationRequest.AsObject; + static toObject(includeInstance: boolean, msg: CancelOperationRequest): CancelOperationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CancelOperationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CancelOperationRequest; + static deserializeBinaryFromReader(message: CancelOperationRequest, reader: jspb.BinaryReader): CancelOperationRequest; +} + +export namespace CancelOperationRequest { + export type AsObject = { + name: string, + } +} + +export class DeleteOperationRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteOperationRequest.AsObject; + static toObject(includeInstance: boolean, msg: DeleteOperationRequest): DeleteOperationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DeleteOperationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteOperationRequest; + static deserializeBinaryFromReader(message: DeleteOperationRequest, reader: jspb.BinaryReader): DeleteOperationRequest; +} + +export namespace DeleteOperationRequest { + export type AsObject = { + name: string, + } +} + +export class WaitOperationRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasTimeout(): boolean; + clearTimeout(): void; + getTimeout(): google_protobuf_duration_pb.Duration | undefined; + setTimeout(value?: google_protobuf_duration_pb.Duration): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WaitOperationRequest.AsObject; + static toObject(includeInstance: boolean, msg: WaitOperationRequest): WaitOperationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WaitOperationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WaitOperationRequest; + static deserializeBinaryFromReader(message: WaitOperationRequest, reader: jspb.BinaryReader): WaitOperationRequest; +} + +export namespace WaitOperationRequest { + export type AsObject = { + name: string, + timeout?: google_protobuf_duration_pb.Duration.AsObject, + } +} + +export class OperationInfo extends jspb.Message { + getResponseType(): string; + setResponseType(value: string): void; + + getMetadataType(): string; + setMetadataType(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OperationInfo.AsObject; + static toObject(includeInstance: boolean, msg: OperationInfo): OperationInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OperationInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OperationInfo; + static deserializeBinaryFromReader(message: OperationInfo, reader: jspb.BinaryReader): OperationInfo; +} + +export namespace OperationInfo { + export type AsObject = { + responseType: string, + metadataType: string, + } +} + + export const operationInfo: jspb.ExtensionFieldInfo; + diff --git a/gen/js/google/longrunning/operations_pb.js b/gen/js/google/longrunning/operations_pb.js new file mode 100644 index 000000000..e59c3ff3e --- /dev/null +++ b/gen/js/google/longrunning/operations_pb.js @@ -0,0 +1,1715 @@ +// source: google/longrunning/operations.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_api_client_pb = require('../../google/api/client_pb.js'); +goog.object.extend(proto, google_api_client_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); +goog.object.extend(proto, google_protobuf_empty_pb); +var google_rpc_status_pb = require('../../google/rpc/status_pb.js'); +goog.object.extend(proto, google_rpc_status_pb); +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.longrunning.CancelOperationRequest', null, global); +goog.exportSymbol('proto.google.longrunning.DeleteOperationRequest', null, global); +goog.exportSymbol('proto.google.longrunning.GetOperationRequest', null, global); +goog.exportSymbol('proto.google.longrunning.ListOperationsRequest', null, global); +goog.exportSymbol('proto.google.longrunning.ListOperationsResponse', null, global); +goog.exportSymbol('proto.google.longrunning.Operation', null, global); +goog.exportSymbol('proto.google.longrunning.Operation.ResultCase', null, global); +goog.exportSymbol('proto.google.longrunning.OperationInfo', null, global); +goog.exportSymbol('proto.google.longrunning.WaitOperationRequest', null, global); +goog.exportSymbol('proto.google.longrunning.operationInfo', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.longrunning.Operation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.longrunning.Operation.oneofGroups_); +}; +goog.inherits(proto.google.longrunning.Operation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.longrunning.Operation.displayName = 'proto.google.longrunning.Operation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.longrunning.GetOperationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.longrunning.GetOperationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.longrunning.GetOperationRequest.displayName = 'proto.google.longrunning.GetOperationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.longrunning.ListOperationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.longrunning.ListOperationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.longrunning.ListOperationsRequest.displayName = 'proto.google.longrunning.ListOperationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.longrunning.ListOperationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.longrunning.ListOperationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.google.longrunning.ListOperationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.longrunning.ListOperationsResponse.displayName = 'proto.google.longrunning.ListOperationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.longrunning.CancelOperationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.longrunning.CancelOperationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.longrunning.CancelOperationRequest.displayName = 'proto.google.longrunning.CancelOperationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.longrunning.DeleteOperationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.longrunning.DeleteOperationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.longrunning.DeleteOperationRequest.displayName = 'proto.google.longrunning.DeleteOperationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.longrunning.WaitOperationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.longrunning.WaitOperationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.longrunning.WaitOperationRequest.displayName = 'proto.google.longrunning.WaitOperationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.longrunning.OperationInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.longrunning.OperationInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.longrunning.OperationInfo.displayName = 'proto.google.longrunning.OperationInfo'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.longrunning.Operation.oneofGroups_ = [[4,5]]; + +/** + * @enum {number} + */ +proto.google.longrunning.Operation.ResultCase = { + RESULT_NOT_SET: 0, + ERROR: 4, + RESPONSE: 5 +}; + +/** + * @return {proto.google.longrunning.Operation.ResultCase} + */ +proto.google.longrunning.Operation.prototype.getResultCase = function() { + return /** @type {proto.google.longrunning.Operation.ResultCase} */(jspb.Message.computeOneofCase(this, proto.google.longrunning.Operation.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.longrunning.Operation.prototype.toObject = function(opt_includeInstance) { + return proto.google.longrunning.Operation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.longrunning.Operation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.Operation.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + metadata: (f = msg.getMetadata()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + done: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + error: (f = msg.getError()) && google_rpc_status_pb.Status.toObject(includeInstance, f), + response: (f = msg.getResponse()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.longrunning.Operation} + */ +proto.google.longrunning.Operation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.longrunning.Operation; + return proto.google.longrunning.Operation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.longrunning.Operation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.longrunning.Operation} + */ +proto.google.longrunning.Operation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDone(value); + break; + case 4: + var value = new google_rpc_status_pb.Status; + reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); + msg.setError(value); + break; + case 5: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.longrunning.Operation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.longrunning.Operation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.longrunning.Operation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.Operation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getDone(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_rpc_status_pb.Status.serializeBinaryToWriter + ); + } + f = message.getResponse(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.longrunning.Operation.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.Operation} returns this + */ +proto.google.longrunning.Operation.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any metadata = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.google.longrunning.Operation.prototype.getMetadata = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.google.longrunning.Operation} returns this +*/ +proto.google.longrunning.Operation.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.longrunning.Operation} returns this + */ +proto.google.longrunning.Operation.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.longrunning.Operation.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool done = 3; + * @return {boolean} + */ +proto.google.longrunning.Operation.prototype.getDone = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.longrunning.Operation} returns this + */ +proto.google.longrunning.Operation.prototype.setDone = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional google.rpc.Status error = 4; + * @return {?proto.google.rpc.Status} + */ +proto.google.longrunning.Operation.prototype.getError = function() { + return /** @type{?proto.google.rpc.Status} */ ( + jspb.Message.getWrapperField(this, google_rpc_status_pb.Status, 4)); +}; + + +/** + * @param {?proto.google.rpc.Status|undefined} value + * @return {!proto.google.longrunning.Operation} returns this +*/ +proto.google.longrunning.Operation.prototype.setError = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.google.longrunning.Operation.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.longrunning.Operation} returns this + */ +proto.google.longrunning.Operation.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.longrunning.Operation.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Any response = 5; + * @return {?proto.google.protobuf.Any} + */ +proto.google.longrunning.Operation.prototype.getResponse = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.google.longrunning.Operation} returns this +*/ +proto.google.longrunning.Operation.prototype.setResponse = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.google.longrunning.Operation.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.longrunning.Operation} returns this + */ +proto.google.longrunning.Operation.prototype.clearResponse = function() { + return this.setResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.longrunning.Operation.prototype.hasResponse = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.longrunning.GetOperationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.google.longrunning.GetOperationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.longrunning.GetOperationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.GetOperationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.longrunning.GetOperationRequest} + */ +proto.google.longrunning.GetOperationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.longrunning.GetOperationRequest; + return proto.google.longrunning.GetOperationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.longrunning.GetOperationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.longrunning.GetOperationRequest} + */ +proto.google.longrunning.GetOperationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.longrunning.GetOperationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.longrunning.GetOperationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.longrunning.GetOperationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.GetOperationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.longrunning.GetOperationRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.GetOperationRequest} returns this + */ +proto.google.longrunning.GetOperationRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.longrunning.ListOperationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.google.longrunning.ListOperationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.longrunning.ListOperationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.ListOperationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 4, ""), + filter: jspb.Message.getFieldWithDefault(msg, 1, ""), + pageSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + pageToken: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.longrunning.ListOperationsRequest} + */ +proto.google.longrunning.ListOperationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.longrunning.ListOperationsRequest; + return proto.google.longrunning.ListOperationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.longrunning.ListOperationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.longrunning.ListOperationsRequest} + */ +proto.google.longrunning.ListOperationsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFilter(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPageSize(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPageToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.longrunning.ListOperationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.longrunning.ListOperationsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.longrunning.ListOperationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.ListOperationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getFilter(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPageSize(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getPageToken(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 4; + * @return {string} + */ +proto.google.longrunning.ListOperationsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.ListOperationsRequest} returns this + */ +proto.google.longrunning.ListOperationsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string filter = 1; + * @return {string} + */ +proto.google.longrunning.ListOperationsRequest.prototype.getFilter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.ListOperationsRequest} returns this + */ +proto.google.longrunning.ListOperationsRequest.prototype.setFilter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 page_size = 2; + * @return {number} + */ +proto.google.longrunning.ListOperationsRequest.prototype.getPageSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.longrunning.ListOperationsRequest} returns this + */ +proto.google.longrunning.ListOperationsRequest.prototype.setPageSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string page_token = 3; + * @return {string} + */ +proto.google.longrunning.ListOperationsRequest.prototype.getPageToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.ListOperationsRequest} returns this + */ +proto.google.longrunning.ListOperationsRequest.prototype.setPageToken = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.longrunning.ListOperationsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.longrunning.ListOperationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.google.longrunning.ListOperationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.longrunning.ListOperationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.ListOperationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + operationsList: jspb.Message.toObjectList(msg.getOperationsList(), + proto.google.longrunning.Operation.toObject, includeInstance), + nextPageToken: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.longrunning.ListOperationsResponse} + */ +proto.google.longrunning.ListOperationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.longrunning.ListOperationsResponse; + return proto.google.longrunning.ListOperationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.longrunning.ListOperationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.longrunning.ListOperationsResponse} + */ +proto.google.longrunning.ListOperationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.longrunning.Operation; + reader.readMessage(value,proto.google.longrunning.Operation.deserializeBinaryFromReader); + msg.addOperations(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNextPageToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.longrunning.ListOperationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.longrunning.ListOperationsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.longrunning.ListOperationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.ListOperationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOperationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.longrunning.Operation.serializeBinaryToWriter + ); + } + f = message.getNextPageToken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * repeated Operation operations = 1; + * @return {!Array} + */ +proto.google.longrunning.ListOperationsResponse.prototype.getOperationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.longrunning.Operation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.longrunning.ListOperationsResponse} returns this +*/ +proto.google.longrunning.ListOperationsResponse.prototype.setOperationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.longrunning.Operation=} opt_value + * @param {number=} opt_index + * @return {!proto.google.longrunning.Operation} + */ +proto.google.longrunning.ListOperationsResponse.prototype.addOperations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.longrunning.Operation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.longrunning.ListOperationsResponse} returns this + */ +proto.google.longrunning.ListOperationsResponse.prototype.clearOperationsList = function() { + return this.setOperationsList([]); +}; + + +/** + * optional string next_page_token = 2; + * @return {string} + */ +proto.google.longrunning.ListOperationsResponse.prototype.getNextPageToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.ListOperationsResponse} returns this + */ +proto.google.longrunning.ListOperationsResponse.prototype.setNextPageToken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.longrunning.CancelOperationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.google.longrunning.CancelOperationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.longrunning.CancelOperationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.CancelOperationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.longrunning.CancelOperationRequest} + */ +proto.google.longrunning.CancelOperationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.longrunning.CancelOperationRequest; + return proto.google.longrunning.CancelOperationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.longrunning.CancelOperationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.longrunning.CancelOperationRequest} + */ +proto.google.longrunning.CancelOperationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.longrunning.CancelOperationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.longrunning.CancelOperationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.longrunning.CancelOperationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.CancelOperationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.longrunning.CancelOperationRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.CancelOperationRequest} returns this + */ +proto.google.longrunning.CancelOperationRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.longrunning.DeleteOperationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.google.longrunning.DeleteOperationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.longrunning.DeleteOperationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.DeleteOperationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.longrunning.DeleteOperationRequest} + */ +proto.google.longrunning.DeleteOperationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.longrunning.DeleteOperationRequest; + return proto.google.longrunning.DeleteOperationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.longrunning.DeleteOperationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.longrunning.DeleteOperationRequest} + */ +proto.google.longrunning.DeleteOperationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.longrunning.DeleteOperationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.longrunning.DeleteOperationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.longrunning.DeleteOperationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.DeleteOperationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.longrunning.DeleteOperationRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.DeleteOperationRequest} returns this + */ +proto.google.longrunning.DeleteOperationRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.longrunning.WaitOperationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.google.longrunning.WaitOperationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.longrunning.WaitOperationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.WaitOperationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + timeout: (f = msg.getTimeout()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.longrunning.WaitOperationRequest} + */ +proto.google.longrunning.WaitOperationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.longrunning.WaitOperationRequest; + return proto.google.longrunning.WaitOperationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.longrunning.WaitOperationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.longrunning.WaitOperationRequest} + */ +proto.google.longrunning.WaitOperationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setTimeout(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.longrunning.WaitOperationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.longrunning.WaitOperationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.longrunning.WaitOperationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.WaitOperationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTimeout(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.longrunning.WaitOperationRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.WaitOperationRequest} returns this + */ +proto.google.longrunning.WaitOperationRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Duration timeout = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.google.longrunning.WaitOperationRequest.prototype.getTimeout = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.google.longrunning.WaitOperationRequest} returns this +*/ +proto.google.longrunning.WaitOperationRequest.prototype.setTimeout = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.longrunning.WaitOperationRequest} returns this + */ +proto.google.longrunning.WaitOperationRequest.prototype.clearTimeout = function() { + return this.setTimeout(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.longrunning.WaitOperationRequest.prototype.hasTimeout = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.longrunning.OperationInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.longrunning.OperationInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.longrunning.OperationInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.OperationInfo.toObject = function(includeInstance, msg) { + var f, obj = { + responseType: jspb.Message.getFieldWithDefault(msg, 1, ""), + metadataType: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.longrunning.OperationInfo} + */ +proto.google.longrunning.OperationInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.longrunning.OperationInfo; + return proto.google.longrunning.OperationInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.longrunning.OperationInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.longrunning.OperationInfo} + */ +proto.google.longrunning.OperationInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setResponseType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMetadataType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.longrunning.OperationInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.longrunning.OperationInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.longrunning.OperationInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.longrunning.OperationInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResponseType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMetadataType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string response_type = 1; + * @return {string} + */ +proto.google.longrunning.OperationInfo.prototype.getResponseType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.OperationInfo} returns this + */ +proto.google.longrunning.OperationInfo.prototype.setResponseType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string metadata_type = 2; + * @return {string} + */ +proto.google.longrunning.OperationInfo.prototype.getMetadataType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.longrunning.OperationInfo} returns this + */ +proto.google.longrunning.OperationInfo.prototype.setMetadataType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `operationInfo`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.longrunning.operationInfo = new jspb.ExtensionFieldInfo( + 1049, + {operationInfo: 0}, + proto.google.longrunning.OperationInfo, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.longrunning.OperationInfo.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[1049] = new jspb.ExtensionFieldBinaryInfo( + proto.google.longrunning.operationInfo, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.longrunning.OperationInfo.serializeBinaryToWriter, + proto.google.longrunning.OperationInfo.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[1049] = proto.google.longrunning.operationInfo; + +goog.object.extend(exports, proto.google.longrunning); diff --git a/gen/js/google/longrunning/operations_pb_service.d.ts b/gen/js/google/longrunning/operations_pb_service.d.ts new file mode 100644 index 000000000..3edfc282e --- /dev/null +++ b/gen/js/google/longrunning/operations_pb_service.d.ts @@ -0,0 +1,140 @@ +// package: google.longrunning +// file: google/longrunning/operations.proto + +import * as google_longrunning_operations_pb from "../../google/longrunning/operations_pb"; +import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type OperationsListOperations = { + readonly methodName: string; + readonly service: typeof Operations; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof google_longrunning_operations_pb.ListOperationsRequest; + readonly responseType: typeof google_longrunning_operations_pb.ListOperationsResponse; +}; + +type OperationsGetOperation = { + readonly methodName: string; + readonly service: typeof Operations; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof google_longrunning_operations_pb.GetOperationRequest; + readonly responseType: typeof google_longrunning_operations_pb.Operation; +}; + +type OperationsDeleteOperation = { + readonly methodName: string; + readonly service: typeof Operations; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof google_longrunning_operations_pb.DeleteOperationRequest; + readonly responseType: typeof google_protobuf_empty_pb.Empty; +}; + +type OperationsCancelOperation = { + readonly methodName: string; + readonly service: typeof Operations; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof google_longrunning_operations_pb.CancelOperationRequest; + readonly responseType: typeof google_protobuf_empty_pb.Empty; +}; + +type OperationsWaitOperation = { + readonly methodName: string; + readonly service: typeof Operations; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof google_longrunning_operations_pb.WaitOperationRequest; + readonly responseType: typeof google_longrunning_operations_pb.Operation; +}; + +export class Operations { + static readonly serviceName: string; + static readonly ListOperations: OperationsListOperations; + static readonly GetOperation: OperationsGetOperation; + static readonly DeleteOperation: OperationsDeleteOperation; + static readonly CancelOperation: OperationsCancelOperation; + static readonly WaitOperation: OperationsWaitOperation; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class OperationsClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + listOperations( + requestMessage: google_longrunning_operations_pb.ListOperationsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: google_longrunning_operations_pb.ListOperationsResponse|null) => void + ): UnaryResponse; + listOperations( + requestMessage: google_longrunning_operations_pb.ListOperationsRequest, + callback: (error: ServiceError|null, responseMessage: google_longrunning_operations_pb.ListOperationsResponse|null) => void + ): UnaryResponse; + getOperation( + requestMessage: google_longrunning_operations_pb.GetOperationRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: google_longrunning_operations_pb.Operation|null) => void + ): UnaryResponse; + getOperation( + requestMessage: google_longrunning_operations_pb.GetOperationRequest, + callback: (error: ServiceError|null, responseMessage: google_longrunning_operations_pb.Operation|null) => void + ): UnaryResponse; + deleteOperation( + requestMessage: google_longrunning_operations_pb.DeleteOperationRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void + ): UnaryResponse; + deleteOperation( + requestMessage: google_longrunning_operations_pb.DeleteOperationRequest, + callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void + ): UnaryResponse; + cancelOperation( + requestMessage: google_longrunning_operations_pb.CancelOperationRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void + ): UnaryResponse; + cancelOperation( + requestMessage: google_longrunning_operations_pb.CancelOperationRequest, + callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void + ): UnaryResponse; + waitOperation( + requestMessage: google_longrunning_operations_pb.WaitOperationRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: google_longrunning_operations_pb.Operation|null) => void + ): UnaryResponse; + waitOperation( + requestMessage: google_longrunning_operations_pb.WaitOperationRequest, + callback: (error: ServiceError|null, responseMessage: google_longrunning_operations_pb.Operation|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/google/longrunning/operations_pb_service.js b/gen/js/google/longrunning/operations_pb_service.js new file mode 100644 index 000000000..054fe8e43 --- /dev/null +++ b/gen/js/google/longrunning/operations_pb_service.js @@ -0,0 +1,222 @@ +// package: google.longrunning +// file: google/longrunning/operations.proto + +var google_longrunning_operations_pb = require("../../google/longrunning/operations_pb"); +var google_protobuf_empty_pb = require("google-protobuf/google/protobuf/empty_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var Operations = (function () { + function Operations() {} + Operations.serviceName = "google.longrunning.Operations"; + return Operations; +}()); + +Operations.ListOperations = { + methodName: "ListOperations", + service: Operations, + requestStream: false, + responseStream: false, + requestType: google_longrunning_operations_pb.ListOperationsRequest, + responseType: google_longrunning_operations_pb.ListOperationsResponse +}; + +Operations.GetOperation = { + methodName: "GetOperation", + service: Operations, + requestStream: false, + responseStream: false, + requestType: google_longrunning_operations_pb.GetOperationRequest, + responseType: google_longrunning_operations_pb.Operation +}; + +Operations.DeleteOperation = { + methodName: "DeleteOperation", + service: Operations, + requestStream: false, + responseStream: false, + requestType: google_longrunning_operations_pb.DeleteOperationRequest, + responseType: google_protobuf_empty_pb.Empty +}; + +Operations.CancelOperation = { + methodName: "CancelOperation", + service: Operations, + requestStream: false, + responseStream: false, + requestType: google_longrunning_operations_pb.CancelOperationRequest, + responseType: google_protobuf_empty_pb.Empty +}; + +Operations.WaitOperation = { + methodName: "WaitOperation", + service: Operations, + requestStream: false, + responseStream: false, + requestType: google_longrunning_operations_pb.WaitOperationRequest, + responseType: google_longrunning_operations_pb.Operation +}; + +exports.Operations = Operations; + +function OperationsClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +OperationsClient.prototype.listOperations = function listOperations(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Operations.ListOperations, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +OperationsClient.prototype.getOperation = function getOperation(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Operations.GetOperation, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +OperationsClient.prototype.deleteOperation = function deleteOperation(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Operations.DeleteOperation, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +OperationsClient.prototype.cancelOperation = function cancelOperation(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Operations.CancelOperation, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +OperationsClient.prototype.waitOperation = function waitOperation(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Operations.WaitOperation, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.OperationsClient = OperationsClient; + diff --git a/gen/js/google/rpc/code_pb.d.ts b/gen/js/google/rpc/code_pb.d.ts new file mode 100644 index 000000000..a871cf969 --- /dev/null +++ b/gen/js/google/rpc/code_pb.d.ts @@ -0,0 +1,27 @@ +// package: google.rpc +// file: google/rpc/code.proto + +import * as jspb from "google-protobuf"; + +export interface CodeMap { + OK: 0; + CANCELLED: 1; + UNKNOWN: 2; + INVALID_ARGUMENT: 3; + DEADLINE_EXCEEDED: 4; + NOT_FOUND: 5; + ALREADY_EXISTS: 6; + PERMISSION_DENIED: 7; + UNAUTHENTICATED: 16; + RESOURCE_EXHAUSTED: 8; + FAILED_PRECONDITION: 9; + ABORTED: 10; + OUT_OF_RANGE: 11; + UNIMPLEMENTED: 12; + INTERNAL: 13; + UNAVAILABLE: 14; + DATA_LOSS: 15; +} + +export const Code: CodeMap; + diff --git a/gen/js/google/rpc/code_pb.js b/gen/js/google/rpc/code_pb.js new file mode 100644 index 000000000..401325586 --- /dev/null +++ b/gen/js/google/rpc/code_pb.js @@ -0,0 +1,42 @@ +// source: google/rpc/code.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.rpc.Code', null, global); +/** + * @enum {number} + */ +proto.google.rpc.Code = { + OK: 0, + CANCELLED: 1, + UNKNOWN: 2, + INVALID_ARGUMENT: 3, + DEADLINE_EXCEEDED: 4, + NOT_FOUND: 5, + ALREADY_EXISTS: 6, + PERMISSION_DENIED: 7, + UNAUTHENTICATED: 16, + RESOURCE_EXHAUSTED: 8, + FAILED_PRECONDITION: 9, + ABORTED: 10, + OUT_OF_RANGE: 11, + UNIMPLEMENTED: 12, + INTERNAL: 13, + UNAVAILABLE: 14, + DATA_LOSS: 15 +}; + +goog.object.extend(exports, proto.google.rpc); diff --git a/gen/js/google/rpc/code_pb_service.d.ts b/gen/js/google/rpc/code_pb_service.d.ts new file mode 100644 index 000000000..a5a9e20bb --- /dev/null +++ b/gen/js/google/rpc/code_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.rpc +// file: google/rpc/code.proto + diff --git a/gen/js/google/rpc/code_pb_service.js b/gen/js/google/rpc/code_pb_service.js new file mode 100644 index 000000000..a5a9e20bb --- /dev/null +++ b/gen/js/google/rpc/code_pb_service.js @@ -0,0 +1,3 @@ +// package: google.rpc +// file: google/rpc/code.proto + diff --git a/gen/js/google/rpc/context/attribute_context_pb.d.ts b/gen/js/google/rpc/context/attribute_context_pb.d.ts new file mode 100644 index 000000000..0e8c025fa --- /dev/null +++ b/gen/js/google/rpc/context/attribute_context_pb.d.ts @@ -0,0 +1,356 @@ +// package: google.rpc.context +// file: google/rpc/context/attribute_context.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class AttributeContext extends jspb.Message { + hasOrigin(): boolean; + clearOrigin(): void; + getOrigin(): AttributeContext.Peer | undefined; + setOrigin(value?: AttributeContext.Peer): void; + + hasSource(): boolean; + clearSource(): void; + getSource(): AttributeContext.Peer | undefined; + setSource(value?: AttributeContext.Peer): void; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): AttributeContext.Peer | undefined; + setDestination(value?: AttributeContext.Peer): void; + + hasRequest(): boolean; + clearRequest(): void; + getRequest(): AttributeContext.Request | undefined; + setRequest(value?: AttributeContext.Request): void; + + hasResponse(): boolean; + clearResponse(): void; + getResponse(): AttributeContext.Response | undefined; + setResponse(value?: AttributeContext.Response): void; + + hasResource(): boolean; + clearResource(): void; + getResource(): AttributeContext.Resource | undefined; + setResource(value?: AttributeContext.Resource): void; + + hasApi(): boolean; + clearApi(): void; + getApi(): AttributeContext.Api | undefined; + setApi(value?: AttributeContext.Api): void; + + clearExtensionsList(): void; + getExtensionsList(): Array; + setExtensionsList(value: Array): void; + addExtensions(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AttributeContext.AsObject; + static toObject(includeInstance: boolean, msg: AttributeContext): AttributeContext.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AttributeContext, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AttributeContext; + static deserializeBinaryFromReader(message: AttributeContext, reader: jspb.BinaryReader): AttributeContext; +} + +export namespace AttributeContext { + export type AsObject = { + origin?: AttributeContext.Peer.AsObject, + source?: AttributeContext.Peer.AsObject, + destination?: AttributeContext.Peer.AsObject, + request?: AttributeContext.Request.AsObject, + response?: AttributeContext.Response.AsObject, + resource?: AttributeContext.Resource.AsObject, + api?: AttributeContext.Api.AsObject, + extensionsList: Array, + } + + export class Peer extends jspb.Message { + getIp(): string; + setIp(value: string): void; + + getPort(): number; + setPort(value: number): void; + + getLabelsMap(): jspb.Map; + clearLabelsMap(): void; + getPrincipal(): string; + setPrincipal(value: string): void; + + getRegionCode(): string; + setRegionCode(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Peer.AsObject; + static toObject(includeInstance: boolean, msg: Peer): Peer.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Peer, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Peer; + static deserializeBinaryFromReader(message: Peer, reader: jspb.BinaryReader): Peer; + } + + export namespace Peer { + export type AsObject = { + ip: string, + port: number, + labelsMap: Array<[string, string]>, + principal: string, + regionCode: string, + } + } + + export class Api extends jspb.Message { + getService(): string; + setService(value: string): void; + + getOperation(): string; + setOperation(value: string): void; + + getProtocol(): string; + setProtocol(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Api.AsObject; + static toObject(includeInstance: boolean, msg: Api): Api.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Api, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Api; + static deserializeBinaryFromReader(message: Api, reader: jspb.BinaryReader): Api; + } + + export namespace Api { + export type AsObject = { + service: string, + operation: string, + protocol: string, + version: string, + } + } + + export class Auth extends jspb.Message { + getPrincipal(): string; + setPrincipal(value: string): void; + + clearAudiencesList(): void; + getAudiencesList(): Array; + setAudiencesList(value: Array): void; + addAudiences(value: string, index?: number): string; + + getPresenter(): string; + setPresenter(value: string): void; + + hasClaims(): boolean; + clearClaims(): void; + getClaims(): google_protobuf_struct_pb.Struct | undefined; + setClaims(value?: google_protobuf_struct_pb.Struct): void; + + clearAccessLevelsList(): void; + getAccessLevelsList(): Array; + setAccessLevelsList(value: Array): void; + addAccessLevels(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Auth.AsObject; + static toObject(includeInstance: boolean, msg: Auth): Auth.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Auth, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Auth; + static deserializeBinaryFromReader(message: Auth, reader: jspb.BinaryReader): Auth; + } + + export namespace Auth { + export type AsObject = { + principal: string, + audiencesList: Array, + presenter: string, + claims?: google_protobuf_struct_pb.Struct.AsObject, + accessLevelsList: Array, + } + } + + export class Request extends jspb.Message { + getId(): string; + setId(value: string): void; + + getMethod(): string; + setMethod(value: string): void; + + getHeadersMap(): jspb.Map; + clearHeadersMap(): void; + getPath(): string; + setPath(value: string): void; + + getHost(): string; + setHost(value: string): void; + + getScheme(): string; + setScheme(value: string): void; + + getQuery(): string; + setQuery(value: string): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getSize(): number; + setSize(value: number): void; + + getProtocol(): string; + setProtocol(value: string): void; + + getReason(): string; + setReason(value: string): void; + + hasAuth(): boolean; + clearAuth(): void; + getAuth(): AttributeContext.Auth | undefined; + setAuth(value?: AttributeContext.Auth): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Request.AsObject; + static toObject(includeInstance: boolean, msg: Request): Request.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Request, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Request; + static deserializeBinaryFromReader(message: Request, reader: jspb.BinaryReader): Request; + } + + export namespace Request { + export type AsObject = { + id: string, + method: string, + headersMap: Array<[string, string]>, + path: string, + host: string, + scheme: string, + query: string, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + size: number, + protocol: string, + reason: string, + auth?: AttributeContext.Auth.AsObject, + } + } + + export class Response extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getSize(): number; + setSize(value: number): void; + + getHeadersMap(): jspb.Map; + clearHeadersMap(): void; + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasBackendLatency(): boolean; + clearBackendLatency(): void; + getBackendLatency(): google_protobuf_duration_pb.Duration | undefined; + setBackendLatency(value?: google_protobuf_duration_pb.Duration): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Response.AsObject; + static toObject(includeInstance: boolean, msg: Response): Response.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Response, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Response; + static deserializeBinaryFromReader(message: Response, reader: jspb.BinaryReader): Response; + } + + export namespace Response { + export type AsObject = { + code: number, + size: number, + headersMap: Array<[string, string]>, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + backendLatency?: google_protobuf_duration_pb.Duration.AsObject, + } + } + + export class Resource extends jspb.Message { + getService(): string; + setService(value: string): void; + + getName(): string; + setName(value: string): void; + + getType(): string; + setType(value: string): void; + + getLabelsMap(): jspb.Map; + clearLabelsMap(): void; + getUid(): string; + setUid(value: string): void; + + getAnnotationsMap(): jspb.Map; + clearAnnotationsMap(): void; + getDisplayName(): string; + setDisplayName(value: string): void; + + hasCreateTime(): boolean; + clearCreateTime(): void; + getCreateTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setCreateTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasUpdateTime(): boolean; + clearUpdateTime(): void; + getUpdateTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdateTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasDeleteTime(): boolean; + clearDeleteTime(): void; + getDeleteTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setDeleteTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getEtag(): string; + setEtag(value: string): void; + + getLocation(): string; + setLocation(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Resource.AsObject; + static toObject(includeInstance: boolean, msg: Resource): Resource.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Resource, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Resource; + static deserializeBinaryFromReader(message: Resource, reader: jspb.BinaryReader): Resource; + } + + export namespace Resource { + export type AsObject = { + service: string, + name: string, + type: string, + labelsMap: Array<[string, string]>, + uid: string, + annotationsMap: Array<[string, string]>, + displayName: string, + createTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + updateTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + deleteTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + etag: string, + location: string, + } + } +} + diff --git a/gen/js/google/rpc/context/attribute_context_pb.js b/gen/js/google/rpc/context/attribute_context_pb.js new file mode 100644 index 000000000..4d041cdb9 --- /dev/null +++ b/gen/js/google/rpc/context/attribute_context_pb.js @@ -0,0 +1,2815 @@ +// source: google/rpc/context/attribute_context.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.google.rpc.context.AttributeContext', null, global); +goog.exportSymbol('proto.google.rpc.context.AttributeContext.Api', null, global); +goog.exportSymbol('proto.google.rpc.context.AttributeContext.Auth', null, global); +goog.exportSymbol('proto.google.rpc.context.AttributeContext.Peer', null, global); +goog.exportSymbol('proto.google.rpc.context.AttributeContext.Request', null, global); +goog.exportSymbol('proto.google.rpc.context.AttributeContext.Resource', null, global); +goog.exportSymbol('proto.google.rpc.context.AttributeContext.Response', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.context.AttributeContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.context.AttributeContext.repeatedFields_, null); +}; +goog.inherits(proto.google.rpc.context.AttributeContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.context.AttributeContext.displayName = 'proto.google.rpc.context.AttributeContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.context.AttributeContext.Peer = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.context.AttributeContext.Peer, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.context.AttributeContext.Peer.displayName = 'proto.google.rpc.context.AttributeContext.Peer'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.context.AttributeContext.Api = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.context.AttributeContext.Api, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.context.AttributeContext.Api.displayName = 'proto.google.rpc.context.AttributeContext.Api'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.context.AttributeContext.Auth = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.context.AttributeContext.Auth.repeatedFields_, null); +}; +goog.inherits(proto.google.rpc.context.AttributeContext.Auth, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.context.AttributeContext.Auth.displayName = 'proto.google.rpc.context.AttributeContext.Auth'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.context.AttributeContext.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.context.AttributeContext.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.context.AttributeContext.Request.displayName = 'proto.google.rpc.context.AttributeContext.Request'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.context.AttributeContext.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.context.AttributeContext.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.context.AttributeContext.Response.displayName = 'proto.google.rpc.context.AttributeContext.Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.context.AttributeContext.Resource = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.context.AttributeContext.Resource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.context.AttributeContext.Resource.displayName = 'proto.google.rpc.context.AttributeContext.Resource'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.rpc.context.AttributeContext.repeatedFields_ = [8]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.context.AttributeContext.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.context.AttributeContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.context.AttributeContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.toObject = function(includeInstance, msg) { + var f, obj = { + origin: (f = msg.getOrigin()) && proto.google.rpc.context.AttributeContext.Peer.toObject(includeInstance, f), + source: (f = msg.getSource()) && proto.google.rpc.context.AttributeContext.Peer.toObject(includeInstance, f), + destination: (f = msg.getDestination()) && proto.google.rpc.context.AttributeContext.Peer.toObject(includeInstance, f), + request: (f = msg.getRequest()) && proto.google.rpc.context.AttributeContext.Request.toObject(includeInstance, f), + response: (f = msg.getResponse()) && proto.google.rpc.context.AttributeContext.Response.toObject(includeInstance, f), + resource: (f = msg.getResource()) && proto.google.rpc.context.AttributeContext.Resource.toObject(includeInstance, f), + api: (f = msg.getApi()) && proto.google.rpc.context.AttributeContext.Api.toObject(includeInstance, f), + extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(), + google_protobuf_any_pb.Any.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.context.AttributeContext} + */ +proto.google.rpc.context.AttributeContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.context.AttributeContext; + return proto.google.rpc.context.AttributeContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.context.AttributeContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.context.AttributeContext} + */ +proto.google.rpc.context.AttributeContext.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 7: + var value = new proto.google.rpc.context.AttributeContext.Peer; + reader.readMessage(value,proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader); + msg.setOrigin(value); + break; + case 1: + var value = new proto.google.rpc.context.AttributeContext.Peer; + reader.readMessage(value,proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader); + msg.setSource(value); + break; + case 2: + var value = new proto.google.rpc.context.AttributeContext.Peer; + reader.readMessage(value,proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader); + msg.setDestination(value); + break; + case 3: + var value = new proto.google.rpc.context.AttributeContext.Request; + reader.readMessage(value,proto.google.rpc.context.AttributeContext.Request.deserializeBinaryFromReader); + msg.setRequest(value); + break; + case 4: + var value = new proto.google.rpc.context.AttributeContext.Response; + reader.readMessage(value,proto.google.rpc.context.AttributeContext.Response.deserializeBinaryFromReader); + msg.setResponse(value); + break; + case 5: + var value = new proto.google.rpc.context.AttributeContext.Resource; + reader.readMessage(value,proto.google.rpc.context.AttributeContext.Resource.deserializeBinaryFromReader); + msg.setResource(value); + break; + case 6: + var value = new proto.google.rpc.context.AttributeContext.Api; + reader.readMessage(value,proto.google.rpc.context.AttributeContext.Api.deserializeBinaryFromReader); + msg.setApi(value); + break; + case 8: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addExtensions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.context.AttributeContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.context.AttributeContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.context.AttributeContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOrigin(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter + ); + } + f = message.getSource(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter + ); + } + f = message.getDestination(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter + ); + } + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.rpc.context.AttributeContext.Request.serializeBinaryToWriter + ); + } + f = message.getResponse(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.rpc.context.AttributeContext.Response.serializeBinaryToWriter + ); + } + f = message.getResource(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.google.rpc.context.AttributeContext.Resource.serializeBinaryToWriter + ); + } + f = message.getApi(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.google.rpc.context.AttributeContext.Api.serializeBinaryToWriter + ); + } + f = message.getExtensionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.context.AttributeContext.Peer.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.context.AttributeContext.Peer} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Peer.toObject = function(includeInstance, msg) { + var f, obj = { + ip: jspb.Message.getFieldWithDefault(msg, 1, ""), + port: jspb.Message.getFieldWithDefault(msg, 2, 0), + labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [], + principal: jspb.Message.getFieldWithDefault(msg, 7, ""), + regionCode: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.context.AttributeContext.Peer} + */ +proto.google.rpc.context.AttributeContext.Peer.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.context.AttributeContext.Peer; + return proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.context.AttributeContext.Peer} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.context.AttributeContext.Peer} + */ +proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setIp(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPort(value); + break; + case 6: + var value = msg.getLabelsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setPrincipal(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setRegionCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.context.AttributeContext.Peer} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIp(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getLabelsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getPrincipal(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getRegionCode(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string ip = 1; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.getIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.setIp = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 port = 2; + * @return {number} + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.setPort = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * map labels = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.getLabelsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.clearLabelsMap = function() { + this.getLabelsMap().clear(); + return this;}; + + +/** + * optional string principal = 7; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.getPrincipal = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.setPrincipal = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string region_code = 8; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.getRegionCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this + */ +proto.google.rpc.context.AttributeContext.Peer.prototype.setRegionCode = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.context.AttributeContext.Api.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.context.AttributeContext.Api.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.context.AttributeContext.Api} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Api.toObject = function(includeInstance, msg) { + var f, obj = { + service: jspb.Message.getFieldWithDefault(msg, 1, ""), + operation: jspb.Message.getFieldWithDefault(msg, 2, ""), + protocol: jspb.Message.getFieldWithDefault(msg, 3, ""), + version: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.context.AttributeContext.Api} + */ +proto.google.rpc.context.AttributeContext.Api.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.context.AttributeContext.Api; + return proto.google.rpc.context.AttributeContext.Api.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.context.AttributeContext.Api} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.context.AttributeContext.Api} + */ +proto.google.rpc.context.AttributeContext.Api.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setService(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOperation(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setProtocol(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.context.AttributeContext.Api.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.context.AttributeContext.Api.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.context.AttributeContext.Api} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Api.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getService(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOperation(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProtocol(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string service = 1; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Api.prototype.getService = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Api} returns this + */ +proto.google.rpc.context.AttributeContext.Api.prototype.setService = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string operation = 2; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Api.prototype.getOperation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Api} returns this + */ +proto.google.rpc.context.AttributeContext.Api.prototype.setOperation = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string protocol = 3; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Api.prototype.getProtocol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Api} returns this + */ +proto.google.rpc.context.AttributeContext.Api.prototype.setProtocol = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version = 4; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Api.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Api} returns this + */ +proto.google.rpc.context.AttributeContext.Api.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.rpc.context.AttributeContext.Auth.repeatedFields_ = [2,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.context.AttributeContext.Auth.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.context.AttributeContext.Auth} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Auth.toObject = function(includeInstance, msg) { + var f, obj = { + principal: jspb.Message.getFieldWithDefault(msg, 1, ""), + audiencesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + presenter: jspb.Message.getFieldWithDefault(msg, 3, ""), + claims: (f = msg.getClaims()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + accessLevelsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.context.AttributeContext.Auth} + */ +proto.google.rpc.context.AttributeContext.Auth.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.context.AttributeContext.Auth; + return proto.google.rpc.context.AttributeContext.Auth.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.context.AttributeContext.Auth} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.context.AttributeContext.Auth} + */ +proto.google.rpc.context.AttributeContext.Auth.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPrincipal(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addAudiences(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPresenter(value); + break; + case 4: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setClaims(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addAccessLevels(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.context.AttributeContext.Auth.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.context.AttributeContext.Auth} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Auth.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPrincipal(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAudiencesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getPresenter(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getClaims(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getAccessLevelsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } +}; + + +/** + * optional string principal = 1; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.getPrincipal = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.setPrincipal = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string audiences = 2; + * @return {!Array} + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.getAudiencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.setAudiencesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.addAudiences = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.clearAudiencesList = function() { + return this.setAudiencesList([]); +}; + + +/** + * optional string presenter = 3; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.getPresenter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.setPresenter = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct claims = 4; + * @return {?proto.google.protobuf.Struct} + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.getClaims = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this +*/ +proto.google.rpc.context.AttributeContext.Auth.prototype.setClaims = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.clearClaims = function() { + return this.setClaims(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.hasClaims = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated string access_levels = 5; + * @return {!Array} + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.getAccessLevelsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.setAccessLevelsList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.addAccessLevels = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this + */ +proto.google.rpc.context.AttributeContext.Auth.prototype.clearAccessLevelsList = function() { + return this.setAccessLevelsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.context.AttributeContext.Request.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.context.AttributeContext.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Request.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + method: jspb.Message.getFieldWithDefault(msg, 2, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [], + path: jspb.Message.getFieldWithDefault(msg, 4, ""), + host: jspb.Message.getFieldWithDefault(msg, 5, ""), + scheme: jspb.Message.getFieldWithDefault(msg, 6, ""), + query: jspb.Message.getFieldWithDefault(msg, 7, ""), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + size: jspb.Message.getFieldWithDefault(msg, 10, 0), + protocol: jspb.Message.getFieldWithDefault(msg, 11, ""), + reason: jspb.Message.getFieldWithDefault(msg, 12, ""), + auth: (f = msg.getAuth()) && proto.google.rpc.context.AttributeContext.Auth.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.context.AttributeContext.Request} + */ +proto.google.rpc.context.AttributeContext.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.context.AttributeContext.Request; + return proto.google.rpc.context.AttributeContext.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.context.AttributeContext.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.context.AttributeContext.Request} + */ +proto.google.rpc.context.AttributeContext.Request.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMethod(value); + break; + case 3: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setHost(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setScheme(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setProtocol(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setReason(value); + break; + case 13: + var value = new proto.google.rpc.context.AttributeContext.Auth; + reader.readMessage(value,proto.google.rpc.context.AttributeContext.Auth.deserializeBinaryFromReader); + msg.setAuth(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.context.AttributeContext.Request.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.context.AttributeContext.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getScheme(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } + f = message.getProtocol(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getReason(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getAuth(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.google.rpc.context.AttributeContext.Auth.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string method = 2; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map headers = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getHeadersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this;}; + + +/** + * optional string path = 4; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string host = 5; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getHost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.setHost = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string scheme = 6; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getScheme = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.setScheme = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string query = 7; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getQuery = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.setQuery = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this +*/ +proto.google.rpc.context.AttributeContext.Request.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.hasTime = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional int64 size = 10; + * @return {number} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional string protocol = 11; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getProtocol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.setProtocol = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * optional string reason = 12; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getReason = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.setReason = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional Auth auth = 13; + * @return {?proto.google.rpc.context.AttributeContext.Auth} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.getAuth = function() { + return /** @type{?proto.google.rpc.context.AttributeContext.Auth} */ ( + jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Auth, 13)); +}; + + +/** + * @param {?proto.google.rpc.context.AttributeContext.Auth|undefined} value + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this +*/ +proto.google.rpc.context.AttributeContext.Request.prototype.setAuth = function(value) { + return jspb.Message.setWrapperField(this, 13, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext.Request} returns this + */ +proto.google.rpc.context.AttributeContext.Request.prototype.clearAuth = function() { + return this.setAuth(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.Request.prototype.hasAuth = function() { + return jspb.Message.getField(this, 13) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.context.AttributeContext.Response.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.context.AttributeContext.Response.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.context.AttributeContext.Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Response.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + size: jspb.Message.getFieldWithDefault(msg, 2, 0), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [], + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + backendLatency: (f = msg.getBackendLatency()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.context.AttributeContext.Response} + */ +proto.google.rpc.context.AttributeContext.Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.context.AttributeContext.Response; + return proto.google.rpc.context.AttributeContext.Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.context.AttributeContext.Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.context.AttributeContext.Response} + */ +proto.google.rpc.context.AttributeContext.Response.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCode(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 3: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 5: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setBackendLatency(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.context.AttributeContext.Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.context.AttributeContext.Response.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.context.AttributeContext.Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getBackendLatency(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 code = 1; + * @return {number} + */ +proto.google.rpc.context.AttributeContext.Response.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.rpc.context.AttributeContext.Response} returns this + */ +proto.google.rpc.context.AttributeContext.Response.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 size = 2; + * @return {number} + */ +proto.google.rpc.context.AttributeContext.Response.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.rpc.context.AttributeContext.Response} returns this + */ +proto.google.rpc.context.AttributeContext.Response.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * map headers = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.rpc.context.AttributeContext.Response.prototype.getHeadersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.rpc.context.AttributeContext.Response} returns this + */ +proto.google.rpc.context.AttributeContext.Response.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this;}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.google.rpc.context.AttributeContext.Response.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.google.rpc.context.AttributeContext.Response} returns this +*/ +proto.google.rpc.context.AttributeContext.Response.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext.Response} returns this + */ +proto.google.rpc.context.AttributeContext.Response.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.Response.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Duration backend_latency = 5; + * @return {?proto.google.protobuf.Duration} + */ +proto.google.rpc.context.AttributeContext.Response.prototype.getBackendLatency = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.google.rpc.context.AttributeContext.Response} returns this +*/ +proto.google.rpc.context.AttributeContext.Response.prototype.setBackendLatency = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext.Response} returns this + */ +proto.google.rpc.context.AttributeContext.Response.prototype.clearBackendLatency = function() { + return this.setBackendLatency(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.Response.prototype.hasBackendLatency = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.context.AttributeContext.Resource.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.context.AttributeContext.Resource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Resource.toObject = function(includeInstance, msg) { + var f, obj = { + service: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + type: jspb.Message.getFieldWithDefault(msg, 3, ""), + labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [], + uid: jspb.Message.getFieldWithDefault(msg, 5, ""), + annotationsMap: (f = msg.getAnnotationsMap()) ? f.toObject(includeInstance, undefined) : [], + displayName: jspb.Message.getFieldWithDefault(msg, 7, ""), + createTime: (f = msg.getCreateTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updateTime: (f = msg.getUpdateTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + deleteTime: (f = msg.getDeleteTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + etag: jspb.Message.getFieldWithDefault(msg, 11, ""), + location: jspb.Message.getFieldWithDefault(msg, 12, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.context.AttributeContext.Resource} + */ +proto.google.rpc.context.AttributeContext.Resource.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.context.AttributeContext.Resource; + return proto.google.rpc.context.AttributeContext.Resource.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.context.AttributeContext.Resource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.context.AttributeContext.Resource} + */ +proto.google.rpc.context.AttributeContext.Resource.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setService(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 4: + var value = msg.getLabelsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setUid(value); + break; + case 6: + var value = msg.getAnnotationsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setDisplayName(value); + break; + case 8: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreateTime(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdateTime(value); + break; + case 10: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setDeleteTime(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setEtag(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.context.AttributeContext.Resource.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.context.AttributeContext.Resource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.context.AttributeContext.Resource.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getService(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLabelsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getUid(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getAnnotationsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getDisplayName(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getCreateTime(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUpdateTime(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getDeleteTime(); + if (f != null) { + writer.writeMessage( + 10, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEtag(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } +}; + + +/** + * optional string service = 1; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getService = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.setService = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string type = 3; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * map labels = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getLabelsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.clearLabelsMap = function() { + this.getLabelsMap().clear(); + return this;}; + + +/** + * optional string uid = 5; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getUid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.setUid = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * map annotations = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getAnnotationsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.clearAnnotationsMap = function() { + this.getAnnotationsMap().clear(); + return this;}; + + +/** + * optional string display_name = 7; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getDisplayName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.setDisplayName = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional google.protobuf.Timestamp create_time = 8; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getCreateTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this +*/ +proto.google.rpc.context.AttributeContext.Resource.prototype.setCreateTime = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.clearCreateTime = function() { + return this.setCreateTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.hasCreateTime = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional google.protobuf.Timestamp update_time = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getUpdateTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this +*/ +proto.google.rpc.context.AttributeContext.Resource.prototype.setUpdateTime = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.clearUpdateTime = function() { + return this.setUpdateTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.hasUpdateTime = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional google.protobuf.Timestamp delete_time = 10; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getDeleteTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this +*/ +proto.google.rpc.context.AttributeContext.Resource.prototype.setDeleteTime = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.clearDeleteTime = function() { + return this.setDeleteTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.hasDeleteTime = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string etag = 11; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getEtag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.setEtag = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * optional string location = 12; + * @return {string} + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this + */ +proto.google.rpc.context.AttributeContext.Resource.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional Peer origin = 7; + * @return {?proto.google.rpc.context.AttributeContext.Peer} + */ +proto.google.rpc.context.AttributeContext.prototype.getOrigin = function() { + return /** @type{?proto.google.rpc.context.AttributeContext.Peer} */ ( + jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Peer, 7)); +}; + + +/** + * @param {?proto.google.rpc.context.AttributeContext.Peer|undefined} value + * @return {!proto.google.rpc.context.AttributeContext} returns this +*/ +proto.google.rpc.context.AttributeContext.prototype.setOrigin = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext} returns this + */ +proto.google.rpc.context.AttributeContext.prototype.clearOrigin = function() { + return this.setOrigin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.prototype.hasOrigin = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional Peer source = 1; + * @return {?proto.google.rpc.context.AttributeContext.Peer} + */ +proto.google.rpc.context.AttributeContext.prototype.getSource = function() { + return /** @type{?proto.google.rpc.context.AttributeContext.Peer} */ ( + jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Peer, 1)); +}; + + +/** + * @param {?proto.google.rpc.context.AttributeContext.Peer|undefined} value + * @return {!proto.google.rpc.context.AttributeContext} returns this +*/ +proto.google.rpc.context.AttributeContext.prototype.setSource = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext} returns this + */ +proto.google.rpc.context.AttributeContext.prototype.clearSource = function() { + return this.setSource(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.prototype.hasSource = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Peer destination = 2; + * @return {?proto.google.rpc.context.AttributeContext.Peer} + */ +proto.google.rpc.context.AttributeContext.prototype.getDestination = function() { + return /** @type{?proto.google.rpc.context.AttributeContext.Peer} */ ( + jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Peer, 2)); +}; + + +/** + * @param {?proto.google.rpc.context.AttributeContext.Peer|undefined} value + * @return {!proto.google.rpc.context.AttributeContext} returns this +*/ +proto.google.rpc.context.AttributeContext.prototype.setDestination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext} returns this + */ +proto.google.rpc.context.AttributeContext.prototype.clearDestination = function() { + return this.setDestination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.prototype.hasDestination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Request request = 3; + * @return {?proto.google.rpc.context.AttributeContext.Request} + */ +proto.google.rpc.context.AttributeContext.prototype.getRequest = function() { + return /** @type{?proto.google.rpc.context.AttributeContext.Request} */ ( + jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Request, 3)); +}; + + +/** + * @param {?proto.google.rpc.context.AttributeContext.Request|undefined} value + * @return {!proto.google.rpc.context.AttributeContext} returns this +*/ +proto.google.rpc.context.AttributeContext.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext} returns this + */ +proto.google.rpc.context.AttributeContext.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.prototype.hasRequest = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Response response = 4; + * @return {?proto.google.rpc.context.AttributeContext.Response} + */ +proto.google.rpc.context.AttributeContext.prototype.getResponse = function() { + return /** @type{?proto.google.rpc.context.AttributeContext.Response} */ ( + jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Response, 4)); +}; + + +/** + * @param {?proto.google.rpc.context.AttributeContext.Response|undefined} value + * @return {!proto.google.rpc.context.AttributeContext} returns this +*/ +proto.google.rpc.context.AttributeContext.prototype.setResponse = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext} returns this + */ +proto.google.rpc.context.AttributeContext.prototype.clearResponse = function() { + return this.setResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.prototype.hasResponse = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Resource resource = 5; + * @return {?proto.google.rpc.context.AttributeContext.Resource} + */ +proto.google.rpc.context.AttributeContext.prototype.getResource = function() { + return /** @type{?proto.google.rpc.context.AttributeContext.Resource} */ ( + jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Resource, 5)); +}; + + +/** + * @param {?proto.google.rpc.context.AttributeContext.Resource|undefined} value + * @return {!proto.google.rpc.context.AttributeContext} returns this +*/ +proto.google.rpc.context.AttributeContext.prototype.setResource = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext} returns this + */ +proto.google.rpc.context.AttributeContext.prototype.clearResource = function() { + return this.setResource(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.prototype.hasResource = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Api api = 6; + * @return {?proto.google.rpc.context.AttributeContext.Api} + */ +proto.google.rpc.context.AttributeContext.prototype.getApi = function() { + return /** @type{?proto.google.rpc.context.AttributeContext.Api} */ ( + jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Api, 6)); +}; + + +/** + * @param {?proto.google.rpc.context.AttributeContext.Api|undefined} value + * @return {!proto.google.rpc.context.AttributeContext} returns this +*/ +proto.google.rpc.context.AttributeContext.prototype.setApi = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.context.AttributeContext} returns this + */ +proto.google.rpc.context.AttributeContext.prototype.clearApi = function() { + return this.setApi(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.context.AttributeContext.prototype.hasApi = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated google.protobuf.Any extensions = 8; + * @return {!Array} + */ +proto.google.rpc.context.AttributeContext.prototype.getExtensionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.rpc.context.AttributeContext} returns this +*/ +proto.google.rpc.context.AttributeContext.prototype.setExtensionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.google.rpc.context.AttributeContext.prototype.addExtensions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.rpc.context.AttributeContext} returns this + */ +proto.google.rpc.context.AttributeContext.prototype.clearExtensionsList = function() { + return this.setExtensionsList([]); +}; + + +goog.object.extend(exports, proto.google.rpc.context); diff --git a/gen/js/google/rpc/context/attribute_context_pb_service.d.ts b/gen/js/google/rpc/context/attribute_context_pb_service.d.ts new file mode 100644 index 000000000..f2095b6c9 --- /dev/null +++ b/gen/js/google/rpc/context/attribute_context_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.rpc.context +// file: google/rpc/context/attribute_context.proto + diff --git a/gen/js/google/rpc/context/attribute_context_pb_service.js b/gen/js/google/rpc/context/attribute_context_pb_service.js new file mode 100644 index 000000000..f2095b6c9 --- /dev/null +++ b/gen/js/google/rpc/context/attribute_context_pb_service.js @@ -0,0 +1,3 @@ +// package: google.rpc.context +// file: google/rpc/context/attribute_context.proto + diff --git a/gen/js/google/rpc/error_details_pb.d.ts b/gen/js/google/rpc/error_details_pb.d.ts new file mode 100644 index 000000000..fe907b10b --- /dev/null +++ b/gen/js/google/rpc/error_details_pb.d.ts @@ -0,0 +1,349 @@ +// package: google.rpc +// file: google/rpc/error_details.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; + +export class RetryInfo extends jspb.Message { + hasRetryDelay(): boolean; + clearRetryDelay(): void; + getRetryDelay(): google_protobuf_duration_pb.Duration | undefined; + setRetryDelay(value?: google_protobuf_duration_pb.Duration): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RetryInfo.AsObject; + static toObject(includeInstance: boolean, msg: RetryInfo): RetryInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RetryInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RetryInfo; + static deserializeBinaryFromReader(message: RetryInfo, reader: jspb.BinaryReader): RetryInfo; +} + +export namespace RetryInfo { + export type AsObject = { + retryDelay?: google_protobuf_duration_pb.Duration.AsObject, + } +} + +export class DebugInfo extends jspb.Message { + clearStackEntriesList(): void; + getStackEntriesList(): Array; + setStackEntriesList(value: Array): void; + addStackEntries(value: string, index?: number): string; + + getDetail(): string; + setDetail(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DebugInfo.AsObject; + static toObject(includeInstance: boolean, msg: DebugInfo): DebugInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DebugInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DebugInfo; + static deserializeBinaryFromReader(message: DebugInfo, reader: jspb.BinaryReader): DebugInfo; +} + +export namespace DebugInfo { + export type AsObject = { + stackEntriesList: Array, + detail: string, + } +} + +export class QuotaFailure extends jspb.Message { + clearViolationsList(): void; + getViolationsList(): Array; + setViolationsList(value: Array): void; + addViolations(value?: QuotaFailure.Violation, index?: number): QuotaFailure.Violation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): QuotaFailure.AsObject; + static toObject(includeInstance: boolean, msg: QuotaFailure): QuotaFailure.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: QuotaFailure, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): QuotaFailure; + static deserializeBinaryFromReader(message: QuotaFailure, reader: jspb.BinaryReader): QuotaFailure; +} + +export namespace QuotaFailure { + export type AsObject = { + violationsList: Array, + } + + export class Violation extends jspb.Message { + getSubject(): string; + setSubject(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Violation.AsObject; + static toObject(includeInstance: boolean, msg: Violation): Violation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Violation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Violation; + static deserializeBinaryFromReader(message: Violation, reader: jspb.BinaryReader): Violation; + } + + export namespace Violation { + export type AsObject = { + subject: string, + description: string, + } + } +} + +export class ErrorInfo extends jspb.Message { + getReason(): string; + setReason(value: string): void; + + getDomain(): string; + setDomain(value: string): void; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ErrorInfo.AsObject; + static toObject(includeInstance: boolean, msg: ErrorInfo): ErrorInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ErrorInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ErrorInfo; + static deserializeBinaryFromReader(message: ErrorInfo, reader: jspb.BinaryReader): ErrorInfo; +} + +export namespace ErrorInfo { + export type AsObject = { + reason: string, + domain: string, + metadataMap: Array<[string, string]>, + } +} + +export class PreconditionFailure extends jspb.Message { + clearViolationsList(): void; + getViolationsList(): Array; + setViolationsList(value: Array): void; + addViolations(value?: PreconditionFailure.Violation, index?: number): PreconditionFailure.Violation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PreconditionFailure.AsObject; + static toObject(includeInstance: boolean, msg: PreconditionFailure): PreconditionFailure.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PreconditionFailure, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PreconditionFailure; + static deserializeBinaryFromReader(message: PreconditionFailure, reader: jspb.BinaryReader): PreconditionFailure; +} + +export namespace PreconditionFailure { + export type AsObject = { + violationsList: Array, + } + + export class Violation extends jspb.Message { + getType(): string; + setType(value: string): void; + + getSubject(): string; + setSubject(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Violation.AsObject; + static toObject(includeInstance: boolean, msg: Violation): Violation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Violation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Violation; + static deserializeBinaryFromReader(message: Violation, reader: jspb.BinaryReader): Violation; + } + + export namespace Violation { + export type AsObject = { + type: string, + subject: string, + description: string, + } + } +} + +export class BadRequest extends jspb.Message { + clearFieldViolationsList(): void; + getFieldViolationsList(): Array; + setFieldViolationsList(value: Array): void; + addFieldViolations(value?: BadRequest.FieldViolation, index?: number): BadRequest.FieldViolation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BadRequest.AsObject; + static toObject(includeInstance: boolean, msg: BadRequest): BadRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BadRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BadRequest; + static deserializeBinaryFromReader(message: BadRequest, reader: jspb.BinaryReader): BadRequest; +} + +export namespace BadRequest { + export type AsObject = { + fieldViolationsList: Array, + } + + export class FieldViolation extends jspb.Message { + getField(): string; + setField(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldViolation.AsObject; + static toObject(includeInstance: boolean, msg: FieldViolation): FieldViolation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldViolation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldViolation; + static deserializeBinaryFromReader(message: FieldViolation, reader: jspb.BinaryReader): FieldViolation; + } + + export namespace FieldViolation { + export type AsObject = { + field: string, + description: string, + } + } +} + +export class RequestInfo extends jspb.Message { + getRequestId(): string; + setRequestId(value: string): void; + + getServingData(): string; + setServingData(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequestInfo.AsObject; + static toObject(includeInstance: boolean, msg: RequestInfo): RequestInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequestInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequestInfo; + static deserializeBinaryFromReader(message: RequestInfo, reader: jspb.BinaryReader): RequestInfo; +} + +export namespace RequestInfo { + export type AsObject = { + requestId: string, + servingData: string, + } +} + +export class ResourceInfo extends jspb.Message { + getResourceType(): string; + setResourceType(value: string): void; + + getResourceName(): string; + setResourceName(value: string): void; + + getOwner(): string; + setOwner(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceInfo.AsObject; + static toObject(includeInstance: boolean, msg: ResourceInfo): ResourceInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceInfo; + static deserializeBinaryFromReader(message: ResourceInfo, reader: jspb.BinaryReader): ResourceInfo; +} + +export namespace ResourceInfo { + export type AsObject = { + resourceType: string, + resourceName: string, + owner: string, + description: string, + } +} + +export class Help extends jspb.Message { + clearLinksList(): void; + getLinksList(): Array; + setLinksList(value: Array): void; + addLinks(value?: Help.Link, index?: number): Help.Link; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Help.AsObject; + static toObject(includeInstance: boolean, msg: Help): Help.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Help, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Help; + static deserializeBinaryFromReader(message: Help, reader: jspb.BinaryReader): Help; +} + +export namespace Help { + export type AsObject = { + linksList: Array, + } + + export class Link extends jspb.Message { + getDescription(): string; + setDescription(value: string): void; + + getUrl(): string; + setUrl(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Link.AsObject; + static toObject(includeInstance: boolean, msg: Link): Link.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Link, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Link; + static deserializeBinaryFromReader(message: Link, reader: jspb.BinaryReader): Link; + } + + export namespace Link { + export type AsObject = { + description: string, + url: string, + } + } +} + +export class LocalizedMessage extends jspb.Message { + getLocale(): string; + setLocale(value: string): void; + + getMessage(): string; + setMessage(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LocalizedMessage.AsObject; + static toObject(includeInstance: boolean, msg: LocalizedMessage): LocalizedMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LocalizedMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LocalizedMessage; + static deserializeBinaryFromReader(message: LocalizedMessage, reader: jspb.BinaryReader): LocalizedMessage; +} + +export namespace LocalizedMessage { + export type AsObject = { + locale: string, + message: string, + } +} + diff --git a/gen/js/google/rpc/error_details_pb.js b/gen/js/google/rpc/error_details_pb.js new file mode 100644 index 000000000..042ef4d25 --- /dev/null +++ b/gen/js/google/rpc/error_details_pb.js @@ -0,0 +1,2708 @@ +// source: google/rpc/error_details.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +goog.exportSymbol('proto.google.rpc.BadRequest', null, global); +goog.exportSymbol('proto.google.rpc.BadRequest.FieldViolation', null, global); +goog.exportSymbol('proto.google.rpc.DebugInfo', null, global); +goog.exportSymbol('proto.google.rpc.ErrorInfo', null, global); +goog.exportSymbol('proto.google.rpc.Help', null, global); +goog.exportSymbol('proto.google.rpc.Help.Link', null, global); +goog.exportSymbol('proto.google.rpc.LocalizedMessage', null, global); +goog.exportSymbol('proto.google.rpc.PreconditionFailure', null, global); +goog.exportSymbol('proto.google.rpc.PreconditionFailure.Violation', null, global); +goog.exportSymbol('proto.google.rpc.QuotaFailure', null, global); +goog.exportSymbol('proto.google.rpc.QuotaFailure.Violation', null, global); +goog.exportSymbol('proto.google.rpc.RequestInfo', null, global); +goog.exportSymbol('proto.google.rpc.ResourceInfo', null, global); +goog.exportSymbol('proto.google.rpc.RetryInfo', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.RetryInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.RetryInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.RetryInfo.displayName = 'proto.google.rpc.RetryInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.DebugInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.DebugInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.rpc.DebugInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.DebugInfo.displayName = 'proto.google.rpc.DebugInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.QuotaFailure = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.QuotaFailure.repeatedFields_, null); +}; +goog.inherits(proto.google.rpc.QuotaFailure, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.QuotaFailure.displayName = 'proto.google.rpc.QuotaFailure'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.QuotaFailure.Violation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.QuotaFailure.Violation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.QuotaFailure.Violation.displayName = 'proto.google.rpc.QuotaFailure.Violation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.ErrorInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.ErrorInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.ErrorInfo.displayName = 'proto.google.rpc.ErrorInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.PreconditionFailure = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.PreconditionFailure.repeatedFields_, null); +}; +goog.inherits(proto.google.rpc.PreconditionFailure, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.PreconditionFailure.displayName = 'proto.google.rpc.PreconditionFailure'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.PreconditionFailure.Violation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.PreconditionFailure.Violation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.PreconditionFailure.Violation.displayName = 'proto.google.rpc.PreconditionFailure.Violation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.BadRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.BadRequest.repeatedFields_, null); +}; +goog.inherits(proto.google.rpc.BadRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.BadRequest.displayName = 'proto.google.rpc.BadRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.BadRequest.FieldViolation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.BadRequest.FieldViolation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.BadRequest.FieldViolation.displayName = 'proto.google.rpc.BadRequest.FieldViolation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.RequestInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.RequestInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.RequestInfo.displayName = 'proto.google.rpc.RequestInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.ResourceInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.ResourceInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.ResourceInfo.displayName = 'proto.google.rpc.ResourceInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.Help = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.Help.repeatedFields_, null); +}; +goog.inherits(proto.google.rpc.Help, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.Help.displayName = 'proto.google.rpc.Help'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.Help.Link = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.Help.Link, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.Help.Link.displayName = 'proto.google.rpc.Help.Link'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.LocalizedMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.rpc.LocalizedMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.LocalizedMessage.displayName = 'proto.google.rpc.LocalizedMessage'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.RetryInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.RetryInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.RetryInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.RetryInfo.toObject = function(includeInstance, msg) { + var f, obj = { + retryDelay: (f = msg.getRetryDelay()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.RetryInfo} + */ +proto.google.rpc.RetryInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.RetryInfo; + return proto.google.rpc.RetryInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.RetryInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.RetryInfo} + */ +proto.google.rpc.RetryInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setRetryDelay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.RetryInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.RetryInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.RetryInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.RetryInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRetryDelay(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Duration retry_delay = 1; + * @return {?proto.google.protobuf.Duration} + */ +proto.google.rpc.RetryInfo.prototype.getRetryDelay = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.google.rpc.RetryInfo} returns this +*/ +proto.google.rpc.RetryInfo.prototype.setRetryDelay = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.RetryInfo} returns this + */ +proto.google.rpc.RetryInfo.prototype.clearRetryDelay = function() { + return this.setRetryDelay(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.RetryInfo.prototype.hasRetryDelay = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.rpc.DebugInfo.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.DebugInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.DebugInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.DebugInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.DebugInfo.toObject = function(includeInstance, msg) { + var f, obj = { + stackEntriesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + detail: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.DebugInfo} + */ +proto.google.rpc.DebugInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.DebugInfo; + return proto.google.rpc.DebugInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.DebugInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.DebugInfo} + */ +proto.google.rpc.DebugInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addStackEntries(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDetail(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.DebugInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.DebugInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.DebugInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.DebugInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStackEntriesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getDetail(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * repeated string stack_entries = 1; + * @return {!Array} + */ +proto.google.rpc.DebugInfo.prototype.getStackEntriesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.rpc.DebugInfo} returns this + */ +proto.google.rpc.DebugInfo.prototype.setStackEntriesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.rpc.DebugInfo} returns this + */ +proto.google.rpc.DebugInfo.prototype.addStackEntries = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.rpc.DebugInfo} returns this + */ +proto.google.rpc.DebugInfo.prototype.clearStackEntriesList = function() { + return this.setStackEntriesList([]); +}; + + +/** + * optional string detail = 2; + * @return {string} + */ +proto.google.rpc.DebugInfo.prototype.getDetail = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.DebugInfo} returns this + */ +proto.google.rpc.DebugInfo.prototype.setDetail = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.rpc.QuotaFailure.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.QuotaFailure.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.QuotaFailure.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.QuotaFailure} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.QuotaFailure.toObject = function(includeInstance, msg) { + var f, obj = { + violationsList: jspb.Message.toObjectList(msg.getViolationsList(), + proto.google.rpc.QuotaFailure.Violation.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.QuotaFailure} + */ +proto.google.rpc.QuotaFailure.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.QuotaFailure; + return proto.google.rpc.QuotaFailure.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.QuotaFailure} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.QuotaFailure} + */ +proto.google.rpc.QuotaFailure.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.rpc.QuotaFailure.Violation; + reader.readMessage(value,proto.google.rpc.QuotaFailure.Violation.deserializeBinaryFromReader); + msg.addViolations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.QuotaFailure.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.QuotaFailure.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.QuotaFailure} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.QuotaFailure.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getViolationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.rpc.QuotaFailure.Violation.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.QuotaFailure.Violation.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.QuotaFailure.Violation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.QuotaFailure.Violation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.QuotaFailure.Violation.toObject = function(includeInstance, msg) { + var f, obj = { + subject: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.QuotaFailure.Violation} + */ +proto.google.rpc.QuotaFailure.Violation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.QuotaFailure.Violation; + return proto.google.rpc.QuotaFailure.Violation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.QuotaFailure.Violation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.QuotaFailure.Violation} + */ +proto.google.rpc.QuotaFailure.Violation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSubject(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.QuotaFailure.Violation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.QuotaFailure.Violation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.QuotaFailure.Violation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.QuotaFailure.Violation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubject(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string subject = 1; + * @return {string} + */ +proto.google.rpc.QuotaFailure.Violation.prototype.getSubject = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.QuotaFailure.Violation} returns this + */ +proto.google.rpc.QuotaFailure.Violation.prototype.setSubject = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.google.rpc.QuotaFailure.Violation.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.QuotaFailure.Violation} returns this + */ +proto.google.rpc.QuotaFailure.Violation.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Violation violations = 1; + * @return {!Array} + */ +proto.google.rpc.QuotaFailure.prototype.getViolationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.rpc.QuotaFailure.Violation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.rpc.QuotaFailure} returns this +*/ +proto.google.rpc.QuotaFailure.prototype.setViolationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.rpc.QuotaFailure.Violation=} opt_value + * @param {number=} opt_index + * @return {!proto.google.rpc.QuotaFailure.Violation} + */ +proto.google.rpc.QuotaFailure.prototype.addViolations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.QuotaFailure.Violation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.rpc.QuotaFailure} returns this + */ +proto.google.rpc.QuotaFailure.prototype.clearViolationsList = function() { + return this.setViolationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.ErrorInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.ErrorInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.ErrorInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.ErrorInfo.toObject = function(includeInstance, msg) { + var f, obj = { + reason: jspb.Message.getFieldWithDefault(msg, 1, ""), + domain: jspb.Message.getFieldWithDefault(msg, 2, ""), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.ErrorInfo} + */ +proto.google.rpc.ErrorInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.ErrorInfo; + return proto.google.rpc.ErrorInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.ErrorInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.ErrorInfo} + */ +proto.google.rpc.ErrorInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setReason(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDomain(value); + break; + case 3: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.ErrorInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.ErrorInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.ErrorInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.ErrorInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReason(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDomain(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * optional string reason = 1; + * @return {string} + */ +proto.google.rpc.ErrorInfo.prototype.getReason = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.ErrorInfo} returns this + */ +proto.google.rpc.ErrorInfo.prototype.setReason = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string domain = 2; + * @return {string} + */ +proto.google.rpc.ErrorInfo.prototype.getDomain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.ErrorInfo} returns this + */ +proto.google.rpc.ErrorInfo.prototype.setDomain = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map metadata = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.rpc.ErrorInfo.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.rpc.ErrorInfo} returns this + */ +proto.google.rpc.ErrorInfo.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.rpc.PreconditionFailure.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.PreconditionFailure.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.PreconditionFailure.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.PreconditionFailure} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.PreconditionFailure.toObject = function(includeInstance, msg) { + var f, obj = { + violationsList: jspb.Message.toObjectList(msg.getViolationsList(), + proto.google.rpc.PreconditionFailure.Violation.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.PreconditionFailure} + */ +proto.google.rpc.PreconditionFailure.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.PreconditionFailure; + return proto.google.rpc.PreconditionFailure.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.PreconditionFailure} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.PreconditionFailure} + */ +proto.google.rpc.PreconditionFailure.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.rpc.PreconditionFailure.Violation; + reader.readMessage(value,proto.google.rpc.PreconditionFailure.Violation.deserializeBinaryFromReader); + msg.addViolations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.PreconditionFailure.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.PreconditionFailure.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.PreconditionFailure} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.PreconditionFailure.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getViolationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.rpc.PreconditionFailure.Violation.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.PreconditionFailure.Violation.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.PreconditionFailure.Violation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.PreconditionFailure.Violation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.PreconditionFailure.Violation.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + subject: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.PreconditionFailure.Violation} + */ +proto.google.rpc.PreconditionFailure.Violation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.PreconditionFailure.Violation; + return proto.google.rpc.PreconditionFailure.Violation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.PreconditionFailure.Violation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.PreconditionFailure.Violation} + */ +proto.google.rpc.PreconditionFailure.Violation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSubject(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.PreconditionFailure.Violation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.PreconditionFailure.Violation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.PreconditionFailure.Violation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.PreconditionFailure.Violation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSubject(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.google.rpc.PreconditionFailure.Violation.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.PreconditionFailure.Violation} returns this + */ +proto.google.rpc.PreconditionFailure.Violation.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string subject = 2; + * @return {string} + */ +proto.google.rpc.PreconditionFailure.Violation.prototype.getSubject = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.PreconditionFailure.Violation} returns this + */ +proto.google.rpc.PreconditionFailure.Violation.prototype.setSubject = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.google.rpc.PreconditionFailure.Violation.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.PreconditionFailure.Violation} returns this + */ +proto.google.rpc.PreconditionFailure.Violation.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated Violation violations = 1; + * @return {!Array} + */ +proto.google.rpc.PreconditionFailure.prototype.getViolationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.rpc.PreconditionFailure.Violation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.rpc.PreconditionFailure} returns this +*/ +proto.google.rpc.PreconditionFailure.prototype.setViolationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.rpc.PreconditionFailure.Violation=} opt_value + * @param {number=} opt_index + * @return {!proto.google.rpc.PreconditionFailure.Violation} + */ +proto.google.rpc.PreconditionFailure.prototype.addViolations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.PreconditionFailure.Violation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.rpc.PreconditionFailure} returns this + */ +proto.google.rpc.PreconditionFailure.prototype.clearViolationsList = function() { + return this.setViolationsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.rpc.BadRequest.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.BadRequest.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.BadRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.BadRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.BadRequest.toObject = function(includeInstance, msg) { + var f, obj = { + fieldViolationsList: jspb.Message.toObjectList(msg.getFieldViolationsList(), + proto.google.rpc.BadRequest.FieldViolation.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.BadRequest} + */ +proto.google.rpc.BadRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.BadRequest; + return proto.google.rpc.BadRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.BadRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.BadRequest} + */ +proto.google.rpc.BadRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.rpc.BadRequest.FieldViolation; + reader.readMessage(value,proto.google.rpc.BadRequest.FieldViolation.deserializeBinaryFromReader); + msg.addFieldViolations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.BadRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.BadRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.BadRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.BadRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFieldViolationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.rpc.BadRequest.FieldViolation.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.BadRequest.FieldViolation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.BadRequest.FieldViolation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.BadRequest.FieldViolation.toObject = function(includeInstance, msg) { + var f, obj = { + field: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.BadRequest.FieldViolation} + */ +proto.google.rpc.BadRequest.FieldViolation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.BadRequest.FieldViolation; + return proto.google.rpc.BadRequest.FieldViolation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.BadRequest.FieldViolation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.BadRequest.FieldViolation} + */ +proto.google.rpc.BadRequest.FieldViolation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.BadRequest.FieldViolation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.BadRequest.FieldViolation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.BadRequest.FieldViolation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string field = 1; + * @return {string} + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.BadRequest.FieldViolation} returns this + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.BadRequest.FieldViolation} returns this + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated FieldViolation field_violations = 1; + * @return {!Array} + */ +proto.google.rpc.BadRequest.prototype.getFieldViolationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.rpc.BadRequest.FieldViolation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.rpc.BadRequest} returns this +*/ +proto.google.rpc.BadRequest.prototype.setFieldViolationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.rpc.BadRequest.FieldViolation=} opt_value + * @param {number=} opt_index + * @return {!proto.google.rpc.BadRequest.FieldViolation} + */ +proto.google.rpc.BadRequest.prototype.addFieldViolations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.BadRequest.FieldViolation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.rpc.BadRequest} returns this + */ +proto.google.rpc.BadRequest.prototype.clearFieldViolationsList = function() { + return this.setFieldViolationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.RequestInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.RequestInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.RequestInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.RequestInfo.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: jspb.Message.getFieldWithDefault(msg, 1, ""), + servingData: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.RequestInfo} + */ +proto.google.rpc.RequestInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.RequestInfo; + return proto.google.rpc.RequestInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.RequestInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.RequestInfo} + */ +proto.google.rpc.RequestInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setRequestId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setServingData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.RequestInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.RequestInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.RequestInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.RequestInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getServingData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string request_id = 1; + * @return {string} + */ +proto.google.rpc.RequestInfo.prototype.getRequestId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.RequestInfo} returns this + */ +proto.google.rpc.RequestInfo.prototype.setRequestId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string serving_data = 2; + * @return {string} + */ +proto.google.rpc.RequestInfo.prototype.getServingData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.RequestInfo} returns this + */ +proto.google.rpc.RequestInfo.prototype.setServingData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.ResourceInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.ResourceInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.ResourceInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.ResourceInfo.toObject = function(includeInstance, msg) { + var f, obj = { + resourceType: jspb.Message.getFieldWithDefault(msg, 1, ""), + resourceName: jspb.Message.getFieldWithDefault(msg, 2, ""), + owner: jspb.Message.getFieldWithDefault(msg, 3, ""), + description: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.ResourceInfo} + */ +proto.google.rpc.ResourceInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.ResourceInfo; + return proto.google.rpc.ResourceInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.ResourceInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.ResourceInfo} + */ +proto.google.rpc.ResourceInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.ResourceInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.ResourceInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.ResourceInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.ResourceInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResourceType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getResourceName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string resource_type = 1; + * @return {string} + */ +proto.google.rpc.ResourceInfo.prototype.getResourceType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.ResourceInfo} returns this + */ +proto.google.rpc.ResourceInfo.prototype.setResourceType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string resource_name = 2; + * @return {string} + */ +proto.google.rpc.ResourceInfo.prototype.getResourceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.ResourceInfo} returns this + */ +proto.google.rpc.ResourceInfo.prototype.setResourceName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string owner = 3; + * @return {string} + */ +proto.google.rpc.ResourceInfo.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.ResourceInfo} returns this + */ +proto.google.rpc.ResourceInfo.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string description = 4; + * @return {string} + */ +proto.google.rpc.ResourceInfo.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.ResourceInfo} returns this + */ +proto.google.rpc.ResourceInfo.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.rpc.Help.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.Help.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.Help.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.Help} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.Help.toObject = function(includeInstance, msg) { + var f, obj = { + linksList: jspb.Message.toObjectList(msg.getLinksList(), + proto.google.rpc.Help.Link.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.Help} + */ +proto.google.rpc.Help.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.Help; + return proto.google.rpc.Help.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.Help} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.Help} + */ +proto.google.rpc.Help.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.rpc.Help.Link; + reader.readMessage(value,proto.google.rpc.Help.Link.deserializeBinaryFromReader); + msg.addLinks(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.Help.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.Help.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.Help} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.Help.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLinksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.rpc.Help.Link.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.Help.Link.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.Help.Link.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.Help.Link} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.Help.Link.toObject = function(includeInstance, msg) { + var f, obj = { + description: jspb.Message.getFieldWithDefault(msg, 1, ""), + url: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.Help.Link} + */ +proto.google.rpc.Help.Link.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.Help.Link; + return proto.google.rpc.Help.Link.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.Help.Link} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.Help.Link} + */ +proto.google.rpc.Help.Link.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.Help.Link.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.Help.Link.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.Help.Link} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.Help.Link.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.google.rpc.Help.Link.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.Help.Link} returns this + */ +proto.google.rpc.Help.Link.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string url = 2; + * @return {string} + */ +proto.google.rpc.Help.Link.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.Help.Link} returns this + */ +proto.google.rpc.Help.Link.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Link links = 1; + * @return {!Array} + */ +proto.google.rpc.Help.prototype.getLinksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.rpc.Help.Link, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.rpc.Help} returns this +*/ +proto.google.rpc.Help.prototype.setLinksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.rpc.Help.Link=} opt_value + * @param {number=} opt_index + * @return {!proto.google.rpc.Help.Link} + */ +proto.google.rpc.Help.prototype.addLinks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.rpc.Help.Link, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.rpc.Help} returns this + */ +proto.google.rpc.Help.prototype.clearLinksList = function() { + return this.setLinksList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.LocalizedMessage.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.LocalizedMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.LocalizedMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.LocalizedMessage.toObject = function(includeInstance, msg) { + var f, obj = { + locale: jspb.Message.getFieldWithDefault(msg, 1, ""), + message: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.LocalizedMessage} + */ +proto.google.rpc.LocalizedMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.LocalizedMessage; + return proto.google.rpc.LocalizedMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.LocalizedMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.LocalizedMessage} + */ +proto.google.rpc.LocalizedMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocale(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.LocalizedMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.LocalizedMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.LocalizedMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.LocalizedMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocale(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string locale = 1; + * @return {string} + */ +proto.google.rpc.LocalizedMessage.prototype.getLocale = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.LocalizedMessage} returns this + */ +proto.google.rpc.LocalizedMessage.prototype.setLocale = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.google.rpc.LocalizedMessage.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.LocalizedMessage} returns this + */ +proto.google.rpc.LocalizedMessage.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.rpc); diff --git a/gen/js/google/rpc/error_details_pb_service.d.ts b/gen/js/google/rpc/error_details_pb_service.d.ts new file mode 100644 index 000000000..6c9ba8770 --- /dev/null +++ b/gen/js/google/rpc/error_details_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.rpc +// file: google/rpc/error_details.proto + diff --git a/gen/js/google/rpc/error_details_pb_service.js b/gen/js/google/rpc/error_details_pb_service.js new file mode 100644 index 000000000..6c9ba8770 --- /dev/null +++ b/gen/js/google/rpc/error_details_pb_service.js @@ -0,0 +1,3 @@ +// package: google.rpc +// file: google/rpc/error_details.proto + diff --git a/gen/js/google/rpc/status_pb.d.ts b/gen/js/google/rpc/status_pb.d.ts new file mode 100644 index 000000000..5a5eecdfa --- /dev/null +++ b/gen/js/google/rpc/status_pb.d.ts @@ -0,0 +1,36 @@ +// package: google.rpc +// file: google/rpc/status.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; + +export class Status extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getMessage(): string; + setMessage(value: string): void; + + clearDetailsList(): void; + getDetailsList(): Array; + setDetailsList(value: Array): void; + addDetails(value?: google_protobuf_any_pb.Any, index?: number): google_protobuf_any_pb.Any; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; +} + +export namespace Status { + export type AsObject = { + code: number, + message: string, + detailsList: Array, + } +} + diff --git a/gen/js/google/rpc/status_pb.js b/gen/js/google/rpc/status_pb.js new file mode 100644 index 000000000..4f84c8b90 --- /dev/null +++ b/gen/js/google/rpc/status_pb.js @@ -0,0 +1,262 @@ +// source: google/rpc/status.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.google.rpc.Status', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.rpc.Status = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.Status.repeatedFields_, null); +}; +goog.inherits(proto.google.rpc.Status, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.rpc.Status.displayName = 'proto.google.rpc.Status'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.rpc.Status.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.rpc.Status.prototype.toObject = function(opt_includeInstance) { + return proto.google.rpc.Status.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.rpc.Status} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.Status.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + detailsList: jspb.Message.toObjectList(msg.getDetailsList(), + google_protobuf_any_pb.Any.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.rpc.Status} + */ +proto.google.rpc.Status.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.rpc.Status; + return proto.google.rpc.Status.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.rpc.Status} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.rpc.Status} + */ +proto.google.rpc.Status.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addDetails(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.rpc.Status.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.rpc.Status.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.rpc.Status} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.rpc.Status.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDetailsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.google.rpc.Status.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.rpc.Status} returns this + */ +proto.google.rpc.Status.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.google.rpc.Status.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.Status} returns this + */ +proto.google.rpc.Status.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated google.protobuf.Any details = 3; + * @return {!Array} + */ +proto.google.rpc.Status.prototype.getDetailsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.rpc.Status} returns this +*/ +proto.google.rpc.Status.prototype.setDetailsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.google.rpc.Status.prototype.addDetails = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.rpc.Status} returns this + */ +proto.google.rpc.Status.prototype.clearDetailsList = function() { + return this.setDetailsList([]); +}; + + +goog.object.extend(exports, proto.google.rpc); diff --git a/gen/js/google/rpc/status_pb_service.d.ts b/gen/js/google/rpc/status_pb_service.d.ts new file mode 100644 index 000000000..3a14d3d83 --- /dev/null +++ b/gen/js/google/rpc/status_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.rpc +// file: google/rpc/status.proto + diff --git a/gen/js/google/rpc/status_pb_service.js b/gen/js/google/rpc/status_pb_service.js new file mode 100644 index 000000000..3a14d3d83 --- /dev/null +++ b/gen/js/google/rpc/status_pb_service.js @@ -0,0 +1,3 @@ +// package: google.rpc +// file: google/rpc/status.proto + diff --git a/gen/js/google/type/calendar_period_pb.d.ts b/gen/js/google/type/calendar_period_pb.d.ts new file mode 100644 index 000000000..f9001223c --- /dev/null +++ b/gen/js/google/type/calendar_period_pb.d.ts @@ -0,0 +1,18 @@ +// package: google.type +// file: google/type/calendar_period.proto + +import * as jspb from "google-protobuf"; + +export interface CalendarPeriodMap { + CALENDAR_PERIOD_UNSPECIFIED: 0; + DAY: 1; + WEEK: 2; + FORTNIGHT: 3; + MONTH: 4; + QUARTER: 5; + HALF: 6; + YEAR: 7; +} + +export const CalendarPeriod: CalendarPeriodMap; + diff --git a/gen/js/google/type/calendar_period_pb.js b/gen/js/google/type/calendar_period_pb.js new file mode 100644 index 000000000..67eb72c23 --- /dev/null +++ b/gen/js/google/type/calendar_period_pb.js @@ -0,0 +1,33 @@ +// source: google/type/calendar_period.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.CalendarPeriod', null, global); +/** + * @enum {number} + */ +proto.google.type.CalendarPeriod = { + CALENDAR_PERIOD_UNSPECIFIED: 0, + DAY: 1, + WEEK: 2, + FORTNIGHT: 3, + MONTH: 4, + QUARTER: 5, + HALF: 6, + YEAR: 7 +}; + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/calendar_period_pb_service.d.ts b/gen/js/google/type/calendar_period_pb_service.d.ts new file mode 100644 index 000000000..0dd88d71d --- /dev/null +++ b/gen/js/google/type/calendar_period_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/calendar_period.proto + diff --git a/gen/js/google/type/calendar_period_pb_service.js b/gen/js/google/type/calendar_period_pb_service.js new file mode 100644 index 000000000..0dd88d71d --- /dev/null +++ b/gen/js/google/type/calendar_period_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/calendar_period.proto + diff --git a/gen/js/google/type/color_pb.d.ts b/gen/js/google/type/color_pb.d.ts new file mode 100644 index 000000000..6f200411b --- /dev/null +++ b/gen/js/google/type/color_pb.d.ts @@ -0,0 +1,40 @@ +// package: google.type +// file: google/type/color.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; + +export class Color extends jspb.Message { + getRed(): number; + setRed(value: number): void; + + getGreen(): number; + setGreen(value: number): void; + + getBlue(): number; + setBlue(value: number): void; + + hasAlpha(): boolean; + clearAlpha(): void; + getAlpha(): google_protobuf_wrappers_pb.FloatValue | undefined; + setAlpha(value?: google_protobuf_wrappers_pb.FloatValue): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Color.AsObject; + static toObject(includeInstance: boolean, msg: Color): Color.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Color, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Color; + static deserializeBinaryFromReader(message: Color, reader: jspb.BinaryReader): Color; +} + +export namespace Color { + export type AsObject = { + red: number, + green: number, + blue: number, + alpha?: google_protobuf_wrappers_pb.FloatValue.AsObject, + } +} + diff --git a/gen/js/google/type/color_pb.js b/gen/js/google/type/color_pb.js new file mode 100644 index 000000000..5fae3bea4 --- /dev/null +++ b/gen/js/google/type/color_pb.js @@ -0,0 +1,283 @@ +// source: google/type/color.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); +goog.object.extend(proto, google_protobuf_wrappers_pb); +goog.exportSymbol('proto.google.type.Color', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.Color = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.Color, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.Color.displayName = 'proto.google.type.Color'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.Color.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.Color.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.Color} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Color.toObject = function(includeInstance, msg) { + var f, obj = { + red: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + green: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + blue: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + alpha: (f = msg.getAlpha()) && google_protobuf_wrappers_pb.FloatValue.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.Color} + */ +proto.google.type.Color.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.Color; + return proto.google.type.Color.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.Color} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.Color} + */ +proto.google.type.Color.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFloat()); + msg.setRed(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFloat()); + msg.setGreen(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFloat()); + msg.setBlue(value); + break; + case 4: + var value = new google_protobuf_wrappers_pb.FloatValue; + reader.readMessage(value,google_protobuf_wrappers_pb.FloatValue.deserializeBinaryFromReader); + msg.setAlpha(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.Color.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.Color.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.Color} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Color.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRed(); + if (f !== 0.0) { + writer.writeFloat( + 1, + f + ); + } + f = message.getGreen(); + if (f !== 0.0) { + writer.writeFloat( + 2, + f + ); + } + f = message.getBlue(); + if (f !== 0.0) { + writer.writeFloat( + 3, + f + ); + } + f = message.getAlpha(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_wrappers_pb.FloatValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional float red = 1; + * @return {number} + */ +proto.google.type.Color.prototype.getRed = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Color} returns this + */ +proto.google.type.Color.prototype.setRed = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional float green = 2; + * @return {number} + */ +proto.google.type.Color.prototype.getGreen = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Color} returns this + */ +proto.google.type.Color.prototype.setGreen = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional float blue = 3; + * @return {number} + */ +proto.google.type.Color.prototype.getBlue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Color} returns this + */ +proto.google.type.Color.prototype.setBlue = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional google.protobuf.FloatValue alpha = 4; + * @return {?proto.google.protobuf.FloatValue} + */ +proto.google.type.Color.prototype.getAlpha = function() { + return /** @type{?proto.google.protobuf.FloatValue} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.FloatValue, 4)); +}; + + +/** + * @param {?proto.google.protobuf.FloatValue|undefined} value + * @return {!proto.google.type.Color} returns this +*/ +proto.google.type.Color.prototype.setAlpha = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.type.Color} returns this + */ +proto.google.type.Color.prototype.clearAlpha = function() { + return this.setAlpha(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.type.Color.prototype.hasAlpha = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/color_pb_service.d.ts b/gen/js/google/type/color_pb_service.d.ts new file mode 100644 index 000000000..5addad990 --- /dev/null +++ b/gen/js/google/type/color_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/color.proto + diff --git a/gen/js/google/type/color_pb_service.js b/gen/js/google/type/color_pb_service.js new file mode 100644 index 000000000..5addad990 --- /dev/null +++ b/gen/js/google/type/color_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/color.proto + diff --git a/gen/js/google/type/date_pb.d.ts b/gen/js/google/type/date_pb.d.ts new file mode 100644 index 000000000..48103f04c --- /dev/null +++ b/gen/js/google/type/date_pb.d.ts @@ -0,0 +1,33 @@ +// package: google.type +// file: google/type/date.proto + +import * as jspb from "google-protobuf"; + +export class Date extends jspb.Message { + getYear(): number; + setYear(value: number): void; + + getMonth(): number; + setMonth(value: number): void; + + getDay(): number; + setDay(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Date.AsObject; + static toObject(includeInstance: boolean, msg: Date): Date.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Date, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Date; + static deserializeBinaryFromReader(message: Date, reader: jspb.BinaryReader): Date; +} + +export namespace Date { + export type AsObject = { + year: number, + month: number, + day: number, + } +} + diff --git a/gen/js/google/type/date_pb.js b/gen/js/google/type/date_pb.js new file mode 100644 index 000000000..5a24b75ad --- /dev/null +++ b/gen/js/google/type/date_pb.js @@ -0,0 +1,230 @@ +// source: google/type/date.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.Date', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.Date = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.Date, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.Date.displayName = 'proto.google.type.Date'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.Date.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.Date.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.Date} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Date.toObject = function(includeInstance, msg) { + var f, obj = { + year: jspb.Message.getFieldWithDefault(msg, 1, 0), + month: jspb.Message.getFieldWithDefault(msg, 2, 0), + day: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.Date} + */ +proto.google.type.Date.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.Date; + return proto.google.type.Date.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.Date} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.Date} + */ +proto.google.type.Date.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setYear(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMonth(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.Date.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.Date.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.Date} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Date.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getYear(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getMonth(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getDay(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } +}; + + +/** + * optional int32 year = 1; + * @return {number} + */ +proto.google.type.Date.prototype.getYear = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Date} returns this + */ +proto.google.type.Date.prototype.setYear = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 month = 2; + * @return {number} + */ +proto.google.type.Date.prototype.getMonth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Date} returns this + */ +proto.google.type.Date.prototype.setMonth = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 day = 3; + * @return {number} + */ +proto.google.type.Date.prototype.getDay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Date} returns this + */ +proto.google.type.Date.prototype.setDay = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/date_pb_service.d.ts b/gen/js/google/type/date_pb_service.d.ts new file mode 100644 index 000000000..415a08eed --- /dev/null +++ b/gen/js/google/type/date_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/date.proto + diff --git a/gen/js/google/type/date_pb_service.js b/gen/js/google/type/date_pb_service.js new file mode 100644 index 000000000..415a08eed --- /dev/null +++ b/gen/js/google/type/date_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/date.proto + diff --git a/gen/js/google/type/datetime_pb.d.ts b/gen/js/google/type/datetime_pb.d.ts new file mode 100644 index 000000000..8ba9f52f1 --- /dev/null +++ b/gen/js/google/type/datetime_pb.d.ts @@ -0,0 +1,93 @@ +// package: google.type +// file: google/type/datetime.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; + +export class DateTime extends jspb.Message { + getYear(): number; + setYear(value: number): void; + + getMonth(): number; + setMonth(value: number): void; + + getDay(): number; + setDay(value: number): void; + + getHours(): number; + setHours(value: number): void; + + getMinutes(): number; + setMinutes(value: number): void; + + getSeconds(): number; + setSeconds(value: number): void; + + getNanos(): number; + setNanos(value: number): void; + + hasUtcOffset(): boolean; + clearUtcOffset(): void; + getUtcOffset(): google_protobuf_duration_pb.Duration | undefined; + setUtcOffset(value?: google_protobuf_duration_pb.Duration): void; + + hasTimeZone(): boolean; + clearTimeZone(): void; + getTimeZone(): TimeZone | undefined; + setTimeZone(value?: TimeZone): void; + + getTimeOffsetCase(): DateTime.TimeOffsetCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DateTime.AsObject; + static toObject(includeInstance: boolean, msg: DateTime): DateTime.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DateTime, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DateTime; + static deserializeBinaryFromReader(message: DateTime, reader: jspb.BinaryReader): DateTime; +} + +export namespace DateTime { + export type AsObject = { + year: number, + month: number, + day: number, + hours: number, + minutes: number, + seconds: number, + nanos: number, + utcOffset?: google_protobuf_duration_pb.Duration.AsObject, + timeZone?: TimeZone.AsObject, + } + + export enum TimeOffsetCase { + TIME_OFFSET_NOT_SET = 0, + UTC_OFFSET = 8, + TIME_ZONE = 9, + } +} + +export class TimeZone extends jspb.Message { + getId(): string; + setId(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TimeZone.AsObject; + static toObject(includeInstance: boolean, msg: TimeZone): TimeZone.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TimeZone, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TimeZone; + static deserializeBinaryFromReader(message: TimeZone, reader: jspb.BinaryReader): TimeZone; +} + +export namespace TimeZone { + export type AsObject = { + id: string, + version: string, + } +} + diff --git a/gen/js/google/type/datetime_pb.js b/gen/js/google/type/datetime_pb.js new file mode 100644 index 000000000..cefec9fbd --- /dev/null +++ b/gen/js/google/type/datetime_pb.js @@ -0,0 +1,663 @@ +// source: google/type/datetime.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +goog.exportSymbol('proto.google.type.DateTime', null, global); +goog.exportSymbol('proto.google.type.DateTime.TimeOffsetCase', null, global); +goog.exportSymbol('proto.google.type.TimeZone', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.DateTime = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.type.DateTime.oneofGroups_); +}; +goog.inherits(proto.google.type.DateTime, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.DateTime.displayName = 'proto.google.type.DateTime'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.TimeZone = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.TimeZone, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.TimeZone.displayName = 'proto.google.type.TimeZone'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.type.DateTime.oneofGroups_ = [[8,9]]; + +/** + * @enum {number} + */ +proto.google.type.DateTime.TimeOffsetCase = { + TIME_OFFSET_NOT_SET: 0, + UTC_OFFSET: 8, + TIME_ZONE: 9 +}; + +/** + * @return {proto.google.type.DateTime.TimeOffsetCase} + */ +proto.google.type.DateTime.prototype.getTimeOffsetCase = function() { + return /** @type {proto.google.type.DateTime.TimeOffsetCase} */(jspb.Message.computeOneofCase(this, proto.google.type.DateTime.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.DateTime.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.DateTime.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.DateTime} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.DateTime.toObject = function(includeInstance, msg) { + var f, obj = { + year: jspb.Message.getFieldWithDefault(msg, 1, 0), + month: jspb.Message.getFieldWithDefault(msg, 2, 0), + day: jspb.Message.getFieldWithDefault(msg, 3, 0), + hours: jspb.Message.getFieldWithDefault(msg, 4, 0), + minutes: jspb.Message.getFieldWithDefault(msg, 5, 0), + seconds: jspb.Message.getFieldWithDefault(msg, 6, 0), + nanos: jspb.Message.getFieldWithDefault(msg, 7, 0), + utcOffset: (f = msg.getUtcOffset()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + timeZone: (f = msg.getTimeZone()) && proto.google.type.TimeZone.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.DateTime} + */ +proto.google.type.DateTime.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.DateTime; + return proto.google.type.DateTime.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.DateTime} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.DateTime} + */ +proto.google.type.DateTime.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setYear(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMonth(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDay(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHours(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinutes(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setSeconds(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNanos(value); + break; + case 8: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setUtcOffset(value); + break; + case 9: + var value = new proto.google.type.TimeZone; + reader.readMessage(value,proto.google.type.TimeZone.deserializeBinaryFromReader); + msg.setTimeZone(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.DateTime.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.DateTime.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.DateTime} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.DateTime.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getYear(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getMonth(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getDay(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getHours(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getMinutes(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getSeconds(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getNanos(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getUtcOffset(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getTimeZone(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.google.type.TimeZone.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 year = 1; + * @return {number} + */ +proto.google.type.DateTime.prototype.getYear = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.DateTime} returns this + */ +proto.google.type.DateTime.prototype.setYear = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 month = 2; + * @return {number} + */ +proto.google.type.DateTime.prototype.getMonth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.DateTime} returns this + */ +proto.google.type.DateTime.prototype.setMonth = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 day = 3; + * @return {number} + */ +proto.google.type.DateTime.prototype.getDay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.DateTime} returns this + */ +proto.google.type.DateTime.prototype.setDay = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 hours = 4; + * @return {number} + */ +proto.google.type.DateTime.prototype.getHours = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.DateTime} returns this + */ +proto.google.type.DateTime.prototype.setHours = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 minutes = 5; + * @return {number} + */ +proto.google.type.DateTime.prototype.getMinutes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.DateTime} returns this + */ +proto.google.type.DateTime.prototype.setMinutes = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 seconds = 6; + * @return {number} + */ +proto.google.type.DateTime.prototype.getSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.DateTime} returns this + */ +proto.google.type.DateTime.prototype.setSeconds = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int32 nanos = 7; + * @return {number} + */ +proto.google.type.DateTime.prototype.getNanos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.DateTime} returns this + */ +proto.google.type.DateTime.prototype.setNanos = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional google.protobuf.Duration utc_offset = 8; + * @return {?proto.google.protobuf.Duration} + */ +proto.google.type.DateTime.prototype.getUtcOffset = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.google.type.DateTime} returns this +*/ +proto.google.type.DateTime.prototype.setUtcOffset = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.type.DateTime.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.type.DateTime} returns this + */ +proto.google.type.DateTime.prototype.clearUtcOffset = function() { + return this.setUtcOffset(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.type.DateTime.prototype.hasUtcOffset = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional TimeZone time_zone = 9; + * @return {?proto.google.type.TimeZone} + */ +proto.google.type.DateTime.prototype.getTimeZone = function() { + return /** @type{?proto.google.type.TimeZone} */ ( + jspb.Message.getWrapperField(this, proto.google.type.TimeZone, 9)); +}; + + +/** + * @param {?proto.google.type.TimeZone|undefined} value + * @return {!proto.google.type.DateTime} returns this +*/ +proto.google.type.DateTime.prototype.setTimeZone = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.google.type.DateTime.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.type.DateTime} returns this + */ +proto.google.type.DateTime.prototype.clearTimeZone = function() { + return this.setTimeZone(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.type.DateTime.prototype.hasTimeZone = function() { + return jspb.Message.getField(this, 9) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.TimeZone.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.TimeZone.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.TimeZone} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.TimeZone.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.TimeZone} + */ +proto.google.type.TimeZone.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.TimeZone; + return proto.google.type.TimeZone.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.TimeZone} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.TimeZone} + */ +proto.google.type.TimeZone.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.TimeZone.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.TimeZone.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.TimeZone} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.TimeZone.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.google.type.TimeZone.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.TimeZone} returns this + */ +proto.google.type.TimeZone.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.google.type.TimeZone.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.TimeZone} returns this + */ +proto.google.type.TimeZone.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/datetime_pb_service.d.ts b/gen/js/google/type/datetime_pb_service.d.ts new file mode 100644 index 000000000..00b722c75 --- /dev/null +++ b/gen/js/google/type/datetime_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/datetime.proto + diff --git a/gen/js/google/type/datetime_pb_service.js b/gen/js/google/type/datetime_pb_service.js new file mode 100644 index 000000000..00b722c75 --- /dev/null +++ b/gen/js/google/type/datetime_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/datetime.proto + diff --git a/gen/js/google/type/dayofweek_pb.d.ts b/gen/js/google/type/dayofweek_pb.d.ts new file mode 100644 index 000000000..ff55bd4ae --- /dev/null +++ b/gen/js/google/type/dayofweek_pb.d.ts @@ -0,0 +1,18 @@ +// package: google.type +// file: google/type/dayofweek.proto + +import * as jspb from "google-protobuf"; + +export interface DayOfWeekMap { + DAY_OF_WEEK_UNSPECIFIED: 0; + MONDAY: 1; + TUESDAY: 2; + WEDNESDAY: 3; + THURSDAY: 4; + FRIDAY: 5; + SATURDAY: 6; + SUNDAY: 7; +} + +export const DayOfWeek: DayOfWeekMap; + diff --git a/gen/js/google/type/dayofweek_pb.js b/gen/js/google/type/dayofweek_pb.js new file mode 100644 index 000000000..af5f4bb80 --- /dev/null +++ b/gen/js/google/type/dayofweek_pb.js @@ -0,0 +1,33 @@ +// source: google/type/dayofweek.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.DayOfWeek', null, global); +/** + * @enum {number} + */ +proto.google.type.DayOfWeek = { + DAY_OF_WEEK_UNSPECIFIED: 0, + MONDAY: 1, + TUESDAY: 2, + WEDNESDAY: 3, + THURSDAY: 4, + FRIDAY: 5, + SATURDAY: 6, + SUNDAY: 7 +}; + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/dayofweek_pb_service.d.ts b/gen/js/google/type/dayofweek_pb_service.d.ts new file mode 100644 index 000000000..80b560fd3 --- /dev/null +++ b/gen/js/google/type/dayofweek_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/dayofweek.proto + diff --git a/gen/js/google/type/dayofweek_pb_service.js b/gen/js/google/type/dayofweek_pb_service.js new file mode 100644 index 000000000..80b560fd3 --- /dev/null +++ b/gen/js/google/type/dayofweek_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/dayofweek.proto + diff --git a/gen/js/google/type/decimal_pb.d.ts b/gen/js/google/type/decimal_pb.d.ts new file mode 100644 index 000000000..97f21d80c --- /dev/null +++ b/gen/js/google/type/decimal_pb.d.ts @@ -0,0 +1,25 @@ +// package: google.type +// file: google/type/decimal.proto + +import * as jspb from "google-protobuf"; + +export class Decimal extends jspb.Message { + getValue(): string; + setValue(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Decimal.AsObject; + static toObject(includeInstance: boolean, msg: Decimal): Decimal.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Decimal, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Decimal; + static deserializeBinaryFromReader(message: Decimal, reader: jspb.BinaryReader): Decimal; +} + +export namespace Decimal { + export type AsObject = { + value: string, + } +} + diff --git a/gen/js/google/type/decimal_pb.js b/gen/js/google/type/decimal_pb.js new file mode 100644 index 000000000..42845d01c --- /dev/null +++ b/gen/js/google/type/decimal_pb.js @@ -0,0 +1,170 @@ +// source: google/type/decimal.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.Decimal', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.Decimal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.Decimal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.Decimal.displayName = 'proto.google.type.Decimal'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.Decimal.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.Decimal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.Decimal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Decimal.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.Decimal} + */ +proto.google.type.Decimal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.Decimal; + return proto.google.type.Decimal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.Decimal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.Decimal} + */ +proto.google.type.Decimal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.Decimal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.Decimal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.Decimal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Decimal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string value = 1; + * @return {string} + */ +proto.google.type.Decimal.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.Decimal} returns this + */ +proto.google.type.Decimal.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/decimal_pb_service.d.ts b/gen/js/google/type/decimal_pb_service.d.ts new file mode 100644 index 000000000..85ee5230b --- /dev/null +++ b/gen/js/google/type/decimal_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/decimal.proto + diff --git a/gen/js/google/type/decimal_pb_service.js b/gen/js/google/type/decimal_pb_service.js new file mode 100644 index 000000000..85ee5230b --- /dev/null +++ b/gen/js/google/type/decimal_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/decimal.proto + diff --git a/gen/js/google/type/expr_pb.d.ts b/gen/js/google/type/expr_pb.d.ts new file mode 100644 index 000000000..446b494c4 --- /dev/null +++ b/gen/js/google/type/expr_pb.d.ts @@ -0,0 +1,37 @@ +// package: google.type +// file: google/type/expr.proto + +import * as jspb from "google-protobuf"; + +export class Expr extends jspb.Message { + getExpression(): string; + setExpression(value: string): void; + + getTitle(): string; + setTitle(value: string): void; + + getDescription(): string; + setDescription(value: string): void; + + getLocation(): string; + setLocation(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Expr.AsObject; + static toObject(includeInstance: boolean, msg: Expr): Expr.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Expr, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Expr; + static deserializeBinaryFromReader(message: Expr, reader: jspb.BinaryReader): Expr; +} + +export namespace Expr { + export type AsObject = { + expression: string, + title: string, + description: string, + location: string, + } +} + diff --git a/gen/js/google/type/expr_pb.js b/gen/js/google/type/expr_pb.js new file mode 100644 index 000000000..9b3493c66 --- /dev/null +++ b/gen/js/google/type/expr_pb.js @@ -0,0 +1,260 @@ +// source: google/type/expr.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.Expr', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.Expr = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.Expr, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.Expr.displayName = 'proto.google.type.Expr'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.Expr.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.Expr.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.Expr} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Expr.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, ""), + title: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + location: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.Expr} + */ +proto.google.type.Expr.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.Expr; + return proto.google.type.Expr.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.Expr} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.Expr} + */ +proto.google.type.Expr.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setExpression(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTitle(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.Expr.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.Expr.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.Expr} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Expr.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLocation(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string expression = 1; + * @return {string} + */ +proto.google.type.Expr.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.Expr} returns this + */ +proto.google.type.Expr.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string title = 2; + * @return {string} + */ +proto.google.type.Expr.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.Expr} returns this + */ +proto.google.type.Expr.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.google.type.Expr.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.Expr} returns this + */ +proto.google.type.Expr.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string location = 4; + * @return {string} + */ +proto.google.type.Expr.prototype.getLocation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.Expr} returns this + */ +proto.google.type.Expr.prototype.setLocation = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/expr_pb_service.d.ts b/gen/js/google/type/expr_pb_service.d.ts new file mode 100644 index 000000000..2ec1f81a6 --- /dev/null +++ b/gen/js/google/type/expr_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/expr.proto + diff --git a/gen/js/google/type/expr_pb_service.js b/gen/js/google/type/expr_pb_service.js new file mode 100644 index 000000000..2ec1f81a6 --- /dev/null +++ b/gen/js/google/type/expr_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/expr.proto + diff --git a/gen/js/google/type/fraction_pb.d.ts b/gen/js/google/type/fraction_pb.d.ts new file mode 100644 index 000000000..7e5b8b719 --- /dev/null +++ b/gen/js/google/type/fraction_pb.d.ts @@ -0,0 +1,29 @@ +// package: google.type +// file: google/type/fraction.proto + +import * as jspb from "google-protobuf"; + +export class Fraction extends jspb.Message { + getNumerator(): number; + setNumerator(value: number): void; + + getDenominator(): number; + setDenominator(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Fraction.AsObject; + static toObject(includeInstance: boolean, msg: Fraction): Fraction.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Fraction, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Fraction; + static deserializeBinaryFromReader(message: Fraction, reader: jspb.BinaryReader): Fraction; +} + +export namespace Fraction { + export type AsObject = { + numerator: number, + denominator: number, + } +} + diff --git a/gen/js/google/type/fraction_pb.js b/gen/js/google/type/fraction_pb.js new file mode 100644 index 000000000..2043dfacb --- /dev/null +++ b/gen/js/google/type/fraction_pb.js @@ -0,0 +1,200 @@ +// source: google/type/fraction.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.Fraction', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.Fraction = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.Fraction, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.Fraction.displayName = 'proto.google.type.Fraction'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.Fraction.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.Fraction.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.Fraction} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Fraction.toObject = function(includeInstance, msg) { + var f, obj = { + numerator: jspb.Message.getFieldWithDefault(msg, 1, 0), + denominator: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.Fraction} + */ +proto.google.type.Fraction.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.Fraction; + return proto.google.type.Fraction.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.Fraction} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.Fraction} + */ +proto.google.type.Fraction.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNumerator(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDenominator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.Fraction.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.Fraction.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.Fraction} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Fraction.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNumerator(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getDenominator(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 numerator = 1; + * @return {number} + */ +proto.google.type.Fraction.prototype.getNumerator = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Fraction} returns this + */ +proto.google.type.Fraction.prototype.setNumerator = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 denominator = 2; + * @return {number} + */ +proto.google.type.Fraction.prototype.getDenominator = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Fraction} returns this + */ +proto.google.type.Fraction.prototype.setDenominator = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/fraction_pb_service.d.ts b/gen/js/google/type/fraction_pb_service.d.ts new file mode 100644 index 000000000..395320a57 --- /dev/null +++ b/gen/js/google/type/fraction_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/fraction.proto + diff --git a/gen/js/google/type/fraction_pb_service.js b/gen/js/google/type/fraction_pb_service.js new file mode 100644 index 000000000..395320a57 --- /dev/null +++ b/gen/js/google/type/fraction_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/fraction.proto + diff --git a/gen/js/google/type/interval_pb.d.ts b/gen/js/google/type/interval_pb.d.ts new file mode 100644 index 000000000..5558f599b --- /dev/null +++ b/gen/js/google/type/interval_pb.d.ts @@ -0,0 +1,34 @@ +// package: google.type +// file: google/type/interval.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class Interval extends jspb.Message { + hasStartTime(): boolean; + clearStartTime(): void; + getStartTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setStartTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + hasEndTime(): boolean; + clearEndTime(): void; + getEndTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setEndTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Interval.AsObject; + static toObject(includeInstance: boolean, msg: Interval): Interval.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Interval, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Interval; + static deserializeBinaryFromReader(message: Interval, reader: jspb.BinaryReader): Interval; +} + +export namespace Interval { + export type AsObject = { + startTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + endTime?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + diff --git a/gen/js/google/type/interval_pb.js b/gen/js/google/type/interval_pb.js new file mode 100644 index 000000000..6903c1de4 --- /dev/null +++ b/gen/js/google/type/interval_pb.js @@ -0,0 +1,244 @@ +// source: google/type/interval.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.google.type.Interval', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.Interval = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.Interval, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.Interval.displayName = 'proto.google.type.Interval'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.Interval.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.Interval.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.Interval} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Interval.toObject = function(includeInstance, msg) { + var f, obj = { + startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.Interval} + */ +proto.google.type.Interval.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.Interval; + return proto.google.type.Interval.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.Interval} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.Interval} + */ +proto.google.type.Interval.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStartTime(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setEndTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.Interval.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.Interval.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.Interval} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Interval.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEndTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp start_time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.google.type.Interval.prototype.getStartTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.google.type.Interval} returns this +*/ +proto.google.type.Interval.prototype.setStartTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.type.Interval} returns this + */ +proto.google.type.Interval.prototype.clearStartTime = function() { + return this.setStartTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.type.Interval.prototype.hasStartTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp end_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.google.type.Interval.prototype.getEndTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.google.type.Interval} returns this +*/ +proto.google.type.Interval.prototype.setEndTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.type.Interval} returns this + */ +proto.google.type.Interval.prototype.clearEndTime = function() { + return this.setEndTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.type.Interval.prototype.hasEndTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/interval_pb_service.d.ts b/gen/js/google/type/interval_pb_service.d.ts new file mode 100644 index 000000000..eaca2ab6a --- /dev/null +++ b/gen/js/google/type/interval_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/interval.proto + diff --git a/gen/js/google/type/interval_pb_service.js b/gen/js/google/type/interval_pb_service.js new file mode 100644 index 000000000..eaca2ab6a --- /dev/null +++ b/gen/js/google/type/interval_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/interval.proto + diff --git a/gen/js/google/type/latlng_pb.d.ts b/gen/js/google/type/latlng_pb.d.ts new file mode 100644 index 000000000..5e4c766b8 --- /dev/null +++ b/gen/js/google/type/latlng_pb.d.ts @@ -0,0 +1,29 @@ +// package: google.type +// file: google/type/latlng.proto + +import * as jspb from "google-protobuf"; + +export class LatLng extends jspb.Message { + getLatitude(): number; + setLatitude(value: number): void; + + getLongitude(): number; + setLongitude(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LatLng.AsObject; + static toObject(includeInstance: boolean, msg: LatLng): LatLng.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LatLng, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LatLng; + static deserializeBinaryFromReader(message: LatLng, reader: jspb.BinaryReader): LatLng; +} + +export namespace LatLng { + export type AsObject = { + latitude: number, + longitude: number, + } +} + diff --git a/gen/js/google/type/latlng_pb.js b/gen/js/google/type/latlng_pb.js new file mode 100644 index 000000000..c2810dd4f --- /dev/null +++ b/gen/js/google/type/latlng_pb.js @@ -0,0 +1,200 @@ +// source: google/type/latlng.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.LatLng', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.LatLng = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.LatLng, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.LatLng.displayName = 'proto.google.type.LatLng'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.LatLng.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.LatLng.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.LatLng} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.LatLng.toObject = function(includeInstance, msg) { + var f, obj = { + latitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + longitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.LatLng} + */ +proto.google.type.LatLng.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.LatLng; + return proto.google.type.LatLng.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.LatLng} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.LatLng} + */ +proto.google.type.LatLng.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLatitude(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLongitude(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.LatLng.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.LatLng.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.LatLng} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.LatLng.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLatitude(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getLongitude(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } +}; + + +/** + * optional double latitude = 1; + * @return {number} + */ +proto.google.type.LatLng.prototype.getLatitude = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.LatLng} returns this + */ +proto.google.type.LatLng.prototype.setLatitude = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double longitude = 2; + * @return {number} + */ +proto.google.type.LatLng.prototype.getLongitude = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.LatLng} returns this + */ +proto.google.type.LatLng.prototype.setLongitude = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/latlng_pb_service.d.ts b/gen/js/google/type/latlng_pb_service.d.ts new file mode 100644 index 000000000..ecf767306 --- /dev/null +++ b/gen/js/google/type/latlng_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/latlng.proto + diff --git a/gen/js/google/type/latlng_pb_service.js b/gen/js/google/type/latlng_pb_service.js new file mode 100644 index 000000000..ecf767306 --- /dev/null +++ b/gen/js/google/type/latlng_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/latlng.proto + diff --git a/gen/js/google/type/localized_text_pb.d.ts b/gen/js/google/type/localized_text_pb.d.ts new file mode 100644 index 000000000..bb5ec9675 --- /dev/null +++ b/gen/js/google/type/localized_text_pb.d.ts @@ -0,0 +1,29 @@ +// package: google.type +// file: google/type/localized_text.proto + +import * as jspb from "google-protobuf"; + +export class LocalizedText extends jspb.Message { + getText(): string; + setText(value: string): void; + + getLanguageCode(): string; + setLanguageCode(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LocalizedText.AsObject; + static toObject(includeInstance: boolean, msg: LocalizedText): LocalizedText.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LocalizedText, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LocalizedText; + static deserializeBinaryFromReader(message: LocalizedText, reader: jspb.BinaryReader): LocalizedText; +} + +export namespace LocalizedText { + export type AsObject = { + text: string, + languageCode: string, + } +} + diff --git a/gen/js/google/type/localized_text_pb.js b/gen/js/google/type/localized_text_pb.js new file mode 100644 index 000000000..09be9248b --- /dev/null +++ b/gen/js/google/type/localized_text_pb.js @@ -0,0 +1,200 @@ +// source: google/type/localized_text.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.LocalizedText', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.LocalizedText = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.LocalizedText, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.LocalizedText.displayName = 'proto.google.type.LocalizedText'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.LocalizedText.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.LocalizedText.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.LocalizedText} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.LocalizedText.toObject = function(includeInstance, msg) { + var f, obj = { + text: jspb.Message.getFieldWithDefault(msg, 1, ""), + languageCode: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.LocalizedText} + */ +proto.google.type.LocalizedText.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.LocalizedText; + return proto.google.type.LocalizedText.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.LocalizedText} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.LocalizedText} + */ +proto.google.type.LocalizedText.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setText(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLanguageCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.LocalizedText.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.LocalizedText.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.LocalizedText} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.LocalizedText.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getText(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLanguageCode(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string text = 1; + * @return {string} + */ +proto.google.type.LocalizedText.prototype.getText = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.LocalizedText} returns this + */ +proto.google.type.LocalizedText.prototype.setText = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string language_code = 2; + * @return {string} + */ +proto.google.type.LocalizedText.prototype.getLanguageCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.LocalizedText} returns this + */ +proto.google.type.LocalizedText.prototype.setLanguageCode = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/localized_text_pb_service.d.ts b/gen/js/google/type/localized_text_pb_service.d.ts new file mode 100644 index 000000000..9dbec680e --- /dev/null +++ b/gen/js/google/type/localized_text_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/localized_text.proto + diff --git a/gen/js/google/type/localized_text_pb_service.js b/gen/js/google/type/localized_text_pb_service.js new file mode 100644 index 000000000..9dbec680e --- /dev/null +++ b/gen/js/google/type/localized_text_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/localized_text.proto + diff --git a/gen/js/google/type/money_pb.d.ts b/gen/js/google/type/money_pb.d.ts new file mode 100644 index 000000000..57e073851 --- /dev/null +++ b/gen/js/google/type/money_pb.d.ts @@ -0,0 +1,33 @@ +// package: google.type +// file: google/type/money.proto + +import * as jspb from "google-protobuf"; + +export class Money extends jspb.Message { + getCurrencyCode(): string; + setCurrencyCode(value: string): void; + + getUnits(): number; + setUnits(value: number): void; + + getNanos(): number; + setNanos(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Money.AsObject; + static toObject(includeInstance: boolean, msg: Money): Money.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Money, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Money; + static deserializeBinaryFromReader(message: Money, reader: jspb.BinaryReader): Money; +} + +export namespace Money { + export type AsObject = { + currencyCode: string, + units: number, + nanos: number, + } +} + diff --git a/gen/js/google/type/money_pb.js b/gen/js/google/type/money_pb.js new file mode 100644 index 000000000..b86d055eb --- /dev/null +++ b/gen/js/google/type/money_pb.js @@ -0,0 +1,230 @@ +// source: google/type/money.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.Money', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.Money = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.Money, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.Money.displayName = 'proto.google.type.Money'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.Money.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.Money.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.Money} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Money.toObject = function(includeInstance, msg) { + var f, obj = { + currencyCode: jspb.Message.getFieldWithDefault(msg, 1, ""), + units: jspb.Message.getFieldWithDefault(msg, 2, 0), + nanos: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.Money} + */ +proto.google.type.Money.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.Money; + return proto.google.type.Money.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.Money} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.Money} + */ +proto.google.type.Money.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCurrencyCode(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnits(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNanos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.Money.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.Money.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.Money} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Money.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCurrencyCode(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUnits(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getNanos(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } +}; + + +/** + * optional string currency_code = 1; + * @return {string} + */ +proto.google.type.Money.prototype.getCurrencyCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.Money} returns this + */ +proto.google.type.Money.prototype.setCurrencyCode = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 units = 2; + * @return {number} + */ +proto.google.type.Money.prototype.getUnits = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Money} returns this + */ +proto.google.type.Money.prototype.setUnits = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 nanos = 3; + * @return {number} + */ +proto.google.type.Money.prototype.getNanos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Money} returns this + */ +proto.google.type.Money.prototype.setNanos = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/money_pb_service.d.ts b/gen/js/google/type/money_pb_service.d.ts new file mode 100644 index 000000000..de5f8fa9d --- /dev/null +++ b/gen/js/google/type/money_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/money.proto + diff --git a/gen/js/google/type/money_pb_service.js b/gen/js/google/type/money_pb_service.js new file mode 100644 index 000000000..de5f8fa9d --- /dev/null +++ b/gen/js/google/type/money_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/money.proto + diff --git a/gen/js/google/type/month_pb.d.ts b/gen/js/google/type/month_pb.d.ts new file mode 100644 index 000000000..62a776edd --- /dev/null +++ b/gen/js/google/type/month_pb.d.ts @@ -0,0 +1,23 @@ +// package: google.type +// file: google/type/month.proto + +import * as jspb from "google-protobuf"; + +export interface MonthMap { + MONTH_UNSPECIFIED: 0; + JANUARY: 1; + FEBRUARY: 2; + MARCH: 3; + APRIL: 4; + MAY: 5; + JUNE: 6; + JULY: 7; + AUGUST: 8; + SEPTEMBER: 9; + OCTOBER: 10; + NOVEMBER: 11; + DECEMBER: 12; +} + +export const Month: MonthMap; + diff --git a/gen/js/google/type/month_pb.js b/gen/js/google/type/month_pb.js new file mode 100644 index 000000000..4b8b91675 --- /dev/null +++ b/gen/js/google/type/month_pb.js @@ -0,0 +1,38 @@ +// source: google/type/month.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.Month', null, global); +/** + * @enum {number} + */ +proto.google.type.Month = { + MONTH_UNSPECIFIED: 0, + JANUARY: 1, + FEBRUARY: 2, + MARCH: 3, + APRIL: 4, + MAY: 5, + JUNE: 6, + JULY: 7, + AUGUST: 8, + SEPTEMBER: 9, + OCTOBER: 10, + NOVEMBER: 11, + DECEMBER: 12 +}; + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/month_pb_service.d.ts b/gen/js/google/type/month_pb_service.d.ts new file mode 100644 index 000000000..3c95f8628 --- /dev/null +++ b/gen/js/google/type/month_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/month.proto + diff --git a/gen/js/google/type/month_pb_service.js b/gen/js/google/type/month_pb_service.js new file mode 100644 index 000000000..3c95f8628 --- /dev/null +++ b/gen/js/google/type/month_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/month.proto + diff --git a/gen/js/google/type/phone_number_pb.d.ts b/gen/js/google/type/phone_number_pb.d.ts new file mode 100644 index 000000000..5769885a3 --- /dev/null +++ b/gen/js/google/type/phone_number_pb.d.ts @@ -0,0 +1,68 @@ +// package: google.type +// file: google/type/phone_number.proto + +import * as jspb from "google-protobuf"; + +export class PhoneNumber extends jspb.Message { + hasE164Number(): boolean; + clearE164Number(): void; + getE164Number(): string; + setE164Number(value: string): void; + + hasShortCode(): boolean; + clearShortCode(): void; + getShortCode(): PhoneNumber.ShortCode | undefined; + setShortCode(value?: PhoneNumber.ShortCode): void; + + getExtension$(): string; + setExtension$(value: string): void; + + getKindCase(): PhoneNumber.KindCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PhoneNumber.AsObject; + static toObject(includeInstance: boolean, msg: PhoneNumber): PhoneNumber.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PhoneNumber, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PhoneNumber; + static deserializeBinaryFromReader(message: PhoneNumber, reader: jspb.BinaryReader): PhoneNumber; +} + +export namespace PhoneNumber { + export type AsObject = { + e164Number: string, + shortCode?: PhoneNumber.ShortCode.AsObject, + extension: string, + } + + export class ShortCode extends jspb.Message { + getRegionCode(): string; + setRegionCode(value: string): void; + + getNumber(): string; + setNumber(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ShortCode.AsObject; + static toObject(includeInstance: boolean, msg: ShortCode): ShortCode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ShortCode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ShortCode; + static deserializeBinaryFromReader(message: ShortCode, reader: jspb.BinaryReader): ShortCode; + } + + export namespace ShortCode { + export type AsObject = { + regionCode: string, + number: string, + } + } + + export enum KindCase { + KIND_NOT_SET = 0, + E164_NUMBER = 1, + SHORT_CODE = 2, + } +} + diff --git a/gen/js/google/type/phone_number_pb.js b/gen/js/google/type/phone_number_pb.js new file mode 100644 index 000000000..e02aeedcd --- /dev/null +++ b/gen/js/google/type/phone_number_pb.js @@ -0,0 +1,478 @@ +// source: google/type/phone_number.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.PhoneNumber', null, global); +goog.exportSymbol('proto.google.type.PhoneNumber.KindCase', null, global); +goog.exportSymbol('proto.google.type.PhoneNumber.ShortCode', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.PhoneNumber = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.type.PhoneNumber.oneofGroups_); +}; +goog.inherits(proto.google.type.PhoneNumber, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.PhoneNumber.displayName = 'proto.google.type.PhoneNumber'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.PhoneNumber.ShortCode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.PhoneNumber.ShortCode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.PhoneNumber.ShortCode.displayName = 'proto.google.type.PhoneNumber.ShortCode'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.type.PhoneNumber.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.google.type.PhoneNumber.KindCase = { + KIND_NOT_SET: 0, + E164_NUMBER: 1, + SHORT_CODE: 2 +}; + +/** + * @return {proto.google.type.PhoneNumber.KindCase} + */ +proto.google.type.PhoneNumber.prototype.getKindCase = function() { + return /** @type {proto.google.type.PhoneNumber.KindCase} */(jspb.Message.computeOneofCase(this, proto.google.type.PhoneNumber.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.PhoneNumber.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.PhoneNumber.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.PhoneNumber} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.PhoneNumber.toObject = function(includeInstance, msg) { + var f, obj = { + e164Number: jspb.Message.getFieldWithDefault(msg, 1, ""), + shortCode: (f = msg.getShortCode()) && proto.google.type.PhoneNumber.ShortCode.toObject(includeInstance, f), + extension: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.PhoneNumber} + */ +proto.google.type.PhoneNumber.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.PhoneNumber; + return proto.google.type.PhoneNumber.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.PhoneNumber} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.PhoneNumber} + */ +proto.google.type.PhoneNumber.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setE164Number(value); + break; + case 2: + var value = new proto.google.type.PhoneNumber.ShortCode; + reader.readMessage(value,proto.google.type.PhoneNumber.ShortCode.deserializeBinaryFromReader); + msg.setShortCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setExtension$(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.PhoneNumber.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.PhoneNumber.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.PhoneNumber} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.PhoneNumber.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getShortCode(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.type.PhoneNumber.ShortCode.serializeBinaryToWriter + ); + } + f = message.getExtension$(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.PhoneNumber.ShortCode.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.PhoneNumber.ShortCode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.PhoneNumber.ShortCode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.PhoneNumber.ShortCode.toObject = function(includeInstance, msg) { + var f, obj = { + regionCode: jspb.Message.getFieldWithDefault(msg, 1, ""), + number: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.PhoneNumber.ShortCode} + */ +proto.google.type.PhoneNumber.ShortCode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.PhoneNumber.ShortCode; + return proto.google.type.PhoneNumber.ShortCode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.PhoneNumber.ShortCode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.PhoneNumber.ShortCode} + */ +proto.google.type.PhoneNumber.ShortCode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setRegionCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.PhoneNumber.ShortCode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.PhoneNumber.ShortCode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.PhoneNumber.ShortCode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.PhoneNumber.ShortCode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRegionCode(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNumber(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string region_code = 1; + * @return {string} + */ +proto.google.type.PhoneNumber.ShortCode.prototype.getRegionCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PhoneNumber.ShortCode} returns this + */ +proto.google.type.PhoneNumber.ShortCode.prototype.setRegionCode = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string number = 2; + * @return {string} + */ +proto.google.type.PhoneNumber.ShortCode.prototype.getNumber = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PhoneNumber.ShortCode} returns this + */ +proto.google.type.PhoneNumber.ShortCode.prototype.setNumber = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string e164_number = 1; + * @return {string} + */ +proto.google.type.PhoneNumber.prototype.getE164Number = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PhoneNumber} returns this + */ +proto.google.type.PhoneNumber.prototype.setE164Number = function(value) { + return jspb.Message.setOneofField(this, 1, proto.google.type.PhoneNumber.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.type.PhoneNumber} returns this + */ +proto.google.type.PhoneNumber.prototype.clearE164Number = function() { + return jspb.Message.setOneofField(this, 1, proto.google.type.PhoneNumber.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.type.PhoneNumber.prototype.hasE164Number = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ShortCode short_code = 2; + * @return {?proto.google.type.PhoneNumber.ShortCode} + */ +proto.google.type.PhoneNumber.prototype.getShortCode = function() { + return /** @type{?proto.google.type.PhoneNumber.ShortCode} */ ( + jspb.Message.getWrapperField(this, proto.google.type.PhoneNumber.ShortCode, 2)); +}; + + +/** + * @param {?proto.google.type.PhoneNumber.ShortCode|undefined} value + * @return {!proto.google.type.PhoneNumber} returns this +*/ +proto.google.type.PhoneNumber.prototype.setShortCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.google.type.PhoneNumber.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.type.PhoneNumber} returns this + */ +proto.google.type.PhoneNumber.prototype.clearShortCode = function() { + return this.setShortCode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.type.PhoneNumber.prototype.hasShortCode = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string extension = 3; + * @return {string} + */ +proto.google.type.PhoneNumber.prototype.getExtension$ = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PhoneNumber} returns this + */ +proto.google.type.PhoneNumber.prototype.setExtension$ = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/phone_number_pb_service.d.ts b/gen/js/google/type/phone_number_pb_service.d.ts new file mode 100644 index 000000000..541e1664d --- /dev/null +++ b/gen/js/google/type/phone_number_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/phone_number.proto + diff --git a/gen/js/google/type/phone_number_pb_service.js b/gen/js/google/type/phone_number_pb_service.js new file mode 100644 index 000000000..541e1664d --- /dev/null +++ b/gen/js/google/type/phone_number_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/phone_number.proto + diff --git a/gen/js/google/type/postal_address_pb.d.ts b/gen/js/google/type/postal_address_pb.d.ts new file mode 100644 index 000000000..24a14a1fe --- /dev/null +++ b/gen/js/google/type/postal_address_pb.d.ts @@ -0,0 +1,69 @@ +// package: google.type +// file: google/type/postal_address.proto + +import * as jspb from "google-protobuf"; + +export class PostalAddress extends jspb.Message { + getRevision(): number; + setRevision(value: number): void; + + getRegionCode(): string; + setRegionCode(value: string): void; + + getLanguageCode(): string; + setLanguageCode(value: string): void; + + getPostalCode(): string; + setPostalCode(value: string): void; + + getSortingCode(): string; + setSortingCode(value: string): void; + + getAdministrativeArea(): string; + setAdministrativeArea(value: string): void; + + getLocality(): string; + setLocality(value: string): void; + + getSublocality(): string; + setSublocality(value: string): void; + + clearAddressLinesList(): void; + getAddressLinesList(): Array; + setAddressLinesList(value: Array): void; + addAddressLines(value: string, index?: number): string; + + clearRecipientsList(): void; + getRecipientsList(): Array; + setRecipientsList(value: Array): void; + addRecipients(value: string, index?: number): string; + + getOrganization(): string; + setOrganization(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PostalAddress.AsObject; + static toObject(includeInstance: boolean, msg: PostalAddress): PostalAddress.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PostalAddress, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PostalAddress; + static deserializeBinaryFromReader(message: PostalAddress, reader: jspb.BinaryReader): PostalAddress; +} + +export namespace PostalAddress { + export type AsObject = { + revision: number, + regionCode: string, + languageCode: string, + postalCode: string, + sortingCode: string, + administrativeArea: string, + locality: string, + sublocality: string, + addressLinesList: Array, + recipientsList: Array, + organization: string, + } +} + diff --git a/gen/js/google/type/postal_address_pb.js b/gen/js/google/type/postal_address_pb.js new file mode 100644 index 000000000..80d766884 --- /dev/null +++ b/gen/js/google/type/postal_address_pb.js @@ -0,0 +1,515 @@ +// source: google/type/postal_address.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.PostalAddress', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.PostalAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.type.PostalAddress.repeatedFields_, null); +}; +goog.inherits(proto.google.type.PostalAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.PostalAddress.displayName = 'proto.google.type.PostalAddress'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.type.PostalAddress.repeatedFields_ = [9,10]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.PostalAddress.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.PostalAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.PostalAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.PostalAddress.toObject = function(includeInstance, msg) { + var f, obj = { + revision: jspb.Message.getFieldWithDefault(msg, 1, 0), + regionCode: jspb.Message.getFieldWithDefault(msg, 2, ""), + languageCode: jspb.Message.getFieldWithDefault(msg, 3, ""), + postalCode: jspb.Message.getFieldWithDefault(msg, 4, ""), + sortingCode: jspb.Message.getFieldWithDefault(msg, 5, ""), + administrativeArea: jspb.Message.getFieldWithDefault(msg, 6, ""), + locality: jspb.Message.getFieldWithDefault(msg, 7, ""), + sublocality: jspb.Message.getFieldWithDefault(msg, 8, ""), + addressLinesList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, + recipientsList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + organization: jspb.Message.getFieldWithDefault(msg, 11, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.PostalAddress} + */ +proto.google.type.PostalAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.PostalAddress; + return proto.google.type.PostalAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.PostalAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.PostalAddress} + */ +proto.google.type.PostalAddress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRevision(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRegionCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLanguageCode(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPostalCode(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSortingCode(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setAdministrativeArea(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setLocality(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setSublocality(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.addAddressLines(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addRecipients(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setOrganization(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.PostalAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.PostalAddress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.PostalAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.PostalAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRevision(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getRegionCode(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLanguageCode(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPostalCode(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSortingCode(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getAdministrativeArea(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getLocality(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getSublocality(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getAddressLinesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 9, + f + ); + } + f = message.getRecipientsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } + f = message.getOrganization(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } +}; + + +/** + * optional int32 revision = 1; + * @return {number} + */ +proto.google.type.PostalAddress.prototype.getRevision = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setRevision = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string region_code = 2; + * @return {string} + */ +proto.google.type.PostalAddress.prototype.getRegionCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setRegionCode = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string language_code = 3; + * @return {string} + */ +proto.google.type.PostalAddress.prototype.getLanguageCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setLanguageCode = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string postal_code = 4; + * @return {string} + */ +proto.google.type.PostalAddress.prototype.getPostalCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setPostalCode = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string sorting_code = 5; + * @return {string} + */ +proto.google.type.PostalAddress.prototype.getSortingCode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setSortingCode = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string administrative_area = 6; + * @return {string} + */ +proto.google.type.PostalAddress.prototype.getAdministrativeArea = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setAdministrativeArea = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string locality = 7; + * @return {string} + */ +proto.google.type.PostalAddress.prototype.getLocality = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setLocality = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string sublocality = 8; + * @return {string} + */ +proto.google.type.PostalAddress.prototype.getSublocality = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setSublocality = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * repeated string address_lines = 9; + * @return {!Array} + */ +proto.google.type.PostalAddress.prototype.getAddressLinesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setAddressLinesList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.addAddressLines = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.clearAddressLinesList = function() { + return this.setAddressLinesList([]); +}; + + +/** + * repeated string recipients = 10; + * @return {!Array} + */ +proto.google.type.PostalAddress.prototype.getRecipientsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setRecipientsList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.addRecipients = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.clearRecipientsList = function() { + return this.setRecipientsList([]); +}; + + +/** + * optional string organization = 11; + * @return {string} + */ +proto.google.type.PostalAddress.prototype.getOrganization = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.type.PostalAddress} returns this + */ +proto.google.type.PostalAddress.prototype.setOrganization = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/postal_address_pb_service.d.ts b/gen/js/google/type/postal_address_pb_service.d.ts new file mode 100644 index 000000000..541fefedf --- /dev/null +++ b/gen/js/google/type/postal_address_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/postal_address.proto + diff --git a/gen/js/google/type/postal_address_pb_service.js b/gen/js/google/type/postal_address_pb_service.js new file mode 100644 index 000000000..541fefedf --- /dev/null +++ b/gen/js/google/type/postal_address_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/postal_address.proto + diff --git a/gen/js/google/type/quaternion_pb.d.ts b/gen/js/google/type/quaternion_pb.d.ts new file mode 100644 index 000000000..e2504660c --- /dev/null +++ b/gen/js/google/type/quaternion_pb.d.ts @@ -0,0 +1,37 @@ +// package: google.type +// file: google/type/quaternion.proto + +import * as jspb from "google-protobuf"; + +export class Quaternion extends jspb.Message { + getX(): number; + setX(value: number): void; + + getY(): number; + setY(value: number): void; + + getZ(): number; + setZ(value: number): void; + + getW(): number; + setW(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Quaternion.AsObject; + static toObject(includeInstance: boolean, msg: Quaternion): Quaternion.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Quaternion, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Quaternion; + static deserializeBinaryFromReader(message: Quaternion, reader: jspb.BinaryReader): Quaternion; +} + +export namespace Quaternion { + export type AsObject = { + x: number, + y: number, + z: number, + w: number, + } +} + diff --git a/gen/js/google/type/quaternion_pb.js b/gen/js/google/type/quaternion_pb.js new file mode 100644 index 000000000..4b9344bc1 --- /dev/null +++ b/gen/js/google/type/quaternion_pb.js @@ -0,0 +1,260 @@ +// source: google/type/quaternion.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.Quaternion', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.Quaternion = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.Quaternion, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.Quaternion.displayName = 'proto.google.type.Quaternion'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.Quaternion.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.Quaternion.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.Quaternion} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Quaternion.toObject = function(includeInstance, msg) { + var f, obj = { + x: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0), + y: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), + z: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), + w: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.Quaternion} + */ +proto.google.type.Quaternion.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.Quaternion; + return proto.google.type.Quaternion.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.Quaternion} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.Quaternion} + */ +proto.google.type.Quaternion.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setX(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setY(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setZ(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setW(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.Quaternion.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.Quaternion.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.Quaternion} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.Quaternion.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getX(); + if (f !== 0.0) { + writer.writeDouble( + 1, + f + ); + } + f = message.getY(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } + f = message.getZ(); + if (f !== 0.0) { + writer.writeDouble( + 3, + f + ); + } + f = message.getW(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } +}; + + +/** + * optional double x = 1; + * @return {number} + */ +proto.google.type.Quaternion.prototype.getX = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Quaternion} returns this + */ +proto.google.type.Quaternion.prototype.setX = function(value) { + return jspb.Message.setProto3FloatField(this, 1, value); +}; + + +/** + * optional double y = 2; + * @return {number} + */ +proto.google.type.Quaternion.prototype.getY = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Quaternion} returns this + */ +proto.google.type.Quaternion.prototype.setY = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + +/** + * optional double z = 3; + * @return {number} + */ +proto.google.type.Quaternion.prototype.getZ = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Quaternion} returns this + */ +proto.google.type.Quaternion.prototype.setZ = function(value) { + return jspb.Message.setProto3FloatField(this, 3, value); +}; + + +/** + * optional double w = 4; + * @return {number} + */ +proto.google.type.Quaternion.prototype.getW = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.Quaternion} returns this + */ +proto.google.type.Quaternion.prototype.setW = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/quaternion_pb_service.d.ts b/gen/js/google/type/quaternion_pb_service.d.ts new file mode 100644 index 000000000..fefbe6e0b --- /dev/null +++ b/gen/js/google/type/quaternion_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/quaternion.proto + diff --git a/gen/js/google/type/quaternion_pb_service.js b/gen/js/google/type/quaternion_pb_service.js new file mode 100644 index 000000000..fefbe6e0b --- /dev/null +++ b/gen/js/google/type/quaternion_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/quaternion.proto + diff --git a/gen/js/google/type/timeofday_pb.d.ts b/gen/js/google/type/timeofday_pb.d.ts new file mode 100644 index 000000000..c50ec9a07 --- /dev/null +++ b/gen/js/google/type/timeofday_pb.d.ts @@ -0,0 +1,37 @@ +// package: google.type +// file: google/type/timeofday.proto + +import * as jspb from "google-protobuf"; + +export class TimeOfDay extends jspb.Message { + getHours(): number; + setHours(value: number): void; + + getMinutes(): number; + setMinutes(value: number): void; + + getSeconds(): number; + setSeconds(value: number): void; + + getNanos(): number; + setNanos(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TimeOfDay.AsObject; + static toObject(includeInstance: boolean, msg: TimeOfDay): TimeOfDay.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TimeOfDay, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TimeOfDay; + static deserializeBinaryFromReader(message: TimeOfDay, reader: jspb.BinaryReader): TimeOfDay; +} + +export namespace TimeOfDay { + export type AsObject = { + hours: number, + minutes: number, + seconds: number, + nanos: number, + } +} + diff --git a/gen/js/google/type/timeofday_pb.js b/gen/js/google/type/timeofday_pb.js new file mode 100644 index 000000000..3f3d79260 --- /dev/null +++ b/gen/js/google/type/timeofday_pb.js @@ -0,0 +1,260 @@ +// source: google/type/timeofday.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.google.type.TimeOfDay', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.type.TimeOfDay = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.type.TimeOfDay, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.type.TimeOfDay.displayName = 'proto.google.type.TimeOfDay'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.type.TimeOfDay.prototype.toObject = function(opt_includeInstance) { + return proto.google.type.TimeOfDay.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.type.TimeOfDay} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.TimeOfDay.toObject = function(includeInstance, msg) { + var f, obj = { + hours: jspb.Message.getFieldWithDefault(msg, 1, 0), + minutes: jspb.Message.getFieldWithDefault(msg, 2, 0), + seconds: jspb.Message.getFieldWithDefault(msg, 3, 0), + nanos: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.type.TimeOfDay} + */ +proto.google.type.TimeOfDay.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.type.TimeOfDay; + return proto.google.type.TimeOfDay.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.type.TimeOfDay} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.type.TimeOfDay} + */ +proto.google.type.TimeOfDay.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHours(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMinutes(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setSeconds(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNanos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.type.TimeOfDay.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.type.TimeOfDay.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.type.TimeOfDay} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.type.TimeOfDay.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHours(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getMinutes(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getSeconds(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getNanos(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional int32 hours = 1; + * @return {number} + */ +proto.google.type.TimeOfDay.prototype.getHours = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.TimeOfDay} returns this + */ +proto.google.type.TimeOfDay.prototype.setHours = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 minutes = 2; + * @return {number} + */ +proto.google.type.TimeOfDay.prototype.getMinutes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.TimeOfDay} returns this + */ +proto.google.type.TimeOfDay.prototype.setMinutes = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 seconds = 3; + * @return {number} + */ +proto.google.type.TimeOfDay.prototype.getSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.TimeOfDay} returns this + */ +proto.google.type.TimeOfDay.prototype.setSeconds = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 nanos = 4; + * @return {number} + */ +proto.google.type.TimeOfDay.prototype.getNanos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.type.TimeOfDay} returns this + */ +proto.google.type.TimeOfDay.prototype.setNanos = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +goog.object.extend(exports, proto.google.type); diff --git a/gen/js/google/type/timeofday_pb_service.d.ts b/gen/js/google/type/timeofday_pb_service.d.ts new file mode 100644 index 000000000..dcd592c53 --- /dev/null +++ b/gen/js/google/type/timeofday_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/timeofday.proto + diff --git a/gen/js/google/type/timeofday_pb_service.js b/gen/js/google/type/timeofday_pb_service.js new file mode 100644 index 000000000..dcd592c53 --- /dev/null +++ b/gen/js/google/type/timeofday_pb_service.js @@ -0,0 +1,3 @@ +// package: google.type +// file: google/type/timeofday.proto + diff --git a/gen/js/package-lock.json b/gen/js/package-lock.json new file mode 100644 index 000000000..93a2e2e45 --- /dev/null +++ b/gen/js/package-lock.json @@ -0,0 +1,28 @@ +{ + "name": "@viamrobotics/api", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "@viamrobotics/api", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "google-protobuf": "^3.21.0" + } + }, + "node_modules/google-protobuf": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.0.tgz", + "integrity": "sha512-byR7MBTK4tZ5PZEb+u5ZTzpt4SfrTxv5682MjPlHN16XeqgZE2/8HOIWeiXe8JKnT9OVbtBGhbq8mtvkK8cd5g==" + } + }, + "dependencies": { + "google-protobuf": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.0.tgz", + "integrity": "sha512-byR7MBTK4tZ5PZEb+u5ZTzpt4SfrTxv5682MjPlHN16XeqgZE2/8HOIWeiXe8JKnT9OVbtBGhbq8mtvkK8cd5g==" + } + } +} diff --git a/gen/js/package.json b/gen/js/package.json new file mode 100644 index 000000000..94bbd794a --- /dev/null +++ b/gen/js/package.json @@ -0,0 +1,13 @@ +{ + "name": "@viamrobotics/api", + "version": "0.0.1", + "description": "", + "scripts": { + "test": "exit 0" + }, + "author": "Viam Robotics", + "license": "Apache-2.0", + "dependencies": { + "google-protobuf": "^3.21.0" + } +} diff --git a/gen/js/robot/v1/robot_grpc_web_pb.js b/gen/js/robot/v1/robot_grpc_web_pb.js new file mode 100644 index 000000000..2fcff9880 --- /dev/null +++ b/gen/js/robot/v1/robot_grpc_web_pb.js @@ -0,0 +1,752 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.robot.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.robot = {}; +proto.viam.robot.v1 = require('./robot_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.robot.v1.RobotServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.robot.v1.RobotServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.GetOperationsRequest, + * !proto.viam.robot.v1.GetOperationsResponse>} + */ +const methodDescriptor_RobotService_GetOperations = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/GetOperations', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.GetOperationsRequest, + proto.viam.robot.v1.GetOperationsResponse, + /** + * @param {!proto.viam.robot.v1.GetOperationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.GetOperationsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.GetOperationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.GetOperationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.getOperations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/GetOperations', + request, + metadata || {}, + methodDescriptor_RobotService_GetOperations, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.GetOperationsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.getOperations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/GetOperations', + request, + metadata || {}, + methodDescriptor_RobotService_GetOperations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.ResourceNamesRequest, + * !proto.viam.robot.v1.ResourceNamesResponse>} + */ +const methodDescriptor_RobotService_ResourceNames = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/ResourceNames', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.ResourceNamesRequest, + proto.viam.robot.v1.ResourceNamesResponse, + /** + * @param {!proto.viam.robot.v1.ResourceNamesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.ResourceNamesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.ResourceNamesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.ResourceNamesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.resourceNames = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/ResourceNames', + request, + metadata || {}, + methodDescriptor_RobotService_ResourceNames, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.ResourceNamesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.resourceNames = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/ResourceNames', + request, + metadata || {}, + methodDescriptor_RobotService_ResourceNames); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.ResourceRPCSubtypesRequest, + * !proto.viam.robot.v1.ResourceRPCSubtypesResponse>} + */ +const methodDescriptor_RobotService_ResourceRPCSubtypes = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/ResourceRPCSubtypes', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.ResourceRPCSubtypesRequest, + proto.viam.robot.v1.ResourceRPCSubtypesResponse, + /** + * @param {!proto.viam.robot.v1.ResourceRPCSubtypesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.ResourceRPCSubtypesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.ResourceRPCSubtypesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.ResourceRPCSubtypesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.resourceRPCSubtypes = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/ResourceRPCSubtypes', + request, + metadata || {}, + methodDescriptor_RobotService_ResourceRPCSubtypes, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.ResourceRPCSubtypesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.resourceRPCSubtypes = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/ResourceRPCSubtypes', + request, + metadata || {}, + methodDescriptor_RobotService_ResourceRPCSubtypes); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.CancelOperationRequest, + * !proto.viam.robot.v1.CancelOperationResponse>} + */ +const methodDescriptor_RobotService_CancelOperation = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/CancelOperation', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.CancelOperationRequest, + proto.viam.robot.v1.CancelOperationResponse, + /** + * @param {!proto.viam.robot.v1.CancelOperationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.CancelOperationResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.CancelOperationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.CancelOperationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.cancelOperation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/CancelOperation', + request, + metadata || {}, + methodDescriptor_RobotService_CancelOperation, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.CancelOperationRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.cancelOperation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/CancelOperation', + request, + metadata || {}, + methodDescriptor_RobotService_CancelOperation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.BlockForOperationRequest, + * !proto.viam.robot.v1.BlockForOperationResponse>} + */ +const methodDescriptor_RobotService_BlockForOperation = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/BlockForOperation', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.BlockForOperationRequest, + proto.viam.robot.v1.BlockForOperationResponse, + /** + * @param {!proto.viam.robot.v1.BlockForOperationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.BlockForOperationResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.BlockForOperationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.BlockForOperationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.blockForOperation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/BlockForOperation', + request, + metadata || {}, + methodDescriptor_RobotService_BlockForOperation, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.BlockForOperationRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.blockForOperation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/BlockForOperation', + request, + metadata || {}, + methodDescriptor_RobotService_BlockForOperation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.DiscoverComponentsRequest, + * !proto.viam.robot.v1.DiscoverComponentsResponse>} + */ +const methodDescriptor_RobotService_DiscoverComponents = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/DiscoverComponents', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.DiscoverComponentsRequest, + proto.viam.robot.v1.DiscoverComponentsResponse, + /** + * @param {!proto.viam.robot.v1.DiscoverComponentsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.DiscoverComponentsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.DiscoverComponentsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.DiscoverComponentsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.discoverComponents = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/DiscoverComponents', + request, + metadata || {}, + methodDescriptor_RobotService_DiscoverComponents, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.DiscoverComponentsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.discoverComponents = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/DiscoverComponents', + request, + metadata || {}, + methodDescriptor_RobotService_DiscoverComponents); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.FrameSystemConfigRequest, + * !proto.viam.robot.v1.FrameSystemConfigResponse>} + */ +const methodDescriptor_RobotService_FrameSystemConfig = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/FrameSystemConfig', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.FrameSystemConfigRequest, + proto.viam.robot.v1.FrameSystemConfigResponse, + /** + * @param {!proto.viam.robot.v1.FrameSystemConfigRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.FrameSystemConfigResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.FrameSystemConfigRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.FrameSystemConfigResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.frameSystemConfig = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/FrameSystemConfig', + request, + metadata || {}, + methodDescriptor_RobotService_FrameSystemConfig, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.FrameSystemConfigRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.frameSystemConfig = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/FrameSystemConfig', + request, + metadata || {}, + methodDescriptor_RobotService_FrameSystemConfig); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.TransformPoseRequest, + * !proto.viam.robot.v1.TransformPoseResponse>} + */ +const methodDescriptor_RobotService_TransformPose = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/TransformPose', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.TransformPoseRequest, + proto.viam.robot.v1.TransformPoseResponse, + /** + * @param {!proto.viam.robot.v1.TransformPoseRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.TransformPoseResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.TransformPoseRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.TransformPoseResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.transformPose = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/TransformPose', + request, + metadata || {}, + methodDescriptor_RobotService_TransformPose, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.TransformPoseRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.transformPose = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/TransformPose', + request, + metadata || {}, + methodDescriptor_RobotService_TransformPose); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.GetStatusRequest, + * !proto.viam.robot.v1.GetStatusResponse>} + */ +const methodDescriptor_RobotService_GetStatus = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/GetStatus', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.GetStatusRequest, + proto.viam.robot.v1.GetStatusResponse, + /** + * @param {!proto.viam.robot.v1.GetStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.GetStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.GetStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.GetStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.getStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/GetStatus', + request, + metadata || {}, + methodDescriptor_RobotService_GetStatus, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.GetStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.getStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/GetStatus', + request, + metadata || {}, + methodDescriptor_RobotService_GetStatus); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.StreamStatusRequest, + * !proto.viam.robot.v1.StreamStatusResponse>} + */ +const methodDescriptor_RobotService_StreamStatus = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/StreamStatus', + grpc.web.MethodType.SERVER_STREAMING, + proto.viam.robot.v1.StreamStatusRequest, + proto.viam.robot.v1.StreamStatusResponse, + /** + * @param {!proto.viam.robot.v1.StreamStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.StreamStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.StreamStatusRequest} request The request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!grpc.web.ClientReadableStream} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.streamStatus = + function(request, metadata) { + return this.client_.serverStreaming(this.hostname_ + + '/viam.robot.v1.RobotService/StreamStatus', + request, + metadata || {}, + methodDescriptor_RobotService_StreamStatus); +}; + + +/** + * @param {!proto.viam.robot.v1.StreamStatusRequest} request The request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!grpc.web.ClientReadableStream} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.streamStatus = + function(request, metadata) { + return this.client_.serverStreaming(this.hostname_ + + '/viam.robot.v1.RobotService/StreamStatus', + request, + metadata || {}, + methodDescriptor_RobotService_StreamStatus); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.robot.v1.StopAllRequest, + * !proto.viam.robot.v1.StopAllResponse>} + */ +const methodDescriptor_RobotService_StopAll = new grpc.web.MethodDescriptor( + '/viam.robot.v1.RobotService/StopAll', + grpc.web.MethodType.UNARY, + proto.viam.robot.v1.StopAllRequest, + proto.viam.robot.v1.StopAllResponse, + /** + * @param {!proto.viam.robot.v1.StopAllRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.robot.v1.StopAllResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.robot.v1.StopAllRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.robot.v1.StopAllResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.robot.v1.RobotServiceClient.prototype.stopAll = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.robot.v1.RobotService/StopAll', + request, + metadata || {}, + methodDescriptor_RobotService_StopAll, + callback); +}; + + +/** + * @param {!proto.viam.robot.v1.StopAllRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.robot.v1.RobotServicePromiseClient.prototype.stopAll = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.robot.v1.RobotService/StopAll', + request, + metadata || {}, + methodDescriptor_RobotService_StopAll); +}; + + +module.exports = proto.viam.robot.v1; + diff --git a/gen/js/robot/v1/robot_pb.d.ts b/gen/js/robot/v1/robot_pb.d.ts new file mode 100644 index 000000000..f53d29cbb --- /dev/null +++ b/gen/js/robot/v1/robot_pb.d.ts @@ -0,0 +1,672 @@ +// package: viam.robot.v1 +// file: robot/v1/robot.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../google/api/annotations_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class FrameSystemConfig extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasPoseInParentFrame(): boolean; + clearPoseInParentFrame(): void; + getPoseInParentFrame(): common_v1_common_pb.PoseInFrame | undefined; + setPoseInParentFrame(value?: common_v1_common_pb.PoseInFrame): void; + + getModelJson(): Uint8Array | string; + getModelJson_asU8(): Uint8Array; + getModelJson_asB64(): string; + setModelJson(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FrameSystemConfig.AsObject; + static toObject(includeInstance: boolean, msg: FrameSystemConfig): FrameSystemConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FrameSystemConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FrameSystemConfig; + static deserializeBinaryFromReader(message: FrameSystemConfig, reader: jspb.BinaryReader): FrameSystemConfig; +} + +export namespace FrameSystemConfig { + export type AsObject = { + name: string, + poseInParentFrame?: common_v1_common_pb.PoseInFrame.AsObject, + modelJson: Uint8Array | string, + } +} + +export class FrameSystemConfigRequest extends jspb.Message { + clearSupplementalTransformsList(): void; + getSupplementalTransformsList(): Array; + setSupplementalTransformsList(value: Array): void; + addSupplementalTransforms(value?: common_v1_common_pb.Transform, index?: number): common_v1_common_pb.Transform; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FrameSystemConfigRequest.AsObject; + static toObject(includeInstance: boolean, msg: FrameSystemConfigRequest): FrameSystemConfigRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FrameSystemConfigRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FrameSystemConfigRequest; + static deserializeBinaryFromReader(message: FrameSystemConfigRequest, reader: jspb.BinaryReader): FrameSystemConfigRequest; +} + +export namespace FrameSystemConfigRequest { + export type AsObject = { + supplementalTransformsList: Array, + } +} + +export class FrameSystemConfigResponse extends jspb.Message { + clearFrameSystemConfigsList(): void; + getFrameSystemConfigsList(): Array; + setFrameSystemConfigsList(value: Array): void; + addFrameSystemConfigs(value?: FrameSystemConfig, index?: number): FrameSystemConfig; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FrameSystemConfigResponse.AsObject; + static toObject(includeInstance: boolean, msg: FrameSystemConfigResponse): FrameSystemConfigResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FrameSystemConfigResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FrameSystemConfigResponse; + static deserializeBinaryFromReader(message: FrameSystemConfigResponse, reader: jspb.BinaryReader): FrameSystemConfigResponse; +} + +export namespace FrameSystemConfigResponse { + export type AsObject = { + frameSystemConfigsList: Array, + } +} + +export class TransformPoseRequest extends jspb.Message { + hasSource(): boolean; + clearSource(): void; + getSource(): common_v1_common_pb.PoseInFrame | undefined; + setSource(value?: common_v1_common_pb.PoseInFrame): void; + + getDestination(): string; + setDestination(value: string): void; + + clearSupplementalTransformsList(): void; + getSupplementalTransformsList(): Array; + setSupplementalTransformsList(value: Array): void; + addSupplementalTransforms(value?: common_v1_common_pb.Transform, index?: number): common_v1_common_pb.Transform; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransformPoseRequest.AsObject; + static toObject(includeInstance: boolean, msg: TransformPoseRequest): TransformPoseRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransformPoseRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransformPoseRequest; + static deserializeBinaryFromReader(message: TransformPoseRequest, reader: jspb.BinaryReader): TransformPoseRequest; +} + +export namespace TransformPoseRequest { + export type AsObject = { + source?: common_v1_common_pb.PoseInFrame.AsObject, + destination: string, + supplementalTransformsList: Array, + } +} + +export class TransformPoseResponse extends jspb.Message { + hasPose(): boolean; + clearPose(): void; + getPose(): common_v1_common_pb.PoseInFrame | undefined; + setPose(value?: common_v1_common_pb.PoseInFrame): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransformPoseResponse.AsObject; + static toObject(includeInstance: boolean, msg: TransformPoseResponse): TransformPoseResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransformPoseResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransformPoseResponse; + static deserializeBinaryFromReader(message: TransformPoseResponse, reader: jspb.BinaryReader): TransformPoseResponse; +} + +export namespace TransformPoseResponse { + export type AsObject = { + pose?: common_v1_common_pb.PoseInFrame.AsObject, + } +} + +export class ResourceNamesRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceNamesRequest.AsObject; + static toObject(includeInstance: boolean, msg: ResourceNamesRequest): ResourceNamesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceNamesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceNamesRequest; + static deserializeBinaryFromReader(message: ResourceNamesRequest, reader: jspb.BinaryReader): ResourceNamesRequest; +} + +export namespace ResourceNamesRequest { + export type AsObject = { + } +} + +export class ResourceNamesResponse extends jspb.Message { + clearResourcesList(): void; + getResourcesList(): Array; + setResourcesList(value: Array): void; + addResources(value?: common_v1_common_pb.ResourceName, index?: number): common_v1_common_pb.ResourceName; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceNamesResponse.AsObject; + static toObject(includeInstance: boolean, msg: ResourceNamesResponse): ResourceNamesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceNamesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceNamesResponse; + static deserializeBinaryFromReader(message: ResourceNamesResponse, reader: jspb.BinaryReader): ResourceNamesResponse; +} + +export namespace ResourceNamesResponse { + export type AsObject = { + resourcesList: Array, + } +} + +export class ResourceRPCSubtype extends jspb.Message { + hasSubtype(): boolean; + clearSubtype(): void; + getSubtype(): common_v1_common_pb.ResourceName | undefined; + setSubtype(value?: common_v1_common_pb.ResourceName): void; + + getProtoService(): string; + setProtoService(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceRPCSubtype.AsObject; + static toObject(includeInstance: boolean, msg: ResourceRPCSubtype): ResourceRPCSubtype.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceRPCSubtype, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceRPCSubtype; + static deserializeBinaryFromReader(message: ResourceRPCSubtype, reader: jspb.BinaryReader): ResourceRPCSubtype; +} + +export namespace ResourceRPCSubtype { + export type AsObject = { + subtype?: common_v1_common_pb.ResourceName.AsObject, + protoService: string, + } +} + +export class ResourceRPCSubtypesRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceRPCSubtypesRequest.AsObject; + static toObject(includeInstance: boolean, msg: ResourceRPCSubtypesRequest): ResourceRPCSubtypesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceRPCSubtypesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceRPCSubtypesRequest; + static deserializeBinaryFromReader(message: ResourceRPCSubtypesRequest, reader: jspb.BinaryReader): ResourceRPCSubtypesRequest; +} + +export namespace ResourceRPCSubtypesRequest { + export type AsObject = { + } +} + +export class ResourceRPCSubtypesResponse extends jspb.Message { + clearResourceRpcSubtypesList(): void; + getResourceRpcSubtypesList(): Array; + setResourceRpcSubtypesList(value: Array): void; + addResourceRpcSubtypes(value?: ResourceRPCSubtype, index?: number): ResourceRPCSubtype; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ResourceRPCSubtypesResponse.AsObject; + static toObject(includeInstance: boolean, msg: ResourceRPCSubtypesResponse): ResourceRPCSubtypesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ResourceRPCSubtypesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ResourceRPCSubtypesResponse; + static deserializeBinaryFromReader(message: ResourceRPCSubtypesResponse, reader: jspb.BinaryReader): ResourceRPCSubtypesResponse; +} + +export namespace ResourceRPCSubtypesResponse { + export type AsObject = { + resourceRpcSubtypesList: Array, + } +} + +export class Operation extends jspb.Message { + getId(): string; + setId(value: string): void; + + getMethod(): string; + setMethod(value: string): void; + + hasArguments(): boolean; + clearArguments(): void; + getArguments(): google_protobuf_struct_pb.Struct | undefined; + setArguments(value?: google_protobuf_struct_pb.Struct): void; + + hasStarted(): boolean; + clearStarted(): void; + getStarted(): google_protobuf_timestamp_pb.Timestamp | undefined; + setStarted(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Operation.AsObject; + static toObject(includeInstance: boolean, msg: Operation): Operation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Operation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Operation; + static deserializeBinaryFromReader(message: Operation, reader: jspb.BinaryReader): Operation; +} + +export namespace Operation { + export type AsObject = { + id: string, + method: string, + arguments?: google_protobuf_struct_pb.Struct.AsObject, + started?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class GetOperationsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetOperationsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetOperationsRequest): GetOperationsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetOperationsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetOperationsRequest; + static deserializeBinaryFromReader(message: GetOperationsRequest, reader: jspb.BinaryReader): GetOperationsRequest; +} + +export namespace GetOperationsRequest { + export type AsObject = { + } +} + +export class GetOperationsResponse extends jspb.Message { + clearOperationsList(): void; + getOperationsList(): Array; + setOperationsList(value: Array): void; + addOperations(value?: Operation, index?: number): Operation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetOperationsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetOperationsResponse): GetOperationsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetOperationsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetOperationsResponse; + static deserializeBinaryFromReader(message: GetOperationsResponse, reader: jspb.BinaryReader): GetOperationsResponse; +} + +export namespace GetOperationsResponse { + export type AsObject = { + operationsList: Array, + } +} + +export class CancelOperationRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelOperationRequest.AsObject; + static toObject(includeInstance: boolean, msg: CancelOperationRequest): CancelOperationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CancelOperationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CancelOperationRequest; + static deserializeBinaryFromReader(message: CancelOperationRequest, reader: jspb.BinaryReader): CancelOperationRequest; +} + +export namespace CancelOperationRequest { + export type AsObject = { + id: string, + } +} + +export class CancelOperationResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelOperationResponse.AsObject; + static toObject(includeInstance: boolean, msg: CancelOperationResponse): CancelOperationResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CancelOperationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CancelOperationResponse; + static deserializeBinaryFromReader(message: CancelOperationResponse, reader: jspb.BinaryReader): CancelOperationResponse; +} + +export namespace CancelOperationResponse { + export type AsObject = { + } +} + +export class BlockForOperationRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockForOperationRequest.AsObject; + static toObject(includeInstance: boolean, msg: BlockForOperationRequest): BlockForOperationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockForOperationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockForOperationRequest; + static deserializeBinaryFromReader(message: BlockForOperationRequest, reader: jspb.BinaryReader): BlockForOperationRequest; +} + +export namespace BlockForOperationRequest { + export type AsObject = { + id: string, + } +} + +export class BlockForOperationResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockForOperationResponse.AsObject; + static toObject(includeInstance: boolean, msg: BlockForOperationResponse): BlockForOperationResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockForOperationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockForOperationResponse; + static deserializeBinaryFromReader(message: BlockForOperationResponse, reader: jspb.BinaryReader): BlockForOperationResponse; +} + +export namespace BlockForOperationResponse { + export type AsObject = { + } +} + +export class DiscoveryQuery extends jspb.Message { + getSubtype(): string; + setSubtype(value: string): void; + + getModel(): string; + setModel(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DiscoveryQuery.AsObject; + static toObject(includeInstance: boolean, msg: DiscoveryQuery): DiscoveryQuery.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DiscoveryQuery, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DiscoveryQuery; + static deserializeBinaryFromReader(message: DiscoveryQuery, reader: jspb.BinaryReader): DiscoveryQuery; +} + +export namespace DiscoveryQuery { + export type AsObject = { + subtype: string, + model: string, + } +} + +export class Discovery extends jspb.Message { + hasQuery(): boolean; + clearQuery(): void; + getQuery(): DiscoveryQuery | undefined; + setQuery(value?: DiscoveryQuery): void; + + hasResults(): boolean; + clearResults(): void; + getResults(): google_protobuf_struct_pb.Struct | undefined; + setResults(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Discovery.AsObject; + static toObject(includeInstance: boolean, msg: Discovery): Discovery.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Discovery, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Discovery; + static deserializeBinaryFromReader(message: Discovery, reader: jspb.BinaryReader): Discovery; +} + +export namespace Discovery { + export type AsObject = { + query?: DiscoveryQuery.AsObject, + results?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class DiscoverComponentsRequest extends jspb.Message { + clearQueriesList(): void; + getQueriesList(): Array; + setQueriesList(value: Array): void; + addQueries(value?: DiscoveryQuery, index?: number): DiscoveryQuery; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DiscoverComponentsRequest.AsObject; + static toObject(includeInstance: boolean, msg: DiscoverComponentsRequest): DiscoverComponentsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DiscoverComponentsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DiscoverComponentsRequest; + static deserializeBinaryFromReader(message: DiscoverComponentsRequest, reader: jspb.BinaryReader): DiscoverComponentsRequest; +} + +export namespace DiscoverComponentsRequest { + export type AsObject = { + queriesList: Array, + } +} + +export class DiscoverComponentsResponse extends jspb.Message { + clearDiscoveryList(): void; + getDiscoveryList(): Array; + setDiscoveryList(value: Array): void; + addDiscovery(value?: Discovery, index?: number): Discovery; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DiscoverComponentsResponse.AsObject; + static toObject(includeInstance: boolean, msg: DiscoverComponentsResponse): DiscoverComponentsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DiscoverComponentsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DiscoverComponentsResponse; + static deserializeBinaryFromReader(message: DiscoverComponentsResponse, reader: jspb.BinaryReader): DiscoverComponentsResponse; +} + +export namespace DiscoverComponentsResponse { + export type AsObject = { + discoveryList: Array, + } +} + +export class Status extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): common_v1_common_pb.ResourceName | undefined; + setName(value?: common_v1_common_pb.ResourceName): void; + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): google_protobuf_struct_pb.Struct | undefined; + setStatus(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; +} + +export namespace Status { + export type AsObject = { + name?: common_v1_common_pb.ResourceName.AsObject, + status?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetStatusRequest extends jspb.Message { + clearResourceNamesList(): void; + getResourceNamesList(): Array; + setResourceNamesList(value: Array): void; + addResourceNames(value?: common_v1_common_pb.ResourceName, index?: number): common_v1_common_pb.ResourceName; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetStatusRequest): GetStatusRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStatusRequest; + static deserializeBinaryFromReader(message: GetStatusRequest, reader: jspb.BinaryReader): GetStatusRequest; +} + +export namespace GetStatusRequest { + export type AsObject = { + resourceNamesList: Array, + } +} + +export class GetStatusResponse extends jspb.Message { + clearStatusList(): void; + getStatusList(): Array; + setStatusList(value: Array): void; + addStatus(value?: Status, index?: number): Status; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStatusResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetStatusResponse): GetStatusResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStatusResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStatusResponse; + static deserializeBinaryFromReader(message: GetStatusResponse, reader: jspb.BinaryReader): GetStatusResponse; +} + +export namespace GetStatusResponse { + export type AsObject = { + statusList: Array, + } +} + +export class StreamStatusRequest extends jspb.Message { + clearResourceNamesList(): void; + getResourceNamesList(): Array; + setResourceNamesList(value: Array): void; + addResourceNames(value?: common_v1_common_pb.ResourceName, index?: number): common_v1_common_pb.ResourceName; + + hasEvery(): boolean; + clearEvery(): void; + getEvery(): google_protobuf_duration_pb.Duration | undefined; + setEvery(value?: google_protobuf_duration_pb.Duration): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamStatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: StreamStatusRequest): StreamStatusRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamStatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamStatusRequest; + static deserializeBinaryFromReader(message: StreamStatusRequest, reader: jspb.BinaryReader): StreamStatusRequest; +} + +export namespace StreamStatusRequest { + export type AsObject = { + resourceNamesList: Array, + every?: google_protobuf_duration_pb.Duration.AsObject, + } +} + +export class StreamStatusResponse extends jspb.Message { + clearStatusList(): void; + getStatusList(): Array; + setStatusList(value: Array): void; + addStatus(value?: Status, index?: number): Status; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamStatusResponse.AsObject; + static toObject(includeInstance: boolean, msg: StreamStatusResponse): StreamStatusResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamStatusResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamStatusResponse; + static deserializeBinaryFromReader(message: StreamStatusResponse, reader: jspb.BinaryReader): StreamStatusResponse; +} + +export namespace StreamStatusResponse { + export type AsObject = { + statusList: Array, + } +} + +export class StopExtraParameters extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): common_v1_common_pb.ResourceName | undefined; + setName(value?: common_v1_common_pb.ResourceName): void; + + hasParams(): boolean; + clearParams(): void; + getParams(): google_protobuf_struct_pb.Struct | undefined; + setParams(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopExtraParameters.AsObject; + static toObject(includeInstance: boolean, msg: StopExtraParameters): StopExtraParameters.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopExtraParameters, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopExtraParameters; + static deserializeBinaryFromReader(message: StopExtraParameters, reader: jspb.BinaryReader): StopExtraParameters; +} + +export namespace StopExtraParameters { + export type AsObject = { + name?: common_v1_common_pb.ResourceName.AsObject, + params?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class StopAllRequest extends jspb.Message { + clearExtraList(): void; + getExtraList(): Array; + setExtraList(value: Array): void; + addExtra(value?: StopExtraParameters, index?: number): StopExtraParameters; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopAllRequest.AsObject; + static toObject(includeInstance: boolean, msg: StopAllRequest): StopAllRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopAllRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopAllRequest; + static deserializeBinaryFromReader(message: StopAllRequest, reader: jspb.BinaryReader): StopAllRequest; +} + +export namespace StopAllRequest { + export type AsObject = { + extraList: Array, + } +} + +export class StopAllResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopAllResponse.AsObject; + static toObject(includeInstance: boolean, msg: StopAllResponse): StopAllResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StopAllResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StopAllResponse; + static deserializeBinaryFromReader(message: StopAllResponse, reader: jspb.BinaryReader): StopAllResponse; +} + +export namespace StopAllResponse { + export type AsObject = { + } +} + diff --git a/gen/js/robot/v1/robot_pb.js b/gen/js/robot/v1/robot_pb.js new file mode 100644 index 000000000..0153d1b06 --- /dev/null +++ b/gen/js/robot/v1/robot_pb.js @@ -0,0 +1,5339 @@ +// source: robot/v1/robot.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.viam.robot.v1.BlockForOperationRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.BlockForOperationResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.CancelOperationRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.CancelOperationResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.DiscoverComponentsRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.DiscoverComponentsResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.Discovery', null, global); +goog.exportSymbol('proto.viam.robot.v1.DiscoveryQuery', null, global); +goog.exportSymbol('proto.viam.robot.v1.FrameSystemConfig', null, global); +goog.exportSymbol('proto.viam.robot.v1.FrameSystemConfigRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.FrameSystemConfigResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.GetOperationsRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.GetOperationsResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.GetStatusRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.GetStatusResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.Operation', null, global); +goog.exportSymbol('proto.viam.robot.v1.ResourceNamesRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.ResourceNamesResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.ResourceRPCSubtype', null, global); +goog.exportSymbol('proto.viam.robot.v1.ResourceRPCSubtypesRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.ResourceRPCSubtypesResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.Status', null, global); +goog.exportSymbol('proto.viam.robot.v1.StopAllRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.StopAllResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.StopExtraParameters', null, global); +goog.exportSymbol('proto.viam.robot.v1.StreamStatusRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.StreamStatusResponse', null, global); +goog.exportSymbol('proto.viam.robot.v1.TransformPoseRequest', null, global); +goog.exportSymbol('proto.viam.robot.v1.TransformPoseResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.FrameSystemConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.FrameSystemConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.FrameSystemConfig.displayName = 'proto.viam.robot.v1.FrameSystemConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.FrameSystemConfigRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.FrameSystemConfigRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.FrameSystemConfigRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.FrameSystemConfigRequest.displayName = 'proto.viam.robot.v1.FrameSystemConfigRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.FrameSystemConfigResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.FrameSystemConfigResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.FrameSystemConfigResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.FrameSystemConfigResponse.displayName = 'proto.viam.robot.v1.FrameSystemConfigResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.TransformPoseRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.TransformPoseRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.TransformPoseRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.TransformPoseRequest.displayName = 'proto.viam.robot.v1.TransformPoseRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.TransformPoseResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.TransformPoseResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.TransformPoseResponse.displayName = 'proto.viam.robot.v1.TransformPoseResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.ResourceNamesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.ResourceNamesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.ResourceNamesRequest.displayName = 'proto.viam.robot.v1.ResourceNamesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.ResourceNamesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.ResourceNamesResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.ResourceNamesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.ResourceNamesResponse.displayName = 'proto.viam.robot.v1.ResourceNamesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.ResourceRPCSubtype = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.ResourceRPCSubtype, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.ResourceRPCSubtype.displayName = 'proto.viam.robot.v1.ResourceRPCSubtype'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.ResourceRPCSubtypesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.ResourceRPCSubtypesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.ResourceRPCSubtypesRequest.displayName = 'proto.viam.robot.v1.ResourceRPCSubtypesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.ResourceRPCSubtypesResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.ResourceRPCSubtypesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.ResourceRPCSubtypesResponse.displayName = 'proto.viam.robot.v1.ResourceRPCSubtypesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.Operation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.Operation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.Operation.displayName = 'proto.viam.robot.v1.Operation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.GetOperationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.GetOperationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.GetOperationsRequest.displayName = 'proto.viam.robot.v1.GetOperationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.GetOperationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.GetOperationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.GetOperationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.GetOperationsResponse.displayName = 'proto.viam.robot.v1.GetOperationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.CancelOperationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.CancelOperationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.CancelOperationRequest.displayName = 'proto.viam.robot.v1.CancelOperationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.CancelOperationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.CancelOperationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.CancelOperationResponse.displayName = 'proto.viam.robot.v1.CancelOperationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.BlockForOperationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.BlockForOperationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.BlockForOperationRequest.displayName = 'proto.viam.robot.v1.BlockForOperationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.BlockForOperationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.BlockForOperationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.BlockForOperationResponse.displayName = 'proto.viam.robot.v1.BlockForOperationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.DiscoveryQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.DiscoveryQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.DiscoveryQuery.displayName = 'proto.viam.robot.v1.DiscoveryQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.Discovery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.Discovery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.Discovery.displayName = 'proto.viam.robot.v1.Discovery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.DiscoverComponentsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.DiscoverComponentsRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.DiscoverComponentsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.DiscoverComponentsRequest.displayName = 'proto.viam.robot.v1.DiscoverComponentsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.DiscoverComponentsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.DiscoverComponentsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.DiscoverComponentsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.DiscoverComponentsResponse.displayName = 'proto.viam.robot.v1.DiscoverComponentsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.Status = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.Status, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.Status.displayName = 'proto.viam.robot.v1.Status'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.GetStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.GetStatusRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.GetStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.GetStatusRequest.displayName = 'proto.viam.robot.v1.GetStatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.GetStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.GetStatusResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.GetStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.GetStatusResponse.displayName = 'proto.viam.robot.v1.GetStatusResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.StreamStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.StreamStatusRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.StreamStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.StreamStatusRequest.displayName = 'proto.viam.robot.v1.StreamStatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.StreamStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.StreamStatusResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.StreamStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.StreamStatusResponse.displayName = 'proto.viam.robot.v1.StreamStatusResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.StopExtraParameters = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.StopExtraParameters, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.StopExtraParameters.displayName = 'proto.viam.robot.v1.StopExtraParameters'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.StopAllRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.robot.v1.StopAllRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.robot.v1.StopAllRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.StopAllRequest.displayName = 'proto.viam.robot.v1.StopAllRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.robot.v1.StopAllResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.robot.v1.StopAllResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.robot.v1.StopAllResponse.displayName = 'proto.viam.robot.v1.StopAllResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.FrameSystemConfig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.FrameSystemConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.FrameSystemConfig.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + poseInParentFrame: (f = msg.getPoseInParentFrame()) && common_v1_common_pb.PoseInFrame.toObject(includeInstance, f), + modelJson: msg.getModelJson_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.FrameSystemConfig} + */ +proto.viam.robot.v1.FrameSystemConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.FrameSystemConfig; + return proto.viam.robot.v1.FrameSystemConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.FrameSystemConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.FrameSystemConfig} + */ +proto.viam.robot.v1.FrameSystemConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new common_v1_common_pb.PoseInFrame; + reader.readMessage(value,common_v1_common_pb.PoseInFrame.deserializeBinaryFromReader); + msg.setPoseInParentFrame(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setModelJson(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.FrameSystemConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.FrameSystemConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.FrameSystemConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPoseInParentFrame(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_v1_common_pb.PoseInFrame.serializeBinaryToWriter + ); + } + f = message.getModelJson_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.robot.v1.FrameSystemConfig} returns this + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional viam.common.v1.PoseInFrame pose_in_parent_frame = 2; + * @return {?proto.viam.common.v1.PoseInFrame} + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.getPoseInParentFrame = function() { + return /** @type{?proto.viam.common.v1.PoseInFrame} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.PoseInFrame, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.PoseInFrame|undefined} value + * @return {!proto.viam.robot.v1.FrameSystemConfig} returns this +*/ +proto.viam.robot.v1.FrameSystemConfig.prototype.setPoseInParentFrame = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.FrameSystemConfig} returns this + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.clearPoseInParentFrame = function() { + return this.setPoseInParentFrame(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.hasPoseInParentFrame = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes model_json = 3; + * @return {string} + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.getModelJson = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes model_json = 3; + * This is a type-conversion wrapper around `getModelJson()` + * @return {string} + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.getModelJson_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getModelJson())); +}; + + +/** + * optional bytes model_json = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getModelJson()` + * @return {!Uint8Array} + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.getModelJson_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getModelJson())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.robot.v1.FrameSystemConfig} returns this + */ +proto.viam.robot.v1.FrameSystemConfig.prototype.setModelJson = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.FrameSystemConfigRequest.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.FrameSystemConfigRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.FrameSystemConfigRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.FrameSystemConfigRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.FrameSystemConfigRequest.toObject = function(includeInstance, msg) { + var f, obj = { + supplementalTransformsList: jspb.Message.toObjectList(msg.getSupplementalTransformsList(), + common_v1_common_pb.Transform.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.FrameSystemConfigRequest} + */ +proto.viam.robot.v1.FrameSystemConfigRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.FrameSystemConfigRequest; + return proto.viam.robot.v1.FrameSystemConfigRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.FrameSystemConfigRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.FrameSystemConfigRequest} + */ +proto.viam.robot.v1.FrameSystemConfigRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.Transform; + reader.readMessage(value,common_v1_common_pb.Transform.deserializeBinaryFromReader); + msg.addSupplementalTransforms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.FrameSystemConfigRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.FrameSystemConfigRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.FrameSystemConfigRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.FrameSystemConfigRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSupplementalTransformsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + common_v1_common_pb.Transform.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated viam.common.v1.Transform supplemental_transforms = 1; + * @return {!Array} + */ +proto.viam.robot.v1.FrameSystemConfigRequest.prototype.getSupplementalTransformsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_v1_common_pb.Transform, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.FrameSystemConfigRequest} returns this +*/ +proto.viam.robot.v1.FrameSystemConfigRequest.prototype.setSupplementalTransformsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.common.v1.Transform=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.Transform} + */ +proto.viam.robot.v1.FrameSystemConfigRequest.prototype.addSupplementalTransforms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.common.v1.Transform, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.FrameSystemConfigRequest} returns this + */ +proto.viam.robot.v1.FrameSystemConfigRequest.prototype.clearSupplementalTransformsList = function() { + return this.setSupplementalTransformsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.FrameSystemConfigResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.FrameSystemConfigResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.FrameSystemConfigResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.FrameSystemConfigResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.FrameSystemConfigResponse.toObject = function(includeInstance, msg) { + var f, obj = { + frameSystemConfigsList: jspb.Message.toObjectList(msg.getFrameSystemConfigsList(), + proto.viam.robot.v1.FrameSystemConfig.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.FrameSystemConfigResponse} + */ +proto.viam.robot.v1.FrameSystemConfigResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.FrameSystemConfigResponse; + return proto.viam.robot.v1.FrameSystemConfigResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.FrameSystemConfigResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.FrameSystemConfigResponse} + */ +proto.viam.robot.v1.FrameSystemConfigResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.robot.v1.FrameSystemConfig; + reader.readMessage(value,proto.viam.robot.v1.FrameSystemConfig.deserializeBinaryFromReader); + msg.addFrameSystemConfigs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.FrameSystemConfigResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.FrameSystemConfigResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.FrameSystemConfigResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.FrameSystemConfigResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFrameSystemConfigsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.robot.v1.FrameSystemConfig.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FrameSystemConfig frame_system_configs = 1; + * @return {!Array} + */ +proto.viam.robot.v1.FrameSystemConfigResponse.prototype.getFrameSystemConfigsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.robot.v1.FrameSystemConfig, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.FrameSystemConfigResponse} returns this +*/ +proto.viam.robot.v1.FrameSystemConfigResponse.prototype.setFrameSystemConfigsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.robot.v1.FrameSystemConfig=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.robot.v1.FrameSystemConfig} + */ +proto.viam.robot.v1.FrameSystemConfigResponse.prototype.addFrameSystemConfigs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.robot.v1.FrameSystemConfig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.FrameSystemConfigResponse} returns this + */ +proto.viam.robot.v1.FrameSystemConfigResponse.prototype.clearFrameSystemConfigsList = function() { + return this.setFrameSystemConfigsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.TransformPoseRequest.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.TransformPoseRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.TransformPoseRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.TransformPoseRequest.toObject = function(includeInstance, msg) { + var f, obj = { + source: (f = msg.getSource()) && common_v1_common_pb.PoseInFrame.toObject(includeInstance, f), + destination: jspb.Message.getFieldWithDefault(msg, 2, ""), + supplementalTransformsList: jspb.Message.toObjectList(msg.getSupplementalTransformsList(), + common_v1_common_pb.Transform.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.TransformPoseRequest} + */ +proto.viam.robot.v1.TransformPoseRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.TransformPoseRequest; + return proto.viam.robot.v1.TransformPoseRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.TransformPoseRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.TransformPoseRequest} + */ +proto.viam.robot.v1.TransformPoseRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.PoseInFrame; + reader.readMessage(value,common_v1_common_pb.PoseInFrame.deserializeBinaryFromReader); + msg.setSource(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDestination(value); + break; + case 3: + var value = new common_v1_common_pb.Transform; + reader.readMessage(value,common_v1_common_pb.Transform.deserializeBinaryFromReader); + msg.addSupplementalTransforms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.TransformPoseRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.TransformPoseRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.TransformPoseRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSource(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.PoseInFrame.serializeBinaryToWriter + ); + } + f = message.getDestination(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSupplementalTransformsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + common_v1_common_pb.Transform.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.PoseInFrame source = 1; + * @return {?proto.viam.common.v1.PoseInFrame} + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.getSource = function() { + return /** @type{?proto.viam.common.v1.PoseInFrame} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.PoseInFrame, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.PoseInFrame|undefined} value + * @return {!proto.viam.robot.v1.TransformPoseRequest} returns this +*/ +proto.viam.robot.v1.TransformPoseRequest.prototype.setSource = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.TransformPoseRequest} returns this + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.clearSource = function() { + return this.setSource(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.hasSource = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string destination = 2; + * @return {string} + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.getDestination = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.robot.v1.TransformPoseRequest} returns this + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.setDestination = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated viam.common.v1.Transform supplemental_transforms = 3; + * @return {!Array} + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.getSupplementalTransformsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_v1_common_pb.Transform, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.TransformPoseRequest} returns this +*/ +proto.viam.robot.v1.TransformPoseRequest.prototype.setSupplementalTransformsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.viam.common.v1.Transform=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.Transform} + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.addSupplementalTransforms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.viam.common.v1.Transform, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.TransformPoseRequest} returns this + */ +proto.viam.robot.v1.TransformPoseRequest.prototype.clearSupplementalTransformsList = function() { + return this.setSupplementalTransformsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.TransformPoseResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.TransformPoseResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.TransformPoseResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.TransformPoseResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pose: (f = msg.getPose()) && common_v1_common_pb.PoseInFrame.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.TransformPoseResponse} + */ +proto.viam.robot.v1.TransformPoseResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.TransformPoseResponse; + return proto.viam.robot.v1.TransformPoseResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.TransformPoseResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.TransformPoseResponse} + */ +proto.viam.robot.v1.TransformPoseResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.PoseInFrame; + reader.readMessage(value,common_v1_common_pb.PoseInFrame.deserializeBinaryFromReader); + msg.setPose(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.TransformPoseResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.TransformPoseResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.TransformPoseResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.TransformPoseResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPose(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.PoseInFrame.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.PoseInFrame pose = 1; + * @return {?proto.viam.common.v1.PoseInFrame} + */ +proto.viam.robot.v1.TransformPoseResponse.prototype.getPose = function() { + return /** @type{?proto.viam.common.v1.PoseInFrame} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.PoseInFrame, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.PoseInFrame|undefined} value + * @return {!proto.viam.robot.v1.TransformPoseResponse} returns this +*/ +proto.viam.robot.v1.TransformPoseResponse.prototype.setPose = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.TransformPoseResponse} returns this + */ +proto.viam.robot.v1.TransformPoseResponse.prototype.clearPose = function() { + return this.setPose(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.TransformPoseResponse.prototype.hasPose = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.ResourceNamesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.ResourceNamesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.ResourceNamesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceNamesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.ResourceNamesRequest} + */ +proto.viam.robot.v1.ResourceNamesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.ResourceNamesRequest; + return proto.viam.robot.v1.ResourceNamesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.ResourceNamesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.ResourceNamesRequest} + */ +proto.viam.robot.v1.ResourceNamesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.ResourceNamesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.ResourceNamesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.ResourceNamesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceNamesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.ResourceNamesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.ResourceNamesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.ResourceNamesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.ResourceNamesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceNamesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + resourcesList: jspb.Message.toObjectList(msg.getResourcesList(), + common_v1_common_pb.ResourceName.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.ResourceNamesResponse} + */ +proto.viam.robot.v1.ResourceNamesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.ResourceNamesResponse; + return proto.viam.robot.v1.ResourceNamesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.ResourceNamesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.ResourceNamesResponse} + */ +proto.viam.robot.v1.ResourceNamesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.addResources(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.ResourceNamesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.ResourceNamesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.ResourceNamesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceNamesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResourcesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated viam.common.v1.ResourceName resources = 1; + * @return {!Array} + */ +proto.viam.robot.v1.ResourceNamesResponse.prototype.getResourcesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_v1_common_pb.ResourceName, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.ResourceNamesResponse} returns this +*/ +proto.viam.robot.v1.ResourceNamesResponse.prototype.setResourcesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.common.v1.ResourceName=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.ResourceName} + */ +proto.viam.robot.v1.ResourceNamesResponse.prototype.addResources = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.common.v1.ResourceName, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.ResourceNamesResponse} returns this + */ +proto.viam.robot.v1.ResourceNamesResponse.prototype.clearResourcesList = function() { + return this.setResourcesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.ResourceRPCSubtype.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.ResourceRPCSubtype.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.ResourceRPCSubtype} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceRPCSubtype.toObject = function(includeInstance, msg) { + var f, obj = { + subtype: (f = msg.getSubtype()) && common_v1_common_pb.ResourceName.toObject(includeInstance, f), + protoService: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.ResourceRPCSubtype} + */ +proto.viam.robot.v1.ResourceRPCSubtype.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.ResourceRPCSubtype; + return proto.viam.robot.v1.ResourceRPCSubtype.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.ResourceRPCSubtype} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.ResourceRPCSubtype} + */ +proto.viam.robot.v1.ResourceRPCSubtype.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.setSubtype(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProtoService(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.ResourceRPCSubtype.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.ResourceRPCSubtype.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.ResourceRPCSubtype} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceRPCSubtype.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubtype(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } + f = message.getProtoService(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional viam.common.v1.ResourceName subtype = 1; + * @return {?proto.viam.common.v1.ResourceName} + */ +proto.viam.robot.v1.ResourceRPCSubtype.prototype.getSubtype = function() { + return /** @type{?proto.viam.common.v1.ResourceName} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.ResourceName, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.ResourceName|undefined} value + * @return {!proto.viam.robot.v1.ResourceRPCSubtype} returns this +*/ +proto.viam.robot.v1.ResourceRPCSubtype.prototype.setSubtype = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.ResourceRPCSubtype} returns this + */ +proto.viam.robot.v1.ResourceRPCSubtype.prototype.clearSubtype = function() { + return this.setSubtype(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.ResourceRPCSubtype.prototype.hasSubtype = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string proto_service = 2; + * @return {string} + */ +proto.viam.robot.v1.ResourceRPCSubtype.prototype.getProtoService = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.robot.v1.ResourceRPCSubtype} returns this + */ +proto.viam.robot.v1.ResourceRPCSubtype.prototype.setProtoService = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.ResourceRPCSubtypesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.ResourceRPCSubtypesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.ResourceRPCSubtypesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceRPCSubtypesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.ResourceRPCSubtypesRequest} + */ +proto.viam.robot.v1.ResourceRPCSubtypesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.ResourceRPCSubtypesRequest; + return proto.viam.robot.v1.ResourceRPCSubtypesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.ResourceRPCSubtypesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.ResourceRPCSubtypesRequest} + */ +proto.viam.robot.v1.ResourceRPCSubtypesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.ResourceRPCSubtypesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.ResourceRPCSubtypesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.ResourceRPCSubtypesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceRPCSubtypesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.ResourceRPCSubtypesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.ResourceRPCSubtypesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + resourceRpcSubtypesList: jspb.Message.toObjectList(msg.getResourceRpcSubtypesList(), + proto.viam.robot.v1.ResourceRPCSubtype.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.ResourceRPCSubtypesResponse} + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.ResourceRPCSubtypesResponse; + return proto.viam.robot.v1.ResourceRPCSubtypesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.ResourceRPCSubtypesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.ResourceRPCSubtypesResponse} + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.robot.v1.ResourceRPCSubtype; + reader.readMessage(value,proto.viam.robot.v1.ResourceRPCSubtype.deserializeBinaryFromReader); + msg.addResourceRpcSubtypes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.ResourceRPCSubtypesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.ResourceRPCSubtypesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResourceRpcSubtypesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.robot.v1.ResourceRPCSubtype.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ResourceRPCSubtype resource_rpc_subtypes = 1; + * @return {!Array} + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.prototype.getResourceRpcSubtypesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.robot.v1.ResourceRPCSubtype, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.ResourceRPCSubtypesResponse} returns this +*/ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.prototype.setResourceRpcSubtypesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.robot.v1.ResourceRPCSubtype=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.robot.v1.ResourceRPCSubtype} + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.prototype.addResourceRpcSubtypes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.robot.v1.ResourceRPCSubtype, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.ResourceRPCSubtypesResponse} returns this + */ +proto.viam.robot.v1.ResourceRPCSubtypesResponse.prototype.clearResourceRpcSubtypesList = function() { + return this.setResourceRpcSubtypesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.Operation.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.Operation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.Operation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.Operation.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + method: jspb.Message.getFieldWithDefault(msg, 2, ""), + arguments: (f = msg.getArguments()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + started: (f = msg.getStarted()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.Operation} + */ +proto.viam.robot.v1.Operation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.Operation; + return proto.viam.robot.v1.Operation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.Operation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.Operation} + */ +proto.viam.robot.v1.Operation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMethod(value); + break; + case 3: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setArguments(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStarted(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.Operation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.Operation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.Operation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.Operation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArguments(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getStarted(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.robot.v1.Operation.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.robot.v1.Operation} returns this + */ +proto.viam.robot.v1.Operation.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string method = 2; + * @return {string} + */ +proto.viam.robot.v1.Operation.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.robot.v1.Operation} returns this + */ +proto.viam.robot.v1.Operation.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Struct arguments = 3; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.robot.v1.Operation.prototype.getArguments = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.robot.v1.Operation} returns this +*/ +proto.viam.robot.v1.Operation.prototype.setArguments = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.Operation} returns this + */ +proto.viam.robot.v1.Operation.prototype.clearArguments = function() { + return this.setArguments(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.Operation.prototype.hasArguments = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Timestamp started = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.viam.robot.v1.Operation.prototype.getStarted = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.viam.robot.v1.Operation} returns this +*/ +proto.viam.robot.v1.Operation.prototype.setStarted = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.Operation} returns this + */ +proto.viam.robot.v1.Operation.prototype.clearStarted = function() { + return this.setStarted(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.Operation.prototype.hasStarted = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.GetOperationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.GetOperationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.GetOperationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.GetOperationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.GetOperationsRequest} + */ +proto.viam.robot.v1.GetOperationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.GetOperationsRequest; + return proto.viam.robot.v1.GetOperationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.GetOperationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.GetOperationsRequest} + */ +proto.viam.robot.v1.GetOperationsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.GetOperationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.GetOperationsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.GetOperationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.GetOperationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.GetOperationsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.GetOperationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.GetOperationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.GetOperationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.GetOperationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + operationsList: jspb.Message.toObjectList(msg.getOperationsList(), + proto.viam.robot.v1.Operation.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.GetOperationsResponse} + */ +proto.viam.robot.v1.GetOperationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.GetOperationsResponse; + return proto.viam.robot.v1.GetOperationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.GetOperationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.GetOperationsResponse} + */ +proto.viam.robot.v1.GetOperationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.robot.v1.Operation; + reader.readMessage(value,proto.viam.robot.v1.Operation.deserializeBinaryFromReader); + msg.addOperations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.GetOperationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.GetOperationsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.GetOperationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.GetOperationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOperationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.robot.v1.Operation.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Operation operations = 1; + * @return {!Array} + */ +proto.viam.robot.v1.GetOperationsResponse.prototype.getOperationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.robot.v1.Operation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.GetOperationsResponse} returns this +*/ +proto.viam.robot.v1.GetOperationsResponse.prototype.setOperationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.robot.v1.Operation=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.robot.v1.Operation} + */ +proto.viam.robot.v1.GetOperationsResponse.prototype.addOperations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.robot.v1.Operation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.GetOperationsResponse} returns this + */ +proto.viam.robot.v1.GetOperationsResponse.prototype.clearOperationsList = function() { + return this.setOperationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.CancelOperationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.CancelOperationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.CancelOperationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.CancelOperationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.CancelOperationRequest} + */ +proto.viam.robot.v1.CancelOperationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.CancelOperationRequest; + return proto.viam.robot.v1.CancelOperationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.CancelOperationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.CancelOperationRequest} + */ +proto.viam.robot.v1.CancelOperationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.CancelOperationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.CancelOperationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.CancelOperationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.CancelOperationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.robot.v1.CancelOperationRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.robot.v1.CancelOperationRequest} returns this + */ +proto.viam.robot.v1.CancelOperationRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.CancelOperationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.CancelOperationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.CancelOperationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.CancelOperationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.CancelOperationResponse} + */ +proto.viam.robot.v1.CancelOperationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.CancelOperationResponse; + return proto.viam.robot.v1.CancelOperationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.CancelOperationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.CancelOperationResponse} + */ +proto.viam.robot.v1.CancelOperationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.CancelOperationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.CancelOperationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.CancelOperationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.CancelOperationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.BlockForOperationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.BlockForOperationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.BlockForOperationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.BlockForOperationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.BlockForOperationRequest} + */ +proto.viam.robot.v1.BlockForOperationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.BlockForOperationRequest; + return proto.viam.robot.v1.BlockForOperationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.BlockForOperationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.BlockForOperationRequest} + */ +proto.viam.robot.v1.BlockForOperationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.BlockForOperationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.BlockForOperationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.BlockForOperationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.BlockForOperationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.robot.v1.BlockForOperationRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.robot.v1.BlockForOperationRequest} returns this + */ +proto.viam.robot.v1.BlockForOperationRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.BlockForOperationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.BlockForOperationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.BlockForOperationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.BlockForOperationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.BlockForOperationResponse} + */ +proto.viam.robot.v1.BlockForOperationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.BlockForOperationResponse; + return proto.viam.robot.v1.BlockForOperationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.BlockForOperationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.BlockForOperationResponse} + */ +proto.viam.robot.v1.BlockForOperationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.BlockForOperationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.BlockForOperationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.BlockForOperationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.BlockForOperationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.DiscoveryQuery.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.DiscoveryQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.DiscoveryQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.DiscoveryQuery.toObject = function(includeInstance, msg) { + var f, obj = { + subtype: jspb.Message.getFieldWithDefault(msg, 1, ""), + model: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.DiscoveryQuery} + */ +proto.viam.robot.v1.DiscoveryQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.DiscoveryQuery; + return proto.viam.robot.v1.DiscoveryQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.DiscoveryQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.DiscoveryQuery} + */ +proto.viam.robot.v1.DiscoveryQuery.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSubtype(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setModel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.DiscoveryQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.DiscoveryQuery.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.DiscoveryQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.DiscoveryQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubtype(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getModel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string subtype = 1; + * @return {string} + */ +proto.viam.robot.v1.DiscoveryQuery.prototype.getSubtype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.robot.v1.DiscoveryQuery} returns this + */ +proto.viam.robot.v1.DiscoveryQuery.prototype.setSubtype = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string model = 2; + * @return {string} + */ +proto.viam.robot.v1.DiscoveryQuery.prototype.getModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.robot.v1.DiscoveryQuery} returns this + */ +proto.viam.robot.v1.DiscoveryQuery.prototype.setModel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.Discovery.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.Discovery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.Discovery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.Discovery.toObject = function(includeInstance, msg) { + var f, obj = { + query: (f = msg.getQuery()) && proto.viam.robot.v1.DiscoveryQuery.toObject(includeInstance, f), + results: (f = msg.getResults()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.Discovery} + */ +proto.viam.robot.v1.Discovery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.Discovery; + return proto.viam.robot.v1.Discovery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.Discovery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.Discovery} + */ +proto.viam.robot.v1.Discovery.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.robot.v1.DiscoveryQuery; + reader.readMessage(value,proto.viam.robot.v1.DiscoveryQuery.deserializeBinaryFromReader); + msg.setQuery(value); + break; + case 2: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setResults(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.Discovery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.Discovery.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.Discovery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.Discovery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.robot.v1.DiscoveryQuery.serializeBinaryToWriter + ); + } + f = message.getResults(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DiscoveryQuery query = 1; + * @return {?proto.viam.robot.v1.DiscoveryQuery} + */ +proto.viam.robot.v1.Discovery.prototype.getQuery = function() { + return /** @type{?proto.viam.robot.v1.DiscoveryQuery} */ ( + jspb.Message.getWrapperField(this, proto.viam.robot.v1.DiscoveryQuery, 1)); +}; + + +/** + * @param {?proto.viam.robot.v1.DiscoveryQuery|undefined} value + * @return {!proto.viam.robot.v1.Discovery} returns this +*/ +proto.viam.robot.v1.Discovery.prototype.setQuery = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.Discovery} returns this + */ +proto.viam.robot.v1.Discovery.prototype.clearQuery = function() { + return this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.Discovery.prototype.hasQuery = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Struct results = 2; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.robot.v1.Discovery.prototype.getResults = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.robot.v1.Discovery} returns this +*/ +proto.viam.robot.v1.Discovery.prototype.setResults = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.Discovery} returns this + */ +proto.viam.robot.v1.Discovery.prototype.clearResults = function() { + return this.setResults(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.Discovery.prototype.hasResults = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.DiscoverComponentsRequest.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.DiscoverComponentsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.DiscoverComponentsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.DiscoverComponentsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.DiscoverComponentsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + queriesList: jspb.Message.toObjectList(msg.getQueriesList(), + proto.viam.robot.v1.DiscoveryQuery.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.DiscoverComponentsRequest} + */ +proto.viam.robot.v1.DiscoverComponentsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.DiscoverComponentsRequest; + return proto.viam.robot.v1.DiscoverComponentsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.DiscoverComponentsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.DiscoverComponentsRequest} + */ +proto.viam.robot.v1.DiscoverComponentsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.robot.v1.DiscoveryQuery; + reader.readMessage(value,proto.viam.robot.v1.DiscoveryQuery.deserializeBinaryFromReader); + msg.addQueries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.DiscoverComponentsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.DiscoverComponentsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.DiscoverComponentsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.DiscoverComponentsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQueriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.robot.v1.DiscoveryQuery.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DiscoveryQuery queries = 1; + * @return {!Array} + */ +proto.viam.robot.v1.DiscoverComponentsRequest.prototype.getQueriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.robot.v1.DiscoveryQuery, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.DiscoverComponentsRequest} returns this +*/ +proto.viam.robot.v1.DiscoverComponentsRequest.prototype.setQueriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.robot.v1.DiscoveryQuery=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.robot.v1.DiscoveryQuery} + */ +proto.viam.robot.v1.DiscoverComponentsRequest.prototype.addQueries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.robot.v1.DiscoveryQuery, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.DiscoverComponentsRequest} returns this + */ +proto.viam.robot.v1.DiscoverComponentsRequest.prototype.clearQueriesList = function() { + return this.setQueriesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.DiscoverComponentsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.DiscoverComponentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.DiscoverComponentsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.DiscoverComponentsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.DiscoverComponentsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + discoveryList: jspb.Message.toObjectList(msg.getDiscoveryList(), + proto.viam.robot.v1.Discovery.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.DiscoverComponentsResponse} + */ +proto.viam.robot.v1.DiscoverComponentsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.DiscoverComponentsResponse; + return proto.viam.robot.v1.DiscoverComponentsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.DiscoverComponentsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.DiscoverComponentsResponse} + */ +proto.viam.robot.v1.DiscoverComponentsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.robot.v1.Discovery; + reader.readMessage(value,proto.viam.robot.v1.Discovery.deserializeBinaryFromReader); + msg.addDiscovery(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.DiscoverComponentsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.DiscoverComponentsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.DiscoverComponentsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.DiscoverComponentsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDiscoveryList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.robot.v1.Discovery.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Discovery discovery = 1; + * @return {!Array} + */ +proto.viam.robot.v1.DiscoverComponentsResponse.prototype.getDiscoveryList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.robot.v1.Discovery, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.DiscoverComponentsResponse} returns this +*/ +proto.viam.robot.v1.DiscoverComponentsResponse.prototype.setDiscoveryList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.robot.v1.Discovery=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.robot.v1.Discovery} + */ +proto.viam.robot.v1.DiscoverComponentsResponse.prototype.addDiscovery = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.robot.v1.Discovery, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.DiscoverComponentsResponse} returns this + */ +proto.viam.robot.v1.DiscoverComponentsResponse.prototype.clearDiscoveryList = function() { + return this.setDiscoveryList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.Status.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.Status.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.Status} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.Status.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = msg.getName()) && common_v1_common_pb.ResourceName.toObject(includeInstance, f), + status: (f = msg.getStatus()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.Status} + */ +proto.viam.robot.v1.Status.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.Status; + return proto.viam.robot.v1.Status.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.Status} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.Status} + */ +proto.viam.robot.v1.Status.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.setName(value); + break; + case 2: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.Status.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.Status.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.Status} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.Status.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } + f = message.getStatus(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.ResourceName name = 1; + * @return {?proto.viam.common.v1.ResourceName} + */ +proto.viam.robot.v1.Status.prototype.getName = function() { + return /** @type{?proto.viam.common.v1.ResourceName} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.ResourceName, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.ResourceName|undefined} value + * @return {!proto.viam.robot.v1.Status} returns this +*/ +proto.viam.robot.v1.Status.prototype.setName = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.Status} returns this + */ +proto.viam.robot.v1.Status.prototype.clearName = function() { + return this.setName(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.Status.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Struct status = 2; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.robot.v1.Status.prototype.getStatus = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.robot.v1.Status} returns this +*/ +proto.viam.robot.v1.Status.prototype.setStatus = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.Status} returns this + */ +proto.viam.robot.v1.Status.prototype.clearStatus = function() { + return this.setStatus(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.Status.prototype.hasStatus = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.GetStatusRequest.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.GetStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.GetStatusRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.GetStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.GetStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + resourceNamesList: jspb.Message.toObjectList(msg.getResourceNamesList(), + common_v1_common_pb.ResourceName.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.GetStatusRequest} + */ +proto.viam.robot.v1.GetStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.GetStatusRequest; + return proto.viam.robot.v1.GetStatusRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.GetStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.GetStatusRequest} + */ +proto.viam.robot.v1.GetStatusRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.addResourceNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.GetStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.GetStatusRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.GetStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.GetStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResourceNamesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated viam.common.v1.ResourceName resource_names = 1; + * @return {!Array} + */ +proto.viam.robot.v1.GetStatusRequest.prototype.getResourceNamesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_v1_common_pb.ResourceName, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.GetStatusRequest} returns this +*/ +proto.viam.robot.v1.GetStatusRequest.prototype.setResourceNamesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.common.v1.ResourceName=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.ResourceName} + */ +proto.viam.robot.v1.GetStatusRequest.prototype.addResourceNames = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.common.v1.ResourceName, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.GetStatusRequest} returns this + */ +proto.viam.robot.v1.GetStatusRequest.prototype.clearResourceNamesList = function() { + return this.setResourceNamesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.GetStatusResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.GetStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.GetStatusResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.GetStatusResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.GetStatusResponse.toObject = function(includeInstance, msg) { + var f, obj = { + statusList: jspb.Message.toObjectList(msg.getStatusList(), + proto.viam.robot.v1.Status.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.GetStatusResponse} + */ +proto.viam.robot.v1.GetStatusResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.GetStatusResponse; + return proto.viam.robot.v1.GetStatusResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.GetStatusResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.GetStatusResponse} + */ +proto.viam.robot.v1.GetStatusResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.robot.v1.Status; + reader.readMessage(value,proto.viam.robot.v1.Status.deserializeBinaryFromReader); + msg.addStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.GetStatusResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.GetStatusResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.GetStatusResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.GetStatusResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatusList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.robot.v1.Status.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Status status = 1; + * @return {!Array} + */ +proto.viam.robot.v1.GetStatusResponse.prototype.getStatusList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.robot.v1.Status, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.GetStatusResponse} returns this +*/ +proto.viam.robot.v1.GetStatusResponse.prototype.setStatusList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.robot.v1.Status=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.robot.v1.Status} + */ +proto.viam.robot.v1.GetStatusResponse.prototype.addStatus = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.robot.v1.Status, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.GetStatusResponse} returns this + */ +proto.viam.robot.v1.GetStatusResponse.prototype.clearStatusList = function() { + return this.setStatusList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.StreamStatusRequest.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.StreamStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.StreamStatusRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.StreamStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StreamStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + resourceNamesList: jspb.Message.toObjectList(msg.getResourceNamesList(), + common_v1_common_pb.ResourceName.toObject, includeInstance), + every: (f = msg.getEvery()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.StreamStatusRequest} + */ +proto.viam.robot.v1.StreamStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.StreamStatusRequest; + return proto.viam.robot.v1.StreamStatusRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.StreamStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.StreamStatusRequest} + */ +proto.viam.robot.v1.StreamStatusRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.addResourceNames(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setEvery(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.StreamStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.StreamStatusRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.StreamStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StreamStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResourceNamesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } + f = message.getEvery(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated viam.common.v1.ResourceName resource_names = 1; + * @return {!Array} + */ +proto.viam.robot.v1.StreamStatusRequest.prototype.getResourceNamesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_v1_common_pb.ResourceName, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.StreamStatusRequest} returns this +*/ +proto.viam.robot.v1.StreamStatusRequest.prototype.setResourceNamesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.common.v1.ResourceName=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.ResourceName} + */ +proto.viam.robot.v1.StreamStatusRequest.prototype.addResourceNames = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.common.v1.ResourceName, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.StreamStatusRequest} returns this + */ +proto.viam.robot.v1.StreamStatusRequest.prototype.clearResourceNamesList = function() { + return this.setResourceNamesList([]); +}; + + +/** + * optional google.protobuf.Duration every = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.viam.robot.v1.StreamStatusRequest.prototype.getEvery = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.viam.robot.v1.StreamStatusRequest} returns this +*/ +proto.viam.robot.v1.StreamStatusRequest.prototype.setEvery = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.StreamStatusRequest} returns this + */ +proto.viam.robot.v1.StreamStatusRequest.prototype.clearEvery = function() { + return this.setEvery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.StreamStatusRequest.prototype.hasEvery = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.StreamStatusResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.StreamStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.StreamStatusResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.StreamStatusResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StreamStatusResponse.toObject = function(includeInstance, msg) { + var f, obj = { + statusList: jspb.Message.toObjectList(msg.getStatusList(), + proto.viam.robot.v1.Status.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.StreamStatusResponse} + */ +proto.viam.robot.v1.StreamStatusResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.StreamStatusResponse; + return proto.viam.robot.v1.StreamStatusResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.StreamStatusResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.StreamStatusResponse} + */ +proto.viam.robot.v1.StreamStatusResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.robot.v1.Status; + reader.readMessage(value,proto.viam.robot.v1.Status.deserializeBinaryFromReader); + msg.addStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.StreamStatusResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.StreamStatusResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.StreamStatusResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StreamStatusResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatusList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.robot.v1.Status.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Status status = 1; + * @return {!Array} + */ +proto.viam.robot.v1.StreamStatusResponse.prototype.getStatusList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.robot.v1.Status, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.StreamStatusResponse} returns this +*/ +proto.viam.robot.v1.StreamStatusResponse.prototype.setStatusList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.robot.v1.Status=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.robot.v1.Status} + */ +proto.viam.robot.v1.StreamStatusResponse.prototype.addStatus = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.robot.v1.Status, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.StreamStatusResponse} returns this + */ +proto.viam.robot.v1.StreamStatusResponse.prototype.clearStatusList = function() { + return this.setStatusList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.StopExtraParameters.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.StopExtraParameters.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.StopExtraParameters} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StopExtraParameters.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = msg.getName()) && common_v1_common_pb.ResourceName.toObject(includeInstance, f), + params: (f = msg.getParams()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.StopExtraParameters} + */ +proto.viam.robot.v1.StopExtraParameters.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.StopExtraParameters; + return proto.viam.robot.v1.StopExtraParameters.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.StopExtraParameters} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.StopExtraParameters} + */ +proto.viam.robot.v1.StopExtraParameters.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.setName(value); + break; + case 2: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.StopExtraParameters.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.StopExtraParameters.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.StopExtraParameters} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StopExtraParameters.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.ResourceName name = 1; + * @return {?proto.viam.common.v1.ResourceName} + */ +proto.viam.robot.v1.StopExtraParameters.prototype.getName = function() { + return /** @type{?proto.viam.common.v1.ResourceName} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.ResourceName, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.ResourceName|undefined} value + * @return {!proto.viam.robot.v1.StopExtraParameters} returns this +*/ +proto.viam.robot.v1.StopExtraParameters.prototype.setName = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.StopExtraParameters} returns this + */ +proto.viam.robot.v1.StopExtraParameters.prototype.clearName = function() { + return this.setName(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.StopExtraParameters.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Struct params = 2; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.robot.v1.StopExtraParameters.prototype.getParams = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.robot.v1.StopExtraParameters} returns this +*/ +proto.viam.robot.v1.StopExtraParameters.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.robot.v1.StopExtraParameters} returns this + */ +proto.viam.robot.v1.StopExtraParameters.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.robot.v1.StopExtraParameters.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.robot.v1.StopAllRequest.repeatedFields_ = [99]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.StopAllRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.StopAllRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.StopAllRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StopAllRequest.toObject = function(includeInstance, msg) { + var f, obj = { + extraList: jspb.Message.toObjectList(msg.getExtraList(), + proto.viam.robot.v1.StopExtraParameters.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.StopAllRequest} + */ +proto.viam.robot.v1.StopAllRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.StopAllRequest; + return proto.viam.robot.v1.StopAllRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.StopAllRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.StopAllRequest} + */ +proto.viam.robot.v1.StopAllRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 99: + var value = new proto.viam.robot.v1.StopExtraParameters; + reader.readMessage(value,proto.viam.robot.v1.StopExtraParameters.deserializeBinaryFromReader); + msg.addExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.StopAllRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.StopAllRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.StopAllRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StopAllRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExtraList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 99, + f, + proto.viam.robot.v1.StopExtraParameters.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated StopExtraParameters extra = 99; + * @return {!Array} + */ +proto.viam.robot.v1.StopAllRequest.prototype.getExtraList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.robot.v1.StopExtraParameters, 99)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.robot.v1.StopAllRequest} returns this +*/ +proto.viam.robot.v1.StopAllRequest.prototype.setExtraList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 99, value); +}; + + +/** + * @param {!proto.viam.robot.v1.StopExtraParameters=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.robot.v1.StopExtraParameters} + */ +proto.viam.robot.v1.StopAllRequest.prototype.addExtra = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 99, opt_value, proto.viam.robot.v1.StopExtraParameters, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.robot.v1.StopAllRequest} returns this + */ +proto.viam.robot.v1.StopAllRequest.prototype.clearExtraList = function() { + return this.setExtraList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.robot.v1.StopAllResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.robot.v1.StopAllResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.robot.v1.StopAllResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StopAllResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.robot.v1.StopAllResponse} + */ +proto.viam.robot.v1.StopAllResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.robot.v1.StopAllResponse; + return proto.viam.robot.v1.StopAllResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.robot.v1.StopAllResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.robot.v1.StopAllResponse} + */ +proto.viam.robot.v1.StopAllResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.robot.v1.StopAllResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.robot.v1.StopAllResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.robot.v1.StopAllResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.robot.v1.StopAllResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.viam.robot.v1); diff --git a/gen/js/robot/v1/robot_pb_service.d.ts b/gen/js/robot/v1/robot_pb_service.d.ts new file mode 100644 index 000000000..3240f73aa --- /dev/null +++ b/gen/js/robot/v1/robot_pb_service.d.ts @@ -0,0 +1,245 @@ +// package: viam.robot.v1 +// file: robot/v1/robot.proto + +import * as robot_v1_robot_pb from "../../robot/v1/robot_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type RobotServiceGetOperations = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.GetOperationsRequest; + readonly responseType: typeof robot_v1_robot_pb.GetOperationsResponse; +}; + +type RobotServiceResourceNames = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.ResourceNamesRequest; + readonly responseType: typeof robot_v1_robot_pb.ResourceNamesResponse; +}; + +type RobotServiceResourceRPCSubtypes = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.ResourceRPCSubtypesRequest; + readonly responseType: typeof robot_v1_robot_pb.ResourceRPCSubtypesResponse; +}; + +type RobotServiceCancelOperation = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.CancelOperationRequest; + readonly responseType: typeof robot_v1_robot_pb.CancelOperationResponse; +}; + +type RobotServiceBlockForOperation = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.BlockForOperationRequest; + readonly responseType: typeof robot_v1_robot_pb.BlockForOperationResponse; +}; + +type RobotServiceDiscoverComponents = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.DiscoverComponentsRequest; + readonly responseType: typeof robot_v1_robot_pb.DiscoverComponentsResponse; +}; + +type RobotServiceFrameSystemConfig = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.FrameSystemConfigRequest; + readonly responseType: typeof robot_v1_robot_pb.FrameSystemConfigResponse; +}; + +type RobotServiceTransformPose = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.TransformPoseRequest; + readonly responseType: typeof robot_v1_robot_pb.TransformPoseResponse; +}; + +type RobotServiceGetStatus = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.GetStatusRequest; + readonly responseType: typeof robot_v1_robot_pb.GetStatusResponse; +}; + +type RobotServiceStreamStatus = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: true; + readonly requestType: typeof robot_v1_robot_pb.StreamStatusRequest; + readonly responseType: typeof robot_v1_robot_pb.StreamStatusResponse; +}; + +type RobotServiceStopAll = { + readonly methodName: string; + readonly service: typeof RobotService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof robot_v1_robot_pb.StopAllRequest; + readonly responseType: typeof robot_v1_robot_pb.StopAllResponse; +}; + +export class RobotService { + static readonly serviceName: string; + static readonly GetOperations: RobotServiceGetOperations; + static readonly ResourceNames: RobotServiceResourceNames; + static readonly ResourceRPCSubtypes: RobotServiceResourceRPCSubtypes; + static readonly CancelOperation: RobotServiceCancelOperation; + static readonly BlockForOperation: RobotServiceBlockForOperation; + static readonly DiscoverComponents: RobotServiceDiscoverComponents; + static readonly FrameSystemConfig: RobotServiceFrameSystemConfig; + static readonly TransformPose: RobotServiceTransformPose; + static readonly GetStatus: RobotServiceGetStatus; + static readonly StreamStatus: RobotServiceStreamStatus; + static readonly StopAll: RobotServiceStopAll; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class RobotServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getOperations( + requestMessage: robot_v1_robot_pb.GetOperationsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.GetOperationsResponse|null) => void + ): UnaryResponse; + getOperations( + requestMessage: robot_v1_robot_pb.GetOperationsRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.GetOperationsResponse|null) => void + ): UnaryResponse; + resourceNames( + requestMessage: robot_v1_robot_pb.ResourceNamesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.ResourceNamesResponse|null) => void + ): UnaryResponse; + resourceNames( + requestMessage: robot_v1_robot_pb.ResourceNamesRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.ResourceNamesResponse|null) => void + ): UnaryResponse; + resourceRPCSubtypes( + requestMessage: robot_v1_robot_pb.ResourceRPCSubtypesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.ResourceRPCSubtypesResponse|null) => void + ): UnaryResponse; + resourceRPCSubtypes( + requestMessage: robot_v1_robot_pb.ResourceRPCSubtypesRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.ResourceRPCSubtypesResponse|null) => void + ): UnaryResponse; + cancelOperation( + requestMessage: robot_v1_robot_pb.CancelOperationRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.CancelOperationResponse|null) => void + ): UnaryResponse; + cancelOperation( + requestMessage: robot_v1_robot_pb.CancelOperationRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.CancelOperationResponse|null) => void + ): UnaryResponse; + blockForOperation( + requestMessage: robot_v1_robot_pb.BlockForOperationRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.BlockForOperationResponse|null) => void + ): UnaryResponse; + blockForOperation( + requestMessage: robot_v1_robot_pb.BlockForOperationRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.BlockForOperationResponse|null) => void + ): UnaryResponse; + discoverComponents( + requestMessage: robot_v1_robot_pb.DiscoverComponentsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.DiscoverComponentsResponse|null) => void + ): UnaryResponse; + discoverComponents( + requestMessage: robot_v1_robot_pb.DiscoverComponentsRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.DiscoverComponentsResponse|null) => void + ): UnaryResponse; + frameSystemConfig( + requestMessage: robot_v1_robot_pb.FrameSystemConfigRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.FrameSystemConfigResponse|null) => void + ): UnaryResponse; + frameSystemConfig( + requestMessage: robot_v1_robot_pb.FrameSystemConfigRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.FrameSystemConfigResponse|null) => void + ): UnaryResponse; + transformPose( + requestMessage: robot_v1_robot_pb.TransformPoseRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.TransformPoseResponse|null) => void + ): UnaryResponse; + transformPose( + requestMessage: robot_v1_robot_pb.TransformPoseRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.TransformPoseResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: robot_v1_robot_pb.GetStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.GetStatusResponse|null) => void + ): UnaryResponse; + getStatus( + requestMessage: robot_v1_robot_pb.GetStatusRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.GetStatusResponse|null) => void + ): UnaryResponse; + streamStatus(requestMessage: robot_v1_robot_pb.StreamStatusRequest, metadata?: grpc.Metadata): ResponseStream; + stopAll( + requestMessage: robot_v1_robot_pb.StopAllRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.StopAllResponse|null) => void + ): UnaryResponse; + stopAll( + requestMessage: robot_v1_robot_pb.StopAllRequest, + callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.StopAllResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/robot/v1/robot_pb_service.js b/gen/js/robot/v1/robot_pb_service.js new file mode 100644 index 000000000..b572dbe30 --- /dev/null +++ b/gen/js/robot/v1/robot_pb_service.js @@ -0,0 +1,469 @@ +// package: viam.robot.v1 +// file: robot/v1/robot.proto + +var robot_v1_robot_pb = require("../../robot/v1/robot_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var RobotService = (function () { + function RobotService() {} + RobotService.serviceName = "viam.robot.v1.RobotService"; + return RobotService; +}()); + +RobotService.GetOperations = { + methodName: "GetOperations", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.GetOperationsRequest, + responseType: robot_v1_robot_pb.GetOperationsResponse +}; + +RobotService.ResourceNames = { + methodName: "ResourceNames", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.ResourceNamesRequest, + responseType: robot_v1_robot_pb.ResourceNamesResponse +}; + +RobotService.ResourceRPCSubtypes = { + methodName: "ResourceRPCSubtypes", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.ResourceRPCSubtypesRequest, + responseType: robot_v1_robot_pb.ResourceRPCSubtypesResponse +}; + +RobotService.CancelOperation = { + methodName: "CancelOperation", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.CancelOperationRequest, + responseType: robot_v1_robot_pb.CancelOperationResponse +}; + +RobotService.BlockForOperation = { + methodName: "BlockForOperation", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.BlockForOperationRequest, + responseType: robot_v1_robot_pb.BlockForOperationResponse +}; + +RobotService.DiscoverComponents = { + methodName: "DiscoverComponents", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.DiscoverComponentsRequest, + responseType: robot_v1_robot_pb.DiscoverComponentsResponse +}; + +RobotService.FrameSystemConfig = { + methodName: "FrameSystemConfig", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.FrameSystemConfigRequest, + responseType: robot_v1_robot_pb.FrameSystemConfigResponse +}; + +RobotService.TransformPose = { + methodName: "TransformPose", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.TransformPoseRequest, + responseType: robot_v1_robot_pb.TransformPoseResponse +}; + +RobotService.GetStatus = { + methodName: "GetStatus", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.GetStatusRequest, + responseType: robot_v1_robot_pb.GetStatusResponse +}; + +RobotService.StreamStatus = { + methodName: "StreamStatus", + service: RobotService, + requestStream: false, + responseStream: true, + requestType: robot_v1_robot_pb.StreamStatusRequest, + responseType: robot_v1_robot_pb.StreamStatusResponse +}; + +RobotService.StopAll = { + methodName: "StopAll", + service: RobotService, + requestStream: false, + responseStream: false, + requestType: robot_v1_robot_pb.StopAllRequest, + responseType: robot_v1_robot_pb.StopAllResponse +}; + +exports.RobotService = RobotService; + +function RobotServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +RobotServiceClient.prototype.getOperations = function getOperations(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.GetOperations, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.resourceNames = function resourceNames(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.ResourceNames, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.resourceRPCSubtypes = function resourceRPCSubtypes(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.ResourceRPCSubtypes, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.cancelOperation = function cancelOperation(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.CancelOperation, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.blockForOperation = function blockForOperation(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.BlockForOperation, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.discoverComponents = function discoverComponents(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.DiscoverComponents, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.frameSystemConfig = function frameSystemConfig(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.FrameSystemConfig, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.transformPose = function transformPose(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.TransformPose, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.getStatus = function getStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.GetStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.streamStatus = function streamStatus(requestMessage, metadata) { + var listeners = { + data: [], + end: [], + status: [] + }; + var client = grpc.invoke(RobotService.StreamStatus, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onMessage: function (responseMessage) { + listeners.data.forEach(function (handler) { + handler(responseMessage); + }); + }, + onEnd: function (status, statusMessage, trailers) { + listeners.status.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners.end.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners = null; + } + }); + return { + on: function (type, handler) { + listeners[type].push(handler); + return this; + }, + cancel: function () { + listeners = null; + client.close(); + } + }; +}; + +RobotServiceClient.prototype.stopAll = function stopAll(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(RobotService.StopAll, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.RobotServiceClient = RobotServiceClient; + diff --git a/gen/js/service/datamanager/v1/data_manager_grpc_web_pb.js b/gen/js/service/datamanager/v1/data_manager_grpc_web_pb.js new file mode 100644 index 000000000..87a5a929f --- /dev/null +++ b/gen/js/service/datamanager/v1/data_manager_grpc_web_pb.js @@ -0,0 +1,140 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.service.datamanager.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.service = {}; +proto.viam.service.datamanager = {}; +proto.viam.service.datamanager.v1 = require('./data_manager_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.datamanager.v1.DataManagerServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.datamanager.v1.DataManagerServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.datamanager.v1.SyncRequest, + * !proto.viam.service.datamanager.v1.SyncResponse>} + */ +const methodDescriptor_DataManagerService_Sync = new grpc.web.MethodDescriptor( + '/viam.service.datamanager.v1.DataManagerService/Sync', + grpc.web.MethodType.UNARY, + proto.viam.service.datamanager.v1.SyncRequest, + proto.viam.service.datamanager.v1.SyncResponse, + /** + * @param {!proto.viam.service.datamanager.v1.SyncRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.datamanager.v1.SyncResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.datamanager.v1.SyncRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.datamanager.v1.SyncResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.datamanager.v1.DataManagerServiceClient.prototype.sync = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.datamanager.v1.DataManagerService/Sync', + request, + metadata || {}, + methodDescriptor_DataManagerService_Sync, + callback); +}; + + +/** + * @param {!proto.viam.service.datamanager.v1.SyncRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.datamanager.v1.DataManagerServicePromiseClient.prototype.sync = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.datamanager.v1.DataManagerService/Sync', + request, + metadata || {}, + methodDescriptor_DataManagerService_Sync); +}; + + +module.exports = proto.viam.service.datamanager.v1; + diff --git a/gen/js/service/datamanager/v1/data_manager_pb.d.ts b/gen/js/service/datamanager/v1/data_manager_pb.d.ts new file mode 100644 index 000000000..c13e5a054 --- /dev/null +++ b/gen/js/service/datamanager/v1/data_manager_pb.d.ts @@ -0,0 +1,42 @@ +// package: viam.service.datamanager.v1 +// file: service/datamanager/v1/data_manager.proto + +import * as jspb from "google-protobuf"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; + +export class SyncRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncRequest.AsObject; + static toObject(includeInstance: boolean, msg: SyncRequest): SyncRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncRequest; + static deserializeBinaryFromReader(message: SyncRequest, reader: jspb.BinaryReader): SyncRequest; +} + +export namespace SyncRequest { + export type AsObject = { + name: string, + } +} + +export class SyncResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncResponse.AsObject; + static toObject(includeInstance: boolean, msg: SyncResponse): SyncResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncResponse; + static deserializeBinaryFromReader(message: SyncResponse, reader: jspb.BinaryReader): SyncResponse; +} + +export namespace SyncResponse { + export type AsObject = { + } +} + diff --git a/gen/js/service/datamanager/v1/data_manager_pb.js b/gen/js/service/datamanager/v1/data_manager_pb.js new file mode 100644 index 000000000..3513ff212 --- /dev/null +++ b/gen/js/service/datamanager/v1/data_manager_pb.js @@ -0,0 +1,295 @@ +// source: service/datamanager/v1/data_manager.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.viam.service.datamanager.v1.SyncRequest', null, global); +goog.exportSymbol('proto.viam.service.datamanager.v1.SyncResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.datamanager.v1.SyncRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.datamanager.v1.SyncRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.datamanager.v1.SyncRequest.displayName = 'proto.viam.service.datamanager.v1.SyncRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.datamanager.v1.SyncResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.datamanager.v1.SyncResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.datamanager.v1.SyncResponse.displayName = 'proto.viam.service.datamanager.v1.SyncResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.datamanager.v1.SyncRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.datamanager.v1.SyncRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.datamanager.v1.SyncRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.datamanager.v1.SyncRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.datamanager.v1.SyncRequest} + */ +proto.viam.service.datamanager.v1.SyncRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.datamanager.v1.SyncRequest; + return proto.viam.service.datamanager.v1.SyncRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.datamanager.v1.SyncRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.datamanager.v1.SyncRequest} + */ +proto.viam.service.datamanager.v1.SyncRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.datamanager.v1.SyncRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.datamanager.v1.SyncRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.datamanager.v1.SyncRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.datamanager.v1.SyncRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.datamanager.v1.SyncRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.datamanager.v1.SyncRequest} returns this + */ +proto.viam.service.datamanager.v1.SyncRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.datamanager.v1.SyncResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.datamanager.v1.SyncResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.datamanager.v1.SyncResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.datamanager.v1.SyncResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.datamanager.v1.SyncResponse} + */ +proto.viam.service.datamanager.v1.SyncResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.datamanager.v1.SyncResponse; + return proto.viam.service.datamanager.v1.SyncResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.datamanager.v1.SyncResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.datamanager.v1.SyncResponse} + */ +proto.viam.service.datamanager.v1.SyncResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.datamanager.v1.SyncResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.datamanager.v1.SyncResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.datamanager.v1.SyncResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.datamanager.v1.SyncResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.viam.service.datamanager.v1); diff --git a/gen/js/service/datamanager/v1/data_manager_pb_service.d.ts b/gen/js/service/datamanager/v1/data_manager_pb_service.d.ts new file mode 100644 index 000000000..44a598eb8 --- /dev/null +++ b/gen/js/service/datamanager/v1/data_manager_pb_service.d.ts @@ -0,0 +1,63 @@ +// package: viam.service.datamanager.v1 +// file: service/datamanager/v1/data_manager.proto + +import * as service_datamanager_v1_data_manager_pb from "../../../service/datamanager/v1/data_manager_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type DataManagerServiceSync = { + readonly methodName: string; + readonly service: typeof DataManagerService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_datamanager_v1_data_manager_pb.SyncRequest; + readonly responseType: typeof service_datamanager_v1_data_manager_pb.SyncResponse; +}; + +export class DataManagerService { + static readonly serviceName: string; + static readonly Sync: DataManagerServiceSync; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class DataManagerServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + sync( + requestMessage: service_datamanager_v1_data_manager_pb.SyncRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_datamanager_v1_data_manager_pb.SyncResponse|null) => void + ): UnaryResponse; + sync( + requestMessage: service_datamanager_v1_data_manager_pb.SyncRequest, + callback: (error: ServiceError|null, responseMessage: service_datamanager_v1_data_manager_pb.SyncResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/service/datamanager/v1/data_manager_pb_service.js b/gen/js/service/datamanager/v1/data_manager_pb_service.js new file mode 100644 index 000000000..9815206e9 --- /dev/null +++ b/gen/js/service/datamanager/v1/data_manager_pb_service.js @@ -0,0 +1,61 @@ +// package: viam.service.datamanager.v1 +// file: service/datamanager/v1/data_manager.proto + +var service_datamanager_v1_data_manager_pb = require("../../../service/datamanager/v1/data_manager_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var DataManagerService = (function () { + function DataManagerService() {} + DataManagerService.serviceName = "viam.service.datamanager.v1.DataManagerService"; + return DataManagerService; +}()); + +DataManagerService.Sync = { + methodName: "Sync", + service: DataManagerService, + requestStream: false, + responseStream: false, + requestType: service_datamanager_v1_data_manager_pb.SyncRequest, + responseType: service_datamanager_v1_data_manager_pb.SyncResponse +}; + +exports.DataManagerService = DataManagerService; + +function DataManagerServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +DataManagerServiceClient.prototype.sync = function sync(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(DataManagerService.Sync, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.DataManagerServiceClient = DataManagerServiceClient; + diff --git a/gen/js/service/motion/v1/motion_grpc_web_pb.js b/gen/js/service/motion/v1/motion_grpc_web_pb.js new file mode 100644 index 000000000..dfffdfba6 --- /dev/null +++ b/gen/js/service/motion/v1/motion_grpc_web_pb.js @@ -0,0 +1,266 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.service.motion.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.service = {}; +proto.viam.service.motion = {}; +proto.viam.service.motion.v1 = require('./motion_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.motion.v1.MotionServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.motion.v1.MotionServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.motion.v1.MoveRequest, + * !proto.viam.service.motion.v1.MoveResponse>} + */ +const methodDescriptor_MotionService_Move = new grpc.web.MethodDescriptor( + '/viam.service.motion.v1.MotionService/Move', + grpc.web.MethodType.UNARY, + proto.viam.service.motion.v1.MoveRequest, + proto.viam.service.motion.v1.MoveResponse, + /** + * @param {!proto.viam.service.motion.v1.MoveRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.motion.v1.MoveResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.motion.v1.MoveRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.motion.v1.MoveResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.motion.v1.MotionServiceClient.prototype.move = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.motion.v1.MotionService/Move', + request, + metadata || {}, + methodDescriptor_MotionService_Move, + callback); +}; + + +/** + * @param {!proto.viam.service.motion.v1.MoveRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.motion.v1.MotionServicePromiseClient.prototype.move = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.motion.v1.MotionService/Move', + request, + metadata || {}, + methodDescriptor_MotionService_Move); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.motion.v1.MoveSingleComponentRequest, + * !proto.viam.service.motion.v1.MoveSingleComponentResponse>} + */ +const methodDescriptor_MotionService_MoveSingleComponent = new grpc.web.MethodDescriptor( + '/viam.service.motion.v1.MotionService/MoveSingleComponent', + grpc.web.MethodType.UNARY, + proto.viam.service.motion.v1.MoveSingleComponentRequest, + proto.viam.service.motion.v1.MoveSingleComponentResponse, + /** + * @param {!proto.viam.service.motion.v1.MoveSingleComponentRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.motion.v1.MoveSingleComponentResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.motion.v1.MoveSingleComponentRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.motion.v1.MoveSingleComponentResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.motion.v1.MotionServiceClient.prototype.moveSingleComponent = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.motion.v1.MotionService/MoveSingleComponent', + request, + metadata || {}, + methodDescriptor_MotionService_MoveSingleComponent, + callback); +}; + + +/** + * @param {!proto.viam.service.motion.v1.MoveSingleComponentRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.motion.v1.MotionServicePromiseClient.prototype.moveSingleComponent = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.motion.v1.MotionService/MoveSingleComponent', + request, + metadata || {}, + methodDescriptor_MotionService_MoveSingleComponent); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.motion.v1.GetPoseRequest, + * !proto.viam.service.motion.v1.GetPoseResponse>} + */ +const methodDescriptor_MotionService_GetPose = new grpc.web.MethodDescriptor( + '/viam.service.motion.v1.MotionService/GetPose', + grpc.web.MethodType.UNARY, + proto.viam.service.motion.v1.GetPoseRequest, + proto.viam.service.motion.v1.GetPoseResponse, + /** + * @param {!proto.viam.service.motion.v1.GetPoseRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.motion.v1.GetPoseResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.motion.v1.GetPoseRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.motion.v1.GetPoseResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.motion.v1.MotionServiceClient.prototype.getPose = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.motion.v1.MotionService/GetPose', + request, + metadata || {}, + methodDescriptor_MotionService_GetPose, + callback); +}; + + +/** + * @param {!proto.viam.service.motion.v1.GetPoseRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.motion.v1.MotionServicePromiseClient.prototype.getPose = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.motion.v1.MotionService/GetPose', + request, + metadata || {}, + methodDescriptor_MotionService_GetPose); +}; + + +module.exports = proto.viam.service.motion.v1; + diff --git a/gen/js/service/motion/v1/motion_pb.d.ts b/gen/js/service/motion/v1/motion_pb.d.ts new file mode 100644 index 000000000..6c6c51520 --- /dev/null +++ b/gen/js/service/motion/v1/motion_pb.d.ts @@ -0,0 +1,200 @@ +// package: viam.service.motion.v1 +// file: service/motion/v1/motion.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class MoveRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): common_v1_common_pb.PoseInFrame | undefined; + setDestination(value?: common_v1_common_pb.PoseInFrame): void; + + hasComponentName(): boolean; + clearComponentName(): void; + getComponentName(): common_v1_common_pb.ResourceName | undefined; + setComponentName(value?: common_v1_common_pb.ResourceName): void; + + hasWorldState(): boolean; + clearWorldState(): void; + getWorldState(): common_v1_common_pb.WorldState | undefined; + setWorldState(value?: common_v1_common_pb.WorldState): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveRequest.AsObject; + static toObject(includeInstance: boolean, msg: MoveRequest): MoveRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveRequest; + static deserializeBinaryFromReader(message: MoveRequest, reader: jspb.BinaryReader): MoveRequest; +} + +export namespace MoveRequest { + export type AsObject = { + name: string, + destination?: common_v1_common_pb.PoseInFrame.AsObject, + componentName?: common_v1_common_pb.ResourceName.AsObject, + worldState?: common_v1_common_pb.WorldState.AsObject, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class MoveResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveResponse.AsObject; + static toObject(includeInstance: boolean, msg: MoveResponse): MoveResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveResponse; + static deserializeBinaryFromReader(message: MoveResponse, reader: jspb.BinaryReader): MoveResponse; +} + +export namespace MoveResponse { + export type AsObject = { + success: boolean, + } +} + +export class MoveSingleComponentRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): common_v1_common_pb.PoseInFrame | undefined; + setDestination(value?: common_v1_common_pb.PoseInFrame): void; + + hasComponentName(): boolean; + clearComponentName(): void; + getComponentName(): common_v1_common_pb.ResourceName | undefined; + setComponentName(value?: common_v1_common_pb.ResourceName): void; + + hasWorldState(): boolean; + clearWorldState(): void; + getWorldState(): common_v1_common_pb.WorldState | undefined; + setWorldState(value?: common_v1_common_pb.WorldState): void; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveSingleComponentRequest.AsObject; + static toObject(includeInstance: boolean, msg: MoveSingleComponentRequest): MoveSingleComponentRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveSingleComponentRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveSingleComponentRequest; + static deserializeBinaryFromReader(message: MoveSingleComponentRequest, reader: jspb.BinaryReader): MoveSingleComponentRequest; +} + +export namespace MoveSingleComponentRequest { + export type AsObject = { + name: string, + destination?: common_v1_common_pb.PoseInFrame.AsObject, + componentName?: common_v1_common_pb.ResourceName.AsObject, + worldState?: common_v1_common_pb.WorldState.AsObject, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class MoveSingleComponentResponse extends jspb.Message { + getSuccess(): boolean; + setSuccess(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MoveSingleComponentResponse.AsObject; + static toObject(includeInstance: boolean, msg: MoveSingleComponentResponse): MoveSingleComponentResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MoveSingleComponentResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MoveSingleComponentResponse; + static deserializeBinaryFromReader(message: MoveSingleComponentResponse, reader: jspb.BinaryReader): MoveSingleComponentResponse; +} + +export namespace MoveSingleComponentResponse { + export type AsObject = { + success: boolean, + } +} + +export class GetPoseRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasComponentName(): boolean; + clearComponentName(): void; + getComponentName(): common_v1_common_pb.ResourceName | undefined; + setComponentName(value?: common_v1_common_pb.ResourceName): void; + + getDestinationFrame(): string; + setDestinationFrame(value: string): void; + + clearSupplementalTransformsList(): void; + getSupplementalTransformsList(): Array; + setSupplementalTransformsList(value: Array): void; + addSupplementalTransforms(value?: common_v1_common_pb.Transform, index?: number): common_v1_common_pb.Transform; + + hasExtra(): boolean; + clearExtra(): void; + getExtra(): google_protobuf_struct_pb.Struct | undefined; + setExtra(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPoseRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPoseRequest): GetPoseRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPoseRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPoseRequest; + static deserializeBinaryFromReader(message: GetPoseRequest, reader: jspb.BinaryReader): GetPoseRequest; +} + +export namespace GetPoseRequest { + export type AsObject = { + name: string, + componentName?: common_v1_common_pb.ResourceName.AsObject, + destinationFrame: string, + supplementalTransformsList: Array, + extra?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class GetPoseResponse extends jspb.Message { + hasPose(): boolean; + clearPose(): void; + getPose(): common_v1_common_pb.PoseInFrame | undefined; + setPose(value?: common_v1_common_pb.PoseInFrame): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPoseResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPoseResponse): GetPoseResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPoseResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPoseResponse; + static deserializeBinaryFromReader(message: GetPoseResponse, reader: jspb.BinaryReader): GetPoseResponse; +} + +export namespace GetPoseResponse { + export type AsObject = { + pose?: common_v1_common_pb.PoseInFrame.AsObject, + } +} + diff --git a/gen/js/service/motion/v1/motion_pb.js b/gen/js/service/motion/v1/motion_pb.js new file mode 100644 index 000000000..675982207 --- /dev/null +++ b/gen/js/service/motion/v1/motion_pb.js @@ -0,0 +1,1557 @@ +// source: service/motion/v1/motion.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.service.motion.v1.GetPoseRequest', null, global); +goog.exportSymbol('proto.viam.service.motion.v1.GetPoseResponse', null, global); +goog.exportSymbol('proto.viam.service.motion.v1.MoveRequest', null, global); +goog.exportSymbol('proto.viam.service.motion.v1.MoveResponse', null, global); +goog.exportSymbol('proto.viam.service.motion.v1.MoveSingleComponentRequest', null, global); +goog.exportSymbol('proto.viam.service.motion.v1.MoveSingleComponentResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.motion.v1.MoveRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.motion.v1.MoveRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.motion.v1.MoveRequest.displayName = 'proto.viam.service.motion.v1.MoveRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.motion.v1.MoveResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.motion.v1.MoveResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.motion.v1.MoveResponse.displayName = 'proto.viam.service.motion.v1.MoveResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.motion.v1.MoveSingleComponentRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.motion.v1.MoveSingleComponentRequest.displayName = 'proto.viam.service.motion.v1.MoveSingleComponentRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.motion.v1.MoveSingleComponentResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.motion.v1.MoveSingleComponentResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.motion.v1.MoveSingleComponentResponse.displayName = 'proto.viam.service.motion.v1.MoveSingleComponentResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.motion.v1.GetPoseRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.motion.v1.GetPoseRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.motion.v1.GetPoseRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.motion.v1.GetPoseRequest.displayName = 'proto.viam.service.motion.v1.GetPoseRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.motion.v1.GetPoseResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.motion.v1.GetPoseResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.motion.v1.GetPoseResponse.displayName = 'proto.viam.service.motion.v1.GetPoseResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.motion.v1.MoveRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.motion.v1.MoveRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.MoveRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + destination: (f = msg.getDestination()) && common_v1_common_pb.PoseInFrame.toObject(includeInstance, f), + componentName: (f = msg.getComponentName()) && common_v1_common_pb.ResourceName.toObject(includeInstance, f), + worldState: (f = msg.getWorldState()) && common_v1_common_pb.WorldState.toObject(includeInstance, f), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.motion.v1.MoveRequest} + */ +proto.viam.service.motion.v1.MoveRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.motion.v1.MoveRequest; + return proto.viam.service.motion.v1.MoveRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.motion.v1.MoveRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.motion.v1.MoveRequest} + */ +proto.viam.service.motion.v1.MoveRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new common_v1_common_pb.PoseInFrame; + reader.readMessage(value,common_v1_common_pb.PoseInFrame.deserializeBinaryFromReader); + msg.setDestination(value); + break; + case 3: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.setComponentName(value); + break; + case 4: + var value = new common_v1_common_pb.WorldState; + reader.readMessage(value,common_v1_common_pb.WorldState.deserializeBinaryFromReader); + msg.setWorldState(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.motion.v1.MoveRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.motion.v1.MoveRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.MoveRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDestination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_v1_common_pb.PoseInFrame.serializeBinaryToWriter + ); + } + f = message.getComponentName(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } + f = message.getWorldState(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_v1_common_pb.WorldState.serializeBinaryToWriter + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.motion.v1.MoveRequest} returns this + */ +proto.viam.service.motion.v1.MoveRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional viam.common.v1.PoseInFrame destination = 2; + * @return {?proto.viam.common.v1.PoseInFrame} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.getDestination = function() { + return /** @type{?proto.viam.common.v1.PoseInFrame} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.PoseInFrame, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.PoseInFrame|undefined} value + * @return {!proto.viam.service.motion.v1.MoveRequest} returns this +*/ +proto.viam.service.motion.v1.MoveRequest.prototype.setDestination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.MoveRequest} returns this + */ +proto.viam.service.motion.v1.MoveRequest.prototype.clearDestination = function() { + return this.setDestination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.hasDestination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional viam.common.v1.ResourceName component_name = 3; + * @return {?proto.viam.common.v1.ResourceName} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.getComponentName = function() { + return /** @type{?proto.viam.common.v1.ResourceName} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.ResourceName, 3)); +}; + + +/** + * @param {?proto.viam.common.v1.ResourceName|undefined} value + * @return {!proto.viam.service.motion.v1.MoveRequest} returns this +*/ +proto.viam.service.motion.v1.MoveRequest.prototype.setComponentName = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.MoveRequest} returns this + */ +proto.viam.service.motion.v1.MoveRequest.prototype.clearComponentName = function() { + return this.setComponentName(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.hasComponentName = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional viam.common.v1.WorldState world_state = 4; + * @return {?proto.viam.common.v1.WorldState} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.getWorldState = function() { + return /** @type{?proto.viam.common.v1.WorldState} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.WorldState, 4)); +}; + + +/** + * @param {?proto.viam.common.v1.WorldState|undefined} value + * @return {!proto.viam.service.motion.v1.MoveRequest} returns this +*/ +proto.viam.service.motion.v1.MoveRequest.prototype.setWorldState = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.MoveRequest} returns this + */ +proto.viam.service.motion.v1.MoveRequest.prototype.clearWorldState = function() { + return this.setWorldState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.hasWorldState = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.service.motion.v1.MoveRequest} returns this +*/ +proto.viam.service.motion.v1.MoveRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.MoveRequest} returns this + */ +proto.viam.service.motion.v1.MoveRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.motion.v1.MoveResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.motion.v1.MoveResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.motion.v1.MoveResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.MoveResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.motion.v1.MoveResponse} + */ +proto.viam.service.motion.v1.MoveResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.motion.v1.MoveResponse; + return proto.viam.service.motion.v1.MoveResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.motion.v1.MoveResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.motion.v1.MoveResponse} + */ +proto.viam.service.motion.v1.MoveResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.motion.v1.MoveResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.motion.v1.MoveResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.motion.v1.MoveResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.MoveResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.service.motion.v1.MoveResponse} returns this + */ +proto.viam.service.motion.v1.MoveResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.motion.v1.MoveSingleComponentRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.motion.v1.MoveSingleComponentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + destination: (f = msg.getDestination()) && common_v1_common_pb.PoseInFrame.toObject(includeInstance, f), + componentName: (f = msg.getComponentName()) && common_v1_common_pb.ResourceName.toObject(includeInstance, f), + worldState: (f = msg.getWorldState()) && common_v1_common_pb.WorldState.toObject(includeInstance, f), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.motion.v1.MoveSingleComponentRequest; + return proto.viam.service.motion.v1.MoveSingleComponentRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.motion.v1.MoveSingleComponentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new common_v1_common_pb.PoseInFrame; + reader.readMessage(value,common_v1_common_pb.PoseInFrame.deserializeBinaryFromReader); + msg.setDestination(value); + break; + case 3: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.setComponentName(value); + break; + case 4: + var value = new common_v1_common_pb.WorldState; + reader.readMessage(value,common_v1_common_pb.WorldState.deserializeBinaryFromReader); + msg.setWorldState(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.motion.v1.MoveSingleComponentRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.motion.v1.MoveSingleComponentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDestination(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_v1_common_pb.PoseInFrame.serializeBinaryToWriter + ); + } + f = message.getComponentName(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } + f = message.getWorldState(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_v1_common_pb.WorldState.serializeBinaryToWriter + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} returns this + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional viam.common.v1.PoseInFrame destination = 2; + * @return {?proto.viam.common.v1.PoseInFrame} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.getDestination = function() { + return /** @type{?proto.viam.common.v1.PoseInFrame} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.PoseInFrame, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.PoseInFrame|undefined} value + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} returns this +*/ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.setDestination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} returns this + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.clearDestination = function() { + return this.setDestination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.hasDestination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional viam.common.v1.ResourceName component_name = 3; + * @return {?proto.viam.common.v1.ResourceName} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.getComponentName = function() { + return /** @type{?proto.viam.common.v1.ResourceName} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.ResourceName, 3)); +}; + + +/** + * @param {?proto.viam.common.v1.ResourceName|undefined} value + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} returns this +*/ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.setComponentName = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} returns this + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.clearComponentName = function() { + return this.setComponentName(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.hasComponentName = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional viam.common.v1.WorldState world_state = 4; + * @return {?proto.viam.common.v1.WorldState} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.getWorldState = function() { + return /** @type{?proto.viam.common.v1.WorldState} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.WorldState, 4)); +}; + + +/** + * @param {?proto.viam.common.v1.WorldState|undefined} value + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} returns this +*/ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.setWorldState = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} returns this + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.clearWorldState = function() { + return this.setWorldState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.hasWorldState = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} returns this +*/ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.MoveSingleComponentRequest} returns this + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveSingleComponentRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.motion.v1.MoveSingleComponentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.motion.v1.MoveSingleComponentResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.motion.v1.MoveSingleComponentResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.MoveSingleComponentResponse.toObject = function(includeInstance, msg) { + var f, obj = { + success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.motion.v1.MoveSingleComponentResponse} + */ +proto.viam.service.motion.v1.MoveSingleComponentResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.motion.v1.MoveSingleComponentResponse; + return proto.viam.service.motion.v1.MoveSingleComponentResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.motion.v1.MoveSingleComponentResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.motion.v1.MoveSingleComponentResponse} + */ +proto.viam.service.motion.v1.MoveSingleComponentResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.motion.v1.MoveSingleComponentResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.motion.v1.MoveSingleComponentResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.motion.v1.MoveSingleComponentResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.MoveSingleComponentResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSuccess(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool success = 1; + * @return {boolean} + */ +proto.viam.service.motion.v1.MoveSingleComponentResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.service.motion.v1.MoveSingleComponentResponse} returns this + */ +proto.viam.service.motion.v1.MoveSingleComponentResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.motion.v1.GetPoseRequest.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.motion.v1.GetPoseRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.motion.v1.GetPoseRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.GetPoseRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + componentName: (f = msg.getComponentName()) && common_v1_common_pb.ResourceName.toObject(includeInstance, f), + destinationFrame: jspb.Message.getFieldWithDefault(msg, 3, ""), + supplementalTransformsList: jspb.Message.toObjectList(msg.getSupplementalTransformsList(), + common_v1_common_pb.Transform.toObject, includeInstance), + extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.motion.v1.GetPoseRequest} + */ +proto.viam.service.motion.v1.GetPoseRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.motion.v1.GetPoseRequest; + return proto.viam.service.motion.v1.GetPoseRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.motion.v1.GetPoseRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.motion.v1.GetPoseRequest} + */ +proto.viam.service.motion.v1.GetPoseRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.setComponentName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDestinationFrame(value); + break; + case 4: + var value = new common_v1_common_pb.Transform; + reader.readMessage(value,common_v1_common_pb.Transform.deserializeBinaryFromReader); + msg.addSupplementalTransforms(value); + break; + case 99: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.motion.v1.GetPoseRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.motion.v1.GetPoseRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.GetPoseRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getComponentName(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } + f = message.getDestinationFrame(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSupplementalTransformsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + common_v1_common_pb.Transform.serializeBinaryToWriter + ); + } + f = message.getExtra(); + if (f != null) { + writer.writeMessage( + 99, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.motion.v1.GetPoseRequest} returns this + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional viam.common.v1.ResourceName component_name = 2; + * @return {?proto.viam.common.v1.ResourceName} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.getComponentName = function() { + return /** @type{?proto.viam.common.v1.ResourceName} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.ResourceName, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.ResourceName|undefined} value + * @return {!proto.viam.service.motion.v1.GetPoseRequest} returns this +*/ +proto.viam.service.motion.v1.GetPoseRequest.prototype.setComponentName = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.GetPoseRequest} returns this + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.clearComponentName = function() { + return this.setComponentName(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.hasComponentName = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string destination_frame = 3; + * @return {string} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.getDestinationFrame = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.motion.v1.GetPoseRequest} returns this + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.setDestinationFrame = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated viam.common.v1.Transform supplemental_transforms = 4; + * @return {!Array} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.getSupplementalTransformsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_v1_common_pb.Transform, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.motion.v1.GetPoseRequest} returns this +*/ +proto.viam.service.motion.v1.GetPoseRequest.prototype.setSupplementalTransformsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.viam.common.v1.Transform=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.Transform} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.addSupplementalTransforms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.viam.common.v1.Transform, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.motion.v1.GetPoseRequest} returns this + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.clearSupplementalTransformsList = function() { + return this.setSupplementalTransformsList([]); +}; + + +/** + * optional google.protobuf.Struct extra = 99; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.getExtra = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.service.motion.v1.GetPoseRequest} returns this +*/ +proto.viam.service.motion.v1.GetPoseRequest.prototype.setExtra = function(value) { + return jspb.Message.setWrapperField(this, 99, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.GetPoseRequest} returns this + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.clearExtra = function() { + return this.setExtra(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.GetPoseRequest.prototype.hasExtra = function() { + return jspb.Message.getField(this, 99) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.motion.v1.GetPoseResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.motion.v1.GetPoseResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.motion.v1.GetPoseResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.GetPoseResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pose: (f = msg.getPose()) && common_v1_common_pb.PoseInFrame.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.motion.v1.GetPoseResponse} + */ +proto.viam.service.motion.v1.GetPoseResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.motion.v1.GetPoseResponse; + return proto.viam.service.motion.v1.GetPoseResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.motion.v1.GetPoseResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.motion.v1.GetPoseResponse} + */ +proto.viam.service.motion.v1.GetPoseResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.PoseInFrame; + reader.readMessage(value,common_v1_common_pb.PoseInFrame.deserializeBinaryFromReader); + msg.setPose(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.motion.v1.GetPoseResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.motion.v1.GetPoseResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.motion.v1.GetPoseResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.motion.v1.GetPoseResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPose(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.PoseInFrame.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.PoseInFrame pose = 1; + * @return {?proto.viam.common.v1.PoseInFrame} + */ +proto.viam.service.motion.v1.GetPoseResponse.prototype.getPose = function() { + return /** @type{?proto.viam.common.v1.PoseInFrame} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.PoseInFrame, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.PoseInFrame|undefined} value + * @return {!proto.viam.service.motion.v1.GetPoseResponse} returns this +*/ +proto.viam.service.motion.v1.GetPoseResponse.prototype.setPose = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.motion.v1.GetPoseResponse} returns this + */ +proto.viam.service.motion.v1.GetPoseResponse.prototype.clearPose = function() { + return this.setPose(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.motion.v1.GetPoseResponse.prototype.hasPose = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.viam.service.motion.v1); diff --git a/gen/js/service/motion/v1/motion_pb_service.d.ts b/gen/js/service/motion/v1/motion_pb_service.d.ts new file mode 100644 index 000000000..7664a8231 --- /dev/null +++ b/gen/js/service/motion/v1/motion_pb_service.d.ts @@ -0,0 +1,101 @@ +// package: viam.service.motion.v1 +// file: service/motion/v1/motion.proto + +import * as service_motion_v1_motion_pb from "../../../service/motion/v1/motion_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type MotionServiceMove = { + readonly methodName: string; + readonly service: typeof MotionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_motion_v1_motion_pb.MoveRequest; + readonly responseType: typeof service_motion_v1_motion_pb.MoveResponse; +}; + +type MotionServiceMoveSingleComponent = { + readonly methodName: string; + readonly service: typeof MotionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_motion_v1_motion_pb.MoveSingleComponentRequest; + readonly responseType: typeof service_motion_v1_motion_pb.MoveSingleComponentResponse; +}; + +type MotionServiceGetPose = { + readonly methodName: string; + readonly service: typeof MotionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_motion_v1_motion_pb.GetPoseRequest; + readonly responseType: typeof service_motion_v1_motion_pb.GetPoseResponse; +}; + +export class MotionService { + static readonly serviceName: string; + static readonly Move: MotionServiceMove; + static readonly MoveSingleComponent: MotionServiceMoveSingleComponent; + static readonly GetPose: MotionServiceGetPose; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class MotionServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + move( + requestMessage: service_motion_v1_motion_pb.MoveRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_motion_v1_motion_pb.MoveResponse|null) => void + ): UnaryResponse; + move( + requestMessage: service_motion_v1_motion_pb.MoveRequest, + callback: (error: ServiceError|null, responseMessage: service_motion_v1_motion_pb.MoveResponse|null) => void + ): UnaryResponse; + moveSingleComponent( + requestMessage: service_motion_v1_motion_pb.MoveSingleComponentRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_motion_v1_motion_pb.MoveSingleComponentResponse|null) => void + ): UnaryResponse; + moveSingleComponent( + requestMessage: service_motion_v1_motion_pb.MoveSingleComponentRequest, + callback: (error: ServiceError|null, responseMessage: service_motion_v1_motion_pb.MoveSingleComponentResponse|null) => void + ): UnaryResponse; + getPose( + requestMessage: service_motion_v1_motion_pb.GetPoseRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_motion_v1_motion_pb.GetPoseResponse|null) => void + ): UnaryResponse; + getPose( + requestMessage: service_motion_v1_motion_pb.GetPoseRequest, + callback: (error: ServiceError|null, responseMessage: service_motion_v1_motion_pb.GetPoseResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/service/motion/v1/motion_pb_service.js b/gen/js/service/motion/v1/motion_pb_service.js new file mode 100644 index 000000000..121e2355d --- /dev/null +++ b/gen/js/service/motion/v1/motion_pb_service.js @@ -0,0 +1,141 @@ +// package: viam.service.motion.v1 +// file: service/motion/v1/motion.proto + +var service_motion_v1_motion_pb = require("../../../service/motion/v1/motion_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var MotionService = (function () { + function MotionService() {} + MotionService.serviceName = "viam.service.motion.v1.MotionService"; + return MotionService; +}()); + +MotionService.Move = { + methodName: "Move", + service: MotionService, + requestStream: false, + responseStream: false, + requestType: service_motion_v1_motion_pb.MoveRequest, + responseType: service_motion_v1_motion_pb.MoveResponse +}; + +MotionService.MoveSingleComponent = { + methodName: "MoveSingleComponent", + service: MotionService, + requestStream: false, + responseStream: false, + requestType: service_motion_v1_motion_pb.MoveSingleComponentRequest, + responseType: service_motion_v1_motion_pb.MoveSingleComponentResponse +}; + +MotionService.GetPose = { + methodName: "GetPose", + service: MotionService, + requestStream: false, + responseStream: false, + requestType: service_motion_v1_motion_pb.GetPoseRequest, + responseType: service_motion_v1_motion_pb.GetPoseResponse +}; + +exports.MotionService = MotionService; + +function MotionServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +MotionServiceClient.prototype.move = function move(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotionService.Move, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MotionServiceClient.prototype.moveSingleComponent = function moveSingleComponent(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotionService.MoveSingleComponent, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +MotionServiceClient.prototype.getPose = function getPose(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(MotionService.GetPose, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.MotionServiceClient = MotionServiceClient; + diff --git a/gen/js/service/navigation/v1/navigation_grpc_web_pb.js b/gen/js/service/navigation/v1/navigation_grpc_web_pb.js new file mode 100644 index 000000000..d3e90b931 --- /dev/null +++ b/gen/js/service/navigation/v1/navigation_grpc_web_pb.js @@ -0,0 +1,447 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.service.navigation.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.service = {}; +proto.viam.service.navigation = {}; +proto.viam.service.navigation.v1 = require('./navigation_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.navigation.v1.NavigationServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.navigation.v1.NavigationServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.navigation.v1.GetModeRequest, + * !proto.viam.service.navigation.v1.GetModeResponse>} + */ +const methodDescriptor_NavigationService_GetMode = new grpc.web.MethodDescriptor( + '/viam.service.navigation.v1.NavigationService/GetMode', + grpc.web.MethodType.UNARY, + proto.viam.service.navigation.v1.GetModeRequest, + proto.viam.service.navigation.v1.GetModeResponse, + /** + * @param {!proto.viam.service.navigation.v1.GetModeRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.navigation.v1.GetModeResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.navigation.v1.GetModeRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.navigation.v1.GetModeResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.navigation.v1.NavigationServiceClient.prototype.getMode = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/GetMode', + request, + metadata || {}, + methodDescriptor_NavigationService_GetMode, + callback); +}; + + +/** + * @param {!proto.viam.service.navigation.v1.GetModeRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.navigation.v1.NavigationServicePromiseClient.prototype.getMode = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/GetMode', + request, + metadata || {}, + methodDescriptor_NavigationService_GetMode); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.navigation.v1.SetModeRequest, + * !proto.viam.service.navigation.v1.SetModeResponse>} + */ +const methodDescriptor_NavigationService_SetMode = new grpc.web.MethodDescriptor( + '/viam.service.navigation.v1.NavigationService/SetMode', + grpc.web.MethodType.UNARY, + proto.viam.service.navigation.v1.SetModeRequest, + proto.viam.service.navigation.v1.SetModeResponse, + /** + * @param {!proto.viam.service.navigation.v1.SetModeRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.navigation.v1.SetModeResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.navigation.v1.SetModeRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.navigation.v1.SetModeResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.navigation.v1.NavigationServiceClient.prototype.setMode = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/SetMode', + request, + metadata || {}, + methodDescriptor_NavigationService_SetMode, + callback); +}; + + +/** + * @param {!proto.viam.service.navigation.v1.SetModeRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.navigation.v1.NavigationServicePromiseClient.prototype.setMode = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/SetMode', + request, + metadata || {}, + methodDescriptor_NavigationService_SetMode); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.navigation.v1.GetLocationRequest, + * !proto.viam.service.navigation.v1.GetLocationResponse>} + */ +const methodDescriptor_NavigationService_GetLocation = new grpc.web.MethodDescriptor( + '/viam.service.navigation.v1.NavigationService/GetLocation', + grpc.web.MethodType.UNARY, + proto.viam.service.navigation.v1.GetLocationRequest, + proto.viam.service.navigation.v1.GetLocationResponse, + /** + * @param {!proto.viam.service.navigation.v1.GetLocationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.navigation.v1.GetLocationResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.navigation.v1.GetLocationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.navigation.v1.GetLocationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.navigation.v1.NavigationServiceClient.prototype.getLocation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/GetLocation', + request, + metadata || {}, + methodDescriptor_NavigationService_GetLocation, + callback); +}; + + +/** + * @param {!proto.viam.service.navigation.v1.GetLocationRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.navigation.v1.NavigationServicePromiseClient.prototype.getLocation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/GetLocation', + request, + metadata || {}, + methodDescriptor_NavigationService_GetLocation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.navigation.v1.GetWaypointsRequest, + * !proto.viam.service.navigation.v1.GetWaypointsResponse>} + */ +const methodDescriptor_NavigationService_GetWaypoints = new grpc.web.MethodDescriptor( + '/viam.service.navigation.v1.NavigationService/GetWaypoints', + grpc.web.MethodType.UNARY, + proto.viam.service.navigation.v1.GetWaypointsRequest, + proto.viam.service.navigation.v1.GetWaypointsResponse, + /** + * @param {!proto.viam.service.navigation.v1.GetWaypointsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.navigation.v1.GetWaypointsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.navigation.v1.GetWaypointsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.navigation.v1.GetWaypointsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.navigation.v1.NavigationServiceClient.prototype.getWaypoints = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/GetWaypoints', + request, + metadata || {}, + methodDescriptor_NavigationService_GetWaypoints, + callback); +}; + + +/** + * @param {!proto.viam.service.navigation.v1.GetWaypointsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.navigation.v1.NavigationServicePromiseClient.prototype.getWaypoints = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/GetWaypoints', + request, + metadata || {}, + methodDescriptor_NavigationService_GetWaypoints); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.navigation.v1.AddWaypointRequest, + * !proto.viam.service.navigation.v1.AddWaypointResponse>} + */ +const methodDescriptor_NavigationService_AddWaypoint = new grpc.web.MethodDescriptor( + '/viam.service.navigation.v1.NavigationService/AddWaypoint', + grpc.web.MethodType.UNARY, + proto.viam.service.navigation.v1.AddWaypointRequest, + proto.viam.service.navigation.v1.AddWaypointResponse, + /** + * @param {!proto.viam.service.navigation.v1.AddWaypointRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.navigation.v1.AddWaypointResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.navigation.v1.AddWaypointRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.navigation.v1.AddWaypointResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.navigation.v1.NavigationServiceClient.prototype.addWaypoint = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/AddWaypoint', + request, + metadata || {}, + methodDescriptor_NavigationService_AddWaypoint, + callback); +}; + + +/** + * @param {!proto.viam.service.navigation.v1.AddWaypointRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.navigation.v1.NavigationServicePromiseClient.prototype.addWaypoint = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/AddWaypoint', + request, + metadata || {}, + methodDescriptor_NavigationService_AddWaypoint); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.navigation.v1.RemoveWaypointRequest, + * !proto.viam.service.navigation.v1.RemoveWaypointResponse>} + */ +const methodDescriptor_NavigationService_RemoveWaypoint = new grpc.web.MethodDescriptor( + '/viam.service.navigation.v1.NavigationService/RemoveWaypoint', + grpc.web.MethodType.UNARY, + proto.viam.service.navigation.v1.RemoveWaypointRequest, + proto.viam.service.navigation.v1.RemoveWaypointResponse, + /** + * @param {!proto.viam.service.navigation.v1.RemoveWaypointRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.navigation.v1.RemoveWaypointResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.navigation.v1.RemoveWaypointRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.navigation.v1.RemoveWaypointResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.navigation.v1.NavigationServiceClient.prototype.removeWaypoint = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/RemoveWaypoint', + request, + metadata || {}, + methodDescriptor_NavigationService_RemoveWaypoint, + callback); +}; + + +/** + * @param {!proto.viam.service.navigation.v1.RemoveWaypointRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.navigation.v1.NavigationServicePromiseClient.prototype.removeWaypoint = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.navigation.v1.NavigationService/RemoveWaypoint', + request, + metadata || {}, + methodDescriptor_NavigationService_RemoveWaypoint); +}; + + +module.exports = proto.viam.service.navigation.v1; + diff --git a/gen/js/service/navigation/v1/navigation_pb.d.ts b/gen/js/service/navigation/v1/navigation_pb.d.ts new file mode 100644 index 000000000..d8ab4d497 --- /dev/null +++ b/gen/js/service/navigation/v1/navigation_pb.d.ts @@ -0,0 +1,287 @@ +// package: viam.service.navigation.v1 +// file: service/navigation/v1/navigation.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; + +export class GetModeRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetModeRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetModeRequest): GetModeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetModeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetModeRequest; + static deserializeBinaryFromReader(message: GetModeRequest, reader: jspb.BinaryReader): GetModeRequest; +} + +export namespace GetModeRequest { + export type AsObject = { + name: string, + } +} + +export class GetModeResponse extends jspb.Message { + getMode(): ModeMap[keyof ModeMap]; + setMode(value: ModeMap[keyof ModeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetModeResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetModeResponse): GetModeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetModeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetModeResponse; + static deserializeBinaryFromReader(message: GetModeResponse, reader: jspb.BinaryReader): GetModeResponse; +} + +export namespace GetModeResponse { + export type AsObject = { + mode: ModeMap[keyof ModeMap], + } +} + +export class SetModeRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getMode(): ModeMap[keyof ModeMap]; + setMode(value: ModeMap[keyof ModeMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetModeRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetModeRequest): SetModeRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetModeRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetModeRequest; + static deserializeBinaryFromReader(message: SetModeRequest, reader: jspb.BinaryReader): SetModeRequest; +} + +export namespace SetModeRequest { + export type AsObject = { + name: string, + mode: ModeMap[keyof ModeMap], + } +} + +export class SetModeResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetModeResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetModeResponse): SetModeResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetModeResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetModeResponse; + static deserializeBinaryFromReader(message: SetModeResponse, reader: jspb.BinaryReader): SetModeResponse; +} + +export namespace SetModeResponse { + export type AsObject = { + } +} + +export class Waypoint extends jspb.Message { + getId(): string; + setId(value: string): void; + + hasLocation(): boolean; + clearLocation(): void; + getLocation(): common_v1_common_pb.GeoPoint | undefined; + setLocation(value?: common_v1_common_pb.GeoPoint): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Waypoint.AsObject; + static toObject(includeInstance: boolean, msg: Waypoint): Waypoint.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Waypoint, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Waypoint; + static deserializeBinaryFromReader(message: Waypoint, reader: jspb.BinaryReader): Waypoint; +} + +export namespace Waypoint { + export type AsObject = { + id: string, + location?: common_v1_common_pb.GeoPoint.AsObject, + } +} + +export class GetLocationRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLocationRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetLocationRequest): GetLocationRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetLocationRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLocationRequest; + static deserializeBinaryFromReader(message: GetLocationRequest, reader: jspb.BinaryReader): GetLocationRequest; +} + +export namespace GetLocationRequest { + export type AsObject = { + name: string, + } +} + +export class GetLocationResponse extends jspb.Message { + hasLocation(): boolean; + clearLocation(): void; + getLocation(): common_v1_common_pb.GeoPoint | undefined; + setLocation(value?: common_v1_common_pb.GeoPoint): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetLocationResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetLocationResponse): GetLocationResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetLocationResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetLocationResponse; + static deserializeBinaryFromReader(message: GetLocationResponse, reader: jspb.BinaryReader): GetLocationResponse; +} + +export namespace GetLocationResponse { + export type AsObject = { + location?: common_v1_common_pb.GeoPoint.AsObject, + } +} + +export class GetWaypointsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetWaypointsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetWaypointsRequest): GetWaypointsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetWaypointsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetWaypointsRequest; + static deserializeBinaryFromReader(message: GetWaypointsRequest, reader: jspb.BinaryReader): GetWaypointsRequest; +} + +export namespace GetWaypointsRequest { + export type AsObject = { + name: string, + } +} + +export class GetWaypointsResponse extends jspb.Message { + clearWaypointsList(): void; + getWaypointsList(): Array; + setWaypointsList(value: Array): void; + addWaypoints(value?: Waypoint, index?: number): Waypoint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetWaypointsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetWaypointsResponse): GetWaypointsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetWaypointsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetWaypointsResponse; + static deserializeBinaryFromReader(message: GetWaypointsResponse, reader: jspb.BinaryReader): GetWaypointsResponse; +} + +export namespace GetWaypointsResponse { + export type AsObject = { + waypointsList: Array, + } +} + +export class AddWaypointRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasLocation(): boolean; + clearLocation(): void; + getLocation(): common_v1_common_pb.GeoPoint | undefined; + setLocation(value?: common_v1_common_pb.GeoPoint): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddWaypointRequest.AsObject; + static toObject(includeInstance: boolean, msg: AddWaypointRequest): AddWaypointRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddWaypointRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddWaypointRequest; + static deserializeBinaryFromReader(message: AddWaypointRequest, reader: jspb.BinaryReader): AddWaypointRequest; +} + +export namespace AddWaypointRequest { + export type AsObject = { + name: string, + location?: common_v1_common_pb.GeoPoint.AsObject, + } +} + +export class AddWaypointResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddWaypointResponse.AsObject; + static toObject(includeInstance: boolean, msg: AddWaypointResponse): AddWaypointResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddWaypointResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddWaypointResponse; + static deserializeBinaryFromReader(message: AddWaypointResponse, reader: jspb.BinaryReader): AddWaypointResponse; +} + +export namespace AddWaypointResponse { + export type AsObject = { + } +} + +export class RemoveWaypointRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveWaypointRequest.AsObject; + static toObject(includeInstance: boolean, msg: RemoveWaypointRequest): RemoveWaypointRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveWaypointRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveWaypointRequest; + static deserializeBinaryFromReader(message: RemoveWaypointRequest, reader: jspb.BinaryReader): RemoveWaypointRequest; +} + +export namespace RemoveWaypointRequest { + export type AsObject = { + name: string, + id: string, + } +} + +export class RemoveWaypointResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveWaypointResponse.AsObject; + static toObject(includeInstance: boolean, msg: RemoveWaypointResponse): RemoveWaypointResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveWaypointResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveWaypointResponse; + static deserializeBinaryFromReader(message: RemoveWaypointResponse, reader: jspb.BinaryReader): RemoveWaypointResponse; +} + +export namespace RemoveWaypointResponse { + export type AsObject = { + } +} + +export interface ModeMap { + MODE_UNSPECIFIED: 0; + MODE_MANUAL: 1; + MODE_WAYPOINT: 2; +} + +export const Mode: ModeMap; + diff --git a/gen/js/service/navigation/v1/navigation_pb.js b/gen/js/service/navigation/v1/navigation_pb.js new file mode 100644 index 000000000..d03445bae --- /dev/null +++ b/gen/js/service/navigation/v1/navigation_pb.js @@ -0,0 +1,2134 @@ +// source: service/navigation/v1/navigation.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.viam.service.navigation.v1.AddWaypointRequest', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.AddWaypointResponse', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.GetLocationRequest', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.GetLocationResponse', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.GetModeRequest', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.GetModeResponse', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.GetWaypointsRequest', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.GetWaypointsResponse', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.Mode', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.RemoveWaypointRequest', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.RemoveWaypointResponse', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.SetModeRequest', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.SetModeResponse', null, global); +goog.exportSymbol('proto.viam.service.navigation.v1.Waypoint', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.GetModeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.GetModeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.GetModeRequest.displayName = 'proto.viam.service.navigation.v1.GetModeRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.GetModeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.GetModeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.GetModeResponse.displayName = 'proto.viam.service.navigation.v1.GetModeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.SetModeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.SetModeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.SetModeRequest.displayName = 'proto.viam.service.navigation.v1.SetModeRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.SetModeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.SetModeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.SetModeResponse.displayName = 'proto.viam.service.navigation.v1.SetModeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.Waypoint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.Waypoint, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.Waypoint.displayName = 'proto.viam.service.navigation.v1.Waypoint'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.GetLocationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.GetLocationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.GetLocationRequest.displayName = 'proto.viam.service.navigation.v1.GetLocationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.GetLocationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.GetLocationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.GetLocationResponse.displayName = 'proto.viam.service.navigation.v1.GetLocationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.GetWaypointsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.GetWaypointsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.GetWaypointsRequest.displayName = 'proto.viam.service.navigation.v1.GetWaypointsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.GetWaypointsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.navigation.v1.GetWaypointsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.navigation.v1.GetWaypointsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.GetWaypointsResponse.displayName = 'proto.viam.service.navigation.v1.GetWaypointsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.AddWaypointRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.AddWaypointRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.AddWaypointRequest.displayName = 'proto.viam.service.navigation.v1.AddWaypointRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.AddWaypointResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.AddWaypointResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.AddWaypointResponse.displayName = 'proto.viam.service.navigation.v1.AddWaypointResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.RemoveWaypointRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.RemoveWaypointRequest.displayName = 'proto.viam.service.navigation.v1.RemoveWaypointRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.navigation.v1.RemoveWaypointResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.navigation.v1.RemoveWaypointResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.navigation.v1.RemoveWaypointResponse.displayName = 'proto.viam.service.navigation.v1.RemoveWaypointResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.GetModeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.GetModeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.GetModeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetModeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.GetModeRequest} + */ +proto.viam.service.navigation.v1.GetModeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.GetModeRequest; + return proto.viam.service.navigation.v1.GetModeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.GetModeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.GetModeRequest} + */ +proto.viam.service.navigation.v1.GetModeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.GetModeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.GetModeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.GetModeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetModeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.navigation.v1.GetModeRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.navigation.v1.GetModeRequest} returns this + */ +proto.viam.service.navigation.v1.GetModeRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.GetModeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.GetModeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.GetModeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetModeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mode: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.GetModeResponse} + */ +proto.viam.service.navigation.v1.GetModeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.GetModeResponse; + return proto.viam.service.navigation.v1.GetModeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.GetModeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.GetModeResponse} + */ +proto.viam.service.navigation.v1.GetModeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.viam.service.navigation.v1.Mode} */ (reader.readEnum()); + msg.setMode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.GetModeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.GetModeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.GetModeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetModeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional Mode mode = 1; + * @return {!proto.viam.service.navigation.v1.Mode} + */ +proto.viam.service.navigation.v1.GetModeResponse.prototype.getMode = function() { + return /** @type {!proto.viam.service.navigation.v1.Mode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.viam.service.navigation.v1.Mode} value + * @return {!proto.viam.service.navigation.v1.GetModeResponse} returns this + */ +proto.viam.service.navigation.v1.GetModeResponse.prototype.setMode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.SetModeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.SetModeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.SetModeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.SetModeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + mode: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.SetModeRequest} + */ +proto.viam.service.navigation.v1.SetModeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.SetModeRequest; + return proto.viam.service.navigation.v1.SetModeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.SetModeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.SetModeRequest} + */ +proto.viam.service.navigation.v1.SetModeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {!proto.viam.service.navigation.v1.Mode} */ (reader.readEnum()); + msg.setMode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.SetModeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.SetModeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.SetModeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.SetModeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.navigation.v1.SetModeRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.navigation.v1.SetModeRequest} returns this + */ +proto.viam.service.navigation.v1.SetModeRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Mode mode = 2; + * @return {!proto.viam.service.navigation.v1.Mode} + */ +proto.viam.service.navigation.v1.SetModeRequest.prototype.getMode = function() { + return /** @type {!proto.viam.service.navigation.v1.Mode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.viam.service.navigation.v1.Mode} value + * @return {!proto.viam.service.navigation.v1.SetModeRequest} returns this + */ +proto.viam.service.navigation.v1.SetModeRequest.prototype.setMode = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.SetModeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.SetModeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.SetModeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.SetModeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.SetModeResponse} + */ +proto.viam.service.navigation.v1.SetModeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.SetModeResponse; + return proto.viam.service.navigation.v1.SetModeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.SetModeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.SetModeResponse} + */ +proto.viam.service.navigation.v1.SetModeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.SetModeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.SetModeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.SetModeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.SetModeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.Waypoint.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.Waypoint.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.Waypoint} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.Waypoint.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + location: (f = msg.getLocation()) && common_v1_common_pb.GeoPoint.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.Waypoint} + */ +proto.viam.service.navigation.v1.Waypoint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.Waypoint; + return proto.viam.service.navigation.v1.Waypoint.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.Waypoint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.Waypoint} + */ +proto.viam.service.navigation.v1.Waypoint.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new common_v1_common_pb.GeoPoint; + reader.readMessage(value,common_v1_common_pb.GeoPoint.deserializeBinaryFromReader); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.Waypoint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.Waypoint.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.Waypoint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.Waypoint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLocation(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_v1_common_pb.GeoPoint.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.service.navigation.v1.Waypoint.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.navigation.v1.Waypoint} returns this + */ +proto.viam.service.navigation.v1.Waypoint.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional viam.common.v1.GeoPoint location = 2; + * @return {?proto.viam.common.v1.GeoPoint} + */ +proto.viam.service.navigation.v1.Waypoint.prototype.getLocation = function() { + return /** @type{?proto.viam.common.v1.GeoPoint} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.GeoPoint, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.GeoPoint|undefined} value + * @return {!proto.viam.service.navigation.v1.Waypoint} returns this +*/ +proto.viam.service.navigation.v1.Waypoint.prototype.setLocation = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.navigation.v1.Waypoint} returns this + */ +proto.viam.service.navigation.v1.Waypoint.prototype.clearLocation = function() { + return this.setLocation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.navigation.v1.Waypoint.prototype.hasLocation = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.GetLocationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.GetLocationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.GetLocationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetLocationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.GetLocationRequest} + */ +proto.viam.service.navigation.v1.GetLocationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.GetLocationRequest; + return proto.viam.service.navigation.v1.GetLocationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.GetLocationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.GetLocationRequest} + */ +proto.viam.service.navigation.v1.GetLocationRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.GetLocationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.GetLocationRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.GetLocationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetLocationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.navigation.v1.GetLocationRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.navigation.v1.GetLocationRequest} returns this + */ +proto.viam.service.navigation.v1.GetLocationRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.GetLocationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.GetLocationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.GetLocationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetLocationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + location: (f = msg.getLocation()) && common_v1_common_pb.GeoPoint.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.GetLocationResponse} + */ +proto.viam.service.navigation.v1.GetLocationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.GetLocationResponse; + return proto.viam.service.navigation.v1.GetLocationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.GetLocationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.GetLocationResponse} + */ +proto.viam.service.navigation.v1.GetLocationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.GeoPoint; + reader.readMessage(value,common_v1_common_pb.GeoPoint.deserializeBinaryFromReader); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.GetLocationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.GetLocationResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.GetLocationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetLocationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocation(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.GeoPoint.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.GeoPoint location = 1; + * @return {?proto.viam.common.v1.GeoPoint} + */ +proto.viam.service.navigation.v1.GetLocationResponse.prototype.getLocation = function() { + return /** @type{?proto.viam.common.v1.GeoPoint} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.GeoPoint, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.GeoPoint|undefined} value + * @return {!proto.viam.service.navigation.v1.GetLocationResponse} returns this +*/ +proto.viam.service.navigation.v1.GetLocationResponse.prototype.setLocation = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.navigation.v1.GetLocationResponse} returns this + */ +proto.viam.service.navigation.v1.GetLocationResponse.prototype.clearLocation = function() { + return this.setLocation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.navigation.v1.GetLocationResponse.prototype.hasLocation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.GetWaypointsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.GetWaypointsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.GetWaypointsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetWaypointsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.GetWaypointsRequest} + */ +proto.viam.service.navigation.v1.GetWaypointsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.GetWaypointsRequest; + return proto.viam.service.navigation.v1.GetWaypointsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.GetWaypointsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.GetWaypointsRequest} + */ +proto.viam.service.navigation.v1.GetWaypointsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.GetWaypointsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.GetWaypointsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.GetWaypointsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetWaypointsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.navigation.v1.GetWaypointsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.navigation.v1.GetWaypointsRequest} returns this + */ +proto.viam.service.navigation.v1.GetWaypointsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.GetWaypointsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.GetWaypointsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + waypointsList: jspb.Message.toObjectList(msg.getWaypointsList(), + proto.viam.service.navigation.v1.Waypoint.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.GetWaypointsResponse} + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.GetWaypointsResponse; + return proto.viam.service.navigation.v1.GetWaypointsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.GetWaypointsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.GetWaypointsResponse} + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.service.navigation.v1.Waypoint; + reader.readMessage(value,proto.viam.service.navigation.v1.Waypoint.deserializeBinaryFromReader); + msg.addWaypoints(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.GetWaypointsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.GetWaypointsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWaypointsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.service.navigation.v1.Waypoint.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Waypoint waypoints = 1; + * @return {!Array} + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.prototype.getWaypointsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.service.navigation.v1.Waypoint, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.navigation.v1.GetWaypointsResponse} returns this +*/ +proto.viam.service.navigation.v1.GetWaypointsResponse.prototype.setWaypointsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.service.navigation.v1.Waypoint=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.service.navigation.v1.Waypoint} + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.prototype.addWaypoints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.service.navigation.v1.Waypoint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.navigation.v1.GetWaypointsResponse} returns this + */ +proto.viam.service.navigation.v1.GetWaypointsResponse.prototype.clearWaypointsList = function() { + return this.setWaypointsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.AddWaypointRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.AddWaypointRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.AddWaypointRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.AddWaypointRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + location: (f = msg.getLocation()) && common_v1_common_pb.GeoPoint.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.AddWaypointRequest} + */ +proto.viam.service.navigation.v1.AddWaypointRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.AddWaypointRequest; + return proto.viam.service.navigation.v1.AddWaypointRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.AddWaypointRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.AddWaypointRequest} + */ +proto.viam.service.navigation.v1.AddWaypointRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new common_v1_common_pb.GeoPoint; + reader.readMessage(value,common_v1_common_pb.GeoPoint.deserializeBinaryFromReader); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.AddWaypointRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.AddWaypointRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.AddWaypointRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.AddWaypointRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLocation(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_v1_common_pb.GeoPoint.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.navigation.v1.AddWaypointRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.navigation.v1.AddWaypointRequest} returns this + */ +proto.viam.service.navigation.v1.AddWaypointRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional viam.common.v1.GeoPoint location = 2; + * @return {?proto.viam.common.v1.GeoPoint} + */ +proto.viam.service.navigation.v1.AddWaypointRequest.prototype.getLocation = function() { + return /** @type{?proto.viam.common.v1.GeoPoint} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.GeoPoint, 2)); +}; + + +/** + * @param {?proto.viam.common.v1.GeoPoint|undefined} value + * @return {!proto.viam.service.navigation.v1.AddWaypointRequest} returns this +*/ +proto.viam.service.navigation.v1.AddWaypointRequest.prototype.setLocation = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.navigation.v1.AddWaypointRequest} returns this + */ +proto.viam.service.navigation.v1.AddWaypointRequest.prototype.clearLocation = function() { + return this.setLocation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.navigation.v1.AddWaypointRequest.prototype.hasLocation = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.AddWaypointResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.AddWaypointResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.AddWaypointResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.AddWaypointResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.AddWaypointResponse} + */ +proto.viam.service.navigation.v1.AddWaypointResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.AddWaypointResponse; + return proto.viam.service.navigation.v1.AddWaypointResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.AddWaypointResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.AddWaypointResponse} + */ +proto.viam.service.navigation.v1.AddWaypointResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.AddWaypointResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.AddWaypointResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.AddWaypointResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.AddWaypointResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.RemoveWaypointRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.RemoveWaypointRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + id: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.RemoveWaypointRequest} + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.RemoveWaypointRequest; + return proto.viam.service.navigation.v1.RemoveWaypointRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.RemoveWaypointRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.RemoveWaypointRequest} + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.RemoveWaypointRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.RemoveWaypointRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.navigation.v1.RemoveWaypointRequest} returns this + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string id = 2; + * @return {string} + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.navigation.v1.RemoveWaypointRequest} returns this + */ +proto.viam.service.navigation.v1.RemoveWaypointRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.navigation.v1.RemoveWaypointResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.navigation.v1.RemoveWaypointResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.navigation.v1.RemoveWaypointResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.RemoveWaypointResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.navigation.v1.RemoveWaypointResponse} + */ +proto.viam.service.navigation.v1.RemoveWaypointResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.navigation.v1.RemoveWaypointResponse; + return proto.viam.service.navigation.v1.RemoveWaypointResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.navigation.v1.RemoveWaypointResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.navigation.v1.RemoveWaypointResponse} + */ +proto.viam.service.navigation.v1.RemoveWaypointResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.navigation.v1.RemoveWaypointResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.navigation.v1.RemoveWaypointResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.navigation.v1.RemoveWaypointResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.navigation.v1.RemoveWaypointResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +/** + * @enum {number} + */ +proto.viam.service.navigation.v1.Mode = { + MODE_UNSPECIFIED: 0, + MODE_MANUAL: 1, + MODE_WAYPOINT: 2 +}; + +goog.object.extend(exports, proto.viam.service.navigation.v1); diff --git a/gen/js/service/navigation/v1/navigation_pb_service.d.ts b/gen/js/service/navigation/v1/navigation_pb_service.d.ts new file mode 100644 index 000000000..353ddff3c --- /dev/null +++ b/gen/js/service/navigation/v1/navigation_pb_service.d.ts @@ -0,0 +1,158 @@ +// package: viam.service.navigation.v1 +// file: service/navigation/v1/navigation.proto + +import * as service_navigation_v1_navigation_pb from "../../../service/navigation/v1/navigation_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type NavigationServiceGetMode = { + readonly methodName: string; + readonly service: typeof NavigationService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_navigation_v1_navigation_pb.GetModeRequest; + readonly responseType: typeof service_navigation_v1_navigation_pb.GetModeResponse; +}; + +type NavigationServiceSetMode = { + readonly methodName: string; + readonly service: typeof NavigationService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_navigation_v1_navigation_pb.SetModeRequest; + readonly responseType: typeof service_navigation_v1_navigation_pb.SetModeResponse; +}; + +type NavigationServiceGetLocation = { + readonly methodName: string; + readonly service: typeof NavigationService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_navigation_v1_navigation_pb.GetLocationRequest; + readonly responseType: typeof service_navigation_v1_navigation_pb.GetLocationResponse; +}; + +type NavigationServiceGetWaypoints = { + readonly methodName: string; + readonly service: typeof NavigationService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_navigation_v1_navigation_pb.GetWaypointsRequest; + readonly responseType: typeof service_navigation_v1_navigation_pb.GetWaypointsResponse; +}; + +type NavigationServiceAddWaypoint = { + readonly methodName: string; + readonly service: typeof NavigationService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_navigation_v1_navigation_pb.AddWaypointRequest; + readonly responseType: typeof service_navigation_v1_navigation_pb.AddWaypointResponse; +}; + +type NavigationServiceRemoveWaypoint = { + readonly methodName: string; + readonly service: typeof NavigationService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_navigation_v1_navigation_pb.RemoveWaypointRequest; + readonly responseType: typeof service_navigation_v1_navigation_pb.RemoveWaypointResponse; +}; + +export class NavigationService { + static readonly serviceName: string; + static readonly GetMode: NavigationServiceGetMode; + static readonly SetMode: NavigationServiceSetMode; + static readonly GetLocation: NavigationServiceGetLocation; + static readonly GetWaypoints: NavigationServiceGetWaypoints; + static readonly AddWaypoint: NavigationServiceAddWaypoint; + static readonly RemoveWaypoint: NavigationServiceRemoveWaypoint; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class NavigationServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getMode( + requestMessage: service_navigation_v1_navigation_pb.GetModeRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.GetModeResponse|null) => void + ): UnaryResponse; + getMode( + requestMessage: service_navigation_v1_navigation_pb.GetModeRequest, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.GetModeResponse|null) => void + ): UnaryResponse; + setMode( + requestMessage: service_navigation_v1_navigation_pb.SetModeRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.SetModeResponse|null) => void + ): UnaryResponse; + setMode( + requestMessage: service_navigation_v1_navigation_pb.SetModeRequest, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.SetModeResponse|null) => void + ): UnaryResponse; + getLocation( + requestMessage: service_navigation_v1_navigation_pb.GetLocationRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.GetLocationResponse|null) => void + ): UnaryResponse; + getLocation( + requestMessage: service_navigation_v1_navigation_pb.GetLocationRequest, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.GetLocationResponse|null) => void + ): UnaryResponse; + getWaypoints( + requestMessage: service_navigation_v1_navigation_pb.GetWaypointsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.GetWaypointsResponse|null) => void + ): UnaryResponse; + getWaypoints( + requestMessage: service_navigation_v1_navigation_pb.GetWaypointsRequest, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.GetWaypointsResponse|null) => void + ): UnaryResponse; + addWaypoint( + requestMessage: service_navigation_v1_navigation_pb.AddWaypointRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.AddWaypointResponse|null) => void + ): UnaryResponse; + addWaypoint( + requestMessage: service_navigation_v1_navigation_pb.AddWaypointRequest, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.AddWaypointResponse|null) => void + ): UnaryResponse; + removeWaypoint( + requestMessage: service_navigation_v1_navigation_pb.RemoveWaypointRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.RemoveWaypointResponse|null) => void + ): UnaryResponse; + removeWaypoint( + requestMessage: service_navigation_v1_navigation_pb.RemoveWaypointRequest, + callback: (error: ServiceError|null, responseMessage: service_navigation_v1_navigation_pb.RemoveWaypointResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/service/navigation/v1/navigation_pb_service.js b/gen/js/service/navigation/v1/navigation_pb_service.js new file mode 100644 index 000000000..65798be06 --- /dev/null +++ b/gen/js/service/navigation/v1/navigation_pb_service.js @@ -0,0 +1,261 @@ +// package: viam.service.navigation.v1 +// file: service/navigation/v1/navigation.proto + +var service_navigation_v1_navigation_pb = require("../../../service/navigation/v1/navigation_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var NavigationService = (function () { + function NavigationService() {} + NavigationService.serviceName = "viam.service.navigation.v1.NavigationService"; + return NavigationService; +}()); + +NavigationService.GetMode = { + methodName: "GetMode", + service: NavigationService, + requestStream: false, + responseStream: false, + requestType: service_navigation_v1_navigation_pb.GetModeRequest, + responseType: service_navigation_v1_navigation_pb.GetModeResponse +}; + +NavigationService.SetMode = { + methodName: "SetMode", + service: NavigationService, + requestStream: false, + responseStream: false, + requestType: service_navigation_v1_navigation_pb.SetModeRequest, + responseType: service_navigation_v1_navigation_pb.SetModeResponse +}; + +NavigationService.GetLocation = { + methodName: "GetLocation", + service: NavigationService, + requestStream: false, + responseStream: false, + requestType: service_navigation_v1_navigation_pb.GetLocationRequest, + responseType: service_navigation_v1_navigation_pb.GetLocationResponse +}; + +NavigationService.GetWaypoints = { + methodName: "GetWaypoints", + service: NavigationService, + requestStream: false, + responseStream: false, + requestType: service_navigation_v1_navigation_pb.GetWaypointsRequest, + responseType: service_navigation_v1_navigation_pb.GetWaypointsResponse +}; + +NavigationService.AddWaypoint = { + methodName: "AddWaypoint", + service: NavigationService, + requestStream: false, + responseStream: false, + requestType: service_navigation_v1_navigation_pb.AddWaypointRequest, + responseType: service_navigation_v1_navigation_pb.AddWaypointResponse +}; + +NavigationService.RemoveWaypoint = { + methodName: "RemoveWaypoint", + service: NavigationService, + requestStream: false, + responseStream: false, + requestType: service_navigation_v1_navigation_pb.RemoveWaypointRequest, + responseType: service_navigation_v1_navigation_pb.RemoveWaypointResponse +}; + +exports.NavigationService = NavigationService; + +function NavigationServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +NavigationServiceClient.prototype.getMode = function getMode(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(NavigationService.GetMode, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +NavigationServiceClient.prototype.setMode = function setMode(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(NavigationService.SetMode, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +NavigationServiceClient.prototype.getLocation = function getLocation(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(NavigationService.GetLocation, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +NavigationServiceClient.prototype.getWaypoints = function getWaypoints(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(NavigationService.GetWaypoints, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +NavigationServiceClient.prototype.addWaypoint = function addWaypoint(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(NavigationService.AddWaypoint, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +NavigationServiceClient.prototype.removeWaypoint = function removeWaypoint(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(NavigationService.RemoveWaypoint, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.NavigationServiceClient = NavigationServiceClient; + diff --git a/gen/js/service/sensors/v1/sensors_grpc_web_pb.js b/gen/js/service/sensors/v1/sensors_grpc_web_pb.js new file mode 100644 index 000000000..963de3f52 --- /dev/null +++ b/gen/js/service/sensors/v1/sensors_grpc_web_pb.js @@ -0,0 +1,205 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.service.sensors.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.service = {}; +proto.viam.service.sensors = {}; +proto.viam.service.sensors.v1 = require('./sensors_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.sensors.v1.SensorsServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.sensors.v1.SensorsServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.sensors.v1.GetSensorsRequest, + * !proto.viam.service.sensors.v1.GetSensorsResponse>} + */ +const methodDescriptor_SensorsService_GetSensors = new grpc.web.MethodDescriptor( + '/viam.service.sensors.v1.SensorsService/GetSensors', + grpc.web.MethodType.UNARY, + proto.viam.service.sensors.v1.GetSensorsRequest, + proto.viam.service.sensors.v1.GetSensorsResponse, + /** + * @param {!proto.viam.service.sensors.v1.GetSensorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.sensors.v1.GetSensorsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.sensors.v1.GetSensorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.sensors.v1.GetSensorsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.sensors.v1.SensorsServiceClient.prototype.getSensors = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.sensors.v1.SensorsService/GetSensors', + request, + metadata || {}, + methodDescriptor_SensorsService_GetSensors, + callback); +}; + + +/** + * @param {!proto.viam.service.sensors.v1.GetSensorsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.sensors.v1.SensorsServicePromiseClient.prototype.getSensors = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.sensors.v1.SensorsService/GetSensors', + request, + metadata || {}, + methodDescriptor_SensorsService_GetSensors); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.sensors.v1.GetReadingsRequest, + * !proto.viam.service.sensors.v1.GetReadingsResponse>} + */ +const methodDescriptor_SensorsService_GetReadings = new grpc.web.MethodDescriptor( + '/viam.service.sensors.v1.SensorsService/GetReadings', + grpc.web.MethodType.UNARY, + proto.viam.service.sensors.v1.GetReadingsRequest, + proto.viam.service.sensors.v1.GetReadingsResponse, + /** + * @param {!proto.viam.service.sensors.v1.GetReadingsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.sensors.v1.GetReadingsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.sensors.v1.GetReadingsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.sensors.v1.GetReadingsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.sensors.v1.SensorsServiceClient.prototype.getReadings = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.sensors.v1.SensorsService/GetReadings', + request, + metadata || {}, + methodDescriptor_SensorsService_GetReadings, + callback); +}; + + +/** + * @param {!proto.viam.service.sensors.v1.GetReadingsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.sensors.v1.SensorsServicePromiseClient.prototype.getReadings = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.sensors.v1.SensorsService/GetReadings', + request, + metadata || {}, + methodDescriptor_SensorsService_GetReadings); +}; + + +module.exports = proto.viam.service.sensors.v1; + diff --git a/gen/js/service/sensors/v1/sensors_pb.d.ts b/gen/js/service/sensors/v1/sensors_pb.d.ts new file mode 100644 index 000000000..d11718c44 --- /dev/null +++ b/gen/js/service/sensors/v1/sensors_pb.d.ts @@ -0,0 +1,123 @@ +// package: viam.service.sensors.v1 +// file: service/sensors/v1/sensors.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class GetSensorsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSensorsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetSensorsRequest): GetSensorsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSensorsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSensorsRequest; + static deserializeBinaryFromReader(message: GetSensorsRequest, reader: jspb.BinaryReader): GetSensorsRequest; +} + +export namespace GetSensorsRequest { + export type AsObject = { + name: string, + } +} + +export class GetSensorsResponse extends jspb.Message { + clearSensorNamesList(): void; + getSensorNamesList(): Array; + setSensorNamesList(value: Array): void; + addSensorNames(value?: common_v1_common_pb.ResourceName, index?: number): common_v1_common_pb.ResourceName; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSensorsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetSensorsResponse): GetSensorsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSensorsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSensorsResponse; + static deserializeBinaryFromReader(message: GetSensorsResponse, reader: jspb.BinaryReader): GetSensorsResponse; +} + +export namespace GetSensorsResponse { + export type AsObject = { + sensorNamesList: Array, + } +} + +export class GetReadingsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearSensorNamesList(): void; + getSensorNamesList(): Array; + setSensorNamesList(value: Array): void; + addSensorNames(value?: common_v1_common_pb.ResourceName, index?: number): common_v1_common_pb.ResourceName; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetReadingsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetReadingsRequest): GetReadingsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetReadingsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetReadingsRequest; + static deserializeBinaryFromReader(message: GetReadingsRequest, reader: jspb.BinaryReader): GetReadingsRequest; +} + +export namespace GetReadingsRequest { + export type AsObject = { + name: string, + sensorNamesList: Array, + } +} + +export class Readings extends jspb.Message { + hasName(): boolean; + clearName(): void; + getName(): common_v1_common_pb.ResourceName | undefined; + setName(value?: common_v1_common_pb.ResourceName): void; + + getReadingsMap(): jspb.Map; + clearReadingsMap(): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Readings.AsObject; + static toObject(includeInstance: boolean, msg: Readings): Readings.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Readings, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Readings; + static deserializeBinaryFromReader(message: Readings, reader: jspb.BinaryReader): Readings; +} + +export namespace Readings { + export type AsObject = { + name?: common_v1_common_pb.ResourceName.AsObject, + readingsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class GetReadingsResponse extends jspb.Message { + clearReadingsList(): void; + getReadingsList(): Array; + setReadingsList(value: Array): void; + addReadings(value?: Readings, index?: number): Readings; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetReadingsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetReadingsResponse): GetReadingsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetReadingsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetReadingsResponse; + static deserializeBinaryFromReader(message: GetReadingsResponse, reader: jspb.BinaryReader): GetReadingsResponse; +} + +export namespace GetReadingsResponse { + export type AsObject = { + readingsList: Array, + } +} + diff --git a/gen/js/service/sensors/v1/sensors_pb.js b/gen/js/service/sensors/v1/sensors_pb.js new file mode 100644 index 000000000..9803bd917 --- /dev/null +++ b/gen/js/service/sensors/v1/sensors_pb.js @@ -0,0 +1,958 @@ +// source: service/sensors/v1/sensors.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.service.sensors.v1.GetReadingsRequest', null, global); +goog.exportSymbol('proto.viam.service.sensors.v1.GetReadingsResponse', null, global); +goog.exportSymbol('proto.viam.service.sensors.v1.GetSensorsRequest', null, global); +goog.exportSymbol('proto.viam.service.sensors.v1.GetSensorsResponse', null, global); +goog.exportSymbol('proto.viam.service.sensors.v1.Readings', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.sensors.v1.GetSensorsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.sensors.v1.GetSensorsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.sensors.v1.GetSensorsRequest.displayName = 'proto.viam.service.sensors.v1.GetSensorsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.sensors.v1.GetSensorsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.sensors.v1.GetSensorsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.sensors.v1.GetSensorsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.sensors.v1.GetSensorsResponse.displayName = 'proto.viam.service.sensors.v1.GetSensorsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.sensors.v1.GetReadingsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.sensors.v1.GetReadingsRequest.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.sensors.v1.GetReadingsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.sensors.v1.GetReadingsRequest.displayName = 'proto.viam.service.sensors.v1.GetReadingsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.sensors.v1.Readings = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.sensors.v1.Readings, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.sensors.v1.Readings.displayName = 'proto.viam.service.sensors.v1.Readings'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.sensors.v1.GetReadingsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.sensors.v1.GetReadingsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.sensors.v1.GetReadingsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.sensors.v1.GetReadingsResponse.displayName = 'proto.viam.service.sensors.v1.GetReadingsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.sensors.v1.GetSensorsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.sensors.v1.GetSensorsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.sensors.v1.GetSensorsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.GetSensorsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.sensors.v1.GetSensorsRequest} + */ +proto.viam.service.sensors.v1.GetSensorsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.sensors.v1.GetSensorsRequest; + return proto.viam.service.sensors.v1.GetSensorsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.sensors.v1.GetSensorsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.sensors.v1.GetSensorsRequest} + */ +proto.viam.service.sensors.v1.GetSensorsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.sensors.v1.GetSensorsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.sensors.v1.GetSensorsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.sensors.v1.GetSensorsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.GetSensorsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.sensors.v1.GetSensorsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.sensors.v1.GetSensorsRequest} returns this + */ +proto.viam.service.sensors.v1.GetSensorsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.sensors.v1.GetSensorsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.sensors.v1.GetSensorsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.sensors.v1.GetSensorsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.sensors.v1.GetSensorsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.GetSensorsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + sensorNamesList: jspb.Message.toObjectList(msg.getSensorNamesList(), + common_v1_common_pb.ResourceName.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.sensors.v1.GetSensorsResponse} + */ +proto.viam.service.sensors.v1.GetSensorsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.sensors.v1.GetSensorsResponse; + return proto.viam.service.sensors.v1.GetSensorsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.sensors.v1.GetSensorsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.sensors.v1.GetSensorsResponse} + */ +proto.viam.service.sensors.v1.GetSensorsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.addSensorNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.sensors.v1.GetSensorsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.sensors.v1.GetSensorsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.sensors.v1.GetSensorsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.GetSensorsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSensorNamesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated viam.common.v1.ResourceName sensor_names = 1; + * @return {!Array} + */ +proto.viam.service.sensors.v1.GetSensorsResponse.prototype.getSensorNamesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_v1_common_pb.ResourceName, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.sensors.v1.GetSensorsResponse} returns this +*/ +proto.viam.service.sensors.v1.GetSensorsResponse.prototype.setSensorNamesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.common.v1.ResourceName=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.ResourceName} + */ +proto.viam.service.sensors.v1.GetSensorsResponse.prototype.addSensorNames = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.common.v1.ResourceName, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.sensors.v1.GetSensorsResponse} returns this + */ +proto.viam.service.sensors.v1.GetSensorsResponse.prototype.clearSensorNamesList = function() { + return this.setSensorNamesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.sensors.v1.GetReadingsRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.sensors.v1.GetReadingsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.sensors.v1.GetReadingsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.sensors.v1.GetReadingsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.GetReadingsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + sensorNamesList: jspb.Message.toObjectList(msg.getSensorNamesList(), + common_v1_common_pb.ResourceName.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.sensors.v1.GetReadingsRequest} + */ +proto.viam.service.sensors.v1.GetReadingsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.sensors.v1.GetReadingsRequest; + return proto.viam.service.sensors.v1.GetReadingsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.sensors.v1.GetReadingsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.sensors.v1.GetReadingsRequest} + */ +proto.viam.service.sensors.v1.GetReadingsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.addSensorNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.sensors.v1.GetReadingsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.sensors.v1.GetReadingsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.sensors.v1.GetReadingsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.GetReadingsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSensorNamesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.sensors.v1.GetReadingsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.sensors.v1.GetReadingsRequest} returns this + */ +proto.viam.service.sensors.v1.GetReadingsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated viam.common.v1.ResourceName sensor_names = 2; + * @return {!Array} + */ +proto.viam.service.sensors.v1.GetReadingsRequest.prototype.getSensorNamesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_v1_common_pb.ResourceName, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.sensors.v1.GetReadingsRequest} returns this +*/ +proto.viam.service.sensors.v1.GetReadingsRequest.prototype.setSensorNamesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.viam.common.v1.ResourceName=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.ResourceName} + */ +proto.viam.service.sensors.v1.GetReadingsRequest.prototype.addSensorNames = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.viam.common.v1.ResourceName, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.sensors.v1.GetReadingsRequest} returns this + */ +proto.viam.service.sensors.v1.GetReadingsRequest.prototype.clearSensorNamesList = function() { + return this.setSensorNamesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.sensors.v1.Readings.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.sensors.v1.Readings.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.sensors.v1.Readings} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.Readings.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = msg.getName()) && common_v1_common_pb.ResourceName.toObject(includeInstance, f), + readingsMap: (f = msg.getReadingsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.sensors.v1.Readings} + */ +proto.viam.service.sensors.v1.Readings.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.sensors.v1.Readings; + return proto.viam.service.sensors.v1.Readings.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.sensors.v1.Readings} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.sensors.v1.Readings} + */ +proto.viam.service.sensors.v1.Readings.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.ResourceName; + reader.readMessage(value,common_v1_common_pb.ResourceName.deserializeBinaryFromReader); + msg.setName(value); + break; + case 2: + var value = msg.getReadingsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.sensors.v1.Readings.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.sensors.v1.Readings.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.sensors.v1.Readings} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.Readings.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.ResourceName.serializeBinaryToWriter + ); + } + f = message.getReadingsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional viam.common.v1.ResourceName name = 1; + * @return {?proto.viam.common.v1.ResourceName} + */ +proto.viam.service.sensors.v1.Readings.prototype.getName = function() { + return /** @type{?proto.viam.common.v1.ResourceName} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.ResourceName, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.ResourceName|undefined} value + * @return {!proto.viam.service.sensors.v1.Readings} returns this +*/ +proto.viam.service.sensors.v1.Readings.prototype.setName = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.sensors.v1.Readings} returns this + */ +proto.viam.service.sensors.v1.Readings.prototype.clearName = function() { + return this.setName(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.sensors.v1.Readings.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * map readings = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.viam.service.sensors.v1.Readings.prototype.getReadingsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.viam.service.sensors.v1.Readings} returns this + */ +proto.viam.service.sensors.v1.Readings.prototype.clearReadingsMap = function() { + this.getReadingsMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.sensors.v1.GetReadingsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.sensors.v1.GetReadingsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.sensors.v1.GetReadingsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.sensors.v1.GetReadingsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.GetReadingsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + readingsList: jspb.Message.toObjectList(msg.getReadingsList(), + proto.viam.service.sensors.v1.Readings.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.sensors.v1.GetReadingsResponse} + */ +proto.viam.service.sensors.v1.GetReadingsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.sensors.v1.GetReadingsResponse; + return proto.viam.service.sensors.v1.GetReadingsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.sensors.v1.GetReadingsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.sensors.v1.GetReadingsResponse} + */ +proto.viam.service.sensors.v1.GetReadingsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.service.sensors.v1.Readings; + reader.readMessage(value,proto.viam.service.sensors.v1.Readings.deserializeBinaryFromReader); + msg.addReadings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.sensors.v1.GetReadingsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.sensors.v1.GetReadingsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.sensors.v1.GetReadingsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.sensors.v1.GetReadingsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReadingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.service.sensors.v1.Readings.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Readings readings = 1; + * @return {!Array} + */ +proto.viam.service.sensors.v1.GetReadingsResponse.prototype.getReadingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.service.sensors.v1.Readings, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.sensors.v1.GetReadingsResponse} returns this +*/ +proto.viam.service.sensors.v1.GetReadingsResponse.prototype.setReadingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.service.sensors.v1.Readings=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.service.sensors.v1.Readings} + */ +proto.viam.service.sensors.v1.GetReadingsResponse.prototype.addReadings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.service.sensors.v1.Readings, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.sensors.v1.GetReadingsResponse} returns this + */ +proto.viam.service.sensors.v1.GetReadingsResponse.prototype.clearReadingsList = function() { + return this.setReadingsList([]); +}; + + +goog.object.extend(exports, proto.viam.service.sensors.v1); diff --git a/gen/js/service/sensors/v1/sensors_pb_service.d.ts b/gen/js/service/sensors/v1/sensors_pb_service.d.ts new file mode 100644 index 000000000..f98564419 --- /dev/null +++ b/gen/js/service/sensors/v1/sensors_pb_service.d.ts @@ -0,0 +1,82 @@ +// package: viam.service.sensors.v1 +// file: service/sensors/v1/sensors.proto + +import * as service_sensors_v1_sensors_pb from "../../../service/sensors/v1/sensors_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type SensorsServiceGetSensors = { + readonly methodName: string; + readonly service: typeof SensorsService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_sensors_v1_sensors_pb.GetSensorsRequest; + readonly responseType: typeof service_sensors_v1_sensors_pb.GetSensorsResponse; +}; + +type SensorsServiceGetReadings = { + readonly methodName: string; + readonly service: typeof SensorsService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_sensors_v1_sensors_pb.GetReadingsRequest; + readonly responseType: typeof service_sensors_v1_sensors_pb.GetReadingsResponse; +}; + +export class SensorsService { + static readonly serviceName: string; + static readonly GetSensors: SensorsServiceGetSensors; + static readonly GetReadings: SensorsServiceGetReadings; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class SensorsServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getSensors( + requestMessage: service_sensors_v1_sensors_pb.GetSensorsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_sensors_v1_sensors_pb.GetSensorsResponse|null) => void + ): UnaryResponse; + getSensors( + requestMessage: service_sensors_v1_sensors_pb.GetSensorsRequest, + callback: (error: ServiceError|null, responseMessage: service_sensors_v1_sensors_pb.GetSensorsResponse|null) => void + ): UnaryResponse; + getReadings( + requestMessage: service_sensors_v1_sensors_pb.GetReadingsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_sensors_v1_sensors_pb.GetReadingsResponse|null) => void + ): UnaryResponse; + getReadings( + requestMessage: service_sensors_v1_sensors_pb.GetReadingsRequest, + callback: (error: ServiceError|null, responseMessage: service_sensors_v1_sensors_pb.GetReadingsResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/service/sensors/v1/sensors_pb_service.js b/gen/js/service/sensors/v1/sensors_pb_service.js new file mode 100644 index 000000000..5ffadab96 --- /dev/null +++ b/gen/js/service/sensors/v1/sensors_pb_service.js @@ -0,0 +1,101 @@ +// package: viam.service.sensors.v1 +// file: service/sensors/v1/sensors.proto + +var service_sensors_v1_sensors_pb = require("../../../service/sensors/v1/sensors_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var SensorsService = (function () { + function SensorsService() {} + SensorsService.serviceName = "viam.service.sensors.v1.SensorsService"; + return SensorsService; +}()); + +SensorsService.GetSensors = { + methodName: "GetSensors", + service: SensorsService, + requestStream: false, + responseStream: false, + requestType: service_sensors_v1_sensors_pb.GetSensorsRequest, + responseType: service_sensors_v1_sensors_pb.GetSensorsResponse +}; + +SensorsService.GetReadings = { + methodName: "GetReadings", + service: SensorsService, + requestStream: false, + responseStream: false, + requestType: service_sensors_v1_sensors_pb.GetReadingsRequest, + responseType: service_sensors_v1_sensors_pb.GetReadingsResponse +}; + +exports.SensorsService = SensorsService; + +function SensorsServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +SensorsServiceClient.prototype.getSensors = function getSensors(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SensorsService.GetSensors, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +SensorsServiceClient.prototype.getReadings = function getReadings(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SensorsService.GetReadings, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.SensorsServiceClient = SensorsServiceClient; + diff --git a/gen/js/service/shell/v1/shell_grpc_web_pb.js b/gen/js/service/shell/v1/shell_grpc_web_pb.js new file mode 100644 index 000000000..fca1e914c --- /dev/null +++ b/gen/js/service/shell/v1/shell_grpc_web_pb.js @@ -0,0 +1,77 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.service.shell.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + +const proto = {}; +proto.viam = {}; +proto.viam.service = {}; +proto.viam.service.shell = {}; +proto.viam.service.shell.v1 = require('./shell_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.shell.v1.ShellServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.shell.v1.ShellServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +module.exports = proto.viam.service.shell.v1; + diff --git a/gen/js/service/shell/v1/shell_pb.d.ts b/gen/js/service/shell/v1/shell_pb.d.ts new file mode 100644 index 000000000..b95af7a31 --- /dev/null +++ b/gen/js/service/shell/v1/shell_pb.d.ts @@ -0,0 +1,57 @@ +// package: viam.service.shell.v1 +// file: service/shell/v1/shell.proto + +import * as jspb from "google-protobuf"; + +export class ShellRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getDataIn(): string; + setDataIn(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ShellRequest.AsObject; + static toObject(includeInstance: boolean, msg: ShellRequest): ShellRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ShellRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ShellRequest; + static deserializeBinaryFromReader(message: ShellRequest, reader: jspb.BinaryReader): ShellRequest; +} + +export namespace ShellRequest { + export type AsObject = { + name: string, + dataIn: string, + } +} + +export class ShellResponse extends jspb.Message { + getDataOut(): string; + setDataOut(value: string): void; + + getDataErr(): string; + setDataErr(value: string): void; + + getEof(): boolean; + setEof(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ShellResponse.AsObject; + static toObject(includeInstance: boolean, msg: ShellResponse): ShellResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ShellResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ShellResponse; + static deserializeBinaryFromReader(message: ShellResponse, reader: jspb.BinaryReader): ShellResponse; +} + +export namespace ShellResponse { + export type AsObject = { + dataOut: string, + dataErr: string, + eof: boolean, + } +} + diff --git a/gen/js/service/shell/v1/shell_pb.js b/gen/js/service/shell/v1/shell_pb.js new file mode 100644 index 000000000..55474bcb4 --- /dev/null +++ b/gen/js/service/shell/v1/shell_pb.js @@ -0,0 +1,412 @@ +// source: service/shell/v1/shell.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +goog.exportSymbol('proto.viam.service.shell.v1.ShellRequest', null, global); +goog.exportSymbol('proto.viam.service.shell.v1.ShellResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.shell.v1.ShellRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.shell.v1.ShellRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.shell.v1.ShellRequest.displayName = 'proto.viam.service.shell.v1.ShellRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.shell.v1.ShellResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.shell.v1.ShellResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.shell.v1.ShellResponse.displayName = 'proto.viam.service.shell.v1.ShellResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.shell.v1.ShellRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.shell.v1.ShellRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.shell.v1.ShellRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.shell.v1.ShellRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + dataIn: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.shell.v1.ShellRequest} + */ +proto.viam.service.shell.v1.ShellRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.shell.v1.ShellRequest; + return proto.viam.service.shell.v1.ShellRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.shell.v1.ShellRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.shell.v1.ShellRequest} + */ +proto.viam.service.shell.v1.ShellRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDataIn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.shell.v1.ShellRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.shell.v1.ShellRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.shell.v1.ShellRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.shell.v1.ShellRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDataIn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.shell.v1.ShellRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.shell.v1.ShellRequest} returns this + */ +proto.viam.service.shell.v1.ShellRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string data_in = 2; + * @return {string} + */ +proto.viam.service.shell.v1.ShellRequest.prototype.getDataIn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.shell.v1.ShellRequest} returns this + */ +proto.viam.service.shell.v1.ShellRequest.prototype.setDataIn = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.shell.v1.ShellResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.shell.v1.ShellResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.shell.v1.ShellResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.shell.v1.ShellResponse.toObject = function(includeInstance, msg) { + var f, obj = { + dataOut: jspb.Message.getFieldWithDefault(msg, 1, ""), + dataErr: jspb.Message.getFieldWithDefault(msg, 2, ""), + eof: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.shell.v1.ShellResponse} + */ +proto.viam.service.shell.v1.ShellResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.shell.v1.ShellResponse; + return proto.viam.service.shell.v1.ShellResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.shell.v1.ShellResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.shell.v1.ShellResponse} + */ +proto.viam.service.shell.v1.ShellResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDataOut(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDataErr(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.shell.v1.ShellResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.shell.v1.ShellResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.shell.v1.ShellResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.shell.v1.ShellResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataOut(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDataErr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEof(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional string data_out = 1; + * @return {string} + */ +proto.viam.service.shell.v1.ShellResponse.prototype.getDataOut = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.shell.v1.ShellResponse} returns this + */ +proto.viam.service.shell.v1.ShellResponse.prototype.setDataOut = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string data_err = 2; + * @return {string} + */ +proto.viam.service.shell.v1.ShellResponse.prototype.getDataErr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.shell.v1.ShellResponse} returns this + */ +proto.viam.service.shell.v1.ShellResponse.prototype.setDataErr = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool eof = 3; + * @return {boolean} + */ +proto.viam.service.shell.v1.ShellResponse.prototype.getEof = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.service.shell.v1.ShellResponse} returns this + */ +proto.viam.service.shell.v1.ShellResponse.prototype.setEof = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +goog.object.extend(exports, proto.viam.service.shell.v1); diff --git a/gen/js/service/shell/v1/shell_pb_service.d.ts b/gen/js/service/shell/v1/shell_pb_service.d.ts new file mode 100644 index 000000000..cf3436cb8 --- /dev/null +++ b/gen/js/service/shell/v1/shell_pb_service.d.ts @@ -0,0 +1,55 @@ +// package: viam.service.shell.v1 +// file: service/shell/v1/shell.proto + +import * as service_shell_v1_shell_pb from "../../../service/shell/v1/shell_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type ShellServiceShell = { + readonly methodName: string; + readonly service: typeof ShellService; + readonly requestStream: true; + readonly responseStream: true; + readonly requestType: typeof service_shell_v1_shell_pb.ShellRequest; + readonly responseType: typeof service_shell_v1_shell_pb.ShellResponse; +}; + +export class ShellService { + static readonly serviceName: string; + static readonly Shell: ShellServiceShell; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class ShellServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + shell(metadata?: grpc.Metadata): BidirectionalStream; +} + diff --git a/gen/js/service/shell/v1/shell_pb_service.js b/gen/js/service/shell/v1/shell_pb_service.js new file mode 100644 index 000000000..cc192de1d --- /dev/null +++ b/gen/js/service/shell/v1/shell_pb_service.js @@ -0,0 +1,75 @@ +// package: viam.service.shell.v1 +// file: service/shell/v1/shell.proto + +var service_shell_v1_shell_pb = require("../../../service/shell/v1/shell_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var ShellService = (function () { + function ShellService() {} + ShellService.serviceName = "viam.service.shell.v1.ShellService"; + return ShellService; +}()); + +ShellService.Shell = { + methodName: "Shell", + service: ShellService, + requestStream: true, + responseStream: true, + requestType: service_shell_v1_shell_pb.ShellRequest, + responseType: service_shell_v1_shell_pb.ShellResponse +}; + +exports.ShellService = ShellService; + +function ShellServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +ShellServiceClient.prototype.shell = function shell(metadata) { + var listeners = { + data: [], + end: [], + status: [] + }; + var client = grpc.client(ShellService.Shell, { + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport + }); + client.onEnd(function (status, statusMessage, trailers) { + listeners.status.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners.end.forEach(function (handler) { + handler({ code: status, details: statusMessage, metadata: trailers }); + }); + listeners = null; + }); + client.onMessage(function (message) { + listeners.data.forEach(function (handler) { + handler(message); + }) + }); + client.start(metadata); + return { + on: function (type, handler) { + listeners[type].push(handler); + return this; + }, + write: function (requestMessage) { + client.send(requestMessage); + return this; + }, + end: function () { + client.finishSend(); + }, + cancel: function () { + listeners = null; + client.close(); + } + }; +}; + +exports.ShellServiceClient = ShellServiceClient; + diff --git a/gen/js/service/slam/v1/slam_grpc_web_pb.js b/gen/js/service/slam/v1/slam_grpc_web_pb.js new file mode 100644 index 000000000..51bf5e263 --- /dev/null +++ b/gen/js/service/slam/v1/slam_grpc_web_pb.js @@ -0,0 +1,203 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.service.slam.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.service = {}; +proto.viam.service.slam = {}; +proto.viam.service.slam.v1 = require('./slam_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.slam.v1.SLAMServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.slam.v1.SLAMServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.slam.v1.GetPositionRequest, + * !proto.viam.service.slam.v1.GetPositionResponse>} + */ +const methodDescriptor_SLAMService_GetPosition = new grpc.web.MethodDescriptor( + '/viam.service.slam.v1.SLAMService/GetPosition', + grpc.web.MethodType.UNARY, + proto.viam.service.slam.v1.GetPositionRequest, + proto.viam.service.slam.v1.GetPositionResponse, + /** + * @param {!proto.viam.service.slam.v1.GetPositionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.slam.v1.GetPositionResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.slam.v1.GetPositionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.slam.v1.GetPositionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.slam.v1.SLAMServiceClient.prototype.getPosition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.slam.v1.SLAMService/GetPosition', + request, + metadata || {}, + methodDescriptor_SLAMService_GetPosition, + callback); +}; + + +/** + * @param {!proto.viam.service.slam.v1.GetPositionRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.slam.v1.SLAMServicePromiseClient.prototype.getPosition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.slam.v1.SLAMService/GetPosition', + request, + metadata || {}, + methodDescriptor_SLAMService_GetPosition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.slam.v1.GetMapRequest, + * !proto.viam.service.slam.v1.GetMapResponse>} + */ +const methodDescriptor_SLAMService_GetMap = new grpc.web.MethodDescriptor( + '/viam.service.slam.v1.SLAMService/GetMap', + grpc.web.MethodType.UNARY, + proto.viam.service.slam.v1.GetMapRequest, + proto.viam.service.slam.v1.GetMapResponse, + /** + * @param {!proto.viam.service.slam.v1.GetMapRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.slam.v1.GetMapResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.slam.v1.GetMapRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.slam.v1.GetMapResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.slam.v1.SLAMServiceClient.prototype.getMap = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.slam.v1.SLAMService/GetMap', + request, + metadata || {}, + methodDescriptor_SLAMService_GetMap, + callback); +}; + + +/** + * @param {!proto.viam.service.slam.v1.GetMapRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.slam.v1.SLAMServicePromiseClient.prototype.getMap = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.slam.v1.SLAMService/GetMap', + request, + metadata || {}, + methodDescriptor_SLAMService_GetMap); +}; + + +module.exports = proto.viam.service.slam.v1; + diff --git a/gen/js/service/slam/v1/slam_pb.d.ts b/gen/js/service/slam/v1/slam_pb.d.ts new file mode 100644 index 000000000..01c94d29b --- /dev/null +++ b/gen/js/service/slam/v1/slam_pb.d.ts @@ -0,0 +1,124 @@ +// package: viam.service.slam.v1 +// file: service/slam/v1/slam.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; + +export class GetPositionRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionRequest): GetPositionRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionRequest; + static deserializeBinaryFromReader(message: GetPositionRequest, reader: jspb.BinaryReader): GetPositionRequest; +} + +export namespace GetPositionRequest { + export type AsObject = { + name: string, + } +} + +export class GetPositionResponse extends jspb.Message { + hasPose(): boolean; + clearPose(): void; + getPose(): common_v1_common_pb.PoseInFrame | undefined; + setPose(value?: common_v1_common_pb.PoseInFrame): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetPositionResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetPositionResponse): GetPositionResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetPositionResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetPositionResponse; + static deserializeBinaryFromReader(message: GetPositionResponse, reader: jspb.BinaryReader): GetPositionResponse; +} + +export namespace GetPositionResponse { + export type AsObject = { + pose?: common_v1_common_pb.PoseInFrame.AsObject, + } +} + +export class GetMapRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getMimeType(): string; + setMimeType(value: string): void; + + hasCameraPosition(): boolean; + clearCameraPosition(): void; + getCameraPosition(): common_v1_common_pb.Pose | undefined; + setCameraPosition(value?: common_v1_common_pb.Pose): void; + + getIncludeRobotMarker(): boolean; + setIncludeRobotMarker(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetMapRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetMapRequest): GetMapRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetMapRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetMapRequest; + static deserializeBinaryFromReader(message: GetMapRequest, reader: jspb.BinaryReader): GetMapRequest; +} + +export namespace GetMapRequest { + export type AsObject = { + name: string, + mimeType: string, + cameraPosition?: common_v1_common_pb.Pose.AsObject, + includeRobotMarker: boolean, + } +} + +export class GetMapResponse extends jspb.Message { + hasPointCloud(): boolean; + clearPointCloud(): void; + getPointCloud(): common_v1_common_pb.PointCloudObject | undefined; + setPointCloud(value?: common_v1_common_pb.PointCloudObject): void; + + hasImage(): boolean; + clearImage(): void; + getImage(): Uint8Array | string; + getImage_asU8(): Uint8Array; + getImage_asB64(): string; + setImage(value: Uint8Array | string): void; + + getMimeType(): string; + setMimeType(value: string): void; + + getMapCase(): GetMapResponse.MapCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetMapResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetMapResponse): GetMapResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetMapResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetMapResponse; + static deserializeBinaryFromReader(message: GetMapResponse, reader: jspb.BinaryReader): GetMapResponse; +} + +export namespace GetMapResponse { + export type AsObject = { + pointCloud?: common_v1_common_pb.PointCloudObject.AsObject, + image: Uint8Array | string, + mimeType: string, + } + + export enum MapCase { + MAP_NOT_SET = 0, + POINT_CLOUD = 1, + IMAGE = 2, + } +} + diff --git a/gen/js/service/slam/v1/slam_pb.js b/gen/js/service/slam/v1/slam_pb.js new file mode 100644 index 000000000..7f78baddf --- /dev/null +++ b/gen/js/service/slam/v1/slam_pb.js @@ -0,0 +1,912 @@ +// source: service/slam/v1/slam.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.viam.service.slam.v1.GetMapRequest', null, global); +goog.exportSymbol('proto.viam.service.slam.v1.GetMapResponse', null, global); +goog.exportSymbol('proto.viam.service.slam.v1.GetMapResponse.MapCase', null, global); +goog.exportSymbol('proto.viam.service.slam.v1.GetPositionRequest', null, global); +goog.exportSymbol('proto.viam.service.slam.v1.GetPositionResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.slam.v1.GetPositionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.slam.v1.GetPositionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.slam.v1.GetPositionRequest.displayName = 'proto.viam.service.slam.v1.GetPositionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.slam.v1.GetPositionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.slam.v1.GetPositionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.slam.v1.GetPositionResponse.displayName = 'proto.viam.service.slam.v1.GetPositionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.slam.v1.GetMapRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.slam.v1.GetMapRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.slam.v1.GetMapRequest.displayName = 'proto.viam.service.slam.v1.GetMapRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.slam.v1.GetMapResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.viam.service.slam.v1.GetMapResponse.oneofGroups_); +}; +goog.inherits(proto.viam.service.slam.v1.GetMapResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.slam.v1.GetMapResponse.displayName = 'proto.viam.service.slam.v1.GetMapResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.slam.v1.GetPositionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.slam.v1.GetPositionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.slam.v1.GetPositionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.slam.v1.GetPositionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.slam.v1.GetPositionRequest} + */ +proto.viam.service.slam.v1.GetPositionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.slam.v1.GetPositionRequest; + return proto.viam.service.slam.v1.GetPositionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.slam.v1.GetPositionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.slam.v1.GetPositionRequest} + */ +proto.viam.service.slam.v1.GetPositionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.slam.v1.GetPositionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.slam.v1.GetPositionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.slam.v1.GetPositionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.slam.v1.GetPositionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.slam.v1.GetPositionRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.slam.v1.GetPositionRequest} returns this + */ +proto.viam.service.slam.v1.GetPositionRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.slam.v1.GetPositionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.slam.v1.GetPositionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.slam.v1.GetPositionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.slam.v1.GetPositionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pose: (f = msg.getPose()) && common_v1_common_pb.PoseInFrame.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.slam.v1.GetPositionResponse} + */ +proto.viam.service.slam.v1.GetPositionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.slam.v1.GetPositionResponse; + return proto.viam.service.slam.v1.GetPositionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.slam.v1.GetPositionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.slam.v1.GetPositionResponse} + */ +proto.viam.service.slam.v1.GetPositionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.PoseInFrame; + reader.readMessage(value,common_v1_common_pb.PoseInFrame.deserializeBinaryFromReader); + msg.setPose(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.slam.v1.GetPositionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.slam.v1.GetPositionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.slam.v1.GetPositionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.slam.v1.GetPositionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPose(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.PoseInFrame.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.common.v1.PoseInFrame pose = 1; + * @return {?proto.viam.common.v1.PoseInFrame} + */ +proto.viam.service.slam.v1.GetPositionResponse.prototype.getPose = function() { + return /** @type{?proto.viam.common.v1.PoseInFrame} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.PoseInFrame, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.PoseInFrame|undefined} value + * @return {!proto.viam.service.slam.v1.GetPositionResponse} returns this +*/ +proto.viam.service.slam.v1.GetPositionResponse.prototype.setPose = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.slam.v1.GetPositionResponse} returns this + */ +proto.viam.service.slam.v1.GetPositionResponse.prototype.clearPose = function() { + return this.setPose(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.slam.v1.GetPositionResponse.prototype.hasPose = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.slam.v1.GetMapRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.slam.v1.GetMapRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.slam.v1.GetMapRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + mimeType: jspb.Message.getFieldWithDefault(msg, 2, ""), + cameraPosition: (f = msg.getCameraPosition()) && common_v1_common_pb.Pose.toObject(includeInstance, f), + includeRobotMarker: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.slam.v1.GetMapRequest} + */ +proto.viam.service.slam.v1.GetMapRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.slam.v1.GetMapRequest; + return proto.viam.service.slam.v1.GetMapRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.slam.v1.GetMapRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.slam.v1.GetMapRequest} + */ +proto.viam.service.slam.v1.GetMapRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + case 3: + var value = new common_v1_common_pb.Pose; + reader.readMessage(value,common_v1_common_pb.Pose.deserializeBinaryFromReader); + msg.setCameraPosition(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIncludeRobotMarker(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.slam.v1.GetMapRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.slam.v1.GetMapRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.slam.v1.GetMapRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCameraPosition(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_v1_common_pb.Pose.serializeBinaryToWriter + ); + } + f = message.getIncludeRobotMarker(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.slam.v1.GetMapRequest} returns this + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string mime_type = 2; + * @return {string} + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.slam.v1.GetMapRequest} returns this + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional viam.common.v1.Pose camera_position = 3; + * @return {?proto.viam.common.v1.Pose} + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.getCameraPosition = function() { + return /** @type{?proto.viam.common.v1.Pose} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.Pose, 3)); +}; + + +/** + * @param {?proto.viam.common.v1.Pose|undefined} value + * @return {!proto.viam.service.slam.v1.GetMapRequest} returns this +*/ +proto.viam.service.slam.v1.GetMapRequest.prototype.setCameraPosition = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.slam.v1.GetMapRequest} returns this + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.clearCameraPosition = function() { + return this.setCameraPosition(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.hasCameraPosition = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool include_robot_marker = 4; + * @return {boolean} + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.getIncludeRobotMarker = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.service.slam.v1.GetMapRequest} returns this + */ +proto.viam.service.slam.v1.GetMapRequest.prototype.setIncludeRobotMarker = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.viam.service.slam.v1.GetMapResponse.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.viam.service.slam.v1.GetMapResponse.MapCase = { + MAP_NOT_SET: 0, + POINT_CLOUD: 1, + IMAGE: 2 +}; + +/** + * @return {proto.viam.service.slam.v1.GetMapResponse.MapCase} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.getMapCase = function() { + return /** @type {proto.viam.service.slam.v1.GetMapResponse.MapCase} */(jspb.Message.computeOneofCase(this, proto.viam.service.slam.v1.GetMapResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.slam.v1.GetMapResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.slam.v1.GetMapResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.slam.v1.GetMapResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pointCloud: (f = msg.getPointCloud()) && common_v1_common_pb.PointCloudObject.toObject(includeInstance, f), + image: msg.getImage_asB64(), + mimeType: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.slam.v1.GetMapResponse} + */ +proto.viam.service.slam.v1.GetMapResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.slam.v1.GetMapResponse; + return proto.viam.service.slam.v1.GetMapResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.slam.v1.GetMapResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.slam.v1.GetMapResponse} + */ +proto.viam.service.slam.v1.GetMapResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_v1_common_pb.PointCloudObject; + reader.readMessage(value,common_v1_common_pb.PointCloudObject.deserializeBinaryFromReader); + msg.setPointCloud(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setImage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.slam.v1.GetMapResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.slam.v1.GetMapResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.slam.v1.GetMapResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPointCloud(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_v1_common_pb.PointCloudObject.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional viam.common.v1.PointCloudObject point_cloud = 1; + * @return {?proto.viam.common.v1.PointCloudObject} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.getPointCloud = function() { + return /** @type{?proto.viam.common.v1.PointCloudObject} */ ( + jspb.Message.getWrapperField(this, common_v1_common_pb.PointCloudObject, 1)); +}; + + +/** + * @param {?proto.viam.common.v1.PointCloudObject|undefined} value + * @return {!proto.viam.service.slam.v1.GetMapResponse} returns this +*/ +proto.viam.service.slam.v1.GetMapResponse.prototype.setPointCloud = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.viam.service.slam.v1.GetMapResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.slam.v1.GetMapResponse} returns this + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.clearPointCloud = function() { + return this.setPointCloud(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.hasPointCloud = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes image = 2; + * @return {string} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.getImage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes image = 2; + * This is a type-conversion wrapper around `getImage()` + * @return {string} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.getImage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getImage())); +}; + + +/** + * optional bytes image = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getImage()` + * @return {!Uint8Array} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.getImage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getImage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.service.slam.v1.GetMapResponse} returns this + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.setImage = function(value) { + return jspb.Message.setOneofField(this, 2, proto.viam.service.slam.v1.GetMapResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.viam.service.slam.v1.GetMapResponse} returns this + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.clearImage = function() { + return jspb.Message.setOneofField(this, 2, proto.viam.service.slam.v1.GetMapResponse.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.hasImage = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string mime_type = 3; + * @return {string} + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.slam.v1.GetMapResponse} returns this + */ +proto.viam.service.slam.v1.GetMapResponse.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.viam.service.slam.v1); diff --git a/gen/js/service/slam/v1/slam_pb_service.d.ts b/gen/js/service/slam/v1/slam_pb_service.d.ts new file mode 100644 index 000000000..df39ffa18 --- /dev/null +++ b/gen/js/service/slam/v1/slam_pb_service.d.ts @@ -0,0 +1,82 @@ +// package: viam.service.slam.v1 +// file: service/slam/v1/slam.proto + +import * as service_slam_v1_slam_pb from "../../../service/slam/v1/slam_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type SLAMServiceGetPosition = { + readonly methodName: string; + readonly service: typeof SLAMService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_slam_v1_slam_pb.GetPositionRequest; + readonly responseType: typeof service_slam_v1_slam_pb.GetPositionResponse; +}; + +type SLAMServiceGetMap = { + readonly methodName: string; + readonly service: typeof SLAMService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_slam_v1_slam_pb.GetMapRequest; + readonly responseType: typeof service_slam_v1_slam_pb.GetMapResponse; +}; + +export class SLAMService { + static readonly serviceName: string; + static readonly GetPosition: SLAMServiceGetPosition; + static readonly GetMap: SLAMServiceGetMap; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class SLAMServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getPosition( + requestMessage: service_slam_v1_slam_pb.GetPositionRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_slam_v1_slam_pb.GetPositionResponse|null) => void + ): UnaryResponse; + getPosition( + requestMessage: service_slam_v1_slam_pb.GetPositionRequest, + callback: (error: ServiceError|null, responseMessage: service_slam_v1_slam_pb.GetPositionResponse|null) => void + ): UnaryResponse; + getMap( + requestMessage: service_slam_v1_slam_pb.GetMapRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_slam_v1_slam_pb.GetMapResponse|null) => void + ): UnaryResponse; + getMap( + requestMessage: service_slam_v1_slam_pb.GetMapRequest, + callback: (error: ServiceError|null, responseMessage: service_slam_v1_slam_pb.GetMapResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/service/slam/v1/slam_pb_service.js b/gen/js/service/slam/v1/slam_pb_service.js new file mode 100644 index 000000000..40712c56b --- /dev/null +++ b/gen/js/service/slam/v1/slam_pb_service.js @@ -0,0 +1,101 @@ +// package: viam.service.slam.v1 +// file: service/slam/v1/slam.proto + +var service_slam_v1_slam_pb = require("../../../service/slam/v1/slam_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var SLAMService = (function () { + function SLAMService() {} + SLAMService.serviceName = "viam.service.slam.v1.SLAMService"; + return SLAMService; +}()); + +SLAMService.GetPosition = { + methodName: "GetPosition", + service: SLAMService, + requestStream: false, + responseStream: false, + requestType: service_slam_v1_slam_pb.GetPositionRequest, + responseType: service_slam_v1_slam_pb.GetPositionResponse +}; + +SLAMService.GetMap = { + methodName: "GetMap", + service: SLAMService, + requestStream: false, + responseStream: false, + requestType: service_slam_v1_slam_pb.GetMapRequest, + responseType: service_slam_v1_slam_pb.GetMapResponse +}; + +exports.SLAMService = SLAMService; + +function SLAMServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +SLAMServiceClient.prototype.getPosition = function getPosition(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SLAMService.GetPosition, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +SLAMServiceClient.prototype.getMap = function getMap(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(SLAMService.GetMap, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.SLAMServiceClient = SLAMServiceClient; + diff --git a/gen/js/service/vision/v1/vision_grpc_web_pb.js b/gen/js/service/vision/v1/vision_grpc_web_pb.js new file mode 100644 index 000000000..dca8bb877 --- /dev/null +++ b/gen/js/service/vision/v1/vision_grpc_web_pb.js @@ -0,0 +1,998 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.service.vision.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var common_v1_common_pb = require('../../../common/v1/common_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') +const proto = {}; +proto.viam = {}; +proto.viam.service = {}; +proto.viam.service.vision = {}; +proto.viam.service.vision.v1 = require('./vision_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.vision.v1.VisionServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.service.vision.v1.VisionServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.GetModelParameterSchemaRequest, + * !proto.viam.service.vision.v1.GetModelParameterSchemaResponse>} + */ +const methodDescriptor_VisionService_GetModelParameterSchema = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetModelParameterSchema', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.GetModelParameterSchemaRequest, + proto.viam.service.vision.v1.GetModelParameterSchemaResponse, + /** + * @param {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.GetModelParameterSchemaResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.GetModelParameterSchemaResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getModelParameterSchema = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetModelParameterSchema', + request, + metadata || {}, + methodDescriptor_VisionService_GetModelParameterSchema, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getModelParameterSchema = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetModelParameterSchema', + request, + metadata || {}, + methodDescriptor_VisionService_GetModelParameterSchema); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.GetDetectorNamesRequest, + * !proto.viam.service.vision.v1.GetDetectorNamesResponse>} + */ +const methodDescriptor_VisionService_GetDetectorNames = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetDetectorNames', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.GetDetectorNamesRequest, + proto.viam.service.vision.v1.GetDetectorNamesResponse, + /** + * @param {!proto.viam.service.vision.v1.GetDetectorNamesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.GetDetectorNamesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.GetDetectorNamesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.GetDetectorNamesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getDetectorNames = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetDetectorNames', + request, + metadata || {}, + methodDescriptor_VisionService_GetDetectorNames, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.GetDetectorNamesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getDetectorNames = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetDetectorNames', + request, + metadata || {}, + methodDescriptor_VisionService_GetDetectorNames); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.AddDetectorRequest, + * !proto.viam.service.vision.v1.AddDetectorResponse>} + */ +const methodDescriptor_VisionService_AddDetector = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/AddDetector', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.AddDetectorRequest, + proto.viam.service.vision.v1.AddDetectorResponse, + /** + * @param {!proto.viam.service.vision.v1.AddDetectorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.AddDetectorResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.AddDetectorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.AddDetectorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.addDetector = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/AddDetector', + request, + metadata || {}, + methodDescriptor_VisionService_AddDetector, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.AddDetectorRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.addDetector = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/AddDetector', + request, + metadata || {}, + methodDescriptor_VisionService_AddDetector); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.RemoveDetectorRequest, + * !proto.viam.service.vision.v1.RemoveDetectorResponse>} + */ +const methodDescriptor_VisionService_RemoveDetector = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/RemoveDetector', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.RemoveDetectorRequest, + proto.viam.service.vision.v1.RemoveDetectorResponse, + /** + * @param {!proto.viam.service.vision.v1.RemoveDetectorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.RemoveDetectorResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.RemoveDetectorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.RemoveDetectorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.removeDetector = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/RemoveDetector', + request, + metadata || {}, + methodDescriptor_VisionService_RemoveDetector, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.RemoveDetectorRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.removeDetector = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/RemoveDetector', + request, + metadata || {}, + methodDescriptor_VisionService_RemoveDetector); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.GetDetectionsFromCameraRequest, + * !proto.viam.service.vision.v1.GetDetectionsFromCameraResponse>} + */ +const methodDescriptor_VisionService_GetDetectionsFromCamera = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetDetectionsFromCamera', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.GetDetectionsFromCameraRequest, + proto.viam.service.vision.v1.GetDetectionsFromCameraResponse, + /** + * @param {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.GetDetectionsFromCameraResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getDetectionsFromCamera = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetDetectionsFromCamera', + request, + metadata || {}, + methodDescriptor_VisionService_GetDetectionsFromCamera, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getDetectionsFromCamera = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetDetectionsFromCamera', + request, + metadata || {}, + methodDescriptor_VisionService_GetDetectionsFromCamera); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.GetDetectionsRequest, + * !proto.viam.service.vision.v1.GetDetectionsResponse>} + */ +const methodDescriptor_VisionService_GetDetections = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetDetections', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.GetDetectionsRequest, + proto.viam.service.vision.v1.GetDetectionsResponse, + /** + * @param {!proto.viam.service.vision.v1.GetDetectionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.GetDetectionsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.GetDetectionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.GetDetectionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getDetections = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetDetections', + request, + metadata || {}, + methodDescriptor_VisionService_GetDetections, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.GetDetectionsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getDetections = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetDetections', + request, + metadata || {}, + methodDescriptor_VisionService_GetDetections); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.GetClassifierNamesRequest, + * !proto.viam.service.vision.v1.GetClassifierNamesResponse>} + */ +const methodDescriptor_VisionService_GetClassifierNames = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetClassifierNames', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.GetClassifierNamesRequest, + proto.viam.service.vision.v1.GetClassifierNamesResponse, + /** + * @param {!proto.viam.service.vision.v1.GetClassifierNamesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.GetClassifierNamesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.GetClassifierNamesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.GetClassifierNamesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getClassifierNames = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetClassifierNames', + request, + metadata || {}, + methodDescriptor_VisionService_GetClassifierNames, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.GetClassifierNamesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getClassifierNames = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetClassifierNames', + request, + metadata || {}, + methodDescriptor_VisionService_GetClassifierNames); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.AddClassifierRequest, + * !proto.viam.service.vision.v1.AddClassifierResponse>} + */ +const methodDescriptor_VisionService_AddClassifier = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/AddClassifier', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.AddClassifierRequest, + proto.viam.service.vision.v1.AddClassifierResponse, + /** + * @param {!proto.viam.service.vision.v1.AddClassifierRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.AddClassifierResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.AddClassifierRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.AddClassifierResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.addClassifier = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/AddClassifier', + request, + metadata || {}, + methodDescriptor_VisionService_AddClassifier, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.AddClassifierRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.addClassifier = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/AddClassifier', + request, + metadata || {}, + methodDescriptor_VisionService_AddClassifier); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.RemoveClassifierRequest, + * !proto.viam.service.vision.v1.RemoveClassifierResponse>} + */ +const methodDescriptor_VisionService_RemoveClassifier = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/RemoveClassifier', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.RemoveClassifierRequest, + proto.viam.service.vision.v1.RemoveClassifierResponse, + /** + * @param {!proto.viam.service.vision.v1.RemoveClassifierRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.RemoveClassifierResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.RemoveClassifierRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.RemoveClassifierResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.removeClassifier = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/RemoveClassifier', + request, + metadata || {}, + methodDescriptor_VisionService_RemoveClassifier, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.RemoveClassifierRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.removeClassifier = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/RemoveClassifier', + request, + metadata || {}, + methodDescriptor_VisionService_RemoveClassifier); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.GetClassificationsFromCameraRequest, + * !proto.viam.service.vision.v1.GetClassificationsFromCameraResponse>} + */ +const methodDescriptor_VisionService_GetClassificationsFromCamera = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetClassificationsFromCamera', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.GetClassificationsFromCameraRequest, + proto.viam.service.vision.v1.GetClassificationsFromCameraResponse, + /** + * @param {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.GetClassificationsFromCameraResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getClassificationsFromCamera = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetClassificationsFromCamera', + request, + metadata || {}, + methodDescriptor_VisionService_GetClassificationsFromCamera, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getClassificationsFromCamera = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetClassificationsFromCamera', + request, + metadata || {}, + methodDescriptor_VisionService_GetClassificationsFromCamera); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.GetClassificationsRequest, + * !proto.viam.service.vision.v1.GetClassificationsResponse>} + */ +const methodDescriptor_VisionService_GetClassifications = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetClassifications', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.GetClassificationsRequest, + proto.viam.service.vision.v1.GetClassificationsResponse, + /** + * @param {!proto.viam.service.vision.v1.GetClassificationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.GetClassificationsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.GetClassificationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.GetClassificationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getClassifications = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetClassifications', + request, + metadata || {}, + methodDescriptor_VisionService_GetClassifications, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.GetClassificationsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getClassifications = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetClassifications', + request, + metadata || {}, + methodDescriptor_VisionService_GetClassifications); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.GetSegmenterNamesRequest, + * !proto.viam.service.vision.v1.GetSegmenterNamesResponse>} + */ +const methodDescriptor_VisionService_GetSegmenterNames = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetSegmenterNames', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.GetSegmenterNamesRequest, + proto.viam.service.vision.v1.GetSegmenterNamesResponse, + /** + * @param {!proto.viam.service.vision.v1.GetSegmenterNamesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.GetSegmenterNamesResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.GetSegmenterNamesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.GetSegmenterNamesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getSegmenterNames = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetSegmenterNames', + request, + metadata || {}, + methodDescriptor_VisionService_GetSegmenterNames, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.GetSegmenterNamesRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getSegmenterNames = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetSegmenterNames', + request, + metadata || {}, + methodDescriptor_VisionService_GetSegmenterNames); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.AddSegmenterRequest, + * !proto.viam.service.vision.v1.AddSegmenterResponse>} + */ +const methodDescriptor_VisionService_AddSegmenter = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/AddSegmenter', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.AddSegmenterRequest, + proto.viam.service.vision.v1.AddSegmenterResponse, + /** + * @param {!proto.viam.service.vision.v1.AddSegmenterRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.AddSegmenterResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.AddSegmenterRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.AddSegmenterResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.addSegmenter = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/AddSegmenter', + request, + metadata || {}, + methodDescriptor_VisionService_AddSegmenter, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.AddSegmenterRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.addSegmenter = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/AddSegmenter', + request, + metadata || {}, + methodDescriptor_VisionService_AddSegmenter); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.RemoveSegmenterRequest, + * !proto.viam.service.vision.v1.RemoveSegmenterResponse>} + */ +const methodDescriptor_VisionService_RemoveSegmenter = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/RemoveSegmenter', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.RemoveSegmenterRequest, + proto.viam.service.vision.v1.RemoveSegmenterResponse, + /** + * @param {!proto.viam.service.vision.v1.RemoveSegmenterRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.RemoveSegmenterResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.RemoveSegmenterRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.RemoveSegmenterResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.removeSegmenter = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/RemoveSegmenter', + request, + metadata || {}, + methodDescriptor_VisionService_RemoveSegmenter, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.RemoveSegmenterRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.removeSegmenter = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/RemoveSegmenter', + request, + metadata || {}, + methodDescriptor_VisionService_RemoveSegmenter); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.service.vision.v1.GetObjectPointCloudsRequest, + * !proto.viam.service.vision.v1.GetObjectPointCloudsResponse>} + */ +const methodDescriptor_VisionService_GetObjectPointClouds = new grpc.web.MethodDescriptor( + '/viam.service.vision.v1.VisionService/GetObjectPointClouds', + grpc.web.MethodType.UNARY, + proto.viam.service.vision.v1.GetObjectPointCloudsRequest, + proto.viam.service.vision.v1.GetObjectPointCloudsResponse, + /** + * @param {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.service.vision.v1.GetObjectPointCloudsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.service.vision.v1.GetObjectPointCloudsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.service.vision.v1.VisionServiceClient.prototype.getObjectPointClouds = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetObjectPointClouds', + request, + metadata || {}, + methodDescriptor_VisionService_GetObjectPointClouds, + callback); +}; + + +/** + * @param {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.service.vision.v1.VisionServicePromiseClient.prototype.getObjectPointClouds = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.service.vision.v1.VisionService/GetObjectPointClouds', + request, + metadata || {}, + methodDescriptor_VisionService_GetObjectPointClouds); +}; + + +module.exports = proto.viam.service.vision.v1; + diff --git a/gen/js/service/vision/v1/vision_pb.d.ts b/gen/js/service/vision/v1/vision_pb.d.ts new file mode 100644 index 000000000..9eb2492e3 --- /dev/null +++ b/gen/js/service/vision/v1/vision_pb.d.ts @@ -0,0 +1,816 @@ +// package: viam.service.vision.v1 +// file: service/vision/v1/vision.proto + +import * as jspb from "google-protobuf"; +import * as common_v1_common_pb from "../../../common/v1/common_pb"; +import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class GetModelParameterSchemaRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getModelType(): string; + setModelType(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetModelParameterSchemaRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetModelParameterSchemaRequest): GetModelParameterSchemaRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetModelParameterSchemaRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetModelParameterSchemaRequest; + static deserializeBinaryFromReader(message: GetModelParameterSchemaRequest, reader: jspb.BinaryReader): GetModelParameterSchemaRequest; +} + +export namespace GetModelParameterSchemaRequest { + export type AsObject = { + name: string, + modelType: string, + } +} + +export class GetModelParameterSchemaResponse extends jspb.Message { + getModelParameterSchema(): Uint8Array | string; + getModelParameterSchema_asU8(): Uint8Array; + getModelParameterSchema_asB64(): string; + setModelParameterSchema(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetModelParameterSchemaResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetModelParameterSchemaResponse): GetModelParameterSchemaResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetModelParameterSchemaResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetModelParameterSchemaResponse; + static deserializeBinaryFromReader(message: GetModelParameterSchemaResponse, reader: jspb.BinaryReader): GetModelParameterSchemaResponse; +} + +export namespace GetModelParameterSchemaResponse { + export type AsObject = { + modelParameterSchema: Uint8Array | string, + } +} + +export class GetDetectorNamesRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDetectorNamesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetDetectorNamesRequest): GetDetectorNamesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDetectorNamesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDetectorNamesRequest; + static deserializeBinaryFromReader(message: GetDetectorNamesRequest, reader: jspb.BinaryReader): GetDetectorNamesRequest; +} + +export namespace GetDetectorNamesRequest { + export type AsObject = { + name: string, + } +} + +export class GetDetectorNamesResponse extends jspb.Message { + clearDetectorNamesList(): void; + getDetectorNamesList(): Array; + setDetectorNamesList(value: Array): void; + addDetectorNames(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDetectorNamesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetDetectorNamesResponse): GetDetectorNamesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDetectorNamesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDetectorNamesResponse; + static deserializeBinaryFromReader(message: GetDetectorNamesResponse, reader: jspb.BinaryReader): GetDetectorNamesResponse; +} + +export namespace GetDetectorNamesResponse { + export type AsObject = { + detectorNamesList: Array, + } +} + +export class AddDetectorRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getDetectorName(): string; + setDetectorName(value: string): void; + + getDetectorModelType(): string; + setDetectorModelType(value: string): void; + + hasDetectorParameters(): boolean; + clearDetectorParameters(): void; + getDetectorParameters(): google_protobuf_struct_pb.Struct | undefined; + setDetectorParameters(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddDetectorRequest.AsObject; + static toObject(includeInstance: boolean, msg: AddDetectorRequest): AddDetectorRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddDetectorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddDetectorRequest; + static deserializeBinaryFromReader(message: AddDetectorRequest, reader: jspb.BinaryReader): AddDetectorRequest; +} + +export namespace AddDetectorRequest { + export type AsObject = { + name: string, + detectorName: string, + detectorModelType: string, + detectorParameters?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class AddDetectorResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddDetectorResponse.AsObject; + static toObject(includeInstance: boolean, msg: AddDetectorResponse): AddDetectorResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddDetectorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddDetectorResponse; + static deserializeBinaryFromReader(message: AddDetectorResponse, reader: jspb.BinaryReader): AddDetectorResponse; +} + +export namespace AddDetectorResponse { + export type AsObject = { + } +} + +export class RemoveDetectorRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getDetectorName(): string; + setDetectorName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveDetectorRequest.AsObject; + static toObject(includeInstance: boolean, msg: RemoveDetectorRequest): RemoveDetectorRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveDetectorRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveDetectorRequest; + static deserializeBinaryFromReader(message: RemoveDetectorRequest, reader: jspb.BinaryReader): RemoveDetectorRequest; +} + +export namespace RemoveDetectorRequest { + export type AsObject = { + name: string, + detectorName: string, + } +} + +export class RemoveDetectorResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveDetectorResponse.AsObject; + static toObject(includeInstance: boolean, msg: RemoveDetectorResponse): RemoveDetectorResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveDetectorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveDetectorResponse; + static deserializeBinaryFromReader(message: RemoveDetectorResponse, reader: jspb.BinaryReader): RemoveDetectorResponse; +} + +export namespace RemoveDetectorResponse { + export type AsObject = { + } +} + +export class GetDetectionsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getImage(): Uint8Array | string; + getImage_asU8(): Uint8Array; + getImage_asB64(): string; + setImage(value: Uint8Array | string): void; + + getWidth(): number; + setWidth(value: number): void; + + getHeight(): number; + setHeight(value: number): void; + + getMimeType(): string; + setMimeType(value: string): void; + + getDetectorName(): string; + setDetectorName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDetectionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetDetectionsRequest): GetDetectionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDetectionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDetectionsRequest; + static deserializeBinaryFromReader(message: GetDetectionsRequest, reader: jspb.BinaryReader): GetDetectionsRequest; +} + +export namespace GetDetectionsRequest { + export type AsObject = { + name: string, + image: Uint8Array | string, + width: number, + height: number, + mimeType: string, + detectorName: string, + } +} + +export class GetDetectionsResponse extends jspb.Message { + clearDetectionsList(): void; + getDetectionsList(): Array; + setDetectionsList(value: Array): void; + addDetections(value?: Detection, index?: number): Detection; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDetectionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetDetectionsResponse): GetDetectionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDetectionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDetectionsResponse; + static deserializeBinaryFromReader(message: GetDetectionsResponse, reader: jspb.BinaryReader): GetDetectionsResponse; +} + +export namespace GetDetectionsResponse { + export type AsObject = { + detectionsList: Array, + } +} + +export class GetDetectionsFromCameraRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getCameraName(): string; + setCameraName(value: string): void; + + getDetectorName(): string; + setDetectorName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDetectionsFromCameraRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetDetectionsFromCameraRequest): GetDetectionsFromCameraRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDetectionsFromCameraRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDetectionsFromCameraRequest; + static deserializeBinaryFromReader(message: GetDetectionsFromCameraRequest, reader: jspb.BinaryReader): GetDetectionsFromCameraRequest; +} + +export namespace GetDetectionsFromCameraRequest { + export type AsObject = { + name: string, + cameraName: string, + detectorName: string, + } +} + +export class GetDetectionsFromCameraResponse extends jspb.Message { + clearDetectionsList(): void; + getDetectionsList(): Array; + setDetectionsList(value: Array): void; + addDetections(value?: Detection, index?: number): Detection; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetDetectionsFromCameraResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetDetectionsFromCameraResponse): GetDetectionsFromCameraResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetDetectionsFromCameraResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetDetectionsFromCameraResponse; + static deserializeBinaryFromReader(message: GetDetectionsFromCameraResponse, reader: jspb.BinaryReader): GetDetectionsFromCameraResponse; +} + +export namespace GetDetectionsFromCameraResponse { + export type AsObject = { + detectionsList: Array, + } +} + +export class Detection extends jspb.Message { + hasXMin(): boolean; + clearXMin(): void; + getXMin(): number; + setXMin(value: number): void; + + hasYMin(): boolean; + clearYMin(): void; + getYMin(): number; + setYMin(value: number): void; + + hasXMax(): boolean; + clearXMax(): void; + getXMax(): number; + setXMax(value: number): void; + + hasYMax(): boolean; + clearYMax(): void; + getYMax(): number; + setYMax(value: number): void; + + getConfidence(): number; + setConfidence(value: number): void; + + getClassName(): string; + setClassName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Detection.AsObject; + static toObject(includeInstance: boolean, msg: Detection): Detection.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Detection, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Detection; + static deserializeBinaryFromReader(message: Detection, reader: jspb.BinaryReader): Detection; +} + +export namespace Detection { + export type AsObject = { + xMin: number, + yMin: number, + xMax: number, + yMax: number, + confidence: number, + className: string, + } +} + +export class GetClassifierNamesRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetClassifierNamesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetClassifierNamesRequest): GetClassifierNamesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetClassifierNamesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetClassifierNamesRequest; + static deserializeBinaryFromReader(message: GetClassifierNamesRequest, reader: jspb.BinaryReader): GetClassifierNamesRequest; +} + +export namespace GetClassifierNamesRequest { + export type AsObject = { + name: string, + } +} + +export class GetClassifierNamesResponse extends jspb.Message { + clearClassifierNamesList(): void; + getClassifierNamesList(): Array; + setClassifierNamesList(value: Array): void; + addClassifierNames(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetClassifierNamesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetClassifierNamesResponse): GetClassifierNamesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetClassifierNamesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetClassifierNamesResponse; + static deserializeBinaryFromReader(message: GetClassifierNamesResponse, reader: jspb.BinaryReader): GetClassifierNamesResponse; +} + +export namespace GetClassifierNamesResponse { + export type AsObject = { + classifierNamesList: Array, + } +} + +export class AddClassifierRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getClassifierName(): string; + setClassifierName(value: string): void; + + getClassifierModelType(): string; + setClassifierModelType(value: string): void; + + hasClassifierParameters(): boolean; + clearClassifierParameters(): void; + getClassifierParameters(): google_protobuf_struct_pb.Struct | undefined; + setClassifierParameters(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddClassifierRequest.AsObject; + static toObject(includeInstance: boolean, msg: AddClassifierRequest): AddClassifierRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddClassifierRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddClassifierRequest; + static deserializeBinaryFromReader(message: AddClassifierRequest, reader: jspb.BinaryReader): AddClassifierRequest; +} + +export namespace AddClassifierRequest { + export type AsObject = { + name: string, + classifierName: string, + classifierModelType: string, + classifierParameters?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class AddClassifierResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddClassifierResponse.AsObject; + static toObject(includeInstance: boolean, msg: AddClassifierResponse): AddClassifierResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddClassifierResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddClassifierResponse; + static deserializeBinaryFromReader(message: AddClassifierResponse, reader: jspb.BinaryReader): AddClassifierResponse; +} + +export namespace AddClassifierResponse { + export type AsObject = { + } +} + +export class RemoveClassifierRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getClassifierName(): string; + setClassifierName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveClassifierRequest.AsObject; + static toObject(includeInstance: boolean, msg: RemoveClassifierRequest): RemoveClassifierRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveClassifierRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveClassifierRequest; + static deserializeBinaryFromReader(message: RemoveClassifierRequest, reader: jspb.BinaryReader): RemoveClassifierRequest; +} + +export namespace RemoveClassifierRequest { + export type AsObject = { + name: string, + classifierName: string, + } +} + +export class RemoveClassifierResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveClassifierResponse.AsObject; + static toObject(includeInstance: boolean, msg: RemoveClassifierResponse): RemoveClassifierResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveClassifierResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveClassifierResponse; + static deserializeBinaryFromReader(message: RemoveClassifierResponse, reader: jspb.BinaryReader): RemoveClassifierResponse; +} + +export namespace RemoveClassifierResponse { + export type AsObject = { + } +} + +export class GetClassificationsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getImage(): Uint8Array | string; + getImage_asU8(): Uint8Array; + getImage_asB64(): string; + setImage(value: Uint8Array | string): void; + + getWidth(): number; + setWidth(value: number): void; + + getHeight(): number; + setHeight(value: number): void; + + getMimeType(): string; + setMimeType(value: string): void; + + getClassifierName(): string; + setClassifierName(value: string): void; + + getN(): number; + setN(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetClassificationsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetClassificationsRequest): GetClassificationsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetClassificationsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetClassificationsRequest; + static deserializeBinaryFromReader(message: GetClassificationsRequest, reader: jspb.BinaryReader): GetClassificationsRequest; +} + +export namespace GetClassificationsRequest { + export type AsObject = { + name: string, + image: Uint8Array | string, + width: number, + height: number, + mimeType: string, + classifierName: string, + n: number, + } +} + +export class GetClassificationsResponse extends jspb.Message { + clearClassificationsList(): void; + getClassificationsList(): Array; + setClassificationsList(value: Array): void; + addClassifications(value?: Classification, index?: number): Classification; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetClassificationsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetClassificationsResponse): GetClassificationsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetClassificationsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetClassificationsResponse; + static deserializeBinaryFromReader(message: GetClassificationsResponse, reader: jspb.BinaryReader): GetClassificationsResponse; +} + +export namespace GetClassificationsResponse { + export type AsObject = { + classificationsList: Array, + } +} + +export class GetClassificationsFromCameraRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getCameraName(): string; + setCameraName(value: string): void; + + getClassifierName(): string; + setClassifierName(value: string): void; + + getN(): number; + setN(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetClassificationsFromCameraRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetClassificationsFromCameraRequest): GetClassificationsFromCameraRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetClassificationsFromCameraRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetClassificationsFromCameraRequest; + static deserializeBinaryFromReader(message: GetClassificationsFromCameraRequest, reader: jspb.BinaryReader): GetClassificationsFromCameraRequest; +} + +export namespace GetClassificationsFromCameraRequest { + export type AsObject = { + name: string, + cameraName: string, + classifierName: string, + n: number, + } +} + +export class GetClassificationsFromCameraResponse extends jspb.Message { + clearClassificationsList(): void; + getClassificationsList(): Array; + setClassificationsList(value: Array): void; + addClassifications(value?: Classification, index?: number): Classification; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetClassificationsFromCameraResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetClassificationsFromCameraResponse): GetClassificationsFromCameraResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetClassificationsFromCameraResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetClassificationsFromCameraResponse; + static deserializeBinaryFromReader(message: GetClassificationsFromCameraResponse, reader: jspb.BinaryReader): GetClassificationsFromCameraResponse; +} + +export namespace GetClassificationsFromCameraResponse { + export type AsObject = { + classificationsList: Array, + } +} + +export class Classification extends jspb.Message { + getClassName(): string; + setClassName(value: string): void; + + getConfidence(): number; + setConfidence(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Classification.AsObject; + static toObject(includeInstance: boolean, msg: Classification): Classification.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Classification, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Classification; + static deserializeBinaryFromReader(message: Classification, reader: jspb.BinaryReader): Classification; +} + +export namespace Classification { + export type AsObject = { + className: string, + confidence: number, + } +} + +export class GetSegmenterNamesRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSegmenterNamesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetSegmenterNamesRequest): GetSegmenterNamesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSegmenterNamesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSegmenterNamesRequest; + static deserializeBinaryFromReader(message: GetSegmenterNamesRequest, reader: jspb.BinaryReader): GetSegmenterNamesRequest; +} + +export namespace GetSegmenterNamesRequest { + export type AsObject = { + name: string, + } +} + +export class GetSegmenterNamesResponse extends jspb.Message { + clearSegmenterNamesList(): void; + getSegmenterNamesList(): Array; + setSegmenterNamesList(value: Array): void; + addSegmenterNames(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSegmenterNamesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetSegmenterNamesResponse): GetSegmenterNamesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSegmenterNamesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSegmenterNamesResponse; + static deserializeBinaryFromReader(message: GetSegmenterNamesResponse, reader: jspb.BinaryReader): GetSegmenterNamesResponse; +} + +export namespace GetSegmenterNamesResponse { + export type AsObject = { + segmenterNamesList: Array, + } +} + +export class AddSegmenterRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getSegmenterName(): string; + setSegmenterName(value: string): void; + + getSegmenterModelType(): string; + setSegmenterModelType(value: string): void; + + hasSegmenterParameters(): boolean; + clearSegmenterParameters(): void; + getSegmenterParameters(): google_protobuf_struct_pb.Struct | undefined; + setSegmenterParameters(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddSegmenterRequest.AsObject; + static toObject(includeInstance: boolean, msg: AddSegmenterRequest): AddSegmenterRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddSegmenterRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddSegmenterRequest; + static deserializeBinaryFromReader(message: AddSegmenterRequest, reader: jspb.BinaryReader): AddSegmenterRequest; +} + +export namespace AddSegmenterRequest { + export type AsObject = { + name: string, + segmenterName: string, + segmenterModelType: string, + segmenterParameters?: google_protobuf_struct_pb.Struct.AsObject, + } +} + +export class AddSegmenterResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddSegmenterResponse.AsObject; + static toObject(includeInstance: boolean, msg: AddSegmenterResponse): AddSegmenterResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddSegmenterResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddSegmenterResponse; + static deserializeBinaryFromReader(message: AddSegmenterResponse, reader: jspb.BinaryReader): AddSegmenterResponse; +} + +export namespace AddSegmenterResponse { + export type AsObject = { + } +} + +export class RemoveSegmenterRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getSegmenterName(): string; + setSegmenterName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveSegmenterRequest.AsObject; + static toObject(includeInstance: boolean, msg: RemoveSegmenterRequest): RemoveSegmenterRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveSegmenterRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveSegmenterRequest; + static deserializeBinaryFromReader(message: RemoveSegmenterRequest, reader: jspb.BinaryReader): RemoveSegmenterRequest; +} + +export namespace RemoveSegmenterRequest { + export type AsObject = { + name: string, + segmenterName: string, + } +} + +export class RemoveSegmenterResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RemoveSegmenterResponse.AsObject; + static toObject(includeInstance: boolean, msg: RemoveSegmenterResponse): RemoveSegmenterResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RemoveSegmenterResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RemoveSegmenterResponse; + static deserializeBinaryFromReader(message: RemoveSegmenterResponse, reader: jspb.BinaryReader): RemoveSegmenterResponse; +} + +export namespace RemoveSegmenterResponse { + export type AsObject = { + } +} + +export class GetObjectPointCloudsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + getCameraName(): string; + setCameraName(value: string): void; + + getSegmenterName(): string; + setSegmenterName(value: string): void; + + getMimeType(): string; + setMimeType(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetObjectPointCloudsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetObjectPointCloudsRequest): GetObjectPointCloudsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetObjectPointCloudsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetObjectPointCloudsRequest; + static deserializeBinaryFromReader(message: GetObjectPointCloudsRequest, reader: jspb.BinaryReader): GetObjectPointCloudsRequest; +} + +export namespace GetObjectPointCloudsRequest { + export type AsObject = { + name: string, + cameraName: string, + segmenterName: string, + mimeType: string, + } +} + +export class GetObjectPointCloudsResponse extends jspb.Message { + getMimeType(): string; + setMimeType(value: string): void; + + clearObjectsList(): void; + getObjectsList(): Array; + setObjectsList(value: Array): void; + addObjects(value?: common_v1_common_pb.PointCloudObject, index?: number): common_v1_common_pb.PointCloudObject; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetObjectPointCloudsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetObjectPointCloudsResponse): GetObjectPointCloudsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetObjectPointCloudsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetObjectPointCloudsResponse; + static deserializeBinaryFromReader(message: GetObjectPointCloudsResponse, reader: jspb.BinaryReader): GetObjectPointCloudsResponse; +} + +export namespace GetObjectPointCloudsResponse { + export type AsObject = { + mimeType: string, + objectsList: Array, + } +} + diff --git a/gen/js/service/vision/v1/vision_pb.js b/gen/js/service/vision/v1/vision_pb.js new file mode 100644 index 000000000..2636f53cd --- /dev/null +++ b/gen/js/service/vision/v1/vision_pb.js @@ -0,0 +1,6319 @@ +// source: service/vision/v1/vision.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var common_v1_common_pb = require('../../../common/v1/common_pb.js'); +goog.object.extend(proto, common_v1_common_pb); +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.viam.service.vision.v1.AddClassifierRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.AddClassifierResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.AddDetectorRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.AddDetectorResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.AddSegmenterRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.AddSegmenterResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.Classification', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.Detection', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetClassificationsFromCameraRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetClassificationsFromCameraResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetClassificationsRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetClassificationsResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetClassifierNamesRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetClassifierNamesResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetDetectionsFromCameraRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetDetectionsFromCameraResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetDetectionsRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetDetectionsResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetDetectorNamesRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetDetectorNamesResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetModelParameterSchemaRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetModelParameterSchemaResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetObjectPointCloudsRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetObjectPointCloudsResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetSegmenterNamesRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.GetSegmenterNamesResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.RemoveClassifierRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.RemoveClassifierResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.RemoveDetectorRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.RemoveDetectorResponse', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.RemoveSegmenterRequest', null, global); +goog.exportSymbol('proto.viam.service.vision.v1.RemoveSegmenterResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetModelParameterSchemaRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetModelParameterSchemaRequest.displayName = 'proto.viam.service.vision.v1.GetModelParameterSchemaRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetModelParameterSchemaResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetModelParameterSchemaResponse.displayName = 'proto.viam.service.vision.v1.GetModelParameterSchemaResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetDetectorNamesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetDetectorNamesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetDetectorNamesRequest.displayName = 'proto.viam.service.vision.v1.GetDetectorNamesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.vision.v1.GetDetectorNamesResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetDetectorNamesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetDetectorNamesResponse.displayName = 'proto.viam.service.vision.v1.GetDetectorNamesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.AddDetectorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.AddDetectorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.AddDetectorRequest.displayName = 'proto.viam.service.vision.v1.AddDetectorRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.AddDetectorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.AddDetectorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.AddDetectorResponse.displayName = 'proto.viam.service.vision.v1.AddDetectorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.RemoveDetectorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.RemoveDetectorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.RemoveDetectorRequest.displayName = 'proto.viam.service.vision.v1.RemoveDetectorRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.RemoveDetectorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.RemoveDetectorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.RemoveDetectorResponse.displayName = 'proto.viam.service.vision.v1.RemoveDetectorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetDetectionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetDetectionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetDetectionsRequest.displayName = 'proto.viam.service.vision.v1.GetDetectionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetDetectionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.vision.v1.GetDetectionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetDetectionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetDetectionsResponse.displayName = 'proto.viam.service.vision.v1.GetDetectionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetDetectionsFromCameraRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.displayName = 'proto.viam.service.vision.v1.GetDetectionsFromCameraRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetDetectionsFromCameraResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.displayName = 'proto.viam.service.vision.v1.GetDetectionsFromCameraResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.Detection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.Detection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.Detection.displayName = 'proto.viam.service.vision.v1.Detection'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetClassifierNamesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetClassifierNamesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetClassifierNamesRequest.displayName = 'proto.viam.service.vision.v1.GetClassifierNamesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.vision.v1.GetClassifierNamesResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetClassifierNamesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetClassifierNamesResponse.displayName = 'proto.viam.service.vision.v1.GetClassifierNamesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.AddClassifierRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.AddClassifierRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.AddClassifierRequest.displayName = 'proto.viam.service.vision.v1.AddClassifierRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.AddClassifierResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.AddClassifierResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.AddClassifierResponse.displayName = 'proto.viam.service.vision.v1.AddClassifierResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.RemoveClassifierRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.RemoveClassifierRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.RemoveClassifierRequest.displayName = 'proto.viam.service.vision.v1.RemoveClassifierRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.RemoveClassifierResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.RemoveClassifierResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.RemoveClassifierResponse.displayName = 'proto.viam.service.vision.v1.RemoveClassifierResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetClassificationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetClassificationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetClassificationsRequest.displayName = 'proto.viam.service.vision.v1.GetClassificationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetClassificationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.vision.v1.GetClassificationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetClassificationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetClassificationsResponse.displayName = 'proto.viam.service.vision.v1.GetClassificationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetClassificationsFromCameraRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.displayName = 'proto.viam.service.vision.v1.GetClassificationsFromCameraRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetClassificationsFromCameraResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.displayName = 'proto.viam.service.vision.v1.GetClassificationsFromCameraResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.Classification = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.Classification, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.Classification.displayName = 'proto.viam.service.vision.v1.Classification'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetSegmenterNamesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetSegmenterNamesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetSegmenterNamesRequest.displayName = 'proto.viam.service.vision.v1.GetSegmenterNamesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.vision.v1.GetSegmenterNamesResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetSegmenterNamesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetSegmenterNamesResponse.displayName = 'proto.viam.service.vision.v1.GetSegmenterNamesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.AddSegmenterRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.AddSegmenterRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.AddSegmenterRequest.displayName = 'proto.viam.service.vision.v1.AddSegmenterRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.AddSegmenterResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.AddSegmenterResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.AddSegmenterResponse.displayName = 'proto.viam.service.vision.v1.AddSegmenterResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.RemoveSegmenterRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.RemoveSegmenterRequest.displayName = 'proto.viam.service.vision.v1.RemoveSegmenterRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.RemoveSegmenterResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.RemoveSegmenterResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.RemoveSegmenterResponse.displayName = 'proto.viam.service.vision.v1.RemoveSegmenterResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetObjectPointCloudsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetObjectPointCloudsRequest.displayName = 'proto.viam.service.vision.v1.GetObjectPointCloudsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.service.vision.v1.GetObjectPointCloudsResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.service.vision.v1.GetObjectPointCloudsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.service.vision.v1.GetObjectPointCloudsResponse.displayName = 'proto.viam.service.vision.v1.GetObjectPointCloudsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetModelParameterSchemaRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + modelType: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetModelParameterSchemaRequest; + return proto.viam.service.vision.v1.GetModelParameterSchemaRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setModelType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetModelParameterSchemaRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getModelType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} returns this + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string model_type = 2; + * @return {string} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.prototype.getModelType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetModelParameterSchemaRequest} returns this + */ +proto.viam.service.vision.v1.GetModelParameterSchemaRequest.prototype.setModelType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetModelParameterSchemaResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetModelParameterSchemaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.toObject = function(includeInstance, msg) { + var f, obj = { + modelParameterSchema: msg.getModelParameterSchema_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetModelParameterSchemaResponse} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetModelParameterSchemaResponse; + return proto.viam.service.vision.v1.GetModelParameterSchemaResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetModelParameterSchemaResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetModelParameterSchemaResponse} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setModelParameterSchema(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetModelParameterSchemaResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetModelParameterSchemaResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getModelParameterSchema_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes model_parameter_schema = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.prototype.getModelParameterSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes model_parameter_schema = 1; + * This is a type-conversion wrapper around `getModelParameterSchema()` + * @return {string} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.prototype.getModelParameterSchema_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getModelParameterSchema())); +}; + + +/** + * optional bytes model_parameter_schema = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getModelParameterSchema()` + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.prototype.getModelParameterSchema_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getModelParameterSchema())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.service.vision.v1.GetModelParameterSchemaResponse} returns this + */ +proto.viam.service.vision.v1.GetModelParameterSchemaResponse.prototype.setModelParameterSchema = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetDetectorNamesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetDetectorNamesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetDetectorNamesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectorNamesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetDetectorNamesRequest} + */ +proto.viam.service.vision.v1.GetDetectorNamesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetDetectorNamesRequest; + return proto.viam.service.vision.v1.GetDetectorNamesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetDetectorNamesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetDetectorNamesRequest} + */ +proto.viam.service.vision.v1.GetDetectorNamesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetDetectorNamesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetDetectorNamesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetDetectorNamesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectorNamesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetDetectorNamesRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetDetectorNamesRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectorNamesRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetDetectorNamesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetDetectorNamesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + detectorNamesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetDetectorNamesResponse} + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetDetectorNamesResponse; + return proto.viam.service.vision.v1.GetDetectorNamesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetDetectorNamesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetDetectorNamesResponse} + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addDetectorNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetDetectorNamesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetDetectorNamesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDetectorNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string detector_names = 1; + * @return {!Array} + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.prototype.getDetectorNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.vision.v1.GetDetectorNamesResponse} returns this + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.prototype.setDetectorNamesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.service.vision.v1.GetDetectorNamesResponse} returns this + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.prototype.addDetectorNames = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.vision.v1.GetDetectorNamesResponse} returns this + */ +proto.viam.service.vision.v1.GetDetectorNamesResponse.prototype.clearDetectorNamesList = function() { + return this.setDetectorNamesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.AddDetectorRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.AddDetectorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddDetectorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + detectorName: jspb.Message.getFieldWithDefault(msg, 2, ""), + detectorModelType: jspb.Message.getFieldWithDefault(msg, 3, ""), + detectorParameters: (f = msg.getDetectorParameters()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.AddDetectorRequest} + */ +proto.viam.service.vision.v1.AddDetectorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.AddDetectorRequest; + return proto.viam.service.vision.v1.AddDetectorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.AddDetectorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.AddDetectorRequest} + */ +proto.viam.service.vision.v1.AddDetectorRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDetectorName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDetectorModelType(value); + break; + case 4: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setDetectorParameters(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.AddDetectorRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.AddDetectorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddDetectorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDetectorName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDetectorModelType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDetectorParameters(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.AddDetectorRequest} returns this + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string detector_name = 2; + * @return {string} + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.getDetectorName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.AddDetectorRequest} returns this + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.setDetectorName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string detector_model_type = 3; + * @return {string} + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.getDetectorModelType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.AddDetectorRequest} returns this + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.setDetectorModelType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct detector_parameters = 4; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.getDetectorParameters = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.service.vision.v1.AddDetectorRequest} returns this +*/ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.setDetectorParameters = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.vision.v1.AddDetectorRequest} returns this + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.clearDetectorParameters = function() { + return this.setDetectorParameters(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.vision.v1.AddDetectorRequest.prototype.hasDetectorParameters = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.AddDetectorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.AddDetectorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.AddDetectorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddDetectorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.AddDetectorResponse} + */ +proto.viam.service.vision.v1.AddDetectorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.AddDetectorResponse; + return proto.viam.service.vision.v1.AddDetectorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.AddDetectorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.AddDetectorResponse} + */ +proto.viam.service.vision.v1.AddDetectorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.AddDetectorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.AddDetectorResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.AddDetectorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddDetectorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.RemoveDetectorRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.RemoveDetectorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + detectorName: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.RemoveDetectorRequest} + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.RemoveDetectorRequest; + return proto.viam.service.vision.v1.RemoveDetectorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.RemoveDetectorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.RemoveDetectorRequest} + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDetectorName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.RemoveDetectorRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.RemoveDetectorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDetectorName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.RemoveDetectorRequest} returns this + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string detector_name = 2; + * @return {string} + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.prototype.getDetectorName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.RemoveDetectorRequest} returns this + */ +proto.viam.service.vision.v1.RemoveDetectorRequest.prototype.setDetectorName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.RemoveDetectorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.RemoveDetectorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.RemoveDetectorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveDetectorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.RemoveDetectorResponse} + */ +proto.viam.service.vision.v1.RemoveDetectorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.RemoveDetectorResponse; + return proto.viam.service.vision.v1.RemoveDetectorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.RemoveDetectorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.RemoveDetectorResponse} + */ +proto.viam.service.vision.v1.RemoveDetectorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.RemoveDetectorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.RemoveDetectorResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.RemoveDetectorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveDetectorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetDetectionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetDetectionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + image: msg.getImage_asB64(), + width: jspb.Message.getFieldWithDefault(msg, 3, 0), + height: jspb.Message.getFieldWithDefault(msg, 4, 0), + mimeType: jspb.Message.getFieldWithDefault(msg, 5, ""), + detectorName: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetDetectionsRequest} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetDetectionsRequest; + return proto.viam.service.vision.v1.GetDetectionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetDetectionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetDetectionsRequest} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setImage(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setWidth(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setDetectorName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetDetectionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetDetectionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getImage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getWidth(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getDetectorName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetDetectionsRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes image = 2; + * @return {string} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.getImage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes image = 2; + * This is a type-conversion wrapper around `getImage()` + * @return {string} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.getImage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getImage())); +}; + + +/** + * optional bytes image = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getImage()` + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.getImage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getImage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.service.vision.v1.GetDetectionsRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.setImage = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 width = 3; + * @return {number} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.getWidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.GetDetectionsRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.setWidth = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 height = 4; + * @return {number} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.GetDetectionsRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string mime_type = 5; + * @return {string} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetDetectionsRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string detector_name = 6; + * @return {string} + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.getDetectorName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetDetectionsRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectionsRequest.prototype.setDetectorName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.vision.v1.GetDetectionsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetDetectionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetDetectionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetDetectionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + detectionsList: jspb.Message.toObjectList(msg.getDetectionsList(), + proto.viam.service.vision.v1.Detection.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetDetectionsResponse} + */ +proto.viam.service.vision.v1.GetDetectionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetDetectionsResponse; + return proto.viam.service.vision.v1.GetDetectionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetDetectionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetDetectionsResponse} + */ +proto.viam.service.vision.v1.GetDetectionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.service.vision.v1.Detection; + reader.readMessage(value,proto.viam.service.vision.v1.Detection.deserializeBinaryFromReader); + msg.addDetections(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetDetectionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetDetectionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetDetectionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDetectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.service.vision.v1.Detection.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Detection detections = 1; + * @return {!Array} + */ +proto.viam.service.vision.v1.GetDetectionsResponse.prototype.getDetectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.service.vision.v1.Detection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.vision.v1.GetDetectionsResponse} returns this +*/ +proto.viam.service.vision.v1.GetDetectionsResponse.prototype.setDetectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.service.vision.v1.Detection=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.service.vision.v1.Detection} + */ +proto.viam.service.vision.v1.GetDetectionsResponse.prototype.addDetections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.service.vision.v1.Detection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.vision.v1.GetDetectionsResponse} returns this + */ +proto.viam.service.vision.v1.GetDetectionsResponse.prototype.clearDetectionsList = function() { + return this.setDetectionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + cameraName: jspb.Message.getFieldWithDefault(msg, 2, ""), + detectorName: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetDetectionsFromCameraRequest; + return proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCameraName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDetectorName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCameraName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDetectorName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string camera_name = 2; + * @return {string} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.prototype.getCameraName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.prototype.setCameraName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string detector_name = 3; + * @return {string} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.prototype.getDetectorName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetDetectionsFromCameraRequest} returns this + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraRequest.prototype.setDetectorName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetDetectionsFromCameraResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.toObject = function(includeInstance, msg) { + var f, obj = { + detectionsList: jspb.Message.toObjectList(msg.getDetectionsList(), + proto.viam.service.vision.v1.Detection.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetDetectionsFromCameraResponse} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetDetectionsFromCameraResponse; + return proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetDetectionsFromCameraResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetDetectionsFromCameraResponse} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.service.vision.v1.Detection; + reader.readMessage(value,proto.viam.service.vision.v1.Detection.deserializeBinaryFromReader); + msg.addDetections(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetDetectionsFromCameraResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDetectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.service.vision.v1.Detection.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Detection detections = 1; + * @return {!Array} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.prototype.getDetectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.service.vision.v1.Detection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.vision.v1.GetDetectionsFromCameraResponse} returns this +*/ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.prototype.setDetectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.service.vision.v1.Detection=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.service.vision.v1.Detection} + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.prototype.addDetections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.service.vision.v1.Detection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.vision.v1.GetDetectionsFromCameraResponse} returns this + */ +proto.viam.service.vision.v1.GetDetectionsFromCameraResponse.prototype.clearDetectionsList = function() { + return this.setDetectionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.Detection.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.Detection.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.Detection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.Detection.toObject = function(includeInstance, msg) { + var f, obj = { + xMin: jspb.Message.getFieldWithDefault(msg, 1, 0), + yMin: jspb.Message.getFieldWithDefault(msg, 2, 0), + xMax: jspb.Message.getFieldWithDefault(msg, 3, 0), + yMax: jspb.Message.getFieldWithDefault(msg, 4, 0), + confidence: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + className: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.Detection} + */ +proto.viam.service.vision.v1.Detection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.Detection; + return proto.viam.service.vision.v1.Detection.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.Detection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.Detection} + */ +proto.viam.service.vision.v1.Detection.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setXMin(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setYMin(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setXMax(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setYMax(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setConfidence(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setClassName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.Detection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.Detection.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.Detection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.Detection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeInt64( + 4, + f + ); + } + f = message.getConfidence(); + if (f !== 0.0) { + writer.writeDouble( + 5, + f + ); + } + f = message.getClassName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional int64 x_min = 1; + * @return {number} + */ +proto.viam.service.vision.v1.Detection.prototype.getXMin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.setXMin = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.clearXMin = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.vision.v1.Detection.prototype.hasXMin = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 y_min = 2; + * @return {number} + */ +proto.viam.service.vision.v1.Detection.prototype.getYMin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.setYMin = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.clearYMin = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.vision.v1.Detection.prototype.hasYMin = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 x_max = 3; + * @return {number} + */ +proto.viam.service.vision.v1.Detection.prototype.getXMax = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.setXMax = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.clearXMax = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.vision.v1.Detection.prototype.hasXMax = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int64 y_max = 4; + * @return {number} + */ +proto.viam.service.vision.v1.Detection.prototype.getYMax = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.setYMax = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.clearYMax = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.vision.v1.Detection.prototype.hasYMax = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional double confidence = 5; + * @return {number} + */ +proto.viam.service.vision.v1.Detection.prototype.getConfidence = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.setConfidence = function(value) { + return jspb.Message.setProto3FloatField(this, 5, value); +}; + + +/** + * optional string class_name = 6; + * @return {string} + */ +proto.viam.service.vision.v1.Detection.prototype.getClassName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.Detection} returns this + */ +proto.viam.service.vision.v1.Detection.prototype.setClassName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetClassifierNamesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetClassifierNamesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetClassifierNamesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassifierNamesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetClassifierNamesRequest} + */ +proto.viam.service.vision.v1.GetClassifierNamesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetClassifierNamesRequest; + return proto.viam.service.vision.v1.GetClassifierNamesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetClassifierNamesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetClassifierNamesRequest} + */ +proto.viam.service.vision.v1.GetClassifierNamesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetClassifierNamesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetClassifierNamesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetClassifierNamesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassifierNamesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetClassifierNamesRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetClassifierNamesRequest} returns this + */ +proto.viam.service.vision.v1.GetClassifierNamesRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetClassifierNamesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetClassifierNamesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + classifierNamesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetClassifierNamesResponse} + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetClassifierNamesResponse; + return proto.viam.service.vision.v1.GetClassifierNamesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetClassifierNamesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetClassifierNamesResponse} + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addClassifierNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetClassifierNamesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetClassifierNamesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClassifierNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string classifier_names = 1; + * @return {!Array} + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.prototype.getClassifierNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.vision.v1.GetClassifierNamesResponse} returns this + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.prototype.setClassifierNamesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.service.vision.v1.GetClassifierNamesResponse} returns this + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.prototype.addClassifierNames = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.vision.v1.GetClassifierNamesResponse} returns this + */ +proto.viam.service.vision.v1.GetClassifierNamesResponse.prototype.clearClassifierNamesList = function() { + return this.setClassifierNamesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.AddClassifierRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.AddClassifierRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddClassifierRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + classifierName: jspb.Message.getFieldWithDefault(msg, 2, ""), + classifierModelType: jspb.Message.getFieldWithDefault(msg, 3, ""), + classifierParameters: (f = msg.getClassifierParameters()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.AddClassifierRequest} + */ +proto.viam.service.vision.v1.AddClassifierRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.AddClassifierRequest; + return proto.viam.service.vision.v1.AddClassifierRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.AddClassifierRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.AddClassifierRequest} + */ +proto.viam.service.vision.v1.AddClassifierRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setClassifierName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setClassifierModelType(value); + break; + case 4: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setClassifierParameters(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.AddClassifierRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.AddClassifierRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddClassifierRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClassifierName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getClassifierModelType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getClassifierParameters(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.AddClassifierRequest} returns this + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string classifier_name = 2; + * @return {string} + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.getClassifierName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.AddClassifierRequest} returns this + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.setClassifierName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string classifier_model_type = 3; + * @return {string} + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.getClassifierModelType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.AddClassifierRequest} returns this + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.setClassifierModelType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct classifier_parameters = 4; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.getClassifierParameters = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.service.vision.v1.AddClassifierRequest} returns this +*/ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.setClassifierParameters = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.vision.v1.AddClassifierRequest} returns this + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.clearClassifierParameters = function() { + return this.setClassifierParameters(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.vision.v1.AddClassifierRequest.prototype.hasClassifierParameters = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.AddClassifierResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.AddClassifierResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.AddClassifierResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddClassifierResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.AddClassifierResponse} + */ +proto.viam.service.vision.v1.AddClassifierResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.AddClassifierResponse; + return proto.viam.service.vision.v1.AddClassifierResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.AddClassifierResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.AddClassifierResponse} + */ +proto.viam.service.vision.v1.AddClassifierResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.AddClassifierResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.AddClassifierResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.AddClassifierResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddClassifierResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.RemoveClassifierRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.RemoveClassifierRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + classifierName: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.RemoveClassifierRequest} + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.RemoveClassifierRequest; + return proto.viam.service.vision.v1.RemoveClassifierRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.RemoveClassifierRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.RemoveClassifierRequest} + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setClassifierName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.RemoveClassifierRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.RemoveClassifierRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClassifierName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.RemoveClassifierRequest} returns this + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string classifier_name = 2; + * @return {string} + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.prototype.getClassifierName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.RemoveClassifierRequest} returns this + */ +proto.viam.service.vision.v1.RemoveClassifierRequest.prototype.setClassifierName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.RemoveClassifierResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.RemoveClassifierResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.RemoveClassifierResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveClassifierResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.RemoveClassifierResponse} + */ +proto.viam.service.vision.v1.RemoveClassifierResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.RemoveClassifierResponse; + return proto.viam.service.vision.v1.RemoveClassifierResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.RemoveClassifierResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.RemoveClassifierResponse} + */ +proto.viam.service.vision.v1.RemoveClassifierResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.RemoveClassifierResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.RemoveClassifierResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.RemoveClassifierResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveClassifierResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetClassificationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetClassificationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassificationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + image: msg.getImage_asB64(), + width: jspb.Message.getFieldWithDefault(msg, 3, 0), + height: jspb.Message.getFieldWithDefault(msg, 4, 0), + mimeType: jspb.Message.getFieldWithDefault(msg, 5, ""), + classifierName: jspb.Message.getFieldWithDefault(msg, 6, ""), + n: jspb.Message.getFieldWithDefault(msg, 7, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetClassificationsRequest} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetClassificationsRequest; + return proto.viam.service.vision.v1.GetClassificationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetClassificationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetClassificationsRequest} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setImage(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWidth(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setClassifierName(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setN(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetClassificationsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetClassificationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassificationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getImage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getWidth(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getClassifierName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getN(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetClassificationsRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes image = 2; + * @return {string} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.getImage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes image = 2; + * This is a type-conversion wrapper around `getImage()` + * @return {string} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.getImage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getImage())); +}; + + +/** + * optional bytes image = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getImage()` + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.getImage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getImage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.viam.service.vision.v1.GetClassificationsRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.setImage = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int32 width = 3; + * @return {number} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.getWidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.GetClassificationsRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.setWidth = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 height = 4; + * @return {number} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.GetClassificationsRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string mime_type = 5; + * @return {string} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetClassificationsRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string classifier_name = 6; + * @return {string} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.getClassifierName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetClassificationsRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.setClassifierName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional int32 n = 7; + * @return {number} + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.getN = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.GetClassificationsRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsRequest.prototype.setN = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.vision.v1.GetClassificationsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetClassificationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetClassificationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetClassificationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassificationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + classificationsList: jspb.Message.toObjectList(msg.getClassificationsList(), + proto.viam.service.vision.v1.Classification.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetClassificationsResponse} + */ +proto.viam.service.vision.v1.GetClassificationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetClassificationsResponse; + return proto.viam.service.vision.v1.GetClassificationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetClassificationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetClassificationsResponse} + */ +proto.viam.service.vision.v1.GetClassificationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.service.vision.v1.Classification; + reader.readMessage(value,proto.viam.service.vision.v1.Classification.deserializeBinaryFromReader); + msg.addClassifications(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetClassificationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetClassificationsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetClassificationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassificationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClassificationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.service.vision.v1.Classification.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Classification classifications = 1; + * @return {!Array} + */ +proto.viam.service.vision.v1.GetClassificationsResponse.prototype.getClassificationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.service.vision.v1.Classification, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.vision.v1.GetClassificationsResponse} returns this +*/ +proto.viam.service.vision.v1.GetClassificationsResponse.prototype.setClassificationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.service.vision.v1.Classification=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.service.vision.v1.Classification} + */ +proto.viam.service.vision.v1.GetClassificationsResponse.prototype.addClassifications = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.service.vision.v1.Classification, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.vision.v1.GetClassificationsResponse} returns this + */ +proto.viam.service.vision.v1.GetClassificationsResponse.prototype.clearClassificationsList = function() { + return this.setClassificationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + cameraName: jspb.Message.getFieldWithDefault(msg, 2, ""), + classifierName: jspb.Message.getFieldWithDefault(msg, 3, ""), + n: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetClassificationsFromCameraRequest; + return proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCameraName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setClassifierName(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setN(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCameraName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getClassifierName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getN(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string camera_name = 2; + * @return {string} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.getCameraName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.setCameraName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string classifier_name = 3; + * @return {string} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.getClassifierName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.setClassifierName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 n = 4; + * @return {number} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.getN = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraRequest} returns this + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraRequest.prototype.setN = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetClassificationsFromCameraResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.toObject = function(includeInstance, msg) { + var f, obj = { + classificationsList: jspb.Message.toObjectList(msg.getClassificationsList(), + proto.viam.service.vision.v1.Classification.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraResponse} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetClassificationsFromCameraResponse; + return proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetClassificationsFromCameraResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraResponse} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.service.vision.v1.Classification; + reader.readMessage(value,proto.viam.service.vision.v1.Classification.deserializeBinaryFromReader); + msg.addClassifications(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetClassificationsFromCameraResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClassificationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.service.vision.v1.Classification.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Classification classifications = 1; + * @return {!Array} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.prototype.getClassificationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.service.vision.v1.Classification, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraResponse} returns this +*/ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.prototype.setClassificationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.service.vision.v1.Classification=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.service.vision.v1.Classification} + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.prototype.addClassifications = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.service.vision.v1.Classification, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.vision.v1.GetClassificationsFromCameraResponse} returns this + */ +proto.viam.service.vision.v1.GetClassificationsFromCameraResponse.prototype.clearClassificationsList = function() { + return this.setClassificationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.Classification.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.Classification.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.Classification} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.Classification.toObject = function(includeInstance, msg) { + var f, obj = { + className: jspb.Message.getFieldWithDefault(msg, 1, ""), + confidence: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.Classification} + */ +proto.viam.service.vision.v1.Classification.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.Classification; + return proto.viam.service.vision.v1.Classification.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.Classification} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.Classification} + */ +proto.viam.service.vision.v1.Classification.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setClassName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setConfidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.Classification.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.Classification.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.Classification} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.Classification.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClassName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConfidence(); + if (f !== 0.0) { + writer.writeDouble( + 2, + f + ); + } +}; + + +/** + * optional string class_name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.Classification.prototype.getClassName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.Classification} returns this + */ +proto.viam.service.vision.v1.Classification.prototype.setClassName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional double confidence = 2; + * @return {number} + */ +proto.viam.service.vision.v1.Classification.prototype.getConfidence = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.service.vision.v1.Classification} returns this + */ +proto.viam.service.vision.v1.Classification.prototype.setConfidence = function(value) { + return jspb.Message.setProto3FloatField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetSegmenterNamesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetSegmenterNamesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetSegmenterNamesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetSegmenterNamesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetSegmenterNamesRequest} + */ +proto.viam.service.vision.v1.GetSegmenterNamesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetSegmenterNamesRequest; + return proto.viam.service.vision.v1.GetSegmenterNamesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetSegmenterNamesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetSegmenterNamesRequest} + */ +proto.viam.service.vision.v1.GetSegmenterNamesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetSegmenterNamesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetSegmenterNamesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetSegmenterNamesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetSegmenterNamesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetSegmenterNamesRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetSegmenterNamesRequest} returns this + */ +proto.viam.service.vision.v1.GetSegmenterNamesRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetSegmenterNamesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetSegmenterNamesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + segmenterNamesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetSegmenterNamesResponse} + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetSegmenterNamesResponse; + return proto.viam.service.vision.v1.GetSegmenterNamesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetSegmenterNamesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetSegmenterNamesResponse} + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addSegmenterNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetSegmenterNamesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetSegmenterNamesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSegmenterNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string segmenter_names = 1; + * @return {!Array} + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.prototype.getSegmenterNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.vision.v1.GetSegmenterNamesResponse} returns this + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.prototype.setSegmenterNamesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.service.vision.v1.GetSegmenterNamesResponse} returns this + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.prototype.addSegmenterNames = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.vision.v1.GetSegmenterNamesResponse} returns this + */ +proto.viam.service.vision.v1.GetSegmenterNamesResponse.prototype.clearSegmenterNamesList = function() { + return this.setSegmenterNamesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.AddSegmenterRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.AddSegmenterRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddSegmenterRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + segmenterName: jspb.Message.getFieldWithDefault(msg, 2, ""), + segmenterModelType: jspb.Message.getFieldWithDefault(msg, 3, ""), + segmenterParameters: (f = msg.getSegmenterParameters()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.AddSegmenterRequest} + */ +proto.viam.service.vision.v1.AddSegmenterRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.AddSegmenterRequest; + return proto.viam.service.vision.v1.AddSegmenterRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.AddSegmenterRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.AddSegmenterRequest} + */ +proto.viam.service.vision.v1.AddSegmenterRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSegmenterName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSegmenterModelType(value); + break; + case 4: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setSegmenterParameters(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.AddSegmenterRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.AddSegmenterRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddSegmenterRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSegmenterName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSegmenterModelType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSegmenterParameters(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.AddSegmenterRequest} returns this + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string segmenter_name = 2; + * @return {string} + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.getSegmenterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.AddSegmenterRequest} returns this + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.setSegmenterName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string segmenter_model_type = 3; + * @return {string} + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.getSegmenterModelType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.AddSegmenterRequest} returns this + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.setSegmenterModelType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Struct segmenter_parameters = 4; + * @return {?proto.google.protobuf.Struct} + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.getSegmenterParameters = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.viam.service.vision.v1.AddSegmenterRequest} returns this +*/ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.setSegmenterParameters = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.service.vision.v1.AddSegmenterRequest} returns this + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.clearSegmenterParameters = function() { + return this.setSegmenterParameters(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.service.vision.v1.AddSegmenterRequest.prototype.hasSegmenterParameters = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.AddSegmenterResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.AddSegmenterResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.AddSegmenterResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddSegmenterResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.AddSegmenterResponse} + */ +proto.viam.service.vision.v1.AddSegmenterResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.AddSegmenterResponse; + return proto.viam.service.vision.v1.AddSegmenterResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.AddSegmenterResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.AddSegmenterResponse} + */ +proto.viam.service.vision.v1.AddSegmenterResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.AddSegmenterResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.AddSegmenterResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.AddSegmenterResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.AddSegmenterResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.RemoveSegmenterRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.RemoveSegmenterRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + segmenterName: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.RemoveSegmenterRequest} + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.RemoveSegmenterRequest; + return proto.viam.service.vision.v1.RemoveSegmenterRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.RemoveSegmenterRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.RemoveSegmenterRequest} + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSegmenterName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.RemoveSegmenterRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.RemoveSegmenterRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSegmenterName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.RemoveSegmenterRequest} returns this + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string segmenter_name = 2; + * @return {string} + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.prototype.getSegmenterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.RemoveSegmenterRequest} returns this + */ +proto.viam.service.vision.v1.RemoveSegmenterRequest.prototype.setSegmenterName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.RemoveSegmenterResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.RemoveSegmenterResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.RemoveSegmenterResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveSegmenterResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.RemoveSegmenterResponse} + */ +proto.viam.service.vision.v1.RemoveSegmenterResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.RemoveSegmenterResponse; + return proto.viam.service.vision.v1.RemoveSegmenterResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.RemoveSegmenterResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.RemoveSegmenterResponse} + */ +proto.viam.service.vision.v1.RemoveSegmenterResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.RemoveSegmenterResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.RemoveSegmenterResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.RemoveSegmenterResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.RemoveSegmenterResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetObjectPointCloudsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + cameraName: jspb.Message.getFieldWithDefault(msg, 2, ""), + segmenterName: jspb.Message.getFieldWithDefault(msg, 3, ""), + mimeType: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetObjectPointCloudsRequest; + return proto.viam.service.vision.v1.GetObjectPointCloudsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCameraName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSegmenterName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetObjectPointCloudsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCameraName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSegmenterName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} returns this + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string camera_name = 2; + * @return {string} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.getCameraName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} returns this + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.setCameraName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string segmenter_name = 3; + * @return {string} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.getSegmenterName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} returns this + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.setSegmenterName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string mime_type = 4; + * @return {string} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsRequest} returns this + */ +proto.viam.service.vision.v1.GetObjectPointCloudsRequest.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.service.vision.v1.GetObjectPointCloudsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.service.vision.v1.GetObjectPointCloudsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mimeType: jspb.Message.getFieldWithDefault(msg, 1, ""), + objectsList: jspb.Message.toObjectList(msg.getObjectsList(), + common_v1_common_pb.PointCloudObject.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsResponse} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.service.vision.v1.GetObjectPointCloudsResponse; + return proto.viam.service.vision.v1.GetObjectPointCloudsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.service.vision.v1.GetObjectPointCloudsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsResponse} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMimeType(value); + break; + case 2: + var value = new common_v1_common_pb.PointCloudObject; + reader.readMessage(value,common_v1_common_pb.PointCloudObject.deserializeBinaryFromReader); + msg.addObjects(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.service.vision.v1.GetObjectPointCloudsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.service.vision.v1.GetObjectPointCloudsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMimeType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getObjectsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + common_v1_common_pb.PointCloudObject.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string mime_type = 1; + * @return {string} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.prototype.getMimeType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsResponse} returns this + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.prototype.setMimeType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated viam.common.v1.PointCloudObject objects = 2; + * @return {!Array} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.prototype.getObjectsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_v1_common_pb.PointCloudObject, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsResponse} returns this +*/ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.prototype.setObjectsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.viam.common.v1.PointCloudObject=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.common.v1.PointCloudObject} + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.prototype.addObjects = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.viam.common.v1.PointCloudObject, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.service.vision.v1.GetObjectPointCloudsResponse} returns this + */ +proto.viam.service.vision.v1.GetObjectPointCloudsResponse.prototype.clearObjectsList = function() { + return this.setObjectsList([]); +}; + + +goog.object.extend(exports, proto.viam.service.vision.v1); diff --git a/gen/js/service/vision/v1/vision_pb_service.d.ts b/gen/js/service/vision/v1/vision_pb_service.d.ts new file mode 100644 index 000000000..18918103c --- /dev/null +++ b/gen/js/service/vision/v1/vision_pb_service.d.ts @@ -0,0 +1,329 @@ +// package: viam.service.vision.v1 +// file: service/vision/v1/vision.proto + +import * as service_vision_v1_vision_pb from "../../../service/vision/v1/vision_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type VisionServiceGetModelParameterSchema = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.GetModelParameterSchemaRequest; + readonly responseType: typeof service_vision_v1_vision_pb.GetModelParameterSchemaResponse; +}; + +type VisionServiceGetDetectorNames = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.GetDetectorNamesRequest; + readonly responseType: typeof service_vision_v1_vision_pb.GetDetectorNamesResponse; +}; + +type VisionServiceAddDetector = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.AddDetectorRequest; + readonly responseType: typeof service_vision_v1_vision_pb.AddDetectorResponse; +}; + +type VisionServiceRemoveDetector = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.RemoveDetectorRequest; + readonly responseType: typeof service_vision_v1_vision_pb.RemoveDetectorResponse; +}; + +type VisionServiceGetDetectionsFromCamera = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.GetDetectionsFromCameraRequest; + readonly responseType: typeof service_vision_v1_vision_pb.GetDetectionsFromCameraResponse; +}; + +type VisionServiceGetDetections = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.GetDetectionsRequest; + readonly responseType: typeof service_vision_v1_vision_pb.GetDetectionsResponse; +}; + +type VisionServiceGetClassifierNames = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.GetClassifierNamesRequest; + readonly responseType: typeof service_vision_v1_vision_pb.GetClassifierNamesResponse; +}; + +type VisionServiceAddClassifier = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.AddClassifierRequest; + readonly responseType: typeof service_vision_v1_vision_pb.AddClassifierResponse; +}; + +type VisionServiceRemoveClassifier = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.RemoveClassifierRequest; + readonly responseType: typeof service_vision_v1_vision_pb.RemoveClassifierResponse; +}; + +type VisionServiceGetClassificationsFromCamera = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.GetClassificationsFromCameraRequest; + readonly responseType: typeof service_vision_v1_vision_pb.GetClassificationsFromCameraResponse; +}; + +type VisionServiceGetClassifications = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.GetClassificationsRequest; + readonly responseType: typeof service_vision_v1_vision_pb.GetClassificationsResponse; +}; + +type VisionServiceGetSegmenterNames = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.GetSegmenterNamesRequest; + readonly responseType: typeof service_vision_v1_vision_pb.GetSegmenterNamesResponse; +}; + +type VisionServiceAddSegmenter = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.AddSegmenterRequest; + readonly responseType: typeof service_vision_v1_vision_pb.AddSegmenterResponse; +}; + +type VisionServiceRemoveSegmenter = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.RemoveSegmenterRequest; + readonly responseType: typeof service_vision_v1_vision_pb.RemoveSegmenterResponse; +}; + +type VisionServiceGetObjectPointClouds = { + readonly methodName: string; + readonly service: typeof VisionService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof service_vision_v1_vision_pb.GetObjectPointCloudsRequest; + readonly responseType: typeof service_vision_v1_vision_pb.GetObjectPointCloudsResponse; +}; + +export class VisionService { + static readonly serviceName: string; + static readonly GetModelParameterSchema: VisionServiceGetModelParameterSchema; + static readonly GetDetectorNames: VisionServiceGetDetectorNames; + static readonly AddDetector: VisionServiceAddDetector; + static readonly RemoveDetector: VisionServiceRemoveDetector; + static readonly GetDetectionsFromCamera: VisionServiceGetDetectionsFromCamera; + static readonly GetDetections: VisionServiceGetDetections; + static readonly GetClassifierNames: VisionServiceGetClassifierNames; + static readonly AddClassifier: VisionServiceAddClassifier; + static readonly RemoveClassifier: VisionServiceRemoveClassifier; + static readonly GetClassificationsFromCamera: VisionServiceGetClassificationsFromCamera; + static readonly GetClassifications: VisionServiceGetClassifications; + static readonly GetSegmenterNames: VisionServiceGetSegmenterNames; + static readonly AddSegmenter: VisionServiceAddSegmenter; + static readonly RemoveSegmenter: VisionServiceRemoveSegmenter; + static readonly GetObjectPointClouds: VisionServiceGetObjectPointClouds; +} + +export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } +export type Status = { details: string, code: number; metadata: grpc.Metadata } + +interface UnaryResponse { + cancel(): void; +} +interface ResponseStream { + cancel(): void; + on(type: 'data', handler: (message: T) => void): ResponseStream; + on(type: 'end', handler: (status?: Status) => void): ResponseStream; + on(type: 'status', handler: (status: Status) => void): ResponseStream; +} +interface RequestStream { + write(message: T): RequestStream; + end(): void; + cancel(): void; + on(type: 'end', handler: (status?: Status) => void): RequestStream; + on(type: 'status', handler: (status: Status) => void): RequestStream; +} +interface BidirectionalStream { + write(message: ReqT): BidirectionalStream; + end(): void; + cancel(): void; + on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; + on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; + on(type: 'status', handler: (status: Status) => void): BidirectionalStream; +} + +export class VisionServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getModelParameterSchema( + requestMessage: service_vision_v1_vision_pb.GetModelParameterSchemaRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetModelParameterSchemaResponse|null) => void + ): UnaryResponse; + getModelParameterSchema( + requestMessage: service_vision_v1_vision_pb.GetModelParameterSchemaRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetModelParameterSchemaResponse|null) => void + ): UnaryResponse; + getDetectorNames( + requestMessage: service_vision_v1_vision_pb.GetDetectorNamesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetDetectorNamesResponse|null) => void + ): UnaryResponse; + getDetectorNames( + requestMessage: service_vision_v1_vision_pb.GetDetectorNamesRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetDetectorNamesResponse|null) => void + ): UnaryResponse; + addDetector( + requestMessage: service_vision_v1_vision_pb.AddDetectorRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.AddDetectorResponse|null) => void + ): UnaryResponse; + addDetector( + requestMessage: service_vision_v1_vision_pb.AddDetectorRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.AddDetectorResponse|null) => void + ): UnaryResponse; + removeDetector( + requestMessage: service_vision_v1_vision_pb.RemoveDetectorRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.RemoveDetectorResponse|null) => void + ): UnaryResponse; + removeDetector( + requestMessage: service_vision_v1_vision_pb.RemoveDetectorRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.RemoveDetectorResponse|null) => void + ): UnaryResponse; + getDetectionsFromCamera( + requestMessage: service_vision_v1_vision_pb.GetDetectionsFromCameraRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetDetectionsFromCameraResponse|null) => void + ): UnaryResponse; + getDetectionsFromCamera( + requestMessage: service_vision_v1_vision_pb.GetDetectionsFromCameraRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetDetectionsFromCameraResponse|null) => void + ): UnaryResponse; + getDetections( + requestMessage: service_vision_v1_vision_pb.GetDetectionsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetDetectionsResponse|null) => void + ): UnaryResponse; + getDetections( + requestMessage: service_vision_v1_vision_pb.GetDetectionsRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetDetectionsResponse|null) => void + ): UnaryResponse; + getClassifierNames( + requestMessage: service_vision_v1_vision_pb.GetClassifierNamesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetClassifierNamesResponse|null) => void + ): UnaryResponse; + getClassifierNames( + requestMessage: service_vision_v1_vision_pb.GetClassifierNamesRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetClassifierNamesResponse|null) => void + ): UnaryResponse; + addClassifier( + requestMessage: service_vision_v1_vision_pb.AddClassifierRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.AddClassifierResponse|null) => void + ): UnaryResponse; + addClassifier( + requestMessage: service_vision_v1_vision_pb.AddClassifierRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.AddClassifierResponse|null) => void + ): UnaryResponse; + removeClassifier( + requestMessage: service_vision_v1_vision_pb.RemoveClassifierRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.RemoveClassifierResponse|null) => void + ): UnaryResponse; + removeClassifier( + requestMessage: service_vision_v1_vision_pb.RemoveClassifierRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.RemoveClassifierResponse|null) => void + ): UnaryResponse; + getClassificationsFromCamera( + requestMessage: service_vision_v1_vision_pb.GetClassificationsFromCameraRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetClassificationsFromCameraResponse|null) => void + ): UnaryResponse; + getClassificationsFromCamera( + requestMessage: service_vision_v1_vision_pb.GetClassificationsFromCameraRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetClassificationsFromCameraResponse|null) => void + ): UnaryResponse; + getClassifications( + requestMessage: service_vision_v1_vision_pb.GetClassificationsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetClassificationsResponse|null) => void + ): UnaryResponse; + getClassifications( + requestMessage: service_vision_v1_vision_pb.GetClassificationsRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetClassificationsResponse|null) => void + ): UnaryResponse; + getSegmenterNames( + requestMessage: service_vision_v1_vision_pb.GetSegmenterNamesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetSegmenterNamesResponse|null) => void + ): UnaryResponse; + getSegmenterNames( + requestMessage: service_vision_v1_vision_pb.GetSegmenterNamesRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetSegmenterNamesResponse|null) => void + ): UnaryResponse; + addSegmenter( + requestMessage: service_vision_v1_vision_pb.AddSegmenterRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.AddSegmenterResponse|null) => void + ): UnaryResponse; + addSegmenter( + requestMessage: service_vision_v1_vision_pb.AddSegmenterRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.AddSegmenterResponse|null) => void + ): UnaryResponse; + removeSegmenter( + requestMessage: service_vision_v1_vision_pb.RemoveSegmenterRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.RemoveSegmenterResponse|null) => void + ): UnaryResponse; + removeSegmenter( + requestMessage: service_vision_v1_vision_pb.RemoveSegmenterRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.RemoveSegmenterResponse|null) => void + ): UnaryResponse; + getObjectPointClouds( + requestMessage: service_vision_v1_vision_pb.GetObjectPointCloudsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetObjectPointCloudsResponse|null) => void + ): UnaryResponse; + getObjectPointClouds( + requestMessage: service_vision_v1_vision_pb.GetObjectPointCloudsRequest, + callback: (error: ServiceError|null, responseMessage: service_vision_v1_vision_pb.GetObjectPointCloudsResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/service/vision/v1/vision_pb_service.js b/gen/js/service/vision/v1/vision_pb_service.js new file mode 100644 index 000000000..3b2afa4fd --- /dev/null +++ b/gen/js/service/vision/v1/vision_pb_service.js @@ -0,0 +1,621 @@ +// package: viam.service.vision.v1 +// file: service/vision/v1/vision.proto + +var service_vision_v1_vision_pb = require("../../../service/vision/v1/vision_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var VisionService = (function () { + function VisionService() {} + VisionService.serviceName = "viam.service.vision.v1.VisionService"; + return VisionService; +}()); + +VisionService.GetModelParameterSchema = { + methodName: "GetModelParameterSchema", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.GetModelParameterSchemaRequest, + responseType: service_vision_v1_vision_pb.GetModelParameterSchemaResponse +}; + +VisionService.GetDetectorNames = { + methodName: "GetDetectorNames", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.GetDetectorNamesRequest, + responseType: service_vision_v1_vision_pb.GetDetectorNamesResponse +}; + +VisionService.AddDetector = { + methodName: "AddDetector", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.AddDetectorRequest, + responseType: service_vision_v1_vision_pb.AddDetectorResponse +}; + +VisionService.RemoveDetector = { + methodName: "RemoveDetector", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.RemoveDetectorRequest, + responseType: service_vision_v1_vision_pb.RemoveDetectorResponse +}; + +VisionService.GetDetectionsFromCamera = { + methodName: "GetDetectionsFromCamera", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.GetDetectionsFromCameraRequest, + responseType: service_vision_v1_vision_pb.GetDetectionsFromCameraResponse +}; + +VisionService.GetDetections = { + methodName: "GetDetections", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.GetDetectionsRequest, + responseType: service_vision_v1_vision_pb.GetDetectionsResponse +}; + +VisionService.GetClassifierNames = { + methodName: "GetClassifierNames", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.GetClassifierNamesRequest, + responseType: service_vision_v1_vision_pb.GetClassifierNamesResponse +}; + +VisionService.AddClassifier = { + methodName: "AddClassifier", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.AddClassifierRequest, + responseType: service_vision_v1_vision_pb.AddClassifierResponse +}; + +VisionService.RemoveClassifier = { + methodName: "RemoveClassifier", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.RemoveClassifierRequest, + responseType: service_vision_v1_vision_pb.RemoveClassifierResponse +}; + +VisionService.GetClassificationsFromCamera = { + methodName: "GetClassificationsFromCamera", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.GetClassificationsFromCameraRequest, + responseType: service_vision_v1_vision_pb.GetClassificationsFromCameraResponse +}; + +VisionService.GetClassifications = { + methodName: "GetClassifications", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.GetClassificationsRequest, + responseType: service_vision_v1_vision_pb.GetClassificationsResponse +}; + +VisionService.GetSegmenterNames = { + methodName: "GetSegmenterNames", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.GetSegmenterNamesRequest, + responseType: service_vision_v1_vision_pb.GetSegmenterNamesResponse +}; + +VisionService.AddSegmenter = { + methodName: "AddSegmenter", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.AddSegmenterRequest, + responseType: service_vision_v1_vision_pb.AddSegmenterResponse +}; + +VisionService.RemoveSegmenter = { + methodName: "RemoveSegmenter", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.RemoveSegmenterRequest, + responseType: service_vision_v1_vision_pb.RemoveSegmenterResponse +}; + +VisionService.GetObjectPointClouds = { + methodName: "GetObjectPointClouds", + service: VisionService, + requestStream: false, + responseStream: false, + requestType: service_vision_v1_vision_pb.GetObjectPointCloudsRequest, + responseType: service_vision_v1_vision_pb.GetObjectPointCloudsResponse +}; + +exports.VisionService = VisionService; + +function VisionServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +VisionServiceClient.prototype.getModelParameterSchema = function getModelParameterSchema(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetModelParameterSchema, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.getDetectorNames = function getDetectorNames(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetDetectorNames, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.addDetector = function addDetector(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.AddDetector, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.removeDetector = function removeDetector(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.RemoveDetector, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.getDetectionsFromCamera = function getDetectionsFromCamera(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetDetectionsFromCamera, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.getDetections = function getDetections(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetDetections, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.getClassifierNames = function getClassifierNames(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetClassifierNames, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.addClassifier = function addClassifier(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.AddClassifier, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.removeClassifier = function removeClassifier(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.RemoveClassifier, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.getClassificationsFromCamera = function getClassificationsFromCamera(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetClassificationsFromCamera, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.getClassifications = function getClassifications(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetClassifications, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.getSegmenterNames = function getSegmenterNames(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetSegmenterNames, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.addSegmenter = function addSegmenter(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.AddSegmenter, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.removeSegmenter = function removeSegmenter(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.RemoveSegmenter, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +VisionServiceClient.prototype.getObjectPointClouds = function getObjectPointClouds(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(VisionService.GetObjectPointClouds, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +exports.VisionServiceClient = VisionServiceClient; + diff --git a/gen/js/tagger/v1/tagger_pb.d.ts b/gen/js/tagger/v1/tagger_pb.d.ts new file mode 100644 index 000000000..13f92bfe9 --- /dev/null +++ b/gen/js/tagger/v1/tagger_pb.d.ts @@ -0,0 +1,10 @@ +// package: tagger.v1 +// file: tagger/v1/tagger.proto + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + + export const tags: jspb.ExtensionFieldInfo; + + export const oneofTags: jspb.ExtensionFieldInfo; + diff --git a/gen/js/tagger/v1/tagger_pb.js b/gen/js/tagger/v1/tagger_pb.js new file mode 100644 index 000000000..9a67134a3 --- /dev/null +++ b/gen/js/tagger/v1/tagger_pb.js @@ -0,0 +1,72 @@ +// source: tagger/v1/tagger.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.tagger.v1.oneofTags', null, global); +goog.exportSymbol('proto.tagger.v1.tags', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `tags`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.tagger.v1.tags = new jspb.ExtensionFieldInfo( + 847939, + {tags: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[847939] = new jspb.ExtensionFieldBinaryInfo( + proto.tagger.v1.tags, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[847939] = proto.tagger.v1.tags; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `oneofTags`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.tagger.v1.oneofTags = new jspb.ExtensionFieldInfo( + 847939, + {oneofTags: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.OneofOptions.extensionsBinary[847939] = new jspb.ExtensionFieldBinaryInfo( + proto.tagger.v1.oneofTags, + jspb.BinaryReader.prototype.readString, + jspb.BinaryWriter.prototype.writeString, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.OneofOptions.extensions[847939] = proto.tagger.v1.oneofTags; + +goog.object.extend(exports, proto.tagger.v1); diff --git a/gen/js/tagger/v1/tagger_pb_service.d.ts b/gen/js/tagger/v1/tagger_pb_service.d.ts new file mode 100644 index 000000000..0912850ab --- /dev/null +++ b/gen/js/tagger/v1/tagger_pb_service.d.ts @@ -0,0 +1,3 @@ +// package: tagger.v1 +// file: tagger/v1/tagger.proto + diff --git a/gen/js/tagger/v1/tagger_pb_service.js b/gen/js/tagger/v1/tagger_pb_service.js new file mode 100644 index 000000000..0912850ab --- /dev/null +++ b/gen/js/tagger/v1/tagger_pb_service.js @@ -0,0 +1,3 @@ +// package: tagger.v1 +// file: tagger/v1/tagger.proto + diff --git a/go.mod b/go.mod index 9cbc11551..dc76abfe4 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/srikrsna/protoc-gen-gotag v0.6.2 google.golang.org/grpc v1.48.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -188,7 +188,6 @@ require ( golang.org/x/text v0.3.7 // indirect golang.org/x/tools v0.1.12 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect @@ -207,4 +206,5 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/rs/cors v1.8.2 // indirect golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect + google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f // indirect ) diff --git a/go.sum b/go.sum index d8ec7178d..29e30fb32 100644 --- a/go.sum +++ b/go.sum @@ -1469,8 +1469,8 @@ google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b h1:SfSkJugek6xm7lWywqth4r2iTrYLpD8lOj1nMIIhMNM= -google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f h1:wwbo0UziciPT4Dsca+bmplW53QNAl7tiUOw7FfAcsf8= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1519,8 +1519,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..dacaae2ad --- /dev/null +++ b/package-lock.json @@ -0,0 +1,47 @@ +{ + "name": "api", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "devDependencies": { + "ts-protoc-gen": "^0.15.0" + } + }, + "node_modules/google-protobuf": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.0.tgz", + "integrity": "sha512-byR7MBTK4tZ5PZEb+u5ZTzpt4SfrTxv5682MjPlHN16XeqgZE2/8HOIWeiXe8JKnT9OVbtBGhbq8mtvkK8cd5g==", + "dev": true + }, + "node_modules/ts-protoc-gen": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.15.0.tgz", + "integrity": "sha512-TycnzEyrdVDlATJ3bWFTtra3SCiEP0W0vySXReAuEygXCUr1j2uaVyL0DhzjwuUdQoW5oXPwk6oZWeA0955V+g==", + "dev": true, + "dependencies": { + "google-protobuf": "^3.15.5" + }, + "bin": { + "protoc-gen-ts": "bin/protoc-gen-ts" + } + } + }, + "dependencies": { + "google-protobuf": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.0.tgz", + "integrity": "sha512-byR7MBTK4tZ5PZEb+u5ZTzpt4SfrTxv5682MjPlHN16XeqgZE2/8HOIWeiXe8JKnT9OVbtBGhbq8mtvkK8cd5g==", + "dev": true + }, + "ts-protoc-gen": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/ts-protoc-gen/-/ts-protoc-gen-0.15.0.tgz", + "integrity": "sha512-TycnzEyrdVDlATJ3bWFTtra3SCiEP0W0vySXReAuEygXCUr1j2uaVyL0DhzjwuUdQoW5oXPwk6oZWeA0955V+g==", + "dev": true, + "requires": { + "google-protobuf": "^3.15.5" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..06c686c46 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "ts-protoc-gen": "^0.15.0" + } +} diff --git a/proto/viam/buf.gen.web.yaml b/proto/viam/buf.gen.web.yaml new file mode 100644 index 000000000..7faf7ba45 --- /dev/null +++ b/proto/viam/buf.gen.web.yaml @@ -0,0 +1,15 @@ +version: v1 +plugins: + - name: js + out: gen/js + opt: + - import_style=commonjs + - name: grpc-web + out: gen/js + opt: + - import_style=commonjs + - mode=grpcwebtext + - name: ts + out: gen/js + opt: + - service=grpc-web diff --git a/proto/viam/buf.lock b/proto/viam/buf.lock new file mode 100644 index 000000000..feb8c62fd --- /dev/null +++ b/proto/viam/buf.lock @@ -0,0 +1,7 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 62f35d8aed1149c291d606d958a7ce32 diff --git a/proto/viam/buf.yaml b/proto/viam/buf.yaml index 892a52c2d..6955db956 100644 --- a/proto/viam/buf.yaml +++ b/proto/viam/buf.yaml @@ -1,5 +1,7 @@ version: v1 name: buf.build/viamrobotics/api +deps: + - buf.build/googleapis/googleapis:62f35d8aed1149c291d606d958a7ce32 build: excludes: - node_modules @@ -11,4 +13,11 @@ lint: - DEFAULT except: - PACKAGE_DIRECTORY_MATCH + ignore_only: + RPC_RESPONSE_STANDARD_NAME: + - component/camera/v1/camera.proto + - component/audioinput/v1/audioinput.proto + RPC_REQUEST_RESPONSE_UNIQUE: + - component/camera/v1/camera.proto + - component/audioinput/v1/audioinput.proto allow_comment_ignores: true diff --git a/proto/viam/common/v1/common.proto b/proto/viam/common/v1/common.proto new file mode 100644 index 000000000..ba9e85bc2 --- /dev/null +++ b/proto/viam/common/v1/common.proto @@ -0,0 +1,148 @@ +// The following is a list of messages that are used across multiple resource subtypes +syntax = "proto3"; + +package viam.common.v1; + +option go_package = "go.viam.com/api/common/v1"; +option java_package = "com.viam.common.v1"; + +message ResourceName { + string namespace = 1; + string type = 2; + string subtype = 3; + string name = 4; +} + +message BoardStatus { + map analogs = 1; + map digital_interrupts = 2; +} + +message AnalogStatus { + // Current value of the analog reader of a robot's board + int32 value = 1; +} + +message DigitalInterruptStatus { + // Current value of the digital interrupt of a robot's board + int64 value = 1; +} +/* Pose is a combination of location and orientation. +Location is expressed as distance which is represented by x , y, z coordinates. Orientation is expressed as an orientation vector which +is represented by o_x, o_y, o_z and theta. The o_x, o_y, o_z coordinates represent the point on the cartesian unit sphere that the end of +the arm is pointing to (with the origin as reference). That unit vector forms an axis around which theta rotates. This means that +incrementing / decrementing theta will perform an inline rotation of the end effector. +Theta is defined as rotation between two planes: the first being defined by the origin, the point (0,0,1), and the rx, ry, rz point, and the +second being defined by the origin, the rx, ry, rz point and the local Z axis. Therefore, if theta is kept at zero as the north/south pole +is circled, the Roll will correct itself to remain in-line. */ +message Pose { + // millimeters from the origin + double x = 1; + // millimeters from the origin + double y = 2; + // millimeters from the origin + double z = 3; + // z component of a vector defining axis of rotation + double o_x = 4; + // x component of a vector defining axis of rotation + double o_y = 5; + // y component of a vector defining axis of rotation + double o_z = 6; + // degrees + double theta = 7; +} + +message Orientation { + // x component of a vector defining axis of rotation + double o_x = 1; + // y component of a vector defining axis of rotation + double o_y = 2; + // z component of a vector defining axis of rotation + double o_z = 3; + // degrees + double theta = 4; +} + +// PoseInFrame contains a pose and the and the reference frame in which it was observed +message PoseInFrame { + string reference_frame = 1; + Pose pose = 2; +} + +message Vector3 { + double x = 1; + double y = 2; + double z = 3; +} + +message Sphere { + double radius_mm = 1; +} + +// RectangularPrism contains a Vector3 field corresponding to the X, Y, Z dimensions of the prism in mms +// These dimensions are with respect to the referenceframe in which the RectangularPrism is defined +message RectangularPrism { + Vector3 dims_mm = 1; +} + +// Geometry contains the dimensions of a given geometry and the pose of its center. The geometry is one of either a sphere or a box. +message Geometry { + // Pose of a gemetries center point + common.v1.Pose center = 1; + // Deminsions of a give geometry. This can be a sphere or box + oneof geometry_type { + Sphere sphere = 2; + RectangularPrism box = 3; + } +} + +// GeometriesinFrame contains the dimensions of a given geometry, pose of its center point, and the reference frame by which it was +// observed. +message GeometriesInFrame { + // Reference frame of the observer of the geometry + string reference_frame = 1; + // Dimensional type + repeated Geometry geometries = 2; +} + +// PointCloudObject contains an image in bytes with point cloud data of all of the objects captured by a given observer as well as a +// repeated list of geometries which respresents the center point and geometry of each of the objects within the point cloud +message PointCloudObject { + // image frame expressed in bytes + bytes point_cloud = 1; + // volume of a given geometry + common.v1.GeometriesInFrame geometries = 2; +} + +message GeoPoint { + double latitude = 1; + double longitude = 2; +} + +// Transform contains a pose and two reference frames. The first reference frame is the starting reference frame, and the second reference +// frame is the observer reference frame. The second reference frame has a pose which represents the pose of an object in the first +// reference frame as observed within the second reference frame. +message Transform { + // the name of a given reference frame + string reference_frame = 1; + // the pose of the above reference frame with respect to a different observer reference frame + PoseInFrame pose_in_observer_frame = 2; +} + +// WorldState contains information about the physical environment around a given robot. All of the fields within this message are optional, +// they can include information about the physical dimensions of an obstacle, the freespace of a robot, and any desired transforms between a +// given reference frame and a new target reference frame. +message WorldState { + // a list of obstacles expressed as a geometry and the reference frame in which it was observed; this field is optional + repeated GeometriesInFrame obstacles = 1; + // a list of spaces the robot is allowed to operate within expressed as a geometry and the reference frame it is measured fom; + // this field is optional + repeated GeometriesInFrame interaction_spaces = 2; + // a list of Transforms needed to transform a pose from one reference frame to another; this field is optional + repeated Transform transforms = 3; +} + +// ActuatorStatus is a generic status for resources that only need to return actuator status. +message ActuatorStatus { + bool is_moving = 1; +} diff --git a/proto/viam/component/arm/v1/arm.proto b/proto/viam/component/arm/v1/arm.proto new file mode 100644 index 000000000..ebf9d9c96 --- /dev/null +++ b/proto/viam/component/arm/v1/arm.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; + +package viam.component.arm.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/component/arm/v1"; +option java_package = "com.viam.component.arm.v1"; + +// An ArmService services all arms associated with a robot +service ArmService { + // GetEndPosition gets the current position the end of the robot's arm expressed as X,Y,Z,ox,oy,oz,theta + rpc GetEndPosition(GetEndPositionRequest) returns (GetEndPositionResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/arm/{name}/position" + }; + } + + // MoveToPosition moves the mount point of the robot's end effector to the requested position. + // This will block until done or a new operation cancels this one + rpc MoveToPosition(MoveToPositionRequest) returns (MoveToPositionResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/arm/{name}/position" + }; + } + + // GetJointPositions lists the joint positions (in degrees) of every joint on a robot + rpc GetJointPositions(GetJointPositionsRequest) returns (GetJointPositionsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/arm/{name}/joint_positions" + }; + } + + // MoveToJointPositions moves every joint on a robot's arm to specified angles which are expressed in degrees + // This will block until done or a new operation cancels this one + rpc MoveToJointPositions(MoveToJointPositionsRequest) returns (MoveToJointPositionsResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/arm/{name}/joint_positions" + }; + } + + // Stop stops a robot's arm + rpc Stop(StopRequest) returns (StopResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/arm/{name}/stop" + }; + } +} + +message GetEndPositionRequest { + // Name of an arm + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GetEndPositionResponse { + // Returns 6d pose of the end effector relative to the base, represented by X,Y,Z coordinates which express + // millimeters and theta, ox, oy, oz coordinates which express an orientation vector + common.v1.Pose pose = 1; +} + +message JointPositions { + // A list of joint positions. Rotations values are in degrees, translational values in mm. + // The numbers are ordered spatially from the base toward the end effector + // This is used in GetJointPositionsResponse and MoveToJointPositionsRequest + repeated double values = 1; +} + +message GetJointPositionsRequest { + // Name of an arm + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GetJointPositionsResponse { + //a list JointPositions + JointPositions positions = 1; +} + +message MoveToPositionRequest { + // Name of an arm + string name = 1; + common.v1.Pose to = 2; + optional common.v1.WorldState world_state = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message MoveToPositionResponse {} + +message MoveToJointPositionsRequest { + // Name of an arm + string name = 1; + // A list of joint positions + // There should be 1 entry in the list per joint DOF, ordered spatially from the base toward the end effector + JointPositions positions = 2; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message MoveToJointPositionsResponse {} + +message StopRequest { + // Name of an arm + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message StopResponse {} + +message Status { + common.v1.Pose end_position = 1; + JointPositions joint_positions = 2; + bool is_moving = 3; +} diff --git a/proto/viam/component/audioinput/v1/audioinput.proto b/proto/viam/component/audioinput/v1/audioinput.proto new file mode 100644 index 000000000..fd9355c33 --- /dev/null +++ b/proto/viam/component/audioinput/v1/audioinput.proto @@ -0,0 +1,89 @@ +syntax = "proto3"; + +package viam.component.audioinput.v1; + +import "google/api/annotations.proto"; +import "google/api/httpbody.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "go.viam.com/api/component/audioinput/v1"; +option java_package = "com.viam.component.audioinput.v1"; + +// An AudioInputService services all audio inputs associated with a robot +service AudioInputService { + // Chunks returns audio chunks forever from an audio input of the underlying robot. + rpc Chunks(ChunksRequest) returns (stream ChunksResponse); + + // Properties returns properties of an audio input of the underlying robot. + rpc Properties(PropertiesRequest) returns (PropertiesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/audioinput/{name}/properties" + }; + } + + // Record records audio from an audio input of the underlying robot + // to an HTTP response. A specific MIME type cannot be requested and may not necessarily + // be the same one returned each time. + rpc Record(RecordRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/viam/api/v1/component/audioinput/{name}/record" + }; + } +} + +enum SampleFormat { + SAMPLE_FORMAT_UNSPECIFIED = 0; + SAMPLE_FORMAT_INT16_INTERLEAVED = 1; + SAMPLE_FORMAT_FLOAT32_INTERLEAVED = 2; +} + +message RecordRequest { + // Name of an audio input + string name = 1; + google.protobuf.Duration duration = 2; +} + +message AudioChunkInfo { + // Actual sample encoding format of the response + SampleFormat sample_format = 1; + uint32 channels = 2; + int64 sampling_rate = 3; +} + +message AudioChunk { + // Data is PCM data that is organized according to the sample format + // along with its possible interleaving. Data in each format is + // Little Endian. + bytes data = 1; + // Length is the number of samples + uint32 length = 2; +} + +message ChunksRequest { + // Name of an audio input + string name = 1; + // Requested sample encoding format of the response + SampleFormat sample_format = 2; +} + +message ChunksResponse { + oneof type { + AudioChunkInfo info = 1; + AudioChunk chunk = 2; + } +} + +message PropertiesRequest { + // Name of an audio input + string name = 1; +} + +message PropertiesResponse { + uint32 channel_count = 1; + google.protobuf.Duration latency = 2; + uint32 sample_rate = 3; + uint32 sample_size = 4; + bool is_big_endian = 5; + bool is_float = 6; + bool is_interleaved = 7; +} diff --git a/proto/viam/component/base/v1/base.proto b/proto/viam/component/base/v1/base.proto new file mode 100644 index 000000000..ce181c430 --- /dev/null +++ b/proto/viam/component/base/v1/base.proto @@ -0,0 +1,113 @@ +syntax = "proto3"; + +package viam.component.base.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/component/base/v1"; +option java_package = "com.viam.component.base.v1"; + +service BaseService { + // MoveStraight moves a robot's base in a straight line by a given distance, expressed in millimeters + // and a given speed, expressed in millimeters per second + // This method blocks until completed or cancelled + rpc MoveStraight(MoveStraightRequest) returns (MoveStraightResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/base/{name}/move_straight" + }; + } + + // Spin spins a robot's base by an given angle, expressed in degrees, and a given + // angular speed, expressed in degrees per second + // This method blocks until completed or cancelled + rpc Spin(SpinRequest) returns (SpinResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/base/{name}/spin" + }; + } + + // SetPower sets the linear and angular power of a base + // -1 -> 1 in terms of power for each direction + rpc SetPower(SetPowerRequest) returns (SetPowerResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/base/{name}/set_power" + }; + } + + // SetVelocity sets the linear and angular velocity of a base + rpc SetVelocity(SetVelocityRequest) returns (SetVelocityResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/base/{name}/set_velocity" + }; + } + + // Stop stops a robot's base + rpc Stop(StopRequest) returns (StopResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/base/{name}/stop" + }; + } +} + +message MoveStraightRequest { + // Name of a base + string name = 1; + // Desired travel distance in millimeters + int64 distance_mm = 2; + // Desired travel velocity in millimeters/second + double mm_per_sec = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message MoveStraightResponse {} + +message SpinRequest { + // Name of a base + string name = 1; + // Desired angle + double angle_deg = 2; + // Desired angular velocity + double degs_per_sec = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message SpinResponse {} + +message StopRequest { + // Name of a base + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message StopResponse {} + +message SetPowerRequest { + // Name of a base + string name = 1; + // Desired linear power percentage as -1 -> 1 + common.v1.Vector3 linear = 2; + // Desired angular power percentage % as -1 -> 1 + common.v1.Vector3 angular = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message SetPowerResponse {} + +message SetVelocityRequest { + // Name of a base + string name = 1; + // Desired linear velocity in mm per second + common.v1.Vector3 linear = 2; + // Desired angular velocity in degrees per second + common.v1.Vector3 angular = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message SetVelocityResponse {} diff --git a/proto/viam/component/board/v1/board.proto b/proto/viam/component/board/v1/board.proto new file mode 100644 index 000000000..a82986e7c --- /dev/null +++ b/proto/viam/component/board/v1/board.proto @@ -0,0 +1,177 @@ +syntax = "proto3"; + +package viam.component.board.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/component/board/v1"; +option java_package = "com.viam.component.board.v1"; + +// BoardService services all Boards associated with a robot +service BoardService { + rpc Status(StatusRequest) returns (StatusResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/board/{name}/status" + }; + } + + rpc SetGPIO(SetGPIORequest) returns (SetGPIOResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/board/{name}/gpio" + }; + } + + // GetGPIO gets the high/low state of the given pin of a board of the underlying robot. + rpc GetGPIO(GetGPIORequest) returns (GetGPIOResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/board/{name}/gpio" + }; + } + + // PWM gets the duty cycle of the given pin of a board of the underlying robot. + rpc PWM(PWMRequest) returns (PWMResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/board/{name}/pwm" + }; + } + + // SetPWM sets the given pin of a board of the underlying robot to the given duty cycle. + rpc SetPWM(SetPWMRequest) returns (SetPWMResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/board/{name}/pwm" + }; + } + + // PWMFrequency gets the PWM frequency of the given pin of a board of the underlying robot. + rpc PWMFrequency(PWMFrequencyRequest) returns (PWMFrequencyResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/board/{name}/pwm_freq" + }; + } + + // SetPWMFrequency sets the given pin of a board of the underlying robot to the given PWM frequency. 0 will use the board's default PWM frequency. + rpc SetPWMFrequency(SetPWMFrequencyRequest) returns (SetPWMFrequencyResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/board/{name}/pwm_freq" + }; + } + + // Analog Reader + + // ReadAnalogReader reads off the current value of an analog reader of a board of the underlying robot. + rpc ReadAnalogReader(ReadAnalogReaderRequest) returns (ReadAnalogReaderResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/board/{board_name}/analog_reader/{analog_reader_name}/read" + }; + } + + // Digital Interrupt + + // GetDigitalInterruptValue returns the current value of the interrupt which is based on the type of interrupt. + rpc GetDigitalInterruptValue(GetDigitalInterruptValueRequest) returns (GetDigitalInterruptValueResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/board/{board_name}/digital_interrupt/{digital_interrupt_name}/value" + }; + } +} + +message StatusRequest { + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message StatusResponse { + common.v1.BoardStatus status = 1; +} + +message SetGPIORequest { + string name = 1; + string pin = 2; + bool high = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message SetGPIOResponse {} + +message GetGPIORequest { + string name = 1; + string pin = 2; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GetGPIOResponse { + bool high = 1; +} + +message PWMRequest { + string name = 1; + string pin = 2; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message PWMResponse { + double duty_cycle_pct = 1; // 0-1 +} + +message SetPWMRequest { + string name = 1; + string pin = 2; + double duty_cycle_pct = 3; // 0-1 + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message SetPWMResponse {} + +message PWMFrequencyRequest { + string name = 1; + string pin = 2; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message PWMFrequencyResponse { + uint64 frequency_hz = 1; +} + +message SetPWMFrequencyRequest { + string name = 1; + string pin = 2; + uint64 frequency_hz = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message SetPWMFrequencyResponse {} + +// Analog Reader + +message ReadAnalogReaderRequest { + string board_name = 1; + string analog_reader_name = 2; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message ReadAnalogReaderResponse { + int32 value = 1; +} + +// Digital Interrupt + +message GetDigitalInterruptValueRequest { + string board_name = 1; + string digital_interrupt_name = 2; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GetDigitalInterruptValueResponse { + int64 value = 1; +} diff --git a/proto/viam/component/camera/v1/camera.proto b/proto/viam/component/camera/v1/camera.proto new file mode 100644 index 000000000..4ce4c3422 --- /dev/null +++ b/proto/viam/component/camera/v1/camera.proto @@ -0,0 +1,143 @@ +syntax = "proto3"; + +package viam.component.camera.v1; + +import "google/api/annotations.proto"; +import "google/api/httpbody.proto"; + +option go_package = "go.viam.com/api/component/camera/v1"; +option java_package = "com.viam.component.camera.v1"; + +// A CameraService services all cameras associated with a robot +service CameraService { + // GetImage returns a frame from a camera of the underlying robot. A specific MIME type + // can be requested but may not necessarily be the same one returned. + rpc GetImage(GetImageRequest) returns (GetImageResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/camera/{name}/image" + }; + } + + // RenderFrame renders a frame from a camera of the underlying robot to an HTTP response. A specific MIME type + // can be requested but may not necessarily be the same one returned. + rpc RenderFrame(RenderFrameRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/viam/api/v1/component/camera/{name}/render_frame" + }; + } + + // GetPointCloud returns a point cloud from a camera of the underlying robot. A specific MIME type + // can be requested but may not necessarily be the same one returned. + rpc GetPointCloud(GetPointCloudRequest) returns (GetPointCloudResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/camera/{name}/point_cloud" + }; + } + + // GetProperties returns the camera intrinsic parameters and camera distortion parameters from a camera of the underlying robot, if available. + rpc GetProperties(GetPropertiesRequest) returns (GetPropertiesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/camera/{name}/properties" + }; + } +} + +message GetImageRequest { + // Name of a camera + string name = 1; + // Requested MIME type of response + string mime_type = 2; +} + +message GetImageResponse { + // Actual MIME type of response + string mime_type = 1; + // Frame in bytes + bytes image = 2; + // Width of frame in px + int64 width_px = 3; + // Height of frame in px + int64 height_px = 4; +} + +message RenderFrameRequest { + // Name of a camera + string name = 1; + // Requested MIME type of response + string mime_type = 2; +} + +message GetPointCloudRequest { + // Name of a camera + string name = 1; + // Requested MIME type of response + string mime_type = 2; +} + +message GetPointCloudResponse { + // Actual MIME type of response + string mime_type = 1; + // Frame in bytes + bytes point_cloud = 2; +} + +message GetPropertiesRequest { + // Name of a camera + string name = 1; +} + +message GetPropertiesResponse { + // A boolean property determining whether the camera supports the return of pointcloud data + bool supports_pcd = 1; + // Parameters for doing a perspective of a 3D scene to a 2D plane + IntrinsicParameters intrinsic_parameters = 2; + // Parameters for modeling lens distortion in cameras + DistortionParameters distortion_parameters = 3; +} + +message Webcams { + repeated Webcam webcams = 1; +} + +message Webcam { + // Camera driver label + string label = 1; + // Camera driver status + string status = 2; + // Camera properties + repeated Property properties = 3; +} + +message Property { + // Camera video properties + Video video = 1; + // Video resolution width + int32 width = 2; + // Video resolution height + int32 height = 3; + // Video frame format + string frame_format = 4; +} + +message Video { + // Video resolution width + int32 width = 1; + // Video resolution height + int32 height = 2; + // Video frame format + string frame_format = 3; +} + +message IntrinsicParameters { + uint32 width_px = 1; + uint32 height_px = 2; + double focal_x_px = 3; + double focal_y_px = 4; + double center_x_px = 5; + double center_y_px = 6; +} + +message DistortionParameters { + string model = 1; + repeated double parameters = 2; +} diff --git a/proto/viam/component/gantry/v1/gantry.proto b/proto/viam/component/gantry/v1/gantry.proto new file mode 100644 index 000000000..c93ff566f --- /dev/null +++ b/proto/viam/component/gantry/v1/gantry.proto @@ -0,0 +1,86 @@ +syntax = "proto3"; + +package viam.component.gantry.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/component/gantry/v1"; +option java_package = "com.viam.component.gantry.v1"; + +// An GantryService services all gantries associated with a robot +service GantryService { + // GetPosition gets the current position of a gantry of the underlying robot. + rpc GetPosition(GetPositionRequest) returns (GetPositionResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/gantry/{name}/position" + }; + } + + // MoveToPosition moves a gantry of the underlying robot to the requested position. + rpc MoveToPosition(MoveToPositionRequest) returns (MoveToPositionResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/gantry/{name}/position" + }; + } + + // GetLengths gets the lengths of a gantry of the underlying robot. + rpc GetLengths(GetLengthsRequest) returns (GetLengthsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/gantry/{name}/lengths" + }; + } + + // Stop stops a robot's gantry + rpc Stop(StopRequest) returns (StopResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/gantry/{name}/stop" + }; + } +} + +message GetPositionRequest { + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GetPositionResponse { + repeated double positions_mm = 1; +} + +message MoveToPositionRequest { + string name = 1; + repeated double positions_mm = 2; + optional common.v1.WorldState world_state = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message MoveToPositionResponse {} + +message GetLengthsRequest { + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GetLengthsResponse { + repeated double lengths_mm = 1; +} + +message StopRequest { + // Name of a gantry + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message StopResponse {} + +message Status { + repeated double positions_mm = 1; + repeated double lengths_mm = 2; + bool is_moving = 3; +} diff --git a/proto/viam/component/generic/v1/generic.proto b/proto/viam/component/generic/v1/generic.proto new file mode 100644 index 000000000..a146a49d0 --- /dev/null +++ b/proto/viam/component/generic/v1/generic.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package viam.component.generic.v1; + +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/component/generic/v1"; +option java_package = "com.viam.component.generic.v1"; + +// GenericService services all generic commands associated with a robot +service GenericService { + // DoCommand sends/recieves arbitrary commands + rpc DoCommand(DoCommandRequest) returns (DoCommandResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/generic/{name}/do_command" + }; + } +} + +message DoCommandRequest { + string name = 1; + google.protobuf.Struct command = 2; +} + +message DoCommandResponse { + google.protobuf.Struct result = 1; +} diff --git a/proto/viam/component/gripper/v1/gripper.proto b/proto/viam/component/gripper/v1/gripper.proto new file mode 100644 index 000000000..33d34c536 --- /dev/null +++ b/proto/viam/component/gripper/v1/gripper.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; + +package viam.component.gripper.v1; + +import "google/api/annotations.proto"; + +option go_package = "go.viam.com/api/component/gripper/v1"; +option java_package = "com.viam.component.gripper.v1"; + +// An GripperService services all grippers associated with a robot +service GripperService { + // Open opens a gripper of the underlying robot. + rpc Open(OpenRequest) returns (OpenResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/gripper/{name}/open" + }; + } + + // Grab requests a gripper of the underlying robot to grab. + rpc Grab(GrabRequest) returns (GrabResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/gripper/{name}/grab" + }; + } + + // Stop stops a robot's gripper + rpc Stop(StopRequest) returns (StopResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/gripper/{name}/stop" + }; + } +} + +message OpenRequest { + string name = 1; +} + +message OpenResponse {} + +message GrabRequest { + string name = 1; +} + +message GrabResponse { + bool success = 1; +} + +message StopRequest { + // Name of a gripper + string name = 1; +} + +message StopResponse {} diff --git a/proto/viam/component/inputcontroller/v1/input_controller.proto b/proto/viam/component/inputcontroller/v1/input_controller.proto new file mode 100644 index 000000000..b9c396fc8 --- /dev/null +++ b/proto/viam/component/inputcontroller/v1/input_controller.proto @@ -0,0 +1,109 @@ +syntax = "proto3"; + +package viam.component.inputcontroller.v1; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "go.viam.com/api/component/inputcontroller/v1"; +option java_package = "com.viam.component.inputcontroller.v1"; + +// InputControllerService servicestains all input controller associated with a robot +service InputControllerService { + // GetControls returns a list of GetControls provided by the Controller + rpc GetControls(GetControlsRequest) returns (GetControlsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/input/{controller}/controls" + }; + } + + // GetEvents returns a list of events representing the last event on each control of a give Input Controller + rpc GetEvents(GetEventsRequest) returns (GetEventsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/input/{controller}/events" + }; + } + + // StreamEvents starts a stream of InputControllerEvents for the given controls (buttons/axes) on a robot's input controller + rpc StreamEvents(StreamEventsRequest) returns (stream StreamEventsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/input/{controller}/event_stream" + }; + } + + // TriggerEvent, where supported, injects an InputControllerEvent into an input controller to (virtually) generate events + // like button presses or axis movements + rpc TriggerEvent(TriggerEventRequest) returns (TriggerEventResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/input/{controller}/event" + }; + } +} + +message GetControlsRequest { + // Name of an input controller + string controller = 1; +} + +message GetControlsResponse { + // Returns a list of all the controls (buttons and axes) that are + // available to a given Input Controller + repeated string controls = 1; +} + +message GetEventsRequest { + // Name of an input controller + string controller = 1; +} + +message GetEventsResponse { + // Returns a list of the most recent event for each control on a given InputController. Effectively provides the current "state" of all + // buttons/axes on a given input controller + repeated Event events = 1; +} + +message TriggerEventRequest { + // Name of an input controller + string controller = 1; + // Digitally assert a given event + Event event = 2; +} + +message TriggerEventResponse {} + +message Event { + // Timestamp of event + google.protobuf.Timestamp time = 1; + // An event type (eg: ButtonPress, ButtonRelease) + string event = 2; + // A control, can be a button (eg: ButtonSouth) or an axis (eg: AbsoluteX) + string control = 3; + // 0 or 1 for buttons, -1.0 to +1.0 for axes + double value = 4; +} + +message StreamEventsRequest { + message Events { + // Name of a control (button or axis) + string control = 1; + // Specify which event types to recieve events for + // To Do (FA): Right now this can be an empty list, but we should error in this case as opening a stream with no messages is expensive + repeated string events = 2; + // Specify which event types to stop recieving events for + // This can be an empty list + repeated string cancelled_events = 3; + } + // Name of an input controller + string controller = 1; + // A list of Events + repeated Events events = 2; +} + +message StreamEventsResponse { + // Event for a controller + Event event = 1; +} + +message Status { + repeated Event events = 1; +} diff --git a/proto/viam/component/motor/v1/motor.proto b/proto/viam/component/motor/v1/motor.proto new file mode 100644 index 000000000..09b63a37e --- /dev/null +++ b/proto/viam/component/motor/v1/motor.proto @@ -0,0 +1,184 @@ +syntax = "proto3"; + +package viam.component.motor.v1; + +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/component/motor/v1"; +option java_package = "com.viam.component.motor.v1"; + +// A MotorService maintains all motors associated with a robot +service MotorService { + // SetPower sets the percentage of the motor's total power that should be employed + // expressed a value between -1 and 1 where negative values indicate a backwards + // direction and positive values a forward direction + rpc SetPower(SetPowerRequest) returns (SetPowerResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/motor/{name}/power" + }; + } + + // GoFor instructs the motor to turn at a specified speed, which is expressed in RPM, + // for a specified number of rotations relative to its starting position + // This method will return an error if position reporting is not supported + // If revolutions is 0, this will run the motor at rpm indefinitely + // If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in. + rpc GoFor(GoForRequest) returns (GoForResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/motor/{name}/go_for" + }; + } + + // GoTo requests the robot's motor to move to a specific position that + // is relative to its home position at a specified speed which is expressed in RPM + // This method will return an error if position reporting is not supported + rpc GoTo(GoToRequest) returns (GoToResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/motor/{name}/go_to" + }; + } + + // ResetZeroPosition sets the current position of the motor as the new zero position + // This method will return an error if position reporting is not supported + rpc ResetZeroPosition(ResetZeroPositionRequest) returns (ResetZeroPositionResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/motor/{name}/zero" + }; + } + + // Position reports the position of the robot's motor relative to its zero position + // This method will return an error if position reporting is not supported + rpc GetPosition(GetPositionRequest) returns (GetPositionResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/motor/{name}/position" + }; + } + + // GetProperties returns a message of booleans indicating which optional features the robot's motor supports + rpc GetProperties(GetPropertiesRequest) returns (GetPropertiesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/motor/{name}/features" + }; + } + + // Stop turns the robot's motor off + + rpc Stop(StopRequest) returns (StopResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/motor/{name}/stop" + }; + } + + // IsPowered returns true if the robot's motor off + // To Do (FA): This will be deprecated + rpc IsPowered(IsPoweredRequest) returns (IsPoweredResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/motor/{name}/powered" + }; + } +} + +message SetPowerRequest { + // Name of a motor + string name = 1; + // Percentage of motor's power, between -1 and 1 + double power_pct = 2; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message SetPowerResponse {} + +message GoForRequest { + // Name of a motor + string name = 1; + // Speed of motor travel in rotations per minute + double rpm = 2; + // Number of revolutions relative to motor's start position + double revolutions = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GoForResponse {} + +message GoToRequest { + // Name of a motor + string name = 1; + // Speed of motor travel in rotations per minute + double rpm = 2; + // Number of revolutions relative to motor's home home/zero + double position_revolutions = 3; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GoToResponse {} + +message ResetZeroPositionRequest { + // Name of a motor + string name = 1; + // Motor position + double offset = 2; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message ResetZeroPositionResponse {} + +message GetPositionRequest { + // Name of a motor + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GetPositionResponse { + // Current position of the motor relative to its home + double position = 1; +} + +message StopRequest { + // Name of a motor + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message StopResponse {} + +message IsPoweredRequest { + // Name of a motor + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message IsPoweredResponse { + // Returns true if the motor is on + bool is_on = 1; +} + +message GetPropertiesRequest { + // Name of a motor + string name = 1; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GetPropertiesResponse { + // Returns true if the motor supports reporting its position + bool position_reporting = 1; +} + +message Status { + // Returns true if the motor is powered + bool is_powered = 1; + // Returns true if the motor has position support + bool position_reporting = 2; + // Returns current position of the motor relative to its home + double position = 3; + // Returns true if the motor is moving + bool is_moving = 4; +} diff --git a/proto/viam/component/movementsensor/v1/movementsensor.proto b/proto/viam/component/movementsensor/v1/movementsensor.proto new file mode 100644 index 000000000..43c33d2a3 --- /dev/null +++ b/proto/viam/component/movementsensor/v1/movementsensor.proto @@ -0,0 +1,125 @@ +syntax = "proto3"; + +package viam.component.movementsensor.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; + +option go_package = "go.viam.com/api/component/movementsensor/v1"; +option java_package = "com.viam.component.movementsensor.v1"; + +service MovementSensorService { + rpc GetLinearVelocity(GetLinearVelocityRequest) returns (GetLinearVelocityResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/movementsensor/{name}/linear_velocity" + }; + } + + rpc GetAngularVelocity(GetAngularVelocityRequest) returns (GetAngularVelocityResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/movementsensor/{name}/angular_velocity" + }; + } + + rpc GetCompassHeading(GetCompassHeadingRequest) returns (GetCompassHeadingResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/movementsensor/{name}/compass_heading" + }; + } + + rpc GetOrientation(GetOrientationRequest) returns (GetOrientationResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/movementsensor/{name}/orientation" + }; + } + + rpc GetPosition(GetPositionRequest) returns (GetPositionResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/movementsensor/{name}/position" + }; + } + + rpc GetProperties(GetPropertiesRequest) returns (GetPropertiesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/movementsensor/{name}/properties" + }; + } + + rpc GetAccuracy(GetAccuracyRequest) returns (GetAccuracyResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/movementsensor/{name}/accuracy" + }; + } +} + +message GetLinearVelocityRequest { + // Name of a movement sensor + string name = 1; +} + +message GetLinearVelocityResponse { + // linear velocity contains velocity in mm/s across x/y/z axes + common.v1.Vector3 linear_velocity = 1; +} + +message GetAngularVelocityRequest { + // Name of a movement sensor + string name = 1; +} + +message GetAngularVelocityResponse { + // angular velocity contains velocity in degrees/s across x/y/z axes + common.v1.Vector3 angular_velocity = 1; +} + +message GetCompassHeadingRequest { + // Name of a movement sensor + string name = 1; +} + +message GetCompassHeadingResponse { + // A number from 0-359 where + // 0 is North, 90 is East, 180 is South, and 270 is West + double value = 1; +} + +message GetOrientationRequest { + // Name of a movement sensor + string name = 1; +} + +message GetOrientationResponse { + common.v1.Orientation orientation = 1; +} + +message GetPositionRequest { + // Name of a movement sensor + string name = 1; +} + +message GetPositionResponse { + common.v1.GeoPoint coordinate = 1; + float altitude_mm = 2; +} + +message GetPropertiesRequest { + // Name of a movement sensor + string name = 1; +} + +message GetPropertiesResponse { + bool linear_velocity_supported = 1; + bool angular_velocity_supported = 2; + bool orientation_supported = 3; + bool position_supported = 4; + bool compass_heading_supported = 5; +} + +message GetAccuracyRequest { + // Name of a movement sensor + string name = 1; +} + +message GetAccuracyResponse { + map accuracy_mm = 1; +} diff --git a/proto/viam/component/posetracker/v1/pose_tracker.proto b/proto/viam/component/posetracker/v1/pose_tracker.proto new file mode 100644 index 000000000..e771e6ffa --- /dev/null +++ b/proto/viam/component/posetracker/v1/pose_tracker.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package viam.component.posetracker.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; + +option go_package = "go.viam.com/api/component/v1"; +option java_package = "com.viam.component.v1"; + +// A PoseTrackerService maintains all pose trackers associated with a robot +service PoseTrackerService { + // GetPoses returns the current pose of each body tracked by the pose tracker + rpc GetPoses(GetPosesRequest) returns (GetPosesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/pose_tracker/{name}/poses" + }; + } +} + +message GetPosesRequest { + // Name of the pose tracker + string name = 1; + // Names of the bodies whose poses are being requested. In the event + // this parameter is not supplied or is an empty list, all available + // poses are returned + repeated string body_names = 2; +} + +message GetPosesResponse { + // Mapping of each body name to the pose representing the center of the body. + map body_poses = 1; +} diff --git a/proto/viam/component/sensor/v1/sensor.proto b/proto/viam/component/sensor/v1/sensor.proto new file mode 100644 index 000000000..fdd3a7270 --- /dev/null +++ b/proto/viam/component/sensor/v1/sensor.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package viam.component.sensor.v1; + +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/component/sensor/v1"; +option java_package = "com.viam.component.sensor.v1"; + +// SensorService services all generic sensors associated with a robot +service SensorService { + // GetReadings returns the readings of a sensor of the underlying robot. + rpc GetReadings(GetReadingsRequest) returns (GetReadingsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/sensor/{name}/readings" + }; + } +} + +message GetReadingsRequest { + string name = 1; +} + +message GetReadingsResponse { + map readings = 1; +} diff --git a/proto/viam/component/servo/v1/servo.proto b/proto/viam/component/servo/v1/servo.proto new file mode 100644 index 000000000..0742411fb --- /dev/null +++ b/proto/viam/component/servo/v1/servo.proto @@ -0,0 +1,64 @@ +syntax = "proto3"; + +package viam.component.servo.v1; + +import "google/api/annotations.proto"; + +option go_package = "go.viam.com/api/component/servo/v1"; +option java_package = "com.viam.component.servo.v1"; + +// A ServoService maintains all servos associated with a robot +service ServoService { + // Move requests the servo of the underlying robot to move. + // This will block until done or a new operation cancels this one + rpc Move(MoveRequest) returns (MoveResponse) { + option (google.api.http) = { + put: "/viam/api/v1/component/servo/{name}/move" + }; + } + + // GetPosition returns the current set angle (degrees) of the servo of the underlying robot. + rpc GetPosition(GetPositionRequest) returns (GetPositionResponse) { + option (google.api.http) = { + get: "/viam/api/v1/component/servo/{name}/position" + }; + } + + // Stop stops a robot's servo + rpc Stop(StopRequest) returns (StopResponse) { + option (google.api.http) = { + post: "/viam/api/v1/component/servo/{name}/stop" + }; + } +} + +message MoveRequest { + // the name of the servo, as registered + string name = 1; + // the degrees by which to rotate the servo. Accepted values are between 0 and 180 + uint32 angle_deg = 2; +} + +message MoveResponse {} + +message GetPositionRequest { + // the name of the servo, as registered + string name = 1; +} + +message GetPositionResponse { + // the degrees from neutral by which the servo is currently rotated. Values are between 0 and 180 + uint32 position_deg = 1; +} + +message StopRequest { + // Name of a servo + string name = 1; +} + +message StopResponse {} + +message Status { + uint32 position_deg = 1; + bool is_moving = 2; +} diff --git a/proto/viam/robot/v1/robot.proto b/proto/viam/robot/v1/robot.proto new file mode 100644 index 000000000..6aeb98ad9 --- /dev/null +++ b/proto/viam/robot/v1/robot.proto @@ -0,0 +1,214 @@ +syntax = "proto3"; + +package viam.robot.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "go.viam.com/api/robot/v1"; +option java_package = "com.viam.robot.v1"; + +// A RobotService encompasses all functionality of some robot comprised of parts, local and remote. +service RobotService { + rpc GetOperations(GetOperationsRequest) returns (GetOperationsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/operations/list" + }; + } + + // ResourceNames returns the list of all resources. + rpc ResourceNames(ResourceNamesRequest) returns (ResourceNamesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/resources/list" + }; + } + + // ResourceRPCSubtypes returns the list of all resource types. + rpc ResourceRPCSubtypes(ResourceRPCSubtypesRequest) returns (ResourceRPCSubtypesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/resource_rpc_subtypes/list" + }; + } + + rpc CancelOperation(CancelOperationRequest) returns (CancelOperationResponse) { + option (google.api.http) = { + post: "/viam/api/v1/operations/cancel" + }; + } + + rpc BlockForOperation(BlockForOperationRequest) returns (BlockForOperationResponse) { + option (google.api.http) = { + post: "/viam/api/v1/operations/block" + }; + } + + // DiscoverComponents returns the list of discovered component configurations. + rpc DiscoverComponents(DiscoverComponentsRequest) returns (DiscoverComponentsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/discovery/components" + }; + } + + rpc FrameSystemConfig(FrameSystemConfigRequest) returns (FrameSystemConfigResponse) { + option (google.api.http) = { + get: "/viam/api/v1/frame_system/config" + }; + } + + rpc TransformPose(TransformPoseRequest) returns (TransformPoseResponse) { + option (google.api.http) = { + get: "/viam/api/v1/frame_system/transform_pose" + }; + } + + // GetStatus returns the list of all statuses requested. An empty request signifies all resources. + rpc GetStatus(GetStatusRequest) returns (GetStatusResponse) { + option (google.api.http) = { + get: "/viam/api/v1/status" + }; + } + + // StreamStatus periodically sends the status of all statuses requested. An empty request signifies all resources. + rpc StreamStatus(StreamStatusRequest) returns (stream StreamStatusResponse) { + option (google.api.http) = { + get: "/viam/api/v1/status/stream" + }; + } + + // StopAll will stop all current and outstanding operations for the robot and stops all actuators and movement + rpc StopAll(StopAllRequest) returns (StopAllResponse) { + option (google.api.http) = { + get: "/viam/api/v1/stop_all" + }; + } +} + +message FrameSystemConfig { + string name = 1; + common.v1.PoseInFrame pose_in_parent_frame = 2; + bytes model_json = 3; +} + +message FrameSystemConfigRequest { + // pose information on any additional reference frames that are needed + // to supplement the robot's frame system + repeated common.v1.Transform supplemental_transforms = 1; +} + +message FrameSystemConfigResponse { + repeated FrameSystemConfig frame_system_configs = 1; +} + +message TransformPoseRequest { + // the original pose to transform along with the reference frame in + // which it was observed + common.v1.PoseInFrame source = 1; + // the reference frame into which the source pose should be transformed, + // if unset this defaults to the "world" reference frame + string destination = 2; + // pose information on any additional reference frames that are needed + // to perform the transform + repeated common.v1.Transform supplemental_transforms = 3; +} + +message TransformPoseResponse { + common.v1.PoseInFrame pose = 1; +} + +message ResourceNamesRequest {} + +message ResourceNamesResponse { + repeated common.v1.ResourceName resources = 1; +} + +message ResourceRPCSubtype { + common.v1.ResourceName subtype = 1; + string proto_service = 2; +} + +message ResourceRPCSubtypesRequest {} + +message ResourceRPCSubtypesResponse { + repeated ResourceRPCSubtype resource_rpc_subtypes = 1; +} + +message Operation { + string id = 1; + string method = 2; + google.protobuf.Struct arguments = 3; + google.protobuf.Timestamp started = 4; +} + +message GetOperationsRequest {} + +message GetOperationsResponse { + repeated Operation operations = 1; +} + +message CancelOperationRequest { + string id = 1; +} + +message CancelOperationResponse {} + +message BlockForOperationRequest { + string id = 1; +} + +message BlockForOperationResponse {} + +// Discovery + +message DiscoveryQuery { + string subtype = 1; + string model = 2; +} + +message Discovery { + DiscoveryQuery query = 1; + google.protobuf.Struct results = 2; +} + +message DiscoverComponentsRequest { + repeated DiscoveryQuery queries = 1; +} + +message DiscoverComponentsResponse { + repeated Discovery discovery = 1; +} + +message Status { + common.v1.ResourceName name = 1; + google.protobuf.Struct status = 2; +} + +message GetStatusRequest { + repeated common.v1.ResourceName resource_names = 1; +} + +message GetStatusResponse { + repeated Status status = 1; +} + +message StreamStatusRequest { + repeated common.v1.ResourceName resource_names = 1; + google.protobuf.Duration every = 2; // how often to send a new status. +} + +message StreamStatusResponse { + repeated Status status = 1; +} + +message StopExtraParameters { + common.v1.ResourceName name = 1; + google.protobuf.Struct params = 2; +} + +message StopAllRequest { + repeated StopExtraParameters extra = 99; +} + +message StopAllResponse {} diff --git a/proto/viam/service/datamanager/v1/data_manager.proto b/proto/viam/service/datamanager/v1/data_manager.proto new file mode 100644 index 000000000..444e7c214 --- /dev/null +++ b/proto/viam/service/datamanager/v1/data_manager.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package viam.service.datamanager.v1; + +import "google/api/annotations.proto"; + +option go_package = "go.viam.com/api/service/datamanager/v1"; +option java_package = "com.viam.service.datamanager.v1"; + +// A DataManagerService service manages data between the robot and the cloud. +service DataManagerService { + // Sync performs a sync of the non-synced files for the specified service name, + rpc Sync(SyncRequest) returns (SyncResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/datamanager/{name}/datasync" + }; + } +} + +message SyncRequest { + string name = 1; +} + +message SyncResponse {} diff --git a/proto/viam/service/motion/v1/motion.proto b/proto/viam/service/motion/v1/motion.proto new file mode 100644 index 000000000..48e0fd078 --- /dev/null +++ b/proto/viam/service/motion/v1/motion.proto @@ -0,0 +1,76 @@ +syntax = "proto3"; + +package viam.service.motion.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/service/motion/v1"; +option java_package = "com.viam.service.motion.v1"; + +// A MotionService declares the gRPC contract for a motion service +service MotionService { + rpc Move(MoveRequest) returns (MoveResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/motion/{name}/move" + }; + } + + rpc MoveSingleComponent(MoveSingleComponentRequest) returns (MoveSingleComponentResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/motion/movesinglecomponent" + }; + } + + rpc GetPose(GetPoseRequest) returns (GetPoseResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/motion/{name}/pose" + }; + } +} + +message MoveRequest { + string name = 1; + common.v1.PoseInFrame destination = 2; + common.v1.ResourceName component_name = 3; + optional common.v1.WorldState world_state = 4; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message MoveResponse { + bool success = 1; +} + +message MoveSingleComponentRequest { + string name = 1; + common.v1.PoseInFrame destination = 2; + common.v1.ResourceName component_name = 3; + optional common.v1.WorldState world_state = 4; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message MoveSingleComponentResponse { + bool success = 1; +} + +message GetPoseRequest { + string name = 1; + // the component whose pose is being requested + common.v1.ResourceName component_name = 2; + // the reference frame in which the component's pose + // should be provided, if unset this defaults + // to the "world" reference frame + string destination_frame = 3; + // pose information on any additional reference frames that are needed + // to compute the component's pose + repeated common.v1.Transform supplemental_transforms = 4; + // Additional arguments to the method + google.protobuf.Struct extra = 99; +} + +message GetPoseResponse { + common.v1.PoseInFrame pose = 1; +} diff --git a/proto/viam/service/navigation/v1/navigation.proto b/proto/viam/service/navigation/v1/navigation.proto new file mode 100644 index 000000000..587ff6fa5 --- /dev/null +++ b/proto/viam/service/navigation/v1/navigation.proto @@ -0,0 +1,104 @@ +syntax = "proto3"; + +package viam.service.navigation.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; + +option go_package = "go.viam.com/api/service/navigation/v1"; +option java_package = "com.viam.service.navigation.v1"; + +// A NavigationService declares the gRPC contract for a Navigation service +service NavigationService { + rpc GetMode(GetModeRequest) returns (GetModeResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/navigation/{name}/mode" + }; + } + + rpc SetMode(SetModeRequest) returns (SetModeResponse) { + option (google.api.http) = { + put: "/viam/api/v1/service/navigation/{name}/mode" + }; + } + + rpc GetLocation(GetLocationRequest) returns (GetLocationResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/navigation/{name}/location" + }; + } + + rpc GetWaypoints(GetWaypointsRequest) returns (GetWaypointsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/navigation/{name}/waypoints" + }; + } + + rpc AddWaypoint(AddWaypointRequest) returns (AddWaypointResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/navigation/{name}/waypoints" + }; + } + + rpc RemoveWaypoint(RemoveWaypointRequest) returns (RemoveWaypointResponse) { + option (google.api.http) = { + delete: "/viam/api/v1/service/navigation/{name}/waypoints/{id}" + }; + } +} + +enum Mode { + MODE_UNSPECIFIED = 0; + MODE_MANUAL = 1; + MODE_WAYPOINT = 2; +} + +message GetModeRequest { + string name = 1; +} + +message GetModeResponse { + Mode mode = 1; +} + +message SetModeRequest { + string name = 1; + Mode mode = 2; +} + +message SetModeResponse {} + +message Waypoint { + string id = 1; + common.v1.GeoPoint location = 2; +} + +message GetLocationRequest { + string name = 1; +} + +message GetLocationResponse { + common.v1.GeoPoint location = 1; +} + +message GetWaypointsRequest { + string name = 1; +} + +message GetWaypointsResponse { + repeated Waypoint waypoints = 1; +} + +message AddWaypointRequest { + string name = 1; + common.v1.GeoPoint location = 2; +} + +message AddWaypointResponse {} + +message RemoveWaypointRequest { + string name = 1; + string id = 2; +} + +message RemoveWaypointResponse {} diff --git a/proto/viam/service/sensors/v1/sensors.proto b/proto/viam/service/sensors/v1/sensors.proto new file mode 100644 index 000000000..0e354e4e6 --- /dev/null +++ b/proto/viam/service/sensors/v1/sensors.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +package viam.service.sensors.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/service/sensors/v1"; +option java_package = "com.viam.service.sensors.v1"; + +// A SensorsService services keeps track of all sensors associated with a robot +service SensorsService { + // GetSensors returns the list of all sensors. + rpc GetSensors(GetSensorsRequest) returns (GetSensorsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/{name}/sensors" + }; + } + + // GetReadings returns the list of readings for all sensors specified. + rpc GetReadings(GetReadingsRequest) returns (GetReadingsResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/sensors/{name}/readings" + }; + } +} + +message GetSensorsRequest { + string name = 1; +} + +message GetSensorsResponse { + repeated common.v1.ResourceName sensor_names = 1; +} + +message GetReadingsRequest { + string name = 1; + repeated common.v1.ResourceName sensor_names = 2; +} + +message Readings { + common.v1.ResourceName name = 1; + map readings = 2; +} + +message GetReadingsResponse { + repeated Readings readings = 1; +} diff --git a/proto/viam/service/shell/v1/shell.proto b/proto/viam/service/shell/v1/shell.proto new file mode 100644 index 000000000..d30a34963 --- /dev/null +++ b/proto/viam/service/shell/v1/shell.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package viam.service.shell.v1; + +option go_package = "go.viam.com/api/service/shell/v1"; +option java_package = "com.viam.service.shell.v1"; + +// A ShellService service allows access to an interactive shell experience. +service ShellService { + // Shell starts a shell with an input and output pipe. + rpc Shell(stream ShellRequest) returns (stream ShellResponse); +} + +message ShellRequest { + string name = 1; + string data_in = 2; +} + +message ShellResponse { + string data_out = 1; + string data_err = 2; + bool eof = 3; +} diff --git a/proto/viam/service/slam/v1/slam.proto b/proto/viam/service/slam/v1/slam.proto new file mode 100644 index 000000000..de8f6a5cc --- /dev/null +++ b/proto/viam/service/slam/v1/slam.proto @@ -0,0 +1,61 @@ +syntax = "proto3"; + +package viam.service.slam.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; + +option go_package = "go.viam.com/api/service/slam/v1"; +option java_package = "com.viam.service.slam.v1"; + +// A SlamService declares the gRPC contract for a slam service +service SLAMService { + // GetPosition returns the current estimated position of the robot with + // respect to the "origin" of the map. + rpc GetPosition(GetPositionRequest) returns (GetPositionResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/slam/{name}/position" + }; + } + + // GetMap returns the latest map image or point cloud generated by the + // SLAM library + rpc GetMap(GetMapRequest) returns (GetMapResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/slam/{name}/map" + }; + } +} + +message GetPositionRequest { + // Name of slam service + string name = 1; +} + +message GetPositionResponse { + // Current position of the robot within the World frame. + common.v1.PoseInFrame pose = 1; +} + +message GetMapRequest { + // Name of slam service + string name = 1; + // Requested MIME type of response (image/jpeg or image/pcd) + string mime_type = 2; + // Optional parameter for image/jpeg mime_type, used to project point + // cloud into a 2D image. + optional common.v1.Pose camera_position = 3; + // Optional parameter for image/jpeg mime_type, defaults to false. + // Tells us whether to include the robot position on the 2D image. + bool include_robot_marker = 4; +} + +message GetMapResponse { + // Image or point cloud of mime_type. + oneof map { + common.v1.PointCloudObject point_cloud = 1; + bytes image = 2; + } + // Actual MIME type of response (image/jpeg or image/pcd) + string mime_type = 3; +} diff --git a/proto/viam/service/vision/v1/vision.proto b/proto/viam/service/vision/v1/vision.proto new file mode 100644 index 000000000..564282698 --- /dev/null +++ b/proto/viam/service/vision/v1/vision.proto @@ -0,0 +1,333 @@ +syntax = "proto3"; + +package viam.service.vision.v1; + +import "common/v1/common.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; + +option go_package = "go.viam.com/api/service/vision/v1"; +option java_package = "com.viam.service.vision.v1"; + +// VisionService declares the gRPC contract for a vision service +service VisionService { + // GetModelParameterSchema takes the model name and returns the parameters needed to add one to the vision registry. + rpc GetModelParameterSchema(GetModelParameterSchemaRequest) returns (GetModelParameterSchemaResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/vision/{name}/model_parameter_schema" + }; + } + // Detection methods + + + // GetDetectorNames returns the list of detectors in the registry. + rpc GetDetectorNames(GetDetectorNamesRequest) returns (GetDetectorNamesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/vision/{name}/detector_names" + }; + } + // AddDetector adds a new detector to the registry. + rpc AddDetector(AddDetectorRequest) returns (AddDetectorResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/add_detector" + }; + } + + // RemoveDetector removes a detector from the registry. + rpc RemoveDetector(RemoveDetectorRequest) returns (RemoveDetectorResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/remove_detector" + }; + } + + // GetDetectionsFromCamera will return a list of detections in the next image given a camera and a detector + rpc GetDetectionsFromCamera(GetDetectionsFromCameraRequest) returns (GetDetectionsFromCameraResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/camera_detections" + }; + } + + // GetDetections will return a list of detections in the next image given the image bytes and a detector + rpc GetDetections(GetDetectionsRequest) returns (GetDetectionsResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/detections" + }; + } + + // Classification methods + + // GetClassifierNames returns the list of classifiers in the registry. + rpc GetClassifierNames(GetClassifierNamesRequest) returns (GetClassifierNamesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/vision/{name}/classifier_names" + }; + } + + // AddClassifier adds a new classifier to the registry. + rpc AddClassifier(AddClassifierRequest) returns (AddClassifierResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/add_classifier" + }; + } + + // RemoveClassifier adds a new classifier to the registry. + rpc RemoveClassifier(RemoveClassifierRequest) returns (RemoveClassifierResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/remove_classifier" + }; + } + + // GetClassificationsFromCamera will return a list of classifications in the next image given a camera and a classifier + rpc GetClassificationsFromCamera(GetClassificationsFromCameraRequest) returns (GetClassificationsFromCameraResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/camera_classifications" + }; + } + + // GetClassifications will return a list of classifications in the next image given the image bytes and a classifier + rpc GetClassifications(GetClassificationsRequest) returns (GetClassificationsResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/classifications" + }; + } + + // Segmentation methods + + // GetSegmenterNames returns the list of segmenters in the registry. + rpc GetSegmenterNames(GetSegmenterNamesRequest) returns (GetSegmenterNamesResponse) { + option (google.api.http) = { + get: "/viam/api/v1/service/vision/{name}/segmenter_names" + }; + } + + // AddSegmenter adds a new segmenter to the registry. + rpc AddSegmenter(AddSegmenterRequest) returns (AddSegmenterResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/add_segmenter" + }; + } + + // RemoveSegmenter removes a segmenter from the registry. + rpc RemoveSegmenter(RemoveSegmenterRequest) returns (RemoveSegmenterResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/remove_segmenter" + }; + } + + // GetObjectPointClouds returns all the found objects in a pointcloud from a camera of the underlying robot, + // as well as the 3-vector center of each of the found objects. + // A specific MIME type can be requested but may not necessarily be the same one returned. + rpc GetObjectPointClouds(GetObjectPointCloudsRequest) returns (GetObjectPointCloudsResponse) { + option (google.api.http) = { + post: "/viam/api/v1/service/vision/{name}/object_point_clouds" + }; + } +} + +message GetModelParameterSchemaRequest { + // name of the vision service + string name = 1; + // name of the type of vision model + string model_type = 2; +} + +message GetModelParameterSchemaResponse { + // the parameters as JSON bytes of a jsonschema.Schema + bytes model_parameter_schema = 1; +} + +message GetDetectorNamesRequest { + string name = 1; +} + +message GetDetectorNamesResponse { + // detectors in the registry + repeated string detector_names = 1; +} + +message AddDetectorRequest { + string name = 1; + string detector_name = 2; + string detector_model_type = 3; + google.protobuf.Struct detector_parameters = 4; +} + +message AddDetectorResponse {} + +message RemoveDetectorRequest { + // name of the vision service + string name = 1; + // name of detector in registry + string detector_name = 2; +} + +message RemoveDetectorResponse {} + +message GetDetectionsRequest { + // name of the vision service + string name = 1; + // the image, encoded as bytes + bytes image = 2; + // the width of the image + int64 width = 3; + // the height of the image + int64 height = 4; + // the actual MIME type of image + string mime_type = 5; + // name of the registered detector to use + string detector_name = 6; +} + +message GetDetectionsResponse { + // the bounding boxes and labels + repeated Detection detections = 1; +} + +message GetDetectionsFromCameraRequest { + // name of the vision service + string name = 1; + // name of camera source to use as input + string camera_name = 2; + // name of the registered detector to use + string detector_name = 3; +} + +message GetDetectionsFromCameraResponse { + // the bounding boxes and labels + repeated Detection detections = 1; +} + +message Detection { + // the four corners of the box + optional int64 x_min = 1; + optional int64 y_min = 2; + optional int64 x_max = 3; + optional int64 y_max = 4; + // the confidence of the detection + double confidence = 5; + // label associated with the detected object + string class_name = 6; +} + +message GetClassifierNamesRequest { + // name of the vision service + string name = 1; +} + +message GetClassifierNamesResponse { + repeated string classifier_names = 1; +} + +message AddClassifierRequest { + // name of the vision service + string name = 1; + // name of classifier to add to registry + string classifier_name = 2; + // the type of classifier + string classifier_model_type = 3; + // additional parameters + google.protobuf.Struct classifier_parameters = 4; +} + +message AddClassifierResponse {} + +message RemoveClassifierRequest { + // name of the vision service + string name = 1; + // name of the classifier in registry + string classifier_name = 2; +} + +message RemoveClassifierResponse {} + +message GetClassificationsRequest { + // name of the vision service + string name = 1; + // the image encoded as bytes + bytes image = 2; + // the width of the image + int32 width = 3; + // the height of the image + int32 height = 4; + // the actual MIME type of image + string mime_type = 5; + // the name of the registered classifier + string classifier_name = 6; + // the number of classifications desired + int32 n = 7; +} + +message GetClassificationsResponse { + repeated Classification classifications = 1; +} + +message GetClassificationsFromCameraRequest { + // name of the vision service + string name = 1; + // the image encoded as bytes + string camera_name = 2; + // the name of the registered classifier + string classifier_name = 3; + // the number of classifications desired + int32 n = 4; +} + +message GetClassificationsFromCameraResponse { + repeated Classification classifications = 1; +} + +// the general form of the output from a classifier +message Classification { + // the class name + string class_name = 1; + // the confidence score of the classification + double confidence = 2; +} + +message GetSegmenterNamesRequest { + string name = 1; +} + +message GetSegmenterNamesResponse { + // segmenters in the registry + repeated string segmenter_names = 1; +} + +message AddSegmenterRequest { + // name of the vision service + string name = 1; + // name of the segmenter + string segmenter_name = 2; + // name of the segmenter model + string segmenter_model_type = 3; + // parameters of the segmenter model + google.protobuf.Struct segmenter_parameters = 4; +} + +message AddSegmenterResponse {} + +message RemoveSegmenterRequest { + // name of the vision service + string name = 1; + // name of segmenter in registry + string segmenter_name = 2; +} + +message RemoveSegmenterResponse {} + +message GetObjectPointCloudsRequest { + string name = 1; + // Name of a camera + string camera_name = 2; + // Name of the segmentation algorithm + string segmenter_name = 3; + // Requested MIME type of response + string mime_type = 4; +} + +message GetObjectPointCloudsResponse { + // Actual MIME type of response + string mime_type = 1; + // List of objects in the scene + repeated common.v1.PointCloudObject objects = 2; +} diff --git a/robot/v1/robot.pb.go b/robot/v1/robot.pb.go new file mode 100644 index 000000000..36775e233 --- /dev/null +++ b/robot/v1/robot.pb.go @@ -0,0 +1,2197 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: robot/v1/robot.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FrameSystemConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + PoseInParentFrame *v1.PoseInFrame `protobuf:"bytes,2,opt,name=pose_in_parent_frame,json=poseInParentFrame,proto3" json:"pose_in_parent_frame,omitempty"` + ModelJson []byte `protobuf:"bytes,3,opt,name=model_json,json=modelJson,proto3" json:"model_json,omitempty"` +} + +func (x *FrameSystemConfig) Reset() { + *x = FrameSystemConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FrameSystemConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FrameSystemConfig) ProtoMessage() {} + +func (x *FrameSystemConfig) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FrameSystemConfig.ProtoReflect.Descriptor instead. +func (*FrameSystemConfig) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{0} +} + +func (x *FrameSystemConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FrameSystemConfig) GetPoseInParentFrame() *v1.PoseInFrame { + if x != nil { + return x.PoseInParentFrame + } + return nil +} + +func (x *FrameSystemConfig) GetModelJson() []byte { + if x != nil { + return x.ModelJson + } + return nil +} + +type FrameSystemConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // pose information on any additional reference frames that are needed + // to supplement the robot's frame system + SupplementalTransforms []*v1.Transform `protobuf:"bytes,1,rep,name=supplemental_transforms,json=supplementalTransforms,proto3" json:"supplemental_transforms,omitempty"` +} + +func (x *FrameSystemConfigRequest) Reset() { + *x = FrameSystemConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FrameSystemConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FrameSystemConfigRequest) ProtoMessage() {} + +func (x *FrameSystemConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FrameSystemConfigRequest.ProtoReflect.Descriptor instead. +func (*FrameSystemConfigRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{1} +} + +func (x *FrameSystemConfigRequest) GetSupplementalTransforms() []*v1.Transform { + if x != nil { + return x.SupplementalTransforms + } + return nil +} + +type FrameSystemConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FrameSystemConfigs []*FrameSystemConfig `protobuf:"bytes,1,rep,name=frame_system_configs,json=frameSystemConfigs,proto3" json:"frame_system_configs,omitempty"` +} + +func (x *FrameSystemConfigResponse) Reset() { + *x = FrameSystemConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FrameSystemConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FrameSystemConfigResponse) ProtoMessage() {} + +func (x *FrameSystemConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FrameSystemConfigResponse.ProtoReflect.Descriptor instead. +func (*FrameSystemConfigResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{2} +} + +func (x *FrameSystemConfigResponse) GetFrameSystemConfigs() []*FrameSystemConfig { + if x != nil { + return x.FrameSystemConfigs + } + return nil +} + +type TransformPoseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the original pose to transform along with the reference frame in + // which it was observed + Source *v1.PoseInFrame `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + // the reference frame into which the source pose should be transformed, + // if unset this defaults to the "world" reference frame + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + // pose information on any additional reference frames that are needed + // to perform the transform + SupplementalTransforms []*v1.Transform `protobuf:"bytes,3,rep,name=supplemental_transforms,json=supplementalTransforms,proto3" json:"supplemental_transforms,omitempty"` +} + +func (x *TransformPoseRequest) Reset() { + *x = TransformPoseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransformPoseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransformPoseRequest) ProtoMessage() {} + +func (x *TransformPoseRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransformPoseRequest.ProtoReflect.Descriptor instead. +func (*TransformPoseRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{3} +} + +func (x *TransformPoseRequest) GetSource() *v1.PoseInFrame { + if x != nil { + return x.Source + } + return nil +} + +func (x *TransformPoseRequest) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *TransformPoseRequest) GetSupplementalTransforms() []*v1.Transform { + if x != nil { + return x.SupplementalTransforms + } + return nil +} + +type TransformPoseResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pose *v1.PoseInFrame `protobuf:"bytes,1,opt,name=pose,proto3" json:"pose,omitempty"` +} + +func (x *TransformPoseResponse) Reset() { + *x = TransformPoseResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransformPoseResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransformPoseResponse) ProtoMessage() {} + +func (x *TransformPoseResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransformPoseResponse.ProtoReflect.Descriptor instead. +func (*TransformPoseResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{4} +} + +func (x *TransformPoseResponse) GetPose() *v1.PoseInFrame { + if x != nil { + return x.Pose + } + return nil +} + +type ResourceNamesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResourceNamesRequest) Reset() { + *x = ResourceNamesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceNamesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceNamesRequest) ProtoMessage() {} + +func (x *ResourceNamesRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceNamesRequest.ProtoReflect.Descriptor instead. +func (*ResourceNamesRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{5} +} + +type ResourceNamesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resources []*v1.ResourceName `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` +} + +func (x *ResourceNamesResponse) Reset() { + *x = ResourceNamesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceNamesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceNamesResponse) ProtoMessage() {} + +func (x *ResourceNamesResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceNamesResponse.ProtoReflect.Descriptor instead. +func (*ResourceNamesResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{6} +} + +func (x *ResourceNamesResponse) GetResources() []*v1.ResourceName { + if x != nil { + return x.Resources + } + return nil +} + +type ResourceRPCSubtype struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Subtype *v1.ResourceName `protobuf:"bytes,1,opt,name=subtype,proto3" json:"subtype,omitempty"` + ProtoService string `protobuf:"bytes,2,opt,name=proto_service,json=protoService,proto3" json:"proto_service,omitempty"` +} + +func (x *ResourceRPCSubtype) Reset() { + *x = ResourceRPCSubtype{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceRPCSubtype) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceRPCSubtype) ProtoMessage() {} + +func (x *ResourceRPCSubtype) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceRPCSubtype.ProtoReflect.Descriptor instead. +func (*ResourceRPCSubtype) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{7} +} + +func (x *ResourceRPCSubtype) GetSubtype() *v1.ResourceName { + if x != nil { + return x.Subtype + } + return nil +} + +func (x *ResourceRPCSubtype) GetProtoService() string { + if x != nil { + return x.ProtoService + } + return "" +} + +type ResourceRPCSubtypesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResourceRPCSubtypesRequest) Reset() { + *x = ResourceRPCSubtypesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceRPCSubtypesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceRPCSubtypesRequest) ProtoMessage() {} + +func (x *ResourceRPCSubtypesRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceRPCSubtypesRequest.ProtoReflect.Descriptor instead. +func (*ResourceRPCSubtypesRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{8} +} + +type ResourceRPCSubtypesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResourceRpcSubtypes []*ResourceRPCSubtype `protobuf:"bytes,1,rep,name=resource_rpc_subtypes,json=resourceRpcSubtypes,proto3" json:"resource_rpc_subtypes,omitempty"` +} + +func (x *ResourceRPCSubtypesResponse) Reset() { + *x = ResourceRPCSubtypesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceRPCSubtypesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceRPCSubtypesResponse) ProtoMessage() {} + +func (x *ResourceRPCSubtypesResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceRPCSubtypesResponse.ProtoReflect.Descriptor instead. +func (*ResourceRPCSubtypesResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{9} +} + +func (x *ResourceRPCSubtypesResponse) GetResourceRpcSubtypes() []*ResourceRPCSubtype { + if x != nil { + return x.ResourceRpcSubtypes + } + return nil +} + +type Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` + Arguments *structpb.Struct `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` + Started *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=started,proto3" json:"started,omitempty"` +} + +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{10} +} + +func (x *Operation) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Operation) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *Operation) GetArguments() *structpb.Struct { + if x != nil { + return x.Arguments + } + return nil +} + +func (x *Operation) GetStarted() *timestamppb.Timestamp { + if x != nil { + return x.Started + } + return nil +} + +type GetOperationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetOperationsRequest) Reset() { + *x = GetOperationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOperationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOperationsRequest) ProtoMessage() {} + +func (x *GetOperationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOperationsRequest.ProtoReflect.Descriptor instead. +func (*GetOperationsRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{11} +} + +type GetOperationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` +} + +func (x *GetOperationsResponse) Reset() { + *x = GetOperationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOperationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOperationsResponse) ProtoMessage() {} + +func (x *GetOperationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOperationsResponse.ProtoReflect.Descriptor instead. +func (*GetOperationsResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{12} +} + +func (x *GetOperationsResponse) GetOperations() []*Operation { + if x != nil { + return x.Operations + } + return nil +} + +type CancelOperationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *CancelOperationRequest) Reset() { + *x = CancelOperationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelOperationRequest) ProtoMessage() {} + +func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelOperationRequest.ProtoReflect.Descriptor instead. +func (*CancelOperationRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{13} +} + +func (x *CancelOperationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type CancelOperationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CancelOperationResponse) Reset() { + *x = CancelOperationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelOperationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelOperationResponse) ProtoMessage() {} + +func (x *CancelOperationResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelOperationResponse.ProtoReflect.Descriptor instead. +func (*CancelOperationResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{14} +} + +type BlockForOperationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *BlockForOperationRequest) Reset() { + *x = BlockForOperationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockForOperationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockForOperationRequest) ProtoMessage() {} + +func (x *BlockForOperationRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockForOperationRequest.ProtoReflect.Descriptor instead. +func (*BlockForOperationRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{15} +} + +func (x *BlockForOperationRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type BlockForOperationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BlockForOperationResponse) Reset() { + *x = BlockForOperationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockForOperationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockForOperationResponse) ProtoMessage() {} + +func (x *BlockForOperationResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockForOperationResponse.ProtoReflect.Descriptor instead. +func (*BlockForOperationResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{16} +} + +type DiscoveryQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Subtype string `protobuf:"bytes,1,opt,name=subtype,proto3" json:"subtype,omitempty"` + Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` +} + +func (x *DiscoveryQuery) Reset() { + *x = DiscoveryQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiscoveryQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiscoveryQuery) ProtoMessage() {} + +func (x *DiscoveryQuery) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiscoveryQuery.ProtoReflect.Descriptor instead. +func (*DiscoveryQuery) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{17} +} + +func (x *DiscoveryQuery) GetSubtype() string { + if x != nil { + return x.Subtype + } + return "" +} + +func (x *DiscoveryQuery) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +type Discovery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Query *DiscoveryQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + Results *structpb.Struct `protobuf:"bytes,2,opt,name=results,proto3" json:"results,omitempty"` +} + +func (x *Discovery) Reset() { + *x = Discovery{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Discovery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Discovery) ProtoMessage() {} + +func (x *Discovery) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Discovery.ProtoReflect.Descriptor instead. +func (*Discovery) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{18} +} + +func (x *Discovery) GetQuery() *DiscoveryQuery { + if x != nil { + return x.Query + } + return nil +} + +func (x *Discovery) GetResults() *structpb.Struct { + if x != nil { + return x.Results + } + return nil +} + +type DiscoverComponentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Queries []*DiscoveryQuery `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"` +} + +func (x *DiscoverComponentsRequest) Reset() { + *x = DiscoverComponentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiscoverComponentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiscoverComponentsRequest) ProtoMessage() {} + +func (x *DiscoverComponentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiscoverComponentsRequest.ProtoReflect.Descriptor instead. +func (*DiscoverComponentsRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{19} +} + +func (x *DiscoverComponentsRequest) GetQueries() []*DiscoveryQuery { + if x != nil { + return x.Queries + } + return nil +} + +type DiscoverComponentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Discovery []*Discovery `protobuf:"bytes,1,rep,name=discovery,proto3" json:"discovery,omitempty"` +} + +func (x *DiscoverComponentsResponse) Reset() { + *x = DiscoverComponentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiscoverComponentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiscoverComponentsResponse) ProtoMessage() {} + +func (x *DiscoverComponentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiscoverComponentsResponse.ProtoReflect.Descriptor instead. +func (*DiscoverComponentsResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{20} +} + +func (x *DiscoverComponentsResponse) GetDiscovery() []*Discovery { + if x != nil { + return x.Discovery + } + return nil +} + +type Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *v1.ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Status *structpb.Struct `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Status) Reset() { + *x = Status{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{21} +} + +func (x *Status) GetName() *v1.ResourceName { + if x != nil { + return x.Name + } + return nil +} + +func (x *Status) GetStatus() *structpb.Struct { + if x != nil { + return x.Status + } + return nil +} + +type GetStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResourceNames []*v1.ResourceName `protobuf:"bytes,1,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` +} + +func (x *GetStatusRequest) Reset() { + *x = GetStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStatusRequest) ProtoMessage() {} + +func (x *GetStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStatusRequest.ProtoReflect.Descriptor instead. +func (*GetStatusRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{22} +} + +func (x *GetStatusRequest) GetResourceNames() []*v1.ResourceName { + if x != nil { + return x.ResourceNames + } + return nil +} + +type GetStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status []*Status `protobuf:"bytes,1,rep,name=status,proto3" json:"status,omitempty"` +} + +func (x *GetStatusResponse) Reset() { + *x = GetStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStatusResponse) ProtoMessage() {} + +func (x *GetStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStatusResponse.ProtoReflect.Descriptor instead. +func (*GetStatusResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{23} +} + +func (x *GetStatusResponse) GetStatus() []*Status { + if x != nil { + return x.Status + } + return nil +} + +type StreamStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResourceNames []*v1.ResourceName `protobuf:"bytes,1,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` + Every *durationpb.Duration `protobuf:"bytes,2,opt,name=every,proto3" json:"every,omitempty"` // how often to send a new status. +} + +func (x *StreamStatusRequest) Reset() { + *x = StreamStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamStatusRequest) ProtoMessage() {} + +func (x *StreamStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamStatusRequest.ProtoReflect.Descriptor instead. +func (*StreamStatusRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{24} +} + +func (x *StreamStatusRequest) GetResourceNames() []*v1.ResourceName { + if x != nil { + return x.ResourceNames + } + return nil +} + +func (x *StreamStatusRequest) GetEvery() *durationpb.Duration { + if x != nil { + return x.Every + } + return nil +} + +type StreamStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status []*Status `protobuf:"bytes,1,rep,name=status,proto3" json:"status,omitempty"` +} + +func (x *StreamStatusResponse) Reset() { + *x = StreamStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamStatusResponse) ProtoMessage() {} + +func (x *StreamStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamStatusResponse.ProtoReflect.Descriptor instead. +func (*StreamStatusResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{25} +} + +func (x *StreamStatusResponse) GetStatus() []*Status { + if x != nil { + return x.Status + } + return nil +} + +type StopExtraParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *v1.ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Params *structpb.Struct `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *StopExtraParameters) Reset() { + *x = StopExtraParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopExtraParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopExtraParameters) ProtoMessage() {} + +func (x *StopExtraParameters) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopExtraParameters.ProtoReflect.Descriptor instead. +func (*StopExtraParameters) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{26} +} + +func (x *StopExtraParameters) GetName() *v1.ResourceName { + if x != nil { + return x.Name + } + return nil +} + +func (x *StopExtraParameters) GetParams() *structpb.Struct { + if x != nil { + return x.Params + } + return nil +} + +type StopAllRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Extra []*StopExtraParameters `protobuf:"bytes,99,rep,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *StopAllRequest) Reset() { + *x = StopAllRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopAllRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopAllRequest) ProtoMessage() {} + +func (x *StopAllRequest) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopAllRequest.ProtoReflect.Descriptor instead. +func (*StopAllRequest) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{27} +} + +func (x *StopAllRequest) GetExtra() []*StopExtraParameters { + if x != nil { + return x.Extra + } + return nil +} + +type StopAllResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StopAllResponse) Reset() { + *x = StopAllResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_robot_v1_robot_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopAllResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopAllResponse) ProtoMessage() {} + +func (x *StopAllResponse) ProtoReflect() protoreflect.Message { + mi := &file_robot_v1_robot_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopAllResponse.ProtoReflect.Descriptor instead. +func (*StopAllResponse) Descriptor() ([]byte, []int) { + return file_robot_v1_robot_proto_rawDescGZIP(), []int{28} +} + +var File_robot_v1_robot_proto protoreflect.FileDescriptor + +var file_robot_v1_robot_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x62, 0x6f, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x11, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x14, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x5f, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, + 0x11, 0x70, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x4a, 0x73, 0x6f, + 0x6e, 0x22, 0x6e, 0x0a, 0x18, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, + 0x17, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x16, 0x73, 0x75, 0x70, 0x70, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x73, 0x22, 0x6f, 0x0a, 0x19, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, + 0x0a, 0x14, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x50, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, + 0x65, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x17, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x16, + 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x22, 0x48, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x50, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x65, + 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x53, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x71, 0x0a, + 0x12, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x50, 0x43, 0x53, 0x75, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x50, 0x43, 0x53, + 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x74, + 0x0a, 0x1b, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x50, 0x43, 0x53, 0x75, 0x62, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, + 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x75, + 0x62, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x50, 0x43, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x52, + 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x70, 0x63, 0x53, 0x75, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x72, + 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x51, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x28, 0x0a, 0x16, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x18, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x40, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x22, 0x73, 0x0a, 0x09, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, + 0x33, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x54, 0x0a, 0x19, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x54, 0x0a, + 0x1a, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x09, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x22, 0x6b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0x57, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x42, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x8b, 0x01, + 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x76, + 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x65, 0x76, 0x65, 0x72, 0x79, 0x22, 0x45, 0x0a, 0x14, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x22, 0x78, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x45, 0x78, 0x74, 0x72, 0x61, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x4a, 0x0a, 0x0e, + 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, + 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x6f, 0x70, 0x45, 0x78, 0x74, 0x72, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x70, + 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdb, 0x0b, 0x0a, 0x0c, + 0x52, 0x6f, 0x62, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x80, 0x01, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, + 0x7f, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, + 0x12, 0x9d, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x50, 0x43, + 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x50, 0x43, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x50, 0x43, 0x53, + 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, + 0x12, 0x88, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1e, 0x2f, 0x76, 0x69, + 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x8d, 0x01, 0x0a, 0x11, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1d, 0x2f, 0x76, + 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x94, 0x01, 0x0a, 0x12, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, + 0x21, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x11, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x8c, 0x01, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x50, 0x6f, 0x73, 0x65, 0x12, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, + 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, + 0x6d, 0x50, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x50, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, + 0x70, 0x6f, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, + 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x7d, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x22, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, + 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, + 0x12, 0x67, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x12, 0x1d, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, + 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, + 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x6c, 0x6c, 0x42, 0x2d, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x5a, 0x18, + 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_robot_v1_robot_proto_rawDescOnce sync.Once + file_robot_v1_robot_proto_rawDescData = file_robot_v1_robot_proto_rawDesc +) + +func file_robot_v1_robot_proto_rawDescGZIP() []byte { + file_robot_v1_robot_proto_rawDescOnce.Do(func() { + file_robot_v1_robot_proto_rawDescData = protoimpl.X.CompressGZIP(file_robot_v1_robot_proto_rawDescData) + }) + return file_robot_v1_robot_proto_rawDescData +} + +var file_robot_v1_robot_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_robot_v1_robot_proto_goTypes = []interface{}{ + (*FrameSystemConfig)(nil), // 0: viam.robot.v1.FrameSystemConfig + (*FrameSystemConfigRequest)(nil), // 1: viam.robot.v1.FrameSystemConfigRequest + (*FrameSystemConfigResponse)(nil), // 2: viam.robot.v1.FrameSystemConfigResponse + (*TransformPoseRequest)(nil), // 3: viam.robot.v1.TransformPoseRequest + (*TransformPoseResponse)(nil), // 4: viam.robot.v1.TransformPoseResponse + (*ResourceNamesRequest)(nil), // 5: viam.robot.v1.ResourceNamesRequest + (*ResourceNamesResponse)(nil), // 6: viam.robot.v1.ResourceNamesResponse + (*ResourceRPCSubtype)(nil), // 7: viam.robot.v1.ResourceRPCSubtype + (*ResourceRPCSubtypesRequest)(nil), // 8: viam.robot.v1.ResourceRPCSubtypesRequest + (*ResourceRPCSubtypesResponse)(nil), // 9: viam.robot.v1.ResourceRPCSubtypesResponse + (*Operation)(nil), // 10: viam.robot.v1.Operation + (*GetOperationsRequest)(nil), // 11: viam.robot.v1.GetOperationsRequest + (*GetOperationsResponse)(nil), // 12: viam.robot.v1.GetOperationsResponse + (*CancelOperationRequest)(nil), // 13: viam.robot.v1.CancelOperationRequest + (*CancelOperationResponse)(nil), // 14: viam.robot.v1.CancelOperationResponse + (*BlockForOperationRequest)(nil), // 15: viam.robot.v1.BlockForOperationRequest + (*BlockForOperationResponse)(nil), // 16: viam.robot.v1.BlockForOperationResponse + (*DiscoveryQuery)(nil), // 17: viam.robot.v1.DiscoveryQuery + (*Discovery)(nil), // 18: viam.robot.v1.Discovery + (*DiscoverComponentsRequest)(nil), // 19: viam.robot.v1.DiscoverComponentsRequest + (*DiscoverComponentsResponse)(nil), // 20: viam.robot.v1.DiscoverComponentsResponse + (*Status)(nil), // 21: viam.robot.v1.Status + (*GetStatusRequest)(nil), // 22: viam.robot.v1.GetStatusRequest + (*GetStatusResponse)(nil), // 23: viam.robot.v1.GetStatusResponse + (*StreamStatusRequest)(nil), // 24: viam.robot.v1.StreamStatusRequest + (*StreamStatusResponse)(nil), // 25: viam.robot.v1.StreamStatusResponse + (*StopExtraParameters)(nil), // 26: viam.robot.v1.StopExtraParameters + (*StopAllRequest)(nil), // 27: viam.robot.v1.StopAllRequest + (*StopAllResponse)(nil), // 28: viam.robot.v1.StopAllResponse + (*v1.PoseInFrame)(nil), // 29: viam.common.v1.PoseInFrame + (*v1.Transform)(nil), // 30: viam.common.v1.Transform + (*v1.ResourceName)(nil), // 31: viam.common.v1.ResourceName + (*structpb.Struct)(nil), // 32: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 33: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 34: google.protobuf.Duration +} +var file_robot_v1_robot_proto_depIdxs = []int32{ + 29, // 0: viam.robot.v1.FrameSystemConfig.pose_in_parent_frame:type_name -> viam.common.v1.PoseInFrame + 30, // 1: viam.robot.v1.FrameSystemConfigRequest.supplemental_transforms:type_name -> viam.common.v1.Transform + 0, // 2: viam.robot.v1.FrameSystemConfigResponse.frame_system_configs:type_name -> viam.robot.v1.FrameSystemConfig + 29, // 3: viam.robot.v1.TransformPoseRequest.source:type_name -> viam.common.v1.PoseInFrame + 30, // 4: viam.robot.v1.TransformPoseRequest.supplemental_transforms:type_name -> viam.common.v1.Transform + 29, // 5: viam.robot.v1.TransformPoseResponse.pose:type_name -> viam.common.v1.PoseInFrame + 31, // 6: viam.robot.v1.ResourceNamesResponse.resources:type_name -> viam.common.v1.ResourceName + 31, // 7: viam.robot.v1.ResourceRPCSubtype.subtype:type_name -> viam.common.v1.ResourceName + 7, // 8: viam.robot.v1.ResourceRPCSubtypesResponse.resource_rpc_subtypes:type_name -> viam.robot.v1.ResourceRPCSubtype + 32, // 9: viam.robot.v1.Operation.arguments:type_name -> google.protobuf.Struct + 33, // 10: viam.robot.v1.Operation.started:type_name -> google.protobuf.Timestamp + 10, // 11: viam.robot.v1.GetOperationsResponse.operations:type_name -> viam.robot.v1.Operation + 17, // 12: viam.robot.v1.Discovery.query:type_name -> viam.robot.v1.DiscoveryQuery + 32, // 13: viam.robot.v1.Discovery.results:type_name -> google.protobuf.Struct + 17, // 14: viam.robot.v1.DiscoverComponentsRequest.queries:type_name -> viam.robot.v1.DiscoveryQuery + 18, // 15: viam.robot.v1.DiscoverComponentsResponse.discovery:type_name -> viam.robot.v1.Discovery + 31, // 16: viam.robot.v1.Status.name:type_name -> viam.common.v1.ResourceName + 32, // 17: viam.robot.v1.Status.status:type_name -> google.protobuf.Struct + 31, // 18: viam.robot.v1.GetStatusRequest.resource_names:type_name -> viam.common.v1.ResourceName + 21, // 19: viam.robot.v1.GetStatusResponse.status:type_name -> viam.robot.v1.Status + 31, // 20: viam.robot.v1.StreamStatusRequest.resource_names:type_name -> viam.common.v1.ResourceName + 34, // 21: viam.robot.v1.StreamStatusRequest.every:type_name -> google.protobuf.Duration + 21, // 22: viam.robot.v1.StreamStatusResponse.status:type_name -> viam.robot.v1.Status + 31, // 23: viam.robot.v1.StopExtraParameters.name:type_name -> viam.common.v1.ResourceName + 32, // 24: viam.robot.v1.StopExtraParameters.params:type_name -> google.protobuf.Struct + 26, // 25: viam.robot.v1.StopAllRequest.extra:type_name -> viam.robot.v1.StopExtraParameters + 11, // 26: viam.robot.v1.RobotService.GetOperations:input_type -> viam.robot.v1.GetOperationsRequest + 5, // 27: viam.robot.v1.RobotService.ResourceNames:input_type -> viam.robot.v1.ResourceNamesRequest + 8, // 28: viam.robot.v1.RobotService.ResourceRPCSubtypes:input_type -> viam.robot.v1.ResourceRPCSubtypesRequest + 13, // 29: viam.robot.v1.RobotService.CancelOperation:input_type -> viam.robot.v1.CancelOperationRequest + 15, // 30: viam.robot.v1.RobotService.BlockForOperation:input_type -> viam.robot.v1.BlockForOperationRequest + 19, // 31: viam.robot.v1.RobotService.DiscoverComponents:input_type -> viam.robot.v1.DiscoverComponentsRequest + 1, // 32: viam.robot.v1.RobotService.FrameSystemConfig:input_type -> viam.robot.v1.FrameSystemConfigRequest + 3, // 33: viam.robot.v1.RobotService.TransformPose:input_type -> viam.robot.v1.TransformPoseRequest + 22, // 34: viam.robot.v1.RobotService.GetStatus:input_type -> viam.robot.v1.GetStatusRequest + 24, // 35: viam.robot.v1.RobotService.StreamStatus:input_type -> viam.robot.v1.StreamStatusRequest + 27, // 36: viam.robot.v1.RobotService.StopAll:input_type -> viam.robot.v1.StopAllRequest + 12, // 37: viam.robot.v1.RobotService.GetOperations:output_type -> viam.robot.v1.GetOperationsResponse + 6, // 38: viam.robot.v1.RobotService.ResourceNames:output_type -> viam.robot.v1.ResourceNamesResponse + 9, // 39: viam.robot.v1.RobotService.ResourceRPCSubtypes:output_type -> viam.robot.v1.ResourceRPCSubtypesResponse + 14, // 40: viam.robot.v1.RobotService.CancelOperation:output_type -> viam.robot.v1.CancelOperationResponse + 16, // 41: viam.robot.v1.RobotService.BlockForOperation:output_type -> viam.robot.v1.BlockForOperationResponse + 20, // 42: viam.robot.v1.RobotService.DiscoverComponents:output_type -> viam.robot.v1.DiscoverComponentsResponse + 2, // 43: viam.robot.v1.RobotService.FrameSystemConfig:output_type -> viam.robot.v1.FrameSystemConfigResponse + 4, // 44: viam.robot.v1.RobotService.TransformPose:output_type -> viam.robot.v1.TransformPoseResponse + 23, // 45: viam.robot.v1.RobotService.GetStatus:output_type -> viam.robot.v1.GetStatusResponse + 25, // 46: viam.robot.v1.RobotService.StreamStatus:output_type -> viam.robot.v1.StreamStatusResponse + 28, // 47: viam.robot.v1.RobotService.StopAll:output_type -> viam.robot.v1.StopAllResponse + 37, // [37:48] is the sub-list for method output_type + 26, // [26:37] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name +} + +func init() { file_robot_v1_robot_proto_init() } +func file_robot_v1_robot_proto_init() { + if File_robot_v1_robot_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_robot_v1_robot_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FrameSystemConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FrameSystemConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FrameSystemConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransformPoseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransformPoseResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceNamesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceNamesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceRPCSubtype); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceRPCSubtypesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceRPCSubtypesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOperationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOperationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelOperationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelOperationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockForOperationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockForOperationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiscoveryQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Discovery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiscoverComponentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiscoverComponentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Status); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopExtraParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopAllRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_robot_v1_robot_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopAllResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_robot_v1_robot_proto_rawDesc, + NumEnums: 0, + NumMessages: 29, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_robot_v1_robot_proto_goTypes, + DependencyIndexes: file_robot_v1_robot_proto_depIdxs, + MessageInfos: file_robot_v1_robot_proto_msgTypes, + }.Build() + File_robot_v1_robot_proto = out.File + file_robot_v1_robot_proto_rawDesc = nil + file_robot_v1_robot_proto_goTypes = nil + file_robot_v1_robot_proto_depIdxs = nil +} diff --git a/robot/v1/robot.pb.gw.go b/robot/v1/robot.pb.gw.go new file mode 100644 index 000000000..cbb6ab672 --- /dev/null +++ b/robot/v1/robot.pb.gw.go @@ -0,0 +1,942 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: robot/v1/robot.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_RobotService_GetOperations_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetOperationsRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetOperations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_GetOperations_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetOperationsRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetOperations(ctx, &protoReq) + return msg, metadata, err + +} + +func request_RobotService_ResourceNames_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResourceNamesRequest + var metadata runtime.ServerMetadata + + msg, err := client.ResourceNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_ResourceNames_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResourceNamesRequest + var metadata runtime.ServerMetadata + + msg, err := server.ResourceNames(ctx, &protoReq) + return msg, metadata, err + +} + +func request_RobotService_ResourceRPCSubtypes_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResourceRPCSubtypesRequest + var metadata runtime.ServerMetadata + + msg, err := client.ResourceRPCSubtypes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_ResourceRPCSubtypes_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResourceRPCSubtypesRequest + var metadata runtime.ServerMetadata + + msg, err := server.ResourceRPCSubtypes(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_RobotService_CancelOperation_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_RobotService_CancelOperation_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CancelOperationRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_CancelOperation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CancelOperation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_CancelOperation_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CancelOperationRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_CancelOperation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CancelOperation(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_RobotService_BlockForOperation_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_RobotService_BlockForOperation_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BlockForOperationRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_BlockForOperation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.BlockForOperation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_BlockForOperation_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BlockForOperationRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_BlockForOperation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.BlockForOperation(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_RobotService_DiscoverComponents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_RobotService_DiscoverComponents_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DiscoverComponentsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_DiscoverComponents_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DiscoverComponents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_DiscoverComponents_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DiscoverComponentsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_DiscoverComponents_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DiscoverComponents(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_RobotService_FrameSystemConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_RobotService_FrameSystemConfig_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq FrameSystemConfigRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_FrameSystemConfig_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.FrameSystemConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_FrameSystemConfig_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq FrameSystemConfigRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_FrameSystemConfig_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.FrameSystemConfig(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_RobotService_TransformPose_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_RobotService_TransformPose_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TransformPoseRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_TransformPose_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TransformPose(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_TransformPose_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TransformPoseRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_TransformPose_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TransformPose(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_RobotService_GetStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_RobotService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetStatusRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_GetStatus_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetStatusRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_GetStatus_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetStatus(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_RobotService_StreamStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_RobotService_StreamStatus_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (RobotService_StreamStatusClient, runtime.ServerMetadata, error) { + var protoReq StreamStatusRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_StreamStatus_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.StreamStatus(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +var ( + filter_RobotService_StopAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_RobotService_StopAll_0(ctx context.Context, marshaler runtime.Marshaler, client RobotServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopAllRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_StopAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.StopAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RobotService_StopAll_0(ctx context.Context, marshaler runtime.Marshaler, server RobotServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StopAllRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RobotService_StopAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.StopAll(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterRobotServiceHandlerServer registers the http handlers for service RobotService to "mux". +// UnaryRPC :call RobotServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRobotServiceHandlerFromEndpoint instead. +func RegisterRobotServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RobotServiceServer) error { + + mux.Handle("GET", pattern_RobotService_GetOperations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/GetOperations", runtime.WithHTTPPathPattern("/viam/api/v1/operations/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_GetOperations_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_GetOperations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_ResourceNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/ResourceNames", runtime.WithHTTPPathPattern("/viam/api/v1/resources/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_ResourceNames_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_ResourceNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_ResourceRPCSubtypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/ResourceRPCSubtypes", runtime.WithHTTPPathPattern("/viam/api/v1/resource_rpc_subtypes/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_ResourceRPCSubtypes_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_ResourceRPCSubtypes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_RobotService_CancelOperation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/CancelOperation", runtime.WithHTTPPathPattern("/viam/api/v1/operations/cancel")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_CancelOperation_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_CancelOperation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_RobotService_BlockForOperation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/BlockForOperation", runtime.WithHTTPPathPattern("/viam/api/v1/operations/block")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_BlockForOperation_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_BlockForOperation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_DiscoverComponents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/DiscoverComponents", runtime.WithHTTPPathPattern("/viam/api/v1/discovery/components")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_DiscoverComponents_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_DiscoverComponents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_FrameSystemConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/FrameSystemConfig", runtime.WithHTTPPathPattern("/viam/api/v1/frame_system/config")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_FrameSystemConfig_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_FrameSystemConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_TransformPose_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/TransformPose", runtime.WithHTTPPathPattern("/viam/api/v1/frame_system/transform_pose")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_TransformPose_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_TransformPose_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_GetStatus_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_GetStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_StreamStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("GET", pattern_RobotService_StopAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.robot.v1.RobotService/StopAll", runtime.WithHTTPPathPattern("/viam/api/v1/stop_all")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RobotService_StopAll_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_StopAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterRobotServiceHandlerFromEndpoint is same as RegisterRobotServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterRobotServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterRobotServiceHandler(ctx, mux, conn) +} + +// RegisterRobotServiceHandler registers the http handlers for service RobotService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterRobotServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterRobotServiceHandlerClient(ctx, mux, NewRobotServiceClient(conn)) +} + +// RegisterRobotServiceHandlerClient registers the http handlers for service RobotService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RobotServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RobotServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "RobotServiceClient" to call the correct interceptors. +func RegisterRobotServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RobotServiceClient) error { + + mux.Handle("GET", pattern_RobotService_GetOperations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/GetOperations", runtime.WithHTTPPathPattern("/viam/api/v1/operations/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_GetOperations_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_GetOperations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_ResourceNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/ResourceNames", runtime.WithHTTPPathPattern("/viam/api/v1/resources/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_ResourceNames_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_ResourceNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_ResourceRPCSubtypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/ResourceRPCSubtypes", runtime.WithHTTPPathPattern("/viam/api/v1/resource_rpc_subtypes/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_ResourceRPCSubtypes_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_ResourceRPCSubtypes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_RobotService_CancelOperation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/CancelOperation", runtime.WithHTTPPathPattern("/viam/api/v1/operations/cancel")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_CancelOperation_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_CancelOperation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_RobotService_BlockForOperation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/BlockForOperation", runtime.WithHTTPPathPattern("/viam/api/v1/operations/block")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_BlockForOperation_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_BlockForOperation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_DiscoverComponents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/DiscoverComponents", runtime.WithHTTPPathPattern("/viam/api/v1/discovery/components")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_DiscoverComponents_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_DiscoverComponents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_FrameSystemConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/FrameSystemConfig", runtime.WithHTTPPathPattern("/viam/api/v1/frame_system/config")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_FrameSystemConfig_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_FrameSystemConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_TransformPose_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/TransformPose", runtime.WithHTTPPathPattern("/viam/api/v1/frame_system/transform_pose")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_TransformPose_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_TransformPose_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/GetStatus", runtime.WithHTTPPathPattern("/viam/api/v1/status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_GetStatus_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_GetStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_StreamStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/StreamStatus", runtime.WithHTTPPathPattern("/viam/api/v1/status/stream")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_StreamStatus_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_StreamStatus_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RobotService_StopAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.robot.v1.RobotService/StopAll", runtime.WithHTTPPathPattern("/viam/api/v1/stop_all")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RobotService_StopAll_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RobotService_StopAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_RobotService_GetOperations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"viam", "api", "v1", "operations", "list"}, "")) + + pattern_RobotService_ResourceNames_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"viam", "api", "v1", "resources", "list"}, "")) + + pattern_RobotService_ResourceRPCSubtypes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"viam", "api", "v1", "resource_rpc_subtypes", "list"}, "")) + + pattern_RobotService_CancelOperation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"viam", "api", "v1", "operations", "cancel"}, "")) + + pattern_RobotService_BlockForOperation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"viam", "api", "v1", "operations", "block"}, "")) + + pattern_RobotService_DiscoverComponents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"viam", "api", "v1", "discovery", "components"}, "")) + + pattern_RobotService_FrameSystemConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"viam", "api", "v1", "frame_system", "config"}, "")) + + pattern_RobotService_TransformPose_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"viam", "api", "v1", "frame_system", "transform_pose"}, "")) + + pattern_RobotService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"viam", "api", "v1", "status"}, "")) + + pattern_RobotService_StreamStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"viam", "api", "v1", "status", "stream"}, "")) + + pattern_RobotService_StopAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"viam", "api", "v1", "stop_all"}, "")) +) + +var ( + forward_RobotService_GetOperations_0 = runtime.ForwardResponseMessage + + forward_RobotService_ResourceNames_0 = runtime.ForwardResponseMessage + + forward_RobotService_ResourceRPCSubtypes_0 = runtime.ForwardResponseMessage + + forward_RobotService_CancelOperation_0 = runtime.ForwardResponseMessage + + forward_RobotService_BlockForOperation_0 = runtime.ForwardResponseMessage + + forward_RobotService_DiscoverComponents_0 = runtime.ForwardResponseMessage + + forward_RobotService_FrameSystemConfig_0 = runtime.ForwardResponseMessage + + forward_RobotService_TransformPose_0 = runtime.ForwardResponseMessage + + forward_RobotService_GetStatus_0 = runtime.ForwardResponseMessage + + forward_RobotService_StreamStatus_0 = runtime.ForwardResponseStream + + forward_RobotService_StopAll_0 = runtime.ForwardResponseMessage +) diff --git a/robot/v1/robot_grpc.pb.go b/robot/v1/robot_grpc.pb.go new file mode 100644 index 000000000..22489bca4 --- /dev/null +++ b/robot/v1/robot_grpc.pb.go @@ -0,0 +1,501 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// RobotServiceClient is the client API for RobotService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RobotServiceClient interface { + GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) + // ResourceNames returns the list of all resources. + ResourceNames(ctx context.Context, in *ResourceNamesRequest, opts ...grpc.CallOption) (*ResourceNamesResponse, error) + // ResourceRPCSubtypes returns the list of all resource types. + ResourceRPCSubtypes(ctx context.Context, in *ResourceRPCSubtypesRequest, opts ...grpc.CallOption) (*ResourceRPCSubtypesResponse, error) + CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*CancelOperationResponse, error) + BlockForOperation(ctx context.Context, in *BlockForOperationRequest, opts ...grpc.CallOption) (*BlockForOperationResponse, error) + // DiscoverComponents returns the list of discovered component configurations. + DiscoverComponents(ctx context.Context, in *DiscoverComponentsRequest, opts ...grpc.CallOption) (*DiscoverComponentsResponse, error) + FrameSystemConfig(ctx context.Context, in *FrameSystemConfigRequest, opts ...grpc.CallOption) (*FrameSystemConfigResponse, error) + TransformPose(ctx context.Context, in *TransformPoseRequest, opts ...grpc.CallOption) (*TransformPoseResponse, error) + // GetStatus returns the list of all statuses requested. An empty request signifies all resources. + GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) + // StreamStatus periodically sends the status of all statuses requested. An empty request signifies all resources. + StreamStatus(ctx context.Context, in *StreamStatusRequest, opts ...grpc.CallOption) (RobotService_StreamStatusClient, error) + // StopAll will stop all current and outstanding operations for the robot and stops all actuators and movement + StopAll(ctx context.Context, in *StopAllRequest, opts ...grpc.CallOption) (*StopAllResponse, error) +} + +type robotServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRobotServiceClient(cc grpc.ClientConnInterface) RobotServiceClient { + return &robotServiceClient{cc} +} + +func (c *robotServiceClient) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) { + out := new(GetOperationsResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/GetOperations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *robotServiceClient) ResourceNames(ctx context.Context, in *ResourceNamesRequest, opts ...grpc.CallOption) (*ResourceNamesResponse, error) { + out := new(ResourceNamesResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/ResourceNames", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *robotServiceClient) ResourceRPCSubtypes(ctx context.Context, in *ResourceRPCSubtypesRequest, opts ...grpc.CallOption) (*ResourceRPCSubtypesResponse, error) { + out := new(ResourceRPCSubtypesResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/ResourceRPCSubtypes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *robotServiceClient) CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*CancelOperationResponse, error) { + out := new(CancelOperationResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/CancelOperation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *robotServiceClient) BlockForOperation(ctx context.Context, in *BlockForOperationRequest, opts ...grpc.CallOption) (*BlockForOperationResponse, error) { + out := new(BlockForOperationResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/BlockForOperation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *robotServiceClient) DiscoverComponents(ctx context.Context, in *DiscoverComponentsRequest, opts ...grpc.CallOption) (*DiscoverComponentsResponse, error) { + out := new(DiscoverComponentsResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/DiscoverComponents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *robotServiceClient) FrameSystemConfig(ctx context.Context, in *FrameSystemConfigRequest, opts ...grpc.CallOption) (*FrameSystemConfigResponse, error) { + out := new(FrameSystemConfigResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/FrameSystemConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *robotServiceClient) TransformPose(ctx context.Context, in *TransformPoseRequest, opts ...grpc.CallOption) (*TransformPoseResponse, error) { + out := new(TransformPoseResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/TransformPose", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *robotServiceClient) GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) { + out := new(GetStatusResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/GetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *robotServiceClient) StreamStatus(ctx context.Context, in *StreamStatusRequest, opts ...grpc.CallOption) (RobotService_StreamStatusClient, error) { + stream, err := c.cc.NewStream(ctx, &RobotService_ServiceDesc.Streams[0], "/viam.robot.v1.RobotService/StreamStatus", opts...) + if err != nil { + return nil, err + } + x := &robotServiceStreamStatusClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type RobotService_StreamStatusClient interface { + Recv() (*StreamStatusResponse, error) + grpc.ClientStream +} + +type robotServiceStreamStatusClient struct { + grpc.ClientStream +} + +func (x *robotServiceStreamStatusClient) Recv() (*StreamStatusResponse, error) { + m := new(StreamStatusResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *robotServiceClient) StopAll(ctx context.Context, in *StopAllRequest, opts ...grpc.CallOption) (*StopAllResponse, error) { + out := new(StopAllResponse) + err := c.cc.Invoke(ctx, "/viam.robot.v1.RobotService/StopAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RobotServiceServer is the server API for RobotService service. +// All implementations must embed UnimplementedRobotServiceServer +// for forward compatibility +type RobotServiceServer interface { + GetOperations(context.Context, *GetOperationsRequest) (*GetOperationsResponse, error) + // ResourceNames returns the list of all resources. + ResourceNames(context.Context, *ResourceNamesRequest) (*ResourceNamesResponse, error) + // ResourceRPCSubtypes returns the list of all resource types. + ResourceRPCSubtypes(context.Context, *ResourceRPCSubtypesRequest) (*ResourceRPCSubtypesResponse, error) + CancelOperation(context.Context, *CancelOperationRequest) (*CancelOperationResponse, error) + BlockForOperation(context.Context, *BlockForOperationRequest) (*BlockForOperationResponse, error) + // DiscoverComponents returns the list of discovered component configurations. + DiscoverComponents(context.Context, *DiscoverComponentsRequest) (*DiscoverComponentsResponse, error) + FrameSystemConfig(context.Context, *FrameSystemConfigRequest) (*FrameSystemConfigResponse, error) + TransformPose(context.Context, *TransformPoseRequest) (*TransformPoseResponse, error) + // GetStatus returns the list of all statuses requested. An empty request signifies all resources. + GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) + // StreamStatus periodically sends the status of all statuses requested. An empty request signifies all resources. + StreamStatus(*StreamStatusRequest, RobotService_StreamStatusServer) error + // StopAll will stop all current and outstanding operations for the robot and stops all actuators and movement + StopAll(context.Context, *StopAllRequest) (*StopAllResponse, error) + mustEmbedUnimplementedRobotServiceServer() +} + +// UnimplementedRobotServiceServer must be embedded to have forward compatible implementations. +type UnimplementedRobotServiceServer struct { +} + +func (UnimplementedRobotServiceServer) GetOperations(context.Context, *GetOperationsRequest) (*GetOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOperations not implemented") +} +func (UnimplementedRobotServiceServer) ResourceNames(context.Context, *ResourceNamesRequest) (*ResourceNamesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResourceNames not implemented") +} +func (UnimplementedRobotServiceServer) ResourceRPCSubtypes(context.Context, *ResourceRPCSubtypesRequest) (*ResourceRPCSubtypesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResourceRPCSubtypes not implemented") +} +func (UnimplementedRobotServiceServer) CancelOperation(context.Context, *CancelOperationRequest) (*CancelOperationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelOperation not implemented") +} +func (UnimplementedRobotServiceServer) BlockForOperation(context.Context, *BlockForOperationRequest) (*BlockForOperationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BlockForOperation not implemented") +} +func (UnimplementedRobotServiceServer) DiscoverComponents(context.Context, *DiscoverComponentsRequest) (*DiscoverComponentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DiscoverComponents not implemented") +} +func (UnimplementedRobotServiceServer) FrameSystemConfig(context.Context, *FrameSystemConfigRequest) (*FrameSystemConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FrameSystemConfig not implemented") +} +func (UnimplementedRobotServiceServer) TransformPose(context.Context, *TransformPoseRequest) (*TransformPoseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransformPose not implemented") +} +func (UnimplementedRobotServiceServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} +func (UnimplementedRobotServiceServer) StreamStatus(*StreamStatusRequest, RobotService_StreamStatusServer) error { + return status.Errorf(codes.Unimplemented, "method StreamStatus not implemented") +} +func (UnimplementedRobotServiceServer) StopAll(context.Context, *StopAllRequest) (*StopAllResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StopAll not implemented") +} +func (UnimplementedRobotServiceServer) mustEmbedUnimplementedRobotServiceServer() {} + +// UnsafeRobotServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RobotServiceServer will +// result in compilation errors. +type UnsafeRobotServiceServer interface { + mustEmbedUnimplementedRobotServiceServer() +} + +func RegisterRobotServiceServer(s grpc.ServiceRegistrar, srv RobotServiceServer) { + s.RegisterService(&RobotService_ServiceDesc, srv) +} + +func _RobotService_GetOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).GetOperations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/GetOperations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).GetOperations(ctx, req.(*GetOperationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RobotService_ResourceNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceNamesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).ResourceNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/ResourceNames", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).ResourceNames(ctx, req.(*ResourceNamesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RobotService_ResourceRPCSubtypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceRPCSubtypesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).ResourceRPCSubtypes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/ResourceRPCSubtypes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).ResourceRPCSubtypes(ctx, req.(*ResourceRPCSubtypesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RobotService_CancelOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).CancelOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/CancelOperation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).CancelOperation(ctx, req.(*CancelOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RobotService_BlockForOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlockForOperationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).BlockForOperation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/BlockForOperation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).BlockForOperation(ctx, req.(*BlockForOperationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RobotService_DiscoverComponents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiscoverComponentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).DiscoverComponents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/DiscoverComponents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).DiscoverComponents(ctx, req.(*DiscoverComponentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RobotService_FrameSystemConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FrameSystemConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).FrameSystemConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/FrameSystemConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).FrameSystemConfig(ctx, req.(*FrameSystemConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RobotService_TransformPose_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransformPoseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).TransformPose(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/TransformPose", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).TransformPose(ctx, req.(*TransformPoseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RobotService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/GetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).GetStatus(ctx, req.(*GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RobotService_StreamStatus_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamStatusRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(RobotServiceServer).StreamStatus(m, &robotServiceStreamStatusServer{stream}) +} + +type RobotService_StreamStatusServer interface { + Send(*StreamStatusResponse) error + grpc.ServerStream +} + +type robotServiceStreamStatusServer struct { + grpc.ServerStream +} + +func (x *robotServiceStreamStatusServer) Send(m *StreamStatusResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _RobotService_StopAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopAllRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RobotServiceServer).StopAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.robot.v1.RobotService/StopAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RobotServiceServer).StopAll(ctx, req.(*StopAllRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RobotService_ServiceDesc is the grpc.ServiceDesc for RobotService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RobotService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.robot.v1.RobotService", + HandlerType: (*RobotServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetOperations", + Handler: _RobotService_GetOperations_Handler, + }, + { + MethodName: "ResourceNames", + Handler: _RobotService_ResourceNames_Handler, + }, + { + MethodName: "ResourceRPCSubtypes", + Handler: _RobotService_ResourceRPCSubtypes_Handler, + }, + { + MethodName: "CancelOperation", + Handler: _RobotService_CancelOperation_Handler, + }, + { + MethodName: "BlockForOperation", + Handler: _RobotService_BlockForOperation_Handler, + }, + { + MethodName: "DiscoverComponents", + Handler: _RobotService_DiscoverComponents_Handler, + }, + { + MethodName: "FrameSystemConfig", + Handler: _RobotService_FrameSystemConfig_Handler, + }, + { + MethodName: "TransformPose", + Handler: _RobotService_TransformPose_Handler, + }, + { + MethodName: "GetStatus", + Handler: _RobotService_GetStatus_Handler, + }, + { + MethodName: "StopAll", + Handler: _RobotService_StopAll_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamStatus", + Handler: _RobotService_StreamStatus_Handler, + ServerStreams: true, + }, + }, + Metadata: "robot/v1/robot.proto", +} diff --git a/service/datamanager/v1/data_manager.pb.go b/service/datamanager/v1/data_manager.pb.go new file mode 100644 index 000000000..8fa4f0ab0 --- /dev/null +++ b/service/datamanager/v1/data_manager.pb.go @@ -0,0 +1,216 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: service/datamanager/v1/data_manager.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SyncRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *SyncRequest) Reset() { + *x = SyncRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_datamanager_v1_data_manager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncRequest) ProtoMessage() {} + +func (x *SyncRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_datamanager_v1_data_manager_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead. +func (*SyncRequest) Descriptor() ([]byte, []int) { + return file_service_datamanager_v1_data_manager_proto_rawDescGZIP(), []int{0} +} + +func (x *SyncRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type SyncResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SyncResponse) Reset() { + *x = SyncResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_datamanager_v1_data_manager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncResponse) ProtoMessage() {} + +func (x *SyncResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_datamanager_v1_data_manager_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead. +func (*SyncResponse) Descriptor() ([]byte, []int) { + return file_service_datamanager_v1_data_manager_proto_rawDescGZIP(), []int{1} +} + +var File_service_datamanager_v1_data_manager_proto protoreflect.FileDescriptor + +var file_service_datamanager_v1_data_manager_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x21, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x79, 0x6e, + 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xac, 0x01, 0x0a, 0x12, 0x44, 0x61, + 0x74, 0x61, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x95, 0x01, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x28, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x49, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x5a, 0x26, 0x67, 0x6f, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_datamanager_v1_data_manager_proto_rawDescOnce sync.Once + file_service_datamanager_v1_data_manager_proto_rawDescData = file_service_datamanager_v1_data_manager_proto_rawDesc +) + +func file_service_datamanager_v1_data_manager_proto_rawDescGZIP() []byte { + file_service_datamanager_v1_data_manager_proto_rawDescOnce.Do(func() { + file_service_datamanager_v1_data_manager_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_datamanager_v1_data_manager_proto_rawDescData) + }) + return file_service_datamanager_v1_data_manager_proto_rawDescData +} + +var file_service_datamanager_v1_data_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_service_datamanager_v1_data_manager_proto_goTypes = []interface{}{ + (*SyncRequest)(nil), // 0: viam.service.datamanager.v1.SyncRequest + (*SyncResponse)(nil), // 1: viam.service.datamanager.v1.SyncResponse +} +var file_service_datamanager_v1_data_manager_proto_depIdxs = []int32{ + 0, // 0: viam.service.datamanager.v1.DataManagerService.Sync:input_type -> viam.service.datamanager.v1.SyncRequest + 1, // 1: viam.service.datamanager.v1.DataManagerService.Sync:output_type -> viam.service.datamanager.v1.SyncResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_service_datamanager_v1_data_manager_proto_init() } +func file_service_datamanager_v1_data_manager_proto_init() { + if File_service_datamanager_v1_data_manager_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_datamanager_v1_data_manager_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_datamanager_v1_data_manager_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_datamanager_v1_data_manager_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_datamanager_v1_data_manager_proto_goTypes, + DependencyIndexes: file_service_datamanager_v1_data_manager_proto_depIdxs, + MessageInfos: file_service_datamanager_v1_data_manager_proto_msgTypes, + }.Build() + File_service_datamanager_v1_data_manager_proto = out.File + file_service_datamanager_v1_data_manager_proto_rawDesc = nil + file_service_datamanager_v1_data_manager_proto_goTypes = nil + file_service_datamanager_v1_data_manager_proto_depIdxs = nil +} diff --git a/service/datamanager/v1/data_manager.pb.gw.go b/service/datamanager/v1/data_manager.pb.gw.go new file mode 100644 index 000000000..9926bce21 --- /dev/null +++ b/service/datamanager/v1/data_manager.pb.gw.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: service/datamanager/v1/data_manager.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_DataManagerService_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client DataManagerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.Sync(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_DataManagerService_Sync_0(ctx context.Context, marshaler runtime.Marshaler, server DataManagerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.Sync(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterDataManagerServiceHandlerServer registers the http handlers for service DataManagerService to "mux". +// UnaryRPC :call DataManagerServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDataManagerServiceHandlerFromEndpoint instead. +func RegisterDataManagerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DataManagerServiceServer) error { + + mux.Handle("POST", pattern_DataManagerService_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.datamanager.v1.DataManagerService/Sync", runtime.WithHTTPPathPattern("/viam/api/v1/service/datamanager/{name}/datasync")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_DataManagerService_Sync_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_DataManagerService_Sync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterDataManagerServiceHandlerFromEndpoint is same as RegisterDataManagerServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterDataManagerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterDataManagerServiceHandler(ctx, mux, conn) +} + +// RegisterDataManagerServiceHandler registers the http handlers for service DataManagerService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterDataManagerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterDataManagerServiceHandlerClient(ctx, mux, NewDataManagerServiceClient(conn)) +} + +// RegisterDataManagerServiceHandlerClient registers the http handlers for service DataManagerService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DataManagerServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DataManagerServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "DataManagerServiceClient" to call the correct interceptors. +func RegisterDataManagerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DataManagerServiceClient) error { + + mux.Handle("POST", pattern_DataManagerService_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.datamanager.v1.DataManagerService/Sync", runtime.WithHTTPPathPattern("/viam/api/v1/service/datamanager/{name}/datasync")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_DataManagerService_Sync_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_DataManagerService_Sync_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_DataManagerService_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "datamanager", "name", "datasync"}, "")) +) + +var ( + forward_DataManagerService_Sync_0 = runtime.ForwardResponseMessage +) diff --git a/service/datamanager/v1/data_manager_grpc.pb.go b/service/datamanager/v1/data_manager_grpc.pb.go new file mode 100644 index 000000000..116c99a69 --- /dev/null +++ b/service/datamanager/v1/data_manager_grpc.pb.go @@ -0,0 +1,103 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// DataManagerServiceClient is the client API for DataManagerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type DataManagerServiceClient interface { + // Sync performs a sync of the non-synced files for the specified service name, + Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) +} + +type dataManagerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDataManagerServiceClient(cc grpc.ClientConnInterface) DataManagerServiceClient { + return &dataManagerServiceClient{cc} +} + +func (c *dataManagerServiceClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { + out := new(SyncResponse) + err := c.cc.Invoke(ctx, "/viam.service.datamanager.v1.DataManagerService/Sync", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DataManagerServiceServer is the server API for DataManagerService service. +// All implementations must embed UnimplementedDataManagerServiceServer +// for forward compatibility +type DataManagerServiceServer interface { + // Sync performs a sync of the non-synced files for the specified service name, + Sync(context.Context, *SyncRequest) (*SyncResponse, error) + mustEmbedUnimplementedDataManagerServiceServer() +} + +// UnimplementedDataManagerServiceServer must be embedded to have forward compatible implementations. +type UnimplementedDataManagerServiceServer struct { +} + +func (UnimplementedDataManagerServiceServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") +} +func (UnimplementedDataManagerServiceServer) mustEmbedUnimplementedDataManagerServiceServer() {} + +// UnsafeDataManagerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DataManagerServiceServer will +// result in compilation errors. +type UnsafeDataManagerServiceServer interface { + mustEmbedUnimplementedDataManagerServiceServer() +} + +func RegisterDataManagerServiceServer(s grpc.ServiceRegistrar, srv DataManagerServiceServer) { + s.RegisterService(&DataManagerService_ServiceDesc, srv) +} + +func _DataManagerService_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataManagerServiceServer).Sync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.datamanager.v1.DataManagerService/Sync", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataManagerServiceServer).Sync(ctx, req.(*SyncRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// DataManagerService_ServiceDesc is the grpc.ServiceDesc for DataManagerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DataManagerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.service.datamanager.v1.DataManagerService", + HandlerType: (*DataManagerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Sync", + Handler: _DataManagerService_Sync_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service/datamanager/v1/data_manager.proto", +} diff --git a/service/motion/v1/motion.pb.go b/service/motion/v1/motion.pb.go new file mode 100644 index 000000000..352037022 --- /dev/null +++ b/service/motion/v1/motion.pb.go @@ -0,0 +1,679 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: service/motion/v1/motion.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MoveRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Destination *v1.PoseInFrame `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + ComponentName *v1.ResourceName `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"` + WorldState *v1.WorldState `protobuf:"bytes,4,opt,name=world_state,json=worldState,proto3,oneof" json:"world_state,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *MoveRequest) Reset() { + *x = MoveRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_motion_v1_motion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveRequest) ProtoMessage() {} + +func (x *MoveRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_motion_v1_motion_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveRequest.ProtoReflect.Descriptor instead. +func (*MoveRequest) Descriptor() ([]byte, []int) { + return file_service_motion_v1_motion_proto_rawDescGZIP(), []int{0} +} + +func (x *MoveRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MoveRequest) GetDestination() *v1.PoseInFrame { + if x != nil { + return x.Destination + } + return nil +} + +func (x *MoveRequest) GetComponentName() *v1.ResourceName { + if x != nil { + return x.ComponentName + } + return nil +} + +func (x *MoveRequest) GetWorldState() *v1.WorldState { + if x != nil { + return x.WorldState + } + return nil +} + +func (x *MoveRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type MoveResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *MoveResponse) Reset() { + *x = MoveResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_motion_v1_motion_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveResponse) ProtoMessage() {} + +func (x *MoveResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_motion_v1_motion_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveResponse.ProtoReflect.Descriptor instead. +func (*MoveResponse) Descriptor() ([]byte, []int) { + return file_service_motion_v1_motion_proto_rawDescGZIP(), []int{1} +} + +func (x *MoveResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type MoveSingleComponentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Destination *v1.PoseInFrame `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + ComponentName *v1.ResourceName `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"` + WorldState *v1.WorldState `protobuf:"bytes,4,opt,name=world_state,json=worldState,proto3,oneof" json:"world_state,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *MoveSingleComponentRequest) Reset() { + *x = MoveSingleComponentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_motion_v1_motion_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveSingleComponentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveSingleComponentRequest) ProtoMessage() {} + +func (x *MoveSingleComponentRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_motion_v1_motion_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveSingleComponentRequest.ProtoReflect.Descriptor instead. +func (*MoveSingleComponentRequest) Descriptor() ([]byte, []int) { + return file_service_motion_v1_motion_proto_rawDescGZIP(), []int{2} +} + +func (x *MoveSingleComponentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MoveSingleComponentRequest) GetDestination() *v1.PoseInFrame { + if x != nil { + return x.Destination + } + return nil +} + +func (x *MoveSingleComponentRequest) GetComponentName() *v1.ResourceName { + if x != nil { + return x.ComponentName + } + return nil +} + +func (x *MoveSingleComponentRequest) GetWorldState() *v1.WorldState { + if x != nil { + return x.WorldState + } + return nil +} + +func (x *MoveSingleComponentRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type MoveSingleComponentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *MoveSingleComponentResponse) Reset() { + *x = MoveSingleComponentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_motion_v1_motion_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveSingleComponentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveSingleComponentResponse) ProtoMessage() {} + +func (x *MoveSingleComponentResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_motion_v1_motion_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveSingleComponentResponse.ProtoReflect.Descriptor instead. +func (*MoveSingleComponentResponse) Descriptor() ([]byte, []int) { + return file_service_motion_v1_motion_proto_rawDescGZIP(), []int{3} +} + +func (x *MoveSingleComponentResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type GetPoseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // the component whose pose is being requested + ComponentName *v1.ResourceName `protobuf:"bytes,2,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"` + // the reference frame in which the component's pose + // should be provided, if unset this defaults + // to the "world" reference frame + DestinationFrame string `protobuf:"bytes,3,opt,name=destination_frame,json=destinationFrame,proto3" json:"destination_frame,omitempty"` + // pose information on any additional reference frames that are needed + // to compute the component's pose + SupplementalTransforms []*v1.Transform `protobuf:"bytes,4,rep,name=supplemental_transforms,json=supplementalTransforms,proto3" json:"supplemental_transforms,omitempty"` + // Additional arguments to the method + Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *GetPoseRequest) Reset() { + *x = GetPoseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_motion_v1_motion_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPoseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPoseRequest) ProtoMessage() {} + +func (x *GetPoseRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_motion_v1_motion_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPoseRequest.ProtoReflect.Descriptor instead. +func (*GetPoseRequest) Descriptor() ([]byte, []int) { + return file_service_motion_v1_motion_proto_rawDescGZIP(), []int{4} +} + +func (x *GetPoseRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetPoseRequest) GetComponentName() *v1.ResourceName { + if x != nil { + return x.ComponentName + } + return nil +} + +func (x *GetPoseRequest) GetDestinationFrame() string { + if x != nil { + return x.DestinationFrame + } + return "" +} + +func (x *GetPoseRequest) GetSupplementalTransforms() []*v1.Transform { + if x != nil { + return x.SupplementalTransforms + } + return nil +} + +func (x *GetPoseRequest) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type GetPoseResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pose *v1.PoseInFrame `protobuf:"bytes,1,opt,name=pose,proto3" json:"pose,omitempty"` +} + +func (x *GetPoseResponse) Reset() { + *x = GetPoseResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_motion_v1_motion_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPoseResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPoseResponse) ProtoMessage() {} + +func (x *GetPoseResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_motion_v1_motion_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPoseResponse.ProtoReflect.Descriptor instead. +func (*GetPoseResponse) Descriptor() ([]byte, []int) { + return file_service_motion_v1_motion_proto_rawDescGZIP(), []int{5} +} + +func (x *GetPoseResponse) GetPose() *v1.PoseInFrame { + if x != nil { + return x.Pose + } + return nil +} + +var File_service_motion_v1_motion_proto protoreflect.FileDescriptor + +var file_service_motion_v1_motion_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x16, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x02, 0x0a, + 0x0b, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x3d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, 0x72, 0x61, + 0x6d, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x43, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, + 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, + 0xb5, 0x02, 0x0a, 0x1a, 0x4d, 0x6f, 0x76, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x43, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, + 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6c, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x77, 0x6f, 0x72, 0x6c, + 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x37, 0x0a, 0x1b, 0x4d, 0x6f, 0x76, 0x65, 0x53, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x22, 0x99, 0x02, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0d, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x17, 0x73, 0x75, 0x70, + 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x16, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x12, 0x2d, 0x0a, + 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x63, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x42, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x65, + 0x32, 0xdc, 0x03, 0x0a, 0x0d, 0x4d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 0x12, 0x23, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27, + 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0xb7, 0x01, 0x0a, 0x13, 0x4d, 0x6f, 0x76, 0x65, + 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, + 0x32, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, + 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x53, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x76, + 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, + 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, + 0x76, 0x65, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x12, 0x26, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x65, 0x42, + 0x3f, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x21, 0x67, + 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_motion_v1_motion_proto_rawDescOnce sync.Once + file_service_motion_v1_motion_proto_rawDescData = file_service_motion_v1_motion_proto_rawDesc +) + +func file_service_motion_v1_motion_proto_rawDescGZIP() []byte { + file_service_motion_v1_motion_proto_rawDescOnce.Do(func() { + file_service_motion_v1_motion_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_motion_v1_motion_proto_rawDescData) + }) + return file_service_motion_v1_motion_proto_rawDescData +} + +var file_service_motion_v1_motion_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_service_motion_v1_motion_proto_goTypes = []interface{}{ + (*MoveRequest)(nil), // 0: viam.service.motion.v1.MoveRequest + (*MoveResponse)(nil), // 1: viam.service.motion.v1.MoveResponse + (*MoveSingleComponentRequest)(nil), // 2: viam.service.motion.v1.MoveSingleComponentRequest + (*MoveSingleComponentResponse)(nil), // 3: viam.service.motion.v1.MoveSingleComponentResponse + (*GetPoseRequest)(nil), // 4: viam.service.motion.v1.GetPoseRequest + (*GetPoseResponse)(nil), // 5: viam.service.motion.v1.GetPoseResponse + (*v1.PoseInFrame)(nil), // 6: viam.common.v1.PoseInFrame + (*v1.ResourceName)(nil), // 7: viam.common.v1.ResourceName + (*v1.WorldState)(nil), // 8: viam.common.v1.WorldState + (*structpb.Struct)(nil), // 9: google.protobuf.Struct + (*v1.Transform)(nil), // 10: viam.common.v1.Transform +} +var file_service_motion_v1_motion_proto_depIdxs = []int32{ + 6, // 0: viam.service.motion.v1.MoveRequest.destination:type_name -> viam.common.v1.PoseInFrame + 7, // 1: viam.service.motion.v1.MoveRequest.component_name:type_name -> viam.common.v1.ResourceName + 8, // 2: viam.service.motion.v1.MoveRequest.world_state:type_name -> viam.common.v1.WorldState + 9, // 3: viam.service.motion.v1.MoveRequest.extra:type_name -> google.protobuf.Struct + 6, // 4: viam.service.motion.v1.MoveSingleComponentRequest.destination:type_name -> viam.common.v1.PoseInFrame + 7, // 5: viam.service.motion.v1.MoveSingleComponentRequest.component_name:type_name -> viam.common.v1.ResourceName + 8, // 6: viam.service.motion.v1.MoveSingleComponentRequest.world_state:type_name -> viam.common.v1.WorldState + 9, // 7: viam.service.motion.v1.MoveSingleComponentRequest.extra:type_name -> google.protobuf.Struct + 7, // 8: viam.service.motion.v1.GetPoseRequest.component_name:type_name -> viam.common.v1.ResourceName + 10, // 9: viam.service.motion.v1.GetPoseRequest.supplemental_transforms:type_name -> viam.common.v1.Transform + 9, // 10: viam.service.motion.v1.GetPoseRequest.extra:type_name -> google.protobuf.Struct + 6, // 11: viam.service.motion.v1.GetPoseResponse.pose:type_name -> viam.common.v1.PoseInFrame + 0, // 12: viam.service.motion.v1.MotionService.Move:input_type -> viam.service.motion.v1.MoveRequest + 2, // 13: viam.service.motion.v1.MotionService.MoveSingleComponent:input_type -> viam.service.motion.v1.MoveSingleComponentRequest + 4, // 14: viam.service.motion.v1.MotionService.GetPose:input_type -> viam.service.motion.v1.GetPoseRequest + 1, // 15: viam.service.motion.v1.MotionService.Move:output_type -> viam.service.motion.v1.MoveResponse + 3, // 16: viam.service.motion.v1.MotionService.MoveSingleComponent:output_type -> viam.service.motion.v1.MoveSingleComponentResponse + 5, // 17: viam.service.motion.v1.MotionService.GetPose:output_type -> viam.service.motion.v1.GetPoseResponse + 15, // [15:18] is the sub-list for method output_type + 12, // [12:15] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_service_motion_v1_motion_proto_init() } +func file_service_motion_v1_motion_proto_init() { + if File_service_motion_v1_motion_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_motion_v1_motion_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_motion_v1_motion_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_motion_v1_motion_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveSingleComponentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_motion_v1_motion_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveSingleComponentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_motion_v1_motion_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPoseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_motion_v1_motion_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPoseResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_service_motion_v1_motion_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_service_motion_v1_motion_proto_msgTypes[2].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_motion_v1_motion_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_motion_v1_motion_proto_goTypes, + DependencyIndexes: file_service_motion_v1_motion_proto_depIdxs, + MessageInfos: file_service_motion_v1_motion_proto_msgTypes, + }.Build() + File_service_motion_v1_motion_proto = out.File + file_service_motion_v1_motion_proto_rawDesc = nil + file_service_motion_v1_motion_proto_goTypes = nil + file_service_motion_v1_motion_proto_depIdxs = nil +} diff --git a/service/motion/v1/motion.pb.gw.go b/service/motion/v1/motion.pb.gw.go new file mode 100644 index 000000000..e0ae49e14 --- /dev/null +++ b/service/motion/v1/motion.pb.gw.go @@ -0,0 +1,409 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: service/motion/v1/motion.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_MotionService_Move_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotionService_Move_0(ctx context.Context, marshaler runtime.Marshaler, client MotionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotionService_Move_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Move(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotionService_Move_0(ctx context.Context, marshaler runtime.Marshaler, server MotionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotionService_Move_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Move(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MotionService_MoveSingleComponent_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_MotionService_MoveSingleComponent_0(ctx context.Context, marshaler runtime.Marshaler, client MotionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveSingleComponentRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotionService_MoveSingleComponent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MoveSingleComponent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotionService_MoveSingleComponent_0(ctx context.Context, marshaler runtime.Marshaler, server MotionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MoveSingleComponentRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotionService_MoveSingleComponent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MoveSingleComponent(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_MotionService_GetPose_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_MotionService_GetPose_0(ctx context.Context, marshaler runtime.Marshaler, client MotionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPoseRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotionService_GetPose_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetPose(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MotionService_GetPose_0(ctx context.Context, marshaler runtime.Marshaler, server MotionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPoseRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MotionService_GetPose_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetPose(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMotionServiceHandlerServer registers the http handlers for service MotionService to "mux". +// UnaryRPC :call MotionServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMotionServiceHandlerFromEndpoint instead. +func RegisterMotionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MotionServiceServer) error { + + mux.Handle("POST", pattern_MotionService_Move_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.motion.v1.MotionService/Move", runtime.WithHTTPPathPattern("/viam/api/v1/service/motion/{name}/move")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotionService_Move_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotionService_Move_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MotionService_MoveSingleComponent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.motion.v1.MotionService/MoveSingleComponent", runtime.WithHTTPPathPattern("/viam/api/v1/service/motion/movesinglecomponent")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotionService_MoveSingleComponent_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotionService_MoveSingleComponent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MotionService_GetPose_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.motion.v1.MotionService/GetPose", runtime.WithHTTPPathPattern("/viam/api/v1/service/motion/{name}/pose")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MotionService_GetPose_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotionService_GetPose_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMotionServiceHandlerFromEndpoint is same as RegisterMotionServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMotionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMotionServiceHandler(ctx, mux, conn) +} + +// RegisterMotionServiceHandler registers the http handlers for service MotionService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMotionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMotionServiceHandlerClient(ctx, mux, NewMotionServiceClient(conn)) +} + +// RegisterMotionServiceHandlerClient registers the http handlers for service MotionService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MotionServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MotionServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MotionServiceClient" to call the correct interceptors. +func RegisterMotionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MotionServiceClient) error { + + mux.Handle("POST", pattern_MotionService_Move_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.motion.v1.MotionService/Move", runtime.WithHTTPPathPattern("/viam/api/v1/service/motion/{name}/move")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotionService_Move_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotionService_Move_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MotionService_MoveSingleComponent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.motion.v1.MotionService/MoveSingleComponent", runtime.WithHTTPPathPattern("/viam/api/v1/service/motion/movesinglecomponent")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotionService_MoveSingleComponent_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotionService_MoveSingleComponent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_MotionService_GetPose_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.motion.v1.MotionService/GetPose", runtime.WithHTTPPathPattern("/viam/api/v1/service/motion/{name}/pose")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MotionService_GetPose_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MotionService_GetPose_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_MotionService_Move_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "motion", "name", "move"}, "")) + + pattern_MotionService_MoveSingleComponent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"viam", "api", "v1", "service", "motion", "movesinglecomponent"}, "")) + + pattern_MotionService_GetPose_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "motion", "name", "pose"}, "")) +) + +var ( + forward_MotionService_Move_0 = runtime.ForwardResponseMessage + + forward_MotionService_MoveSingleComponent_0 = runtime.ForwardResponseMessage + + forward_MotionService_GetPose_0 = runtime.ForwardResponseMessage +) diff --git a/service/motion/v1/motion_grpc.pb.go b/service/motion/v1/motion_grpc.pb.go new file mode 100644 index 000000000..588fe2c18 --- /dev/null +++ b/service/motion/v1/motion_grpc.pb.go @@ -0,0 +1,173 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// MotionServiceClient is the client API for MotionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MotionServiceClient interface { + Move(ctx context.Context, in *MoveRequest, opts ...grpc.CallOption) (*MoveResponse, error) + MoveSingleComponent(ctx context.Context, in *MoveSingleComponentRequest, opts ...grpc.CallOption) (*MoveSingleComponentResponse, error) + GetPose(ctx context.Context, in *GetPoseRequest, opts ...grpc.CallOption) (*GetPoseResponse, error) +} + +type motionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMotionServiceClient(cc grpc.ClientConnInterface) MotionServiceClient { + return &motionServiceClient{cc} +} + +func (c *motionServiceClient) Move(ctx context.Context, in *MoveRequest, opts ...grpc.CallOption) (*MoveResponse, error) { + out := new(MoveResponse) + err := c.cc.Invoke(ctx, "/viam.service.motion.v1.MotionService/Move", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *motionServiceClient) MoveSingleComponent(ctx context.Context, in *MoveSingleComponentRequest, opts ...grpc.CallOption) (*MoveSingleComponentResponse, error) { + out := new(MoveSingleComponentResponse) + err := c.cc.Invoke(ctx, "/viam.service.motion.v1.MotionService/MoveSingleComponent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *motionServiceClient) GetPose(ctx context.Context, in *GetPoseRequest, opts ...grpc.CallOption) (*GetPoseResponse, error) { + out := new(GetPoseResponse) + err := c.cc.Invoke(ctx, "/viam.service.motion.v1.MotionService/GetPose", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MotionServiceServer is the server API for MotionService service. +// All implementations must embed UnimplementedMotionServiceServer +// for forward compatibility +type MotionServiceServer interface { + Move(context.Context, *MoveRequest) (*MoveResponse, error) + MoveSingleComponent(context.Context, *MoveSingleComponentRequest) (*MoveSingleComponentResponse, error) + GetPose(context.Context, *GetPoseRequest) (*GetPoseResponse, error) + mustEmbedUnimplementedMotionServiceServer() +} + +// UnimplementedMotionServiceServer must be embedded to have forward compatible implementations. +type UnimplementedMotionServiceServer struct { +} + +func (UnimplementedMotionServiceServer) Move(context.Context, *MoveRequest) (*MoveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Move not implemented") +} +func (UnimplementedMotionServiceServer) MoveSingleComponent(context.Context, *MoveSingleComponentRequest) (*MoveSingleComponentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveSingleComponent not implemented") +} +func (UnimplementedMotionServiceServer) GetPose(context.Context, *GetPoseRequest) (*GetPoseResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPose not implemented") +} +func (UnimplementedMotionServiceServer) mustEmbedUnimplementedMotionServiceServer() {} + +// UnsafeMotionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MotionServiceServer will +// result in compilation errors. +type UnsafeMotionServiceServer interface { + mustEmbedUnimplementedMotionServiceServer() +} + +func RegisterMotionServiceServer(s grpc.ServiceRegistrar, srv MotionServiceServer) { + s.RegisterService(&MotionService_ServiceDesc, srv) +} + +func _MotionService_Move_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotionServiceServer).Move(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.motion.v1.MotionService/Move", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotionServiceServer).Move(ctx, req.(*MoveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MotionService_MoveSingleComponent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveSingleComponentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotionServiceServer).MoveSingleComponent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.motion.v1.MotionService/MoveSingleComponent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotionServiceServer).MoveSingleComponent(ctx, req.(*MoveSingleComponentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MotionService_GetPose_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPoseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MotionServiceServer).GetPose(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.motion.v1.MotionService/GetPose", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MotionServiceServer).GetPose(ctx, req.(*GetPoseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MotionService_ServiceDesc is the grpc.ServiceDesc for MotionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MotionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.service.motion.v1.MotionService", + HandlerType: (*MotionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Move", + Handler: _MotionService_Move_Handler, + }, + { + MethodName: "MoveSingleComponent", + Handler: _MotionService_MoveSingleComponent_Handler, + }, + { + MethodName: "GetPose", + Handler: _MotionService_GetPose_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service/motion/v1/motion.proto", +} diff --git a/service/navigation/v1/navigation.pb.go b/service/navigation/v1/navigation.pb.go new file mode 100644 index 000000000..1f551bc55 --- /dev/null +++ b/service/navigation/v1/navigation.pb.go @@ -0,0 +1,1063 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: service/navigation/v1/navigation.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Mode int32 + +const ( + Mode_MODE_UNSPECIFIED Mode = 0 + Mode_MODE_MANUAL Mode = 1 + Mode_MODE_WAYPOINT Mode = 2 +) + +// Enum value maps for Mode. +var ( + Mode_name = map[int32]string{ + 0: "MODE_UNSPECIFIED", + 1: "MODE_MANUAL", + 2: "MODE_WAYPOINT", + } + Mode_value = map[string]int32{ + "MODE_UNSPECIFIED": 0, + "MODE_MANUAL": 1, + "MODE_WAYPOINT": 2, + } +) + +func (x Mode) Enum() *Mode { + p := new(Mode) + *p = x + return p +} + +func (x Mode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Mode) Descriptor() protoreflect.EnumDescriptor { + return file_service_navigation_v1_navigation_proto_enumTypes[0].Descriptor() +} + +func (Mode) Type() protoreflect.EnumType { + return &file_service_navigation_v1_navigation_proto_enumTypes[0] +} + +func (x Mode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Mode.Descriptor instead. +func (Mode) EnumDescriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{0} +} + +type GetModeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetModeRequest) Reset() { + *x = GetModeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetModeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetModeRequest) ProtoMessage() {} + +func (x *GetModeRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetModeRequest.ProtoReflect.Descriptor instead. +func (*GetModeRequest) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{0} +} + +func (x *GetModeRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetModeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mode Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=viam.service.navigation.v1.Mode" json:"mode,omitempty"` +} + +func (x *GetModeResponse) Reset() { + *x = GetModeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetModeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetModeResponse) ProtoMessage() {} + +func (x *GetModeResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetModeResponse.ProtoReflect.Descriptor instead. +func (*GetModeResponse) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{1} +} + +func (x *GetModeResponse) GetMode() Mode { + if x != nil { + return x.Mode + } + return Mode_MODE_UNSPECIFIED +} + +type SetModeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Mode Mode `protobuf:"varint,2,opt,name=mode,proto3,enum=viam.service.navigation.v1.Mode" json:"mode,omitempty"` +} + +func (x *SetModeRequest) Reset() { + *x = SetModeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetModeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetModeRequest) ProtoMessage() {} + +func (x *SetModeRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetModeRequest.ProtoReflect.Descriptor instead. +func (*SetModeRequest) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{2} +} + +func (x *SetModeRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetModeRequest) GetMode() Mode { + if x != nil { + return x.Mode + } + return Mode_MODE_UNSPECIFIED +} + +type SetModeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetModeResponse) Reset() { + *x = SetModeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetModeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetModeResponse) ProtoMessage() {} + +func (x *SetModeResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetModeResponse.ProtoReflect.Descriptor instead. +func (*SetModeResponse) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{3} +} + +type Waypoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Location *v1.GeoPoint `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *Waypoint) Reset() { + *x = Waypoint{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Waypoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Waypoint) ProtoMessage() {} + +func (x *Waypoint) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Waypoint.ProtoReflect.Descriptor instead. +func (*Waypoint) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{4} +} + +func (x *Waypoint) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Waypoint) GetLocation() *v1.GeoPoint { + if x != nil { + return x.Location + } + return nil +} + +type GetLocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetLocationRequest) Reset() { + *x = GetLocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLocationRequest) ProtoMessage() {} + +func (x *GetLocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLocationRequest.ProtoReflect.Descriptor instead. +func (*GetLocationRequest) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{5} +} + +func (x *GetLocationRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetLocationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Location *v1.GeoPoint `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *GetLocationResponse) Reset() { + *x = GetLocationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLocationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLocationResponse) ProtoMessage() {} + +func (x *GetLocationResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLocationResponse.ProtoReflect.Descriptor instead. +func (*GetLocationResponse) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{6} +} + +func (x *GetLocationResponse) GetLocation() *v1.GeoPoint { + if x != nil { + return x.Location + } + return nil +} + +type GetWaypointsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetWaypointsRequest) Reset() { + *x = GetWaypointsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWaypointsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWaypointsRequest) ProtoMessage() {} + +func (x *GetWaypointsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWaypointsRequest.ProtoReflect.Descriptor instead. +func (*GetWaypointsRequest) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{7} +} + +func (x *GetWaypointsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetWaypointsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Waypoints []*Waypoint `protobuf:"bytes,1,rep,name=waypoints,proto3" json:"waypoints,omitempty"` +} + +func (x *GetWaypointsResponse) Reset() { + *x = GetWaypointsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWaypointsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWaypointsResponse) ProtoMessage() {} + +func (x *GetWaypointsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWaypointsResponse.ProtoReflect.Descriptor instead. +func (*GetWaypointsResponse) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{8} +} + +func (x *GetWaypointsResponse) GetWaypoints() []*Waypoint { + if x != nil { + return x.Waypoints + } + return nil +} + +type AddWaypointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Location *v1.GeoPoint `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *AddWaypointRequest) Reset() { + *x = AddWaypointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddWaypointRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddWaypointRequest) ProtoMessage() {} + +func (x *AddWaypointRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddWaypointRequest.ProtoReflect.Descriptor instead. +func (*AddWaypointRequest) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{9} +} + +func (x *AddWaypointRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AddWaypointRequest) GetLocation() *v1.GeoPoint { + if x != nil { + return x.Location + } + return nil +} + +type AddWaypointResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AddWaypointResponse) Reset() { + *x = AddWaypointResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddWaypointResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddWaypointResponse) ProtoMessage() {} + +func (x *AddWaypointResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddWaypointResponse.ProtoReflect.Descriptor instead. +func (*AddWaypointResponse) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{10} +} + +type RemoveWaypointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *RemoveWaypointRequest) Reset() { + *x = RemoveWaypointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveWaypointRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveWaypointRequest) ProtoMessage() {} + +func (x *RemoveWaypointRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveWaypointRequest.ProtoReflect.Descriptor instead. +func (*RemoveWaypointRequest) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{11} +} + +func (x *RemoveWaypointRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RemoveWaypointRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type RemoveWaypointResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveWaypointResponse) Reset() { + *x = RemoveWaypointResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveWaypointResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveWaypointResponse) ProtoMessage() {} + +func (x *RemoveWaypointResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_navigation_v1_navigation_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveWaypointResponse.ProtoReflect.Descriptor instead. +func (*RemoveWaypointResponse) Descriptor() ([]byte, []int) { + return file_service_navigation_v1_navigation_proto_rawDescGZIP(), []int{12} +} + +var File_service_navigation_v1_navigation_proto protoreflect.FileDescriptor + +var file_service_navigation_v1_navigation_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x47, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x5a, 0x0a, 0x0e, 0x53, 0x65, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x34, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, + 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, + 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x0a, 0x08, 0x57, 0x61, 0x79, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6f, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x6f, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x29, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x14, + 0x47, 0x65, 0x74, 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x77, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x77, + 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x5e, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x57, + 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6f, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x57, + 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3b, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x40, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, + 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x41, 0x4e, + 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x57, 0x41, + 0x59, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x32, 0x83, 0x08, 0x0a, 0x11, 0x4e, 0x61, 0x76, + 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x97, + 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x76, 0x69, + 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2f, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x1a, 0x2b, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x76, 0x69, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x6f, + 0x64, 0x65, 0x12, 0xa7, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x69, + 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2f, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xab, 0x01, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, + 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, + 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, + 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, + 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x77, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0xa8, 0x01, 0x0a, 0x0b, 0x41, + 0x64, 0x64, 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2e, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x61, 0x79, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x61, 0x79, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x32, 0x22, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x77, 0x61, 0x79, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0xb6, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x57, 0x61, 0x79, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x57, + 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x2a, 0x35, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, + 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x77, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x47, + 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x5a, 0x25, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6e, 0x61, 0x76, 0x69, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_navigation_v1_navigation_proto_rawDescOnce sync.Once + file_service_navigation_v1_navigation_proto_rawDescData = file_service_navigation_v1_navigation_proto_rawDesc +) + +func file_service_navigation_v1_navigation_proto_rawDescGZIP() []byte { + file_service_navigation_v1_navigation_proto_rawDescOnce.Do(func() { + file_service_navigation_v1_navigation_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_navigation_v1_navigation_proto_rawDescData) + }) + return file_service_navigation_v1_navigation_proto_rawDescData +} + +var file_service_navigation_v1_navigation_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_service_navigation_v1_navigation_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_service_navigation_v1_navigation_proto_goTypes = []interface{}{ + (Mode)(0), // 0: viam.service.navigation.v1.Mode + (*GetModeRequest)(nil), // 1: viam.service.navigation.v1.GetModeRequest + (*GetModeResponse)(nil), // 2: viam.service.navigation.v1.GetModeResponse + (*SetModeRequest)(nil), // 3: viam.service.navigation.v1.SetModeRequest + (*SetModeResponse)(nil), // 4: viam.service.navigation.v1.SetModeResponse + (*Waypoint)(nil), // 5: viam.service.navigation.v1.Waypoint + (*GetLocationRequest)(nil), // 6: viam.service.navigation.v1.GetLocationRequest + (*GetLocationResponse)(nil), // 7: viam.service.navigation.v1.GetLocationResponse + (*GetWaypointsRequest)(nil), // 8: viam.service.navigation.v1.GetWaypointsRequest + (*GetWaypointsResponse)(nil), // 9: viam.service.navigation.v1.GetWaypointsResponse + (*AddWaypointRequest)(nil), // 10: viam.service.navigation.v1.AddWaypointRequest + (*AddWaypointResponse)(nil), // 11: viam.service.navigation.v1.AddWaypointResponse + (*RemoveWaypointRequest)(nil), // 12: viam.service.navigation.v1.RemoveWaypointRequest + (*RemoveWaypointResponse)(nil), // 13: viam.service.navigation.v1.RemoveWaypointResponse + (*v1.GeoPoint)(nil), // 14: viam.common.v1.GeoPoint +} +var file_service_navigation_v1_navigation_proto_depIdxs = []int32{ + 0, // 0: viam.service.navigation.v1.GetModeResponse.mode:type_name -> viam.service.navigation.v1.Mode + 0, // 1: viam.service.navigation.v1.SetModeRequest.mode:type_name -> viam.service.navigation.v1.Mode + 14, // 2: viam.service.navigation.v1.Waypoint.location:type_name -> viam.common.v1.GeoPoint + 14, // 3: viam.service.navigation.v1.GetLocationResponse.location:type_name -> viam.common.v1.GeoPoint + 5, // 4: viam.service.navigation.v1.GetWaypointsResponse.waypoints:type_name -> viam.service.navigation.v1.Waypoint + 14, // 5: viam.service.navigation.v1.AddWaypointRequest.location:type_name -> viam.common.v1.GeoPoint + 1, // 6: viam.service.navigation.v1.NavigationService.GetMode:input_type -> viam.service.navigation.v1.GetModeRequest + 3, // 7: viam.service.navigation.v1.NavigationService.SetMode:input_type -> viam.service.navigation.v1.SetModeRequest + 6, // 8: viam.service.navigation.v1.NavigationService.GetLocation:input_type -> viam.service.navigation.v1.GetLocationRequest + 8, // 9: viam.service.navigation.v1.NavigationService.GetWaypoints:input_type -> viam.service.navigation.v1.GetWaypointsRequest + 10, // 10: viam.service.navigation.v1.NavigationService.AddWaypoint:input_type -> viam.service.navigation.v1.AddWaypointRequest + 12, // 11: viam.service.navigation.v1.NavigationService.RemoveWaypoint:input_type -> viam.service.navigation.v1.RemoveWaypointRequest + 2, // 12: viam.service.navigation.v1.NavigationService.GetMode:output_type -> viam.service.navigation.v1.GetModeResponse + 4, // 13: viam.service.navigation.v1.NavigationService.SetMode:output_type -> viam.service.navigation.v1.SetModeResponse + 7, // 14: viam.service.navigation.v1.NavigationService.GetLocation:output_type -> viam.service.navigation.v1.GetLocationResponse + 9, // 15: viam.service.navigation.v1.NavigationService.GetWaypoints:output_type -> viam.service.navigation.v1.GetWaypointsResponse + 11, // 16: viam.service.navigation.v1.NavigationService.AddWaypoint:output_type -> viam.service.navigation.v1.AddWaypointResponse + 13, // 17: viam.service.navigation.v1.NavigationService.RemoveWaypoint:output_type -> viam.service.navigation.v1.RemoveWaypointResponse + 12, // [12:18] is the sub-list for method output_type + 6, // [6:12] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_service_navigation_v1_navigation_proto_init() } +func file_service_navigation_v1_navigation_proto_init() { + if File_service_navigation_v1_navigation_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_navigation_v1_navigation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetModeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetModeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetModeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetModeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Waypoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLocationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWaypointsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWaypointsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddWaypointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddWaypointResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveWaypointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_navigation_v1_navigation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveWaypointResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_navigation_v1_navigation_proto_rawDesc, + NumEnums: 1, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_navigation_v1_navigation_proto_goTypes, + DependencyIndexes: file_service_navigation_v1_navigation_proto_depIdxs, + EnumInfos: file_service_navigation_v1_navigation_proto_enumTypes, + MessageInfos: file_service_navigation_v1_navigation_proto_msgTypes, + }.Build() + File_service_navigation_v1_navigation_proto = out.File + file_service_navigation_v1_navigation_proto_rawDesc = nil + file_service_navigation_v1_navigation_proto_goTypes = nil + file_service_navigation_v1_navigation_proto_depIdxs = nil +} diff --git a/service/navigation/v1/navigation.pb.gw.go b/service/navigation/v1/navigation.pb.gw.go new file mode 100644 index 000000000..900e6c330 --- /dev/null +++ b/service/navigation/v1/navigation.pb.gw.go @@ -0,0 +1,748 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: service/navigation/v1/navigation.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_NavigationService_GetMode_0(ctx context.Context, marshaler runtime.Marshaler, client NavigationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetModeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetMode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NavigationService_GetMode_0(ctx context.Context, marshaler runtime.Marshaler, server NavigationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetModeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetMode(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_NavigationService_SetMode_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_NavigationService_SetMode_0(ctx context.Context, marshaler runtime.Marshaler, client NavigationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetModeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NavigationService_SetMode_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetMode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NavigationService_SetMode_0(ctx context.Context, marshaler runtime.Marshaler, server NavigationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetModeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NavigationService_SetMode_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetMode(ctx, &protoReq) + return msg, metadata, err + +} + +func request_NavigationService_GetLocation_0(ctx context.Context, marshaler runtime.Marshaler, client NavigationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLocationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NavigationService_GetLocation_0(ctx context.Context, marshaler runtime.Marshaler, server NavigationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLocationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetLocation(ctx, &protoReq) + return msg, metadata, err + +} + +func request_NavigationService_GetWaypoints_0(ctx context.Context, marshaler runtime.Marshaler, client NavigationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWaypointsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetWaypoints(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NavigationService_GetWaypoints_0(ctx context.Context, marshaler runtime.Marshaler, server NavigationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWaypointsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetWaypoints(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_NavigationService_AddWaypoint_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_NavigationService_AddWaypoint_0(ctx context.Context, marshaler runtime.Marshaler, client NavigationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddWaypointRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NavigationService_AddWaypoint_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddWaypoint(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NavigationService_AddWaypoint_0(ctx context.Context, marshaler runtime.Marshaler, server NavigationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddWaypointRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NavigationService_AddWaypoint_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddWaypoint(ctx, &protoReq) + return msg, metadata, err + +} + +func request_NavigationService_RemoveWaypoint_0(ctx context.Context, marshaler runtime.Marshaler, client NavigationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveWaypointRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.RemoveWaypoint(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NavigationService_RemoveWaypoint_0(ctx context.Context, marshaler runtime.Marshaler, server NavigationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveWaypointRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.RemoveWaypoint(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterNavigationServiceHandlerServer registers the http handlers for service NavigationService to "mux". +// UnaryRPC :call NavigationServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNavigationServiceHandlerFromEndpoint instead. +func RegisterNavigationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NavigationServiceServer) error { + + mux.Handle("GET", pattern_NavigationService_GetMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/GetMode", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/mode")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NavigationService_GetMode_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_GetMode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_NavigationService_SetMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/SetMode", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/mode")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NavigationService_SetMode_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_SetMode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NavigationService_GetLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/GetLocation", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/location")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NavigationService_GetLocation_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_GetLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NavigationService_GetWaypoints_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/GetWaypoints", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/waypoints")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NavigationService_GetWaypoints_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_GetWaypoints_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_NavigationService_AddWaypoint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/AddWaypoint", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/waypoints")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NavigationService_AddWaypoint_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_AddWaypoint_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_NavigationService_RemoveWaypoint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/RemoveWaypoint", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/waypoints/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NavigationService_RemoveWaypoint_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_RemoveWaypoint_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterNavigationServiceHandlerFromEndpoint is same as RegisterNavigationServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterNavigationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterNavigationServiceHandler(ctx, mux, conn) +} + +// RegisterNavigationServiceHandler registers the http handlers for service NavigationService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterNavigationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterNavigationServiceHandlerClient(ctx, mux, NewNavigationServiceClient(conn)) +} + +// RegisterNavigationServiceHandlerClient registers the http handlers for service NavigationService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NavigationServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NavigationServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "NavigationServiceClient" to call the correct interceptors. +func RegisterNavigationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NavigationServiceClient) error { + + mux.Handle("GET", pattern_NavigationService_GetMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/GetMode", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/mode")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NavigationService_GetMode_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_GetMode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_NavigationService_SetMode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/SetMode", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/mode")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NavigationService_SetMode_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_SetMode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NavigationService_GetLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/GetLocation", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/location")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NavigationService_GetLocation_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_GetLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NavigationService_GetWaypoints_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/GetWaypoints", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/waypoints")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NavigationService_GetWaypoints_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_GetWaypoints_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_NavigationService_AddWaypoint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/AddWaypoint", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/waypoints")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NavigationService_AddWaypoint_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_AddWaypoint_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_NavigationService_RemoveWaypoint_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.navigation.v1.NavigationService/RemoveWaypoint", runtime.WithHTTPPathPattern("/viam/api/v1/service/navigation/{name}/waypoints/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NavigationService_RemoveWaypoint_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NavigationService_RemoveWaypoint_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_NavigationService_GetMode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "navigation", "name", "mode"}, "")) + + pattern_NavigationService_SetMode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "navigation", "name", "mode"}, "")) + + pattern_NavigationService_GetLocation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "navigation", "name", "location"}, "")) + + pattern_NavigationService_GetWaypoints_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "navigation", "name", "waypoints"}, "")) + + pattern_NavigationService_AddWaypoint_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "navigation", "name", "waypoints"}, "")) + + pattern_NavigationService_RemoveWaypoint_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"viam", "api", "v1", "service", "navigation", "name", "waypoints", "id"}, "")) +) + +var ( + forward_NavigationService_GetMode_0 = runtime.ForwardResponseMessage + + forward_NavigationService_SetMode_0 = runtime.ForwardResponseMessage + + forward_NavigationService_GetLocation_0 = runtime.ForwardResponseMessage + + forward_NavigationService_GetWaypoints_0 = runtime.ForwardResponseMessage + + forward_NavigationService_AddWaypoint_0 = runtime.ForwardResponseMessage + + forward_NavigationService_RemoveWaypoint_0 = runtime.ForwardResponseMessage +) diff --git a/service/navigation/v1/navigation_grpc.pb.go b/service/navigation/v1/navigation_grpc.pb.go new file mode 100644 index 000000000..f96b6eb0c --- /dev/null +++ b/service/navigation/v1/navigation_grpc.pb.go @@ -0,0 +1,281 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// NavigationServiceClient is the client API for NavigationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NavigationServiceClient interface { + GetMode(ctx context.Context, in *GetModeRequest, opts ...grpc.CallOption) (*GetModeResponse, error) + SetMode(ctx context.Context, in *SetModeRequest, opts ...grpc.CallOption) (*SetModeResponse, error) + GetLocation(ctx context.Context, in *GetLocationRequest, opts ...grpc.CallOption) (*GetLocationResponse, error) + GetWaypoints(ctx context.Context, in *GetWaypointsRequest, opts ...grpc.CallOption) (*GetWaypointsResponse, error) + AddWaypoint(ctx context.Context, in *AddWaypointRequest, opts ...grpc.CallOption) (*AddWaypointResponse, error) + RemoveWaypoint(ctx context.Context, in *RemoveWaypointRequest, opts ...grpc.CallOption) (*RemoveWaypointResponse, error) +} + +type navigationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNavigationServiceClient(cc grpc.ClientConnInterface) NavigationServiceClient { + return &navigationServiceClient{cc} +} + +func (c *navigationServiceClient) GetMode(ctx context.Context, in *GetModeRequest, opts ...grpc.CallOption) (*GetModeResponse, error) { + out := new(GetModeResponse) + err := c.cc.Invoke(ctx, "/viam.service.navigation.v1.NavigationService/GetMode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *navigationServiceClient) SetMode(ctx context.Context, in *SetModeRequest, opts ...grpc.CallOption) (*SetModeResponse, error) { + out := new(SetModeResponse) + err := c.cc.Invoke(ctx, "/viam.service.navigation.v1.NavigationService/SetMode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *navigationServiceClient) GetLocation(ctx context.Context, in *GetLocationRequest, opts ...grpc.CallOption) (*GetLocationResponse, error) { + out := new(GetLocationResponse) + err := c.cc.Invoke(ctx, "/viam.service.navigation.v1.NavigationService/GetLocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *navigationServiceClient) GetWaypoints(ctx context.Context, in *GetWaypointsRequest, opts ...grpc.CallOption) (*GetWaypointsResponse, error) { + out := new(GetWaypointsResponse) + err := c.cc.Invoke(ctx, "/viam.service.navigation.v1.NavigationService/GetWaypoints", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *navigationServiceClient) AddWaypoint(ctx context.Context, in *AddWaypointRequest, opts ...grpc.CallOption) (*AddWaypointResponse, error) { + out := new(AddWaypointResponse) + err := c.cc.Invoke(ctx, "/viam.service.navigation.v1.NavigationService/AddWaypoint", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *navigationServiceClient) RemoveWaypoint(ctx context.Context, in *RemoveWaypointRequest, opts ...grpc.CallOption) (*RemoveWaypointResponse, error) { + out := new(RemoveWaypointResponse) + err := c.cc.Invoke(ctx, "/viam.service.navigation.v1.NavigationService/RemoveWaypoint", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NavigationServiceServer is the server API for NavigationService service. +// All implementations must embed UnimplementedNavigationServiceServer +// for forward compatibility +type NavigationServiceServer interface { + GetMode(context.Context, *GetModeRequest) (*GetModeResponse, error) + SetMode(context.Context, *SetModeRequest) (*SetModeResponse, error) + GetLocation(context.Context, *GetLocationRequest) (*GetLocationResponse, error) + GetWaypoints(context.Context, *GetWaypointsRequest) (*GetWaypointsResponse, error) + AddWaypoint(context.Context, *AddWaypointRequest) (*AddWaypointResponse, error) + RemoveWaypoint(context.Context, *RemoveWaypointRequest) (*RemoveWaypointResponse, error) + mustEmbedUnimplementedNavigationServiceServer() +} + +// UnimplementedNavigationServiceServer must be embedded to have forward compatible implementations. +type UnimplementedNavigationServiceServer struct { +} + +func (UnimplementedNavigationServiceServer) GetMode(context.Context, *GetModeRequest) (*GetModeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMode not implemented") +} +func (UnimplementedNavigationServiceServer) SetMode(context.Context, *SetModeRequest) (*SetModeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetMode not implemented") +} +func (UnimplementedNavigationServiceServer) GetLocation(context.Context, *GetLocationRequest) (*GetLocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLocation not implemented") +} +func (UnimplementedNavigationServiceServer) GetWaypoints(context.Context, *GetWaypointsRequest) (*GetWaypointsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWaypoints not implemented") +} +func (UnimplementedNavigationServiceServer) AddWaypoint(context.Context, *AddWaypointRequest) (*AddWaypointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddWaypoint not implemented") +} +func (UnimplementedNavigationServiceServer) RemoveWaypoint(context.Context, *RemoveWaypointRequest) (*RemoveWaypointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveWaypoint not implemented") +} +func (UnimplementedNavigationServiceServer) mustEmbedUnimplementedNavigationServiceServer() {} + +// UnsafeNavigationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NavigationServiceServer will +// result in compilation errors. +type UnsafeNavigationServiceServer interface { + mustEmbedUnimplementedNavigationServiceServer() +} + +func RegisterNavigationServiceServer(s grpc.ServiceRegistrar, srv NavigationServiceServer) { + s.RegisterService(&NavigationService_ServiceDesc, srv) +} + +func _NavigationService_GetMode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetModeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NavigationServiceServer).GetMode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.navigation.v1.NavigationService/GetMode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NavigationServiceServer).GetMode(ctx, req.(*GetModeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NavigationService_SetMode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetModeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NavigationServiceServer).SetMode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.navigation.v1.NavigationService/SetMode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NavigationServiceServer).SetMode(ctx, req.(*SetModeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NavigationService_GetLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NavigationServiceServer).GetLocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.navigation.v1.NavigationService/GetLocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NavigationServiceServer).GetLocation(ctx, req.(*GetLocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NavigationService_GetWaypoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWaypointsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NavigationServiceServer).GetWaypoints(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.navigation.v1.NavigationService/GetWaypoints", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NavigationServiceServer).GetWaypoints(ctx, req.(*GetWaypointsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NavigationService_AddWaypoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddWaypointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NavigationServiceServer).AddWaypoint(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.navigation.v1.NavigationService/AddWaypoint", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NavigationServiceServer).AddWaypoint(ctx, req.(*AddWaypointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NavigationService_RemoveWaypoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveWaypointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NavigationServiceServer).RemoveWaypoint(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.navigation.v1.NavigationService/RemoveWaypoint", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NavigationServiceServer).RemoveWaypoint(ctx, req.(*RemoveWaypointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NavigationService_ServiceDesc is the grpc.ServiceDesc for NavigationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NavigationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.service.navigation.v1.NavigationService", + HandlerType: (*NavigationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetMode", + Handler: _NavigationService_GetMode_Handler, + }, + { + MethodName: "SetMode", + Handler: _NavigationService_SetMode_Handler, + }, + { + MethodName: "GetLocation", + Handler: _NavigationService_GetLocation_Handler, + }, + { + MethodName: "GetWaypoints", + Handler: _NavigationService_GetWaypoints_Handler, + }, + { + MethodName: "AddWaypoint", + Handler: _NavigationService_AddWaypoint_Handler, + }, + { + MethodName: "RemoveWaypoint", + Handler: _NavigationService_RemoveWaypoint_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service/navigation/v1/navigation.proto", +} diff --git a/service/sensors/v1/sensors.pb.go b/service/sensors/v1/sensors.pb.go new file mode 100644 index 000000000..fc8088668 --- /dev/null +++ b/service/sensors/v1/sensors.pb.go @@ -0,0 +1,477 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: service/sensors/v1/sensors.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetSensorsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSensorsRequest) Reset() { + *x = GetSensorsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSensorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSensorsRequest) ProtoMessage() {} + +func (x *GetSensorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSensorsRequest.ProtoReflect.Descriptor instead. +func (*GetSensorsRequest) Descriptor() ([]byte, []int) { + return file_service_sensors_v1_sensors_proto_rawDescGZIP(), []int{0} +} + +func (x *GetSensorsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetSensorsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SensorNames []*v1.ResourceName `protobuf:"bytes,1,rep,name=sensor_names,json=sensorNames,proto3" json:"sensor_names,omitempty"` +} + +func (x *GetSensorsResponse) Reset() { + *x = GetSensorsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSensorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSensorsResponse) ProtoMessage() {} + +func (x *GetSensorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSensorsResponse.ProtoReflect.Descriptor instead. +func (*GetSensorsResponse) Descriptor() ([]byte, []int) { + return file_service_sensors_v1_sensors_proto_rawDescGZIP(), []int{1} +} + +func (x *GetSensorsResponse) GetSensorNames() []*v1.ResourceName { + if x != nil { + return x.SensorNames + } + return nil +} + +type GetReadingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + SensorNames []*v1.ResourceName `protobuf:"bytes,2,rep,name=sensor_names,json=sensorNames,proto3" json:"sensor_names,omitempty"` +} + +func (x *GetReadingsRequest) Reset() { + *x = GetReadingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReadingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReadingsRequest) ProtoMessage() {} + +func (x *GetReadingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReadingsRequest.ProtoReflect.Descriptor instead. +func (*GetReadingsRequest) Descriptor() ([]byte, []int) { + return file_service_sensors_v1_sensors_proto_rawDescGZIP(), []int{2} +} + +func (x *GetReadingsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetReadingsRequest) GetSensorNames() []*v1.ResourceName { + if x != nil { + return x.SensorNames + } + return nil +} + +type Readings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name *v1.ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Readings map[string]*structpb.Value `protobuf:"bytes,2,rep,name=readings,proto3" json:"readings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Readings) Reset() { + *x = Readings{} + if protoimpl.UnsafeEnabled { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Readings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Readings) ProtoMessage() {} + +func (x *Readings) ProtoReflect() protoreflect.Message { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Readings.ProtoReflect.Descriptor instead. +func (*Readings) Descriptor() ([]byte, []int) { + return file_service_sensors_v1_sensors_proto_rawDescGZIP(), []int{3} +} + +func (x *Readings) GetName() *v1.ResourceName { + if x != nil { + return x.Name + } + return nil +} + +func (x *Readings) GetReadings() map[string]*structpb.Value { + if x != nil { + return x.Readings + } + return nil +} + +type GetReadingsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Readings []*Readings `protobuf:"bytes,1,rep,name=readings,proto3" json:"readings,omitempty"` +} + +func (x *GetReadingsResponse) Reset() { + *x = GetReadingsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReadingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReadingsResponse) ProtoMessage() {} + +func (x *GetReadingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_sensors_v1_sensors_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReadingsResponse.ProtoReflect.Descriptor instead. +func (*GetReadingsResponse) Descriptor() ([]byte, []int) { + return file_service_sensors_v1_sensors_proto_rawDescGZIP(), []int{4} +} + +func (x *GetReadingsResponse) GetReadings() []*Readings { + if x != nil { + return x.Readings + } + return nil +} + +var File_service_sensors_v1_sensors_proto protoreflect.FileDescriptor + +var file_service_sensors_v1_sensors_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x17, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x27, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x55, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, + 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, + 0x69, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x65, 0x6e, + 0x73, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0b, 0x73, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xde, 0x01, 0x0a, 0x08, 0x52, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x08, 0x72, 0x65, 0x61, + 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, + 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x72, 0x65, + 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x53, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, + 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x54, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, + 0x73, 0x32, 0xc6, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x73, + 0x6f, 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, + 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x9e, 0x01, 0x0a, 0x0b, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, + 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x41, 0x0a, 0x1b, 0x63, 0x6f, + 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x5a, 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_sensors_v1_sensors_proto_rawDescOnce sync.Once + file_service_sensors_v1_sensors_proto_rawDescData = file_service_sensors_v1_sensors_proto_rawDesc +) + +func file_service_sensors_v1_sensors_proto_rawDescGZIP() []byte { + file_service_sensors_v1_sensors_proto_rawDescOnce.Do(func() { + file_service_sensors_v1_sensors_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_sensors_v1_sensors_proto_rawDescData) + }) + return file_service_sensors_v1_sensors_proto_rawDescData +} + +var file_service_sensors_v1_sensors_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_service_sensors_v1_sensors_proto_goTypes = []interface{}{ + (*GetSensorsRequest)(nil), // 0: viam.service.sensors.v1.GetSensorsRequest + (*GetSensorsResponse)(nil), // 1: viam.service.sensors.v1.GetSensorsResponse + (*GetReadingsRequest)(nil), // 2: viam.service.sensors.v1.GetReadingsRequest + (*Readings)(nil), // 3: viam.service.sensors.v1.Readings + (*GetReadingsResponse)(nil), // 4: viam.service.sensors.v1.GetReadingsResponse + nil, // 5: viam.service.sensors.v1.Readings.ReadingsEntry + (*v1.ResourceName)(nil), // 6: viam.common.v1.ResourceName + (*structpb.Value)(nil), // 7: google.protobuf.Value +} +var file_service_sensors_v1_sensors_proto_depIdxs = []int32{ + 6, // 0: viam.service.sensors.v1.GetSensorsResponse.sensor_names:type_name -> viam.common.v1.ResourceName + 6, // 1: viam.service.sensors.v1.GetReadingsRequest.sensor_names:type_name -> viam.common.v1.ResourceName + 6, // 2: viam.service.sensors.v1.Readings.name:type_name -> viam.common.v1.ResourceName + 5, // 3: viam.service.sensors.v1.Readings.readings:type_name -> viam.service.sensors.v1.Readings.ReadingsEntry + 3, // 4: viam.service.sensors.v1.GetReadingsResponse.readings:type_name -> viam.service.sensors.v1.Readings + 7, // 5: viam.service.sensors.v1.Readings.ReadingsEntry.value:type_name -> google.protobuf.Value + 0, // 6: viam.service.sensors.v1.SensorsService.GetSensors:input_type -> viam.service.sensors.v1.GetSensorsRequest + 2, // 7: viam.service.sensors.v1.SensorsService.GetReadings:input_type -> viam.service.sensors.v1.GetReadingsRequest + 1, // 8: viam.service.sensors.v1.SensorsService.GetSensors:output_type -> viam.service.sensors.v1.GetSensorsResponse + 4, // 9: viam.service.sensors.v1.SensorsService.GetReadings:output_type -> viam.service.sensors.v1.GetReadingsResponse + 8, // [8:10] is the sub-list for method output_type + 6, // [6:8] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_service_sensors_v1_sensors_proto_init() } +func file_service_sensors_v1_sensors_proto_init() { + if File_service_sensors_v1_sensors_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_sensors_v1_sensors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSensorsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_sensors_v1_sensors_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSensorsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_sensors_v1_sensors_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReadingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_sensors_v1_sensors_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Readings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_sensors_v1_sensors_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReadingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_sensors_v1_sensors_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_sensors_v1_sensors_proto_goTypes, + DependencyIndexes: file_service_sensors_v1_sensors_proto_depIdxs, + MessageInfos: file_service_sensors_v1_sensors_proto_msgTypes, + }.Build() + File_service_sensors_v1_sensors_proto = out.File + file_service_sensors_v1_sensors_proto_rawDesc = nil + file_service_sensors_v1_sensors_proto_goTypes = nil + file_service_sensors_v1_sensors_proto_depIdxs = nil +} diff --git a/service/sensors/v1/sensors.pb.gw.go b/service/sensors/v1/sensors.pb.gw.go new file mode 100644 index 000000000..305fef602 --- /dev/null +++ b/service/sensors/v1/sensors.pb.gw.go @@ -0,0 +1,306 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: service/sensors/v1/sensors.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_SensorsService_GetSensors_0(ctx context.Context, marshaler runtime.Marshaler, client SensorsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSensorsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetSensors(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SensorsService_GetSensors_0(ctx context.Context, marshaler runtime.Marshaler, server SensorsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSensorsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetSensors(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_SensorsService_GetReadings_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_SensorsService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, client SensorsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetReadingsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SensorsService_GetReadings_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetReadings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SensorsService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, server SensorsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetReadingsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SensorsService_GetReadings_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetReadings(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterSensorsServiceHandlerServer registers the http handlers for service SensorsService to "mux". +// UnaryRPC :call SensorsServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSensorsServiceHandlerFromEndpoint instead. +func RegisterSensorsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SensorsServiceServer) error { + + mux.Handle("GET", pattern_SensorsService_GetSensors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.sensors.v1.SensorsService/GetSensors", runtime.WithHTTPPathPattern("/viam/api/v1/service/{name}/sensors")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SensorsService_GetSensors_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorsService_GetSensors_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SensorsService_GetReadings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.sensors.v1.SensorsService/GetReadings", runtime.WithHTTPPathPattern("/viam/api/v1/service/sensors/{name}/readings")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SensorsService_GetReadings_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorsService_GetReadings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterSensorsServiceHandlerFromEndpoint is same as RegisterSensorsServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterSensorsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterSensorsServiceHandler(ctx, mux, conn) +} + +// RegisterSensorsServiceHandler registers the http handlers for service SensorsService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterSensorsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSensorsServiceHandlerClient(ctx, mux, NewSensorsServiceClient(conn)) +} + +// RegisterSensorsServiceHandlerClient registers the http handlers for service SensorsService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SensorsServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SensorsServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "SensorsServiceClient" to call the correct interceptors. +func RegisterSensorsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SensorsServiceClient) error { + + mux.Handle("GET", pattern_SensorsService_GetSensors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.sensors.v1.SensorsService/GetSensors", runtime.WithHTTPPathPattern("/viam/api/v1/service/{name}/sensors")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SensorsService_GetSensors_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorsService_GetSensors_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SensorsService_GetReadings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.sensors.v1.SensorsService/GetReadings", runtime.WithHTTPPathPattern("/viam/api/v1/service/sensors/{name}/readings")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SensorsService_GetReadings_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SensorsService_GetReadings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_SensorsService_GetSensors_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"viam", "api", "v1", "service", "name", "sensors"}, "")) + + pattern_SensorsService_GetReadings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "sensors", "name", "readings"}, "")) +) + +var ( + forward_SensorsService_GetSensors_0 = runtime.ForwardResponseMessage + + forward_SensorsService_GetReadings_0 = runtime.ForwardResponseMessage +) diff --git a/service/sensors/v1/sensors_grpc.pb.go b/service/sensors/v1/sensors_grpc.pb.go new file mode 100644 index 000000000..9eec3c02a --- /dev/null +++ b/service/sensors/v1/sensors_grpc.pb.go @@ -0,0 +1,141 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SensorsServiceClient is the client API for SensorsService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SensorsServiceClient interface { + // GetSensors returns the list of all sensors. + GetSensors(ctx context.Context, in *GetSensorsRequest, opts ...grpc.CallOption) (*GetSensorsResponse, error) + // GetReadings returns the list of readings for all sensors specified. + GetReadings(ctx context.Context, in *GetReadingsRequest, opts ...grpc.CallOption) (*GetReadingsResponse, error) +} + +type sensorsServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSensorsServiceClient(cc grpc.ClientConnInterface) SensorsServiceClient { + return &sensorsServiceClient{cc} +} + +func (c *sensorsServiceClient) GetSensors(ctx context.Context, in *GetSensorsRequest, opts ...grpc.CallOption) (*GetSensorsResponse, error) { + out := new(GetSensorsResponse) + err := c.cc.Invoke(ctx, "/viam.service.sensors.v1.SensorsService/GetSensors", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *sensorsServiceClient) GetReadings(ctx context.Context, in *GetReadingsRequest, opts ...grpc.CallOption) (*GetReadingsResponse, error) { + out := new(GetReadingsResponse) + err := c.cc.Invoke(ctx, "/viam.service.sensors.v1.SensorsService/GetReadings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SensorsServiceServer is the server API for SensorsService service. +// All implementations must embed UnimplementedSensorsServiceServer +// for forward compatibility +type SensorsServiceServer interface { + // GetSensors returns the list of all sensors. + GetSensors(context.Context, *GetSensorsRequest) (*GetSensorsResponse, error) + // GetReadings returns the list of readings for all sensors specified. + GetReadings(context.Context, *GetReadingsRequest) (*GetReadingsResponse, error) + mustEmbedUnimplementedSensorsServiceServer() +} + +// UnimplementedSensorsServiceServer must be embedded to have forward compatible implementations. +type UnimplementedSensorsServiceServer struct { +} + +func (UnimplementedSensorsServiceServer) GetSensors(context.Context, *GetSensorsRequest) (*GetSensorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSensors not implemented") +} +func (UnimplementedSensorsServiceServer) GetReadings(context.Context, *GetReadingsRequest) (*GetReadingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetReadings not implemented") +} +func (UnimplementedSensorsServiceServer) mustEmbedUnimplementedSensorsServiceServer() {} + +// UnsafeSensorsServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SensorsServiceServer will +// result in compilation errors. +type UnsafeSensorsServiceServer interface { + mustEmbedUnimplementedSensorsServiceServer() +} + +func RegisterSensorsServiceServer(s grpc.ServiceRegistrar, srv SensorsServiceServer) { + s.RegisterService(&SensorsService_ServiceDesc, srv) +} + +func _SensorsService_GetSensors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSensorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SensorsServiceServer).GetSensors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.sensors.v1.SensorsService/GetSensors", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SensorsServiceServer).GetSensors(ctx, req.(*GetSensorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SensorsService_GetReadings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReadingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SensorsServiceServer).GetReadings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.sensors.v1.SensorsService/GetReadings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SensorsServiceServer).GetReadings(ctx, req.(*GetReadingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SensorsService_ServiceDesc is the grpc.ServiceDesc for SensorsService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SensorsService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.service.sensors.v1.SensorsService", + HandlerType: (*SensorsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSensors", + Handler: _SensorsService_GetSensors_Handler, + }, + { + MethodName: "GetReadings", + Handler: _SensorsService_GetReadings_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service/sensors/v1/sensors.proto", +} diff --git a/service/shell/v1/shell.pb.go b/service/shell/v1/shell.pb.go new file mode 100644 index 000000000..7f0d5958f --- /dev/null +++ b/service/shell/v1/shell.pb.go @@ -0,0 +1,246 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: service/shell/v1/shell.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ShellRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + DataIn string `protobuf:"bytes,2,opt,name=data_in,json=dataIn,proto3" json:"data_in,omitempty"` +} + +func (x *ShellRequest) Reset() { + *x = ShellRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_shell_v1_shell_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShellRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShellRequest) ProtoMessage() {} + +func (x *ShellRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_shell_v1_shell_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ShellRequest.ProtoReflect.Descriptor instead. +func (*ShellRequest) Descriptor() ([]byte, []int) { + return file_service_shell_v1_shell_proto_rawDescGZIP(), []int{0} +} + +func (x *ShellRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ShellRequest) GetDataIn() string { + if x != nil { + return x.DataIn + } + return "" +} + +type ShellResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DataOut string `protobuf:"bytes,1,opt,name=data_out,json=dataOut,proto3" json:"data_out,omitempty"` + DataErr string `protobuf:"bytes,2,opt,name=data_err,json=dataErr,proto3" json:"data_err,omitempty"` + Eof bool `protobuf:"varint,3,opt,name=eof,proto3" json:"eof,omitempty"` +} + +func (x *ShellResponse) Reset() { + *x = ShellResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_shell_v1_shell_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShellResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShellResponse) ProtoMessage() {} + +func (x *ShellResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_shell_v1_shell_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ShellResponse.ProtoReflect.Descriptor instead. +func (*ShellResponse) Descriptor() ([]byte, []int) { + return file_service_shell_v1_shell_proto_rawDescGZIP(), []int{1} +} + +func (x *ShellResponse) GetDataOut() string { + if x != nil { + return x.DataOut + } + return "" +} + +func (x *ShellResponse) GetDataErr() string { + if x != nil { + return x.DataErr + } + return "" +} + +func (x *ShellResponse) GetEof() bool { + if x != nil { + return x.Eof + } + return false +} + +var File_service_shell_v1_shell_proto protoreflect.FileDescriptor + +var file_service_shell_v1_shell_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x68, 0x65, + 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x22, 0x3b, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x61, 0x74, 0x61, + 0x49, 0x6e, 0x22, 0x57, 0x0a, 0x0d, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x75, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x45, 0x72, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6f, 0x66, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x65, 0x6f, 0x66, 0x32, 0x66, 0x0a, 0x0c, 0x53, + 0x68, 0x65, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x05, 0x53, + 0x68, 0x65, 0x6c, 0x6c, 0x12, 0x23, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, + 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, + 0x01, 0x30, 0x01, 0x42, 0x3d, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2e, 0x76, 0x31, + 0x5a, 0x20, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_shell_v1_shell_proto_rawDescOnce sync.Once + file_service_shell_v1_shell_proto_rawDescData = file_service_shell_v1_shell_proto_rawDesc +) + +func file_service_shell_v1_shell_proto_rawDescGZIP() []byte { + file_service_shell_v1_shell_proto_rawDescOnce.Do(func() { + file_service_shell_v1_shell_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_shell_v1_shell_proto_rawDescData) + }) + return file_service_shell_v1_shell_proto_rawDescData +} + +var file_service_shell_v1_shell_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_service_shell_v1_shell_proto_goTypes = []interface{}{ + (*ShellRequest)(nil), // 0: viam.service.shell.v1.ShellRequest + (*ShellResponse)(nil), // 1: viam.service.shell.v1.ShellResponse +} +var file_service_shell_v1_shell_proto_depIdxs = []int32{ + 0, // 0: viam.service.shell.v1.ShellService.Shell:input_type -> viam.service.shell.v1.ShellRequest + 1, // 1: viam.service.shell.v1.ShellService.Shell:output_type -> viam.service.shell.v1.ShellResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_service_shell_v1_shell_proto_init() } +func file_service_shell_v1_shell_proto_init() { + if File_service_shell_v1_shell_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_shell_v1_shell_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShellRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_shell_v1_shell_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShellResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_shell_v1_shell_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_shell_v1_shell_proto_goTypes, + DependencyIndexes: file_service_shell_v1_shell_proto_depIdxs, + MessageInfos: file_service_shell_v1_shell_proto_msgTypes, + }.Build() + File_service_shell_v1_shell_proto = out.File + file_service_shell_v1_shell_proto_rawDesc = nil + file_service_shell_v1_shell_proto_goTypes = nil + file_service_shell_v1_shell_proto_depIdxs = nil +} diff --git a/service/shell/v1/shell.pb.gw.go b/service/shell/v1/shell.pb.gw.go new file mode 100644 index 000000000..0110be5c9 --- /dev/null +++ b/service/shell/v1/shell.pb.gw.go @@ -0,0 +1,161 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: service/shell/v1/shell.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_ShellService_Shell_0(ctx context.Context, marshaler runtime.Marshaler, client ShellServiceClient, req *http.Request, pathParams map[string]string) (ShellService_ShellClient, runtime.ServerMetadata, error) { + var metadata runtime.ServerMetadata + stream, err := client.Shell(ctx) + if err != nil { + grpclog.Infof("Failed to start streaming: %v", err) + return nil, metadata, err + } + dec := marshaler.NewDecoder(req.Body) + handleSend := func() error { + var protoReq ShellRequest + err := dec.Decode(&protoReq) + if err == io.EOF { + return err + } + if err != nil { + grpclog.Infof("Failed to decode request: %v", err) + return err + } + if err := stream.Send(&protoReq); err != nil { + grpclog.Infof("Failed to send request: %v", err) + return err + } + return nil + } + go func() { + for { + if err := handleSend(); err != nil { + break + } + } + if err := stream.CloseSend(); err != nil { + grpclog.Infof("Failed to terminate client stream: %v", err) + } + }() + header, err := stream.Header() + if err != nil { + grpclog.Infof("Failed to get header from client: %v", err) + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil +} + +// RegisterShellServiceHandlerServer registers the http handlers for service ShellService to "mux". +// UnaryRPC :call ShellServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterShellServiceHandlerFromEndpoint instead. +func RegisterShellServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShellServiceServer) error { + + mux.Handle("POST", pattern_ShellService_Shell_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + return nil +} + +// RegisterShellServiceHandlerFromEndpoint is same as RegisterShellServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterShellServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterShellServiceHandler(ctx, mux, conn) +} + +// RegisterShellServiceHandler registers the http handlers for service ShellService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterShellServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterShellServiceHandlerClient(ctx, mux, NewShellServiceClient(conn)) +} + +// RegisterShellServiceHandlerClient registers the http handlers for service ShellService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ShellServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ShellServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ShellServiceClient" to call the correct interceptors. +func RegisterShellServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShellServiceClient) error { + + mux.Handle("POST", pattern_ShellService_Shell_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.shell.v1.ShellService/Shell", runtime.WithHTTPPathPattern("/viam.service.shell.v1.ShellService/Shell")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ShellService_Shell_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ShellService_Shell_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ShellService_Shell_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"viam.service.shell.v1.ShellService", "Shell"}, "")) +) + +var ( + forward_ShellService_Shell_0 = runtime.ForwardResponseStream +) diff --git a/service/shell/v1/shell_grpc.pb.go b/service/shell/v1/shell_grpc.pb.go new file mode 100644 index 000000000..13e32a8e1 --- /dev/null +++ b/service/shell/v1/shell_grpc.pb.go @@ -0,0 +1,135 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// ShellServiceClient is the client API for ShellService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ShellServiceClient interface { + // Shell starts a shell with an input and output pipe. + Shell(ctx context.Context, opts ...grpc.CallOption) (ShellService_ShellClient, error) +} + +type shellServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewShellServiceClient(cc grpc.ClientConnInterface) ShellServiceClient { + return &shellServiceClient{cc} +} + +func (c *shellServiceClient) Shell(ctx context.Context, opts ...grpc.CallOption) (ShellService_ShellClient, error) { + stream, err := c.cc.NewStream(ctx, &ShellService_ServiceDesc.Streams[0], "/viam.service.shell.v1.ShellService/Shell", opts...) + if err != nil { + return nil, err + } + x := &shellServiceShellClient{stream} + return x, nil +} + +type ShellService_ShellClient interface { + Send(*ShellRequest) error + Recv() (*ShellResponse, error) + grpc.ClientStream +} + +type shellServiceShellClient struct { + grpc.ClientStream +} + +func (x *shellServiceShellClient) Send(m *ShellRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *shellServiceShellClient) Recv() (*ShellResponse, error) { + m := new(ShellResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// ShellServiceServer is the server API for ShellService service. +// All implementations must embed UnimplementedShellServiceServer +// for forward compatibility +type ShellServiceServer interface { + // Shell starts a shell with an input and output pipe. + Shell(ShellService_ShellServer) error + mustEmbedUnimplementedShellServiceServer() +} + +// UnimplementedShellServiceServer must be embedded to have forward compatible implementations. +type UnimplementedShellServiceServer struct { +} + +func (UnimplementedShellServiceServer) Shell(ShellService_ShellServer) error { + return status.Errorf(codes.Unimplemented, "method Shell not implemented") +} +func (UnimplementedShellServiceServer) mustEmbedUnimplementedShellServiceServer() {} + +// UnsafeShellServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ShellServiceServer will +// result in compilation errors. +type UnsafeShellServiceServer interface { + mustEmbedUnimplementedShellServiceServer() +} + +func RegisterShellServiceServer(s grpc.ServiceRegistrar, srv ShellServiceServer) { + s.RegisterService(&ShellService_ServiceDesc, srv) +} + +func _ShellService_Shell_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ShellServiceServer).Shell(&shellServiceShellServer{stream}) +} + +type ShellService_ShellServer interface { + Send(*ShellResponse) error + Recv() (*ShellRequest, error) + grpc.ServerStream +} + +type shellServiceShellServer struct { + grpc.ServerStream +} + +func (x *shellServiceShellServer) Send(m *ShellResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *shellServiceShellServer) Recv() (*ShellRequest, error) { + m := new(ShellRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// ShellService_ServiceDesc is the grpc.ServiceDesc for ShellService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ShellService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.service.shell.v1.ShellService", + HandlerType: (*ShellServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Shell", + Handler: _ShellService_Shell_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "service/shell/v1/shell.proto", +} diff --git a/service/slam/v1/slam.pb.go b/service/slam/v1/slam.pb.go new file mode 100644 index 000000000..06bfa048b --- /dev/null +++ b/service/slam/v1/slam.pb.go @@ -0,0 +1,468 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: service/slam/v1/slam.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetPositionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of slam service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPositionRequest) Reset() { + *x = GetPositionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_slam_v1_slam_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionRequest) ProtoMessage() {} + +func (x *GetPositionRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_slam_v1_slam_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionRequest.ProtoReflect.Descriptor instead. +func (*GetPositionRequest) Descriptor() ([]byte, []int) { + return file_service_slam_v1_slam_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPositionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetPositionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Current position of the robot within the World frame. + Pose *v1.PoseInFrame `protobuf:"bytes,1,opt,name=pose,proto3" json:"pose,omitempty"` +} + +func (x *GetPositionResponse) Reset() { + *x = GetPositionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_slam_v1_slam_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPositionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPositionResponse) ProtoMessage() {} + +func (x *GetPositionResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_slam_v1_slam_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPositionResponse.ProtoReflect.Descriptor instead. +func (*GetPositionResponse) Descriptor() ([]byte, []int) { + return file_service_slam_v1_slam_proto_rawDescGZIP(), []int{1} +} + +func (x *GetPositionResponse) GetPose() *v1.PoseInFrame { + if x != nil { + return x.Pose + } + return nil +} + +type GetMapRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of slam service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Requested MIME type of response (image/jpeg or image/pcd) + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // Optional parameter for image/jpeg mime_type, used to project point + // cloud into a 2D image. + CameraPosition *v1.Pose `protobuf:"bytes,3,opt,name=camera_position,json=cameraPosition,proto3,oneof" json:"camera_position,omitempty"` + // Optional parameter for image/jpeg mime_type, defaults to false. + // Tells us whether to include the robot position on the 2D image. + IncludeRobotMarker bool `protobuf:"varint,4,opt,name=include_robot_marker,json=includeRobotMarker,proto3" json:"include_robot_marker,omitempty"` +} + +func (x *GetMapRequest) Reset() { + *x = GetMapRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_slam_v1_slam_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMapRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMapRequest) ProtoMessage() {} + +func (x *GetMapRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_slam_v1_slam_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMapRequest.ProtoReflect.Descriptor instead. +func (*GetMapRequest) Descriptor() ([]byte, []int) { + return file_service_slam_v1_slam_proto_rawDescGZIP(), []int{2} +} + +func (x *GetMapRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetMapRequest) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *GetMapRequest) GetCameraPosition() *v1.Pose { + if x != nil { + return x.CameraPosition + } + return nil +} + +func (x *GetMapRequest) GetIncludeRobotMarker() bool { + if x != nil { + return x.IncludeRobotMarker + } + return false +} + +type GetMapResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Image or point cloud of mime_type. + // + // Types that are assignable to Map: + // *GetMapResponse_PointCloud + // *GetMapResponse_Image + Map isGetMapResponse_Map `protobuf_oneof:"map"` + // Actual MIME type of response (image/jpeg or image/pcd) + MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` +} + +func (x *GetMapResponse) Reset() { + *x = GetMapResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_slam_v1_slam_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMapResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMapResponse) ProtoMessage() {} + +func (x *GetMapResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_slam_v1_slam_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMapResponse.ProtoReflect.Descriptor instead. +func (*GetMapResponse) Descriptor() ([]byte, []int) { + return file_service_slam_v1_slam_proto_rawDescGZIP(), []int{3} +} + +func (m *GetMapResponse) GetMap() isGetMapResponse_Map { + if m != nil { + return m.Map + } + return nil +} + +func (x *GetMapResponse) GetPointCloud() *v1.PointCloudObject { + if x, ok := x.GetMap().(*GetMapResponse_PointCloud); ok { + return x.PointCloud + } + return nil +} + +func (x *GetMapResponse) GetImage() []byte { + if x, ok := x.GetMap().(*GetMapResponse_Image); ok { + return x.Image + } + return nil +} + +func (x *GetMapResponse) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +type isGetMapResponse_Map interface { + isGetMapResponse_Map() +} + +type GetMapResponse_PointCloud struct { + PointCloud *v1.PointCloudObject `protobuf:"bytes,1,opt,name=point_cloud,json=pointCloud,proto3,oneof"` +} + +type GetMapResponse_Image struct { + Image []byte `protobuf:"bytes,2,opt,name=image,proto3,oneof"` +} + +func (*GetMapResponse_PointCloud) isGetMapResponse_Map() {} + +func (*GetMapResponse_Image) isGetMapResponse_Map() {} + +var File_service_slam_v1_slam_proto protoreflect.FileDescriptor + +var file_service_slam_v1_slam_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x6c, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x6c, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x6c, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x70, 0x6f, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x65, 0x22, 0xca, 0x01, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a, + 0x0f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, + 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x6f, 0x62, + 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x52, 0x6f, 0x62, 0x6f, 0x74, 0x4d, 0x61, 0x72, + 0x6b, 0x65, 0x72, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x5f, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, + 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x12, + 0x16, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, + 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x32, 0xa9, 0x02, 0x0a, 0x0b, + 0x53, 0x4c, 0x41, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x6c, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x6c, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, + 0x6c, 0x61, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x81, 0x01, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x12, 0x23, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x6c, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x73, 0x6c, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x26, 0x12, 0x24, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x6c, 0x61, 0x6d, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x61, 0x70, 0x42, 0x3b, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x6c, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x5a, 0x1f, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x6c, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_slam_v1_slam_proto_rawDescOnce sync.Once + file_service_slam_v1_slam_proto_rawDescData = file_service_slam_v1_slam_proto_rawDesc +) + +func file_service_slam_v1_slam_proto_rawDescGZIP() []byte { + file_service_slam_v1_slam_proto_rawDescOnce.Do(func() { + file_service_slam_v1_slam_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_slam_v1_slam_proto_rawDescData) + }) + return file_service_slam_v1_slam_proto_rawDescData +} + +var file_service_slam_v1_slam_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_service_slam_v1_slam_proto_goTypes = []interface{}{ + (*GetPositionRequest)(nil), // 0: viam.service.slam.v1.GetPositionRequest + (*GetPositionResponse)(nil), // 1: viam.service.slam.v1.GetPositionResponse + (*GetMapRequest)(nil), // 2: viam.service.slam.v1.GetMapRequest + (*GetMapResponse)(nil), // 3: viam.service.slam.v1.GetMapResponse + (*v1.PoseInFrame)(nil), // 4: viam.common.v1.PoseInFrame + (*v1.Pose)(nil), // 5: viam.common.v1.Pose + (*v1.PointCloudObject)(nil), // 6: viam.common.v1.PointCloudObject +} +var file_service_slam_v1_slam_proto_depIdxs = []int32{ + 4, // 0: viam.service.slam.v1.GetPositionResponse.pose:type_name -> viam.common.v1.PoseInFrame + 5, // 1: viam.service.slam.v1.GetMapRequest.camera_position:type_name -> viam.common.v1.Pose + 6, // 2: viam.service.slam.v1.GetMapResponse.point_cloud:type_name -> viam.common.v1.PointCloudObject + 0, // 3: viam.service.slam.v1.SLAMService.GetPosition:input_type -> viam.service.slam.v1.GetPositionRequest + 2, // 4: viam.service.slam.v1.SLAMService.GetMap:input_type -> viam.service.slam.v1.GetMapRequest + 1, // 5: viam.service.slam.v1.SLAMService.GetPosition:output_type -> viam.service.slam.v1.GetPositionResponse + 3, // 6: viam.service.slam.v1.SLAMService.GetMap:output_type -> viam.service.slam.v1.GetMapResponse + 5, // [5:7] is the sub-list for method output_type + 3, // [3:5] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_service_slam_v1_slam_proto_init() } +func file_service_slam_v1_slam_proto_init() { + if File_service_slam_v1_slam_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_slam_v1_slam_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_slam_v1_slam_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPositionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_slam_v1_slam_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMapRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_slam_v1_slam_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMapResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_service_slam_v1_slam_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_service_slam_v1_slam_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*GetMapResponse_PointCloud)(nil), + (*GetMapResponse_Image)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_slam_v1_slam_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_slam_v1_slam_proto_goTypes, + DependencyIndexes: file_service_slam_v1_slam_proto_depIdxs, + MessageInfos: file_service_slam_v1_slam_proto_msgTypes, + }.Build() + File_service_slam_v1_slam_proto = out.File + file_service_slam_v1_slam_proto_rawDesc = nil + file_service_slam_v1_slam_proto_goTypes = nil + file_service_slam_v1_slam_proto_depIdxs = nil +} diff --git a/service/slam/v1/slam.pb.gw.go b/service/slam/v1/slam.pb.gw.go new file mode 100644 index 000000000..76013905e --- /dev/null +++ b/service/slam/v1/slam.pb.gw.go @@ -0,0 +1,306 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: service/slam/v1/slam.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_SLAMService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, client SLAMServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetPosition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SLAMService_GetPosition_0(ctx context.Context, marshaler runtime.Marshaler, server SLAMServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPositionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetPosition(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_SLAMService_GetMap_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_SLAMService_GetMap_0(ctx context.Context, marshaler runtime.Marshaler, client SLAMServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetMapRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SLAMService_GetMap_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetMap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SLAMService_GetMap_0(ctx context.Context, marshaler runtime.Marshaler, server SLAMServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetMapRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SLAMService_GetMap_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetMap(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterSLAMServiceHandlerServer registers the http handlers for service SLAMService to "mux". +// UnaryRPC :call SLAMServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSLAMServiceHandlerFromEndpoint instead. +func RegisterSLAMServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SLAMServiceServer) error { + + mux.Handle("GET", pattern_SLAMService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.slam.v1.SLAMService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/service/slam/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SLAMService_GetPosition_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SLAMService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SLAMService_GetMap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.slam.v1.SLAMService/GetMap", runtime.WithHTTPPathPattern("/viam/api/v1/service/slam/{name}/map")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SLAMService_GetMap_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SLAMService_GetMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterSLAMServiceHandlerFromEndpoint is same as RegisterSLAMServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterSLAMServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterSLAMServiceHandler(ctx, mux, conn) +} + +// RegisterSLAMServiceHandler registers the http handlers for service SLAMService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterSLAMServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSLAMServiceHandlerClient(ctx, mux, NewSLAMServiceClient(conn)) +} + +// RegisterSLAMServiceHandlerClient registers the http handlers for service SLAMService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SLAMServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SLAMServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "SLAMServiceClient" to call the correct interceptors. +func RegisterSLAMServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SLAMServiceClient) error { + + mux.Handle("GET", pattern_SLAMService_GetPosition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.slam.v1.SLAMService/GetPosition", runtime.WithHTTPPathPattern("/viam/api/v1/service/slam/{name}/position")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SLAMService_GetPosition_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SLAMService_GetPosition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SLAMService_GetMap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.slam.v1.SLAMService/GetMap", runtime.WithHTTPPathPattern("/viam/api/v1/service/slam/{name}/map")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SLAMService_GetMap_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SLAMService_GetMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_SLAMService_GetPosition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "slam", "name", "position"}, "")) + + pattern_SLAMService_GetMap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "slam", "name", "map"}, "")) +) + +var ( + forward_SLAMService_GetPosition_0 = runtime.ForwardResponseMessage + + forward_SLAMService_GetMap_0 = runtime.ForwardResponseMessage +) diff --git a/service/slam/v1/slam_grpc.pb.go b/service/slam/v1/slam_grpc.pb.go new file mode 100644 index 000000000..fabbcb621 --- /dev/null +++ b/service/slam/v1/slam_grpc.pb.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SLAMServiceClient is the client API for SLAMService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SLAMServiceClient interface { + // GetPosition returns the current estimated position of the robot with + // respect to the "origin" of the map. + GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) + // GetMap returns the latest map image or point cloud generated by the + // SLAM library + GetMap(ctx context.Context, in *GetMapRequest, opts ...grpc.CallOption) (*GetMapResponse, error) +} + +type sLAMServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSLAMServiceClient(cc grpc.ClientConnInterface) SLAMServiceClient { + return &sLAMServiceClient{cc} +} + +func (c *sLAMServiceClient) GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error) { + out := new(GetPositionResponse) + err := c.cc.Invoke(ctx, "/viam.service.slam.v1.SLAMService/GetPosition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *sLAMServiceClient) GetMap(ctx context.Context, in *GetMapRequest, opts ...grpc.CallOption) (*GetMapResponse, error) { + out := new(GetMapResponse) + err := c.cc.Invoke(ctx, "/viam.service.slam.v1.SLAMService/GetMap", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SLAMServiceServer is the server API for SLAMService service. +// All implementations must embed UnimplementedSLAMServiceServer +// for forward compatibility +type SLAMServiceServer interface { + // GetPosition returns the current estimated position of the robot with + // respect to the "origin" of the map. + GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) + // GetMap returns the latest map image or point cloud generated by the + // SLAM library + GetMap(context.Context, *GetMapRequest) (*GetMapResponse, error) + mustEmbedUnimplementedSLAMServiceServer() +} + +// UnimplementedSLAMServiceServer must be embedded to have forward compatible implementations. +type UnimplementedSLAMServiceServer struct { +} + +func (UnimplementedSLAMServiceServer) GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPosition not implemented") +} +func (UnimplementedSLAMServiceServer) GetMap(context.Context, *GetMapRequest) (*GetMapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMap not implemented") +} +func (UnimplementedSLAMServiceServer) mustEmbedUnimplementedSLAMServiceServer() {} + +// UnsafeSLAMServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SLAMServiceServer will +// result in compilation errors. +type UnsafeSLAMServiceServer interface { + mustEmbedUnimplementedSLAMServiceServer() +} + +func RegisterSLAMServiceServer(s grpc.ServiceRegistrar, srv SLAMServiceServer) { + s.RegisterService(&SLAMService_ServiceDesc, srv) +} + +func _SLAMService_GetPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPositionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SLAMServiceServer).GetPosition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.slam.v1.SLAMService/GetPosition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SLAMServiceServer).GetPosition(ctx, req.(*GetPositionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SLAMService_GetMap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMapRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SLAMServiceServer).GetMap(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.slam.v1.SLAMService/GetMap", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SLAMServiceServer).GetMap(ctx, req.(*GetMapRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SLAMService_ServiceDesc is the grpc.ServiceDesc for SLAMService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SLAMService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.service.slam.v1.SLAMService", + HandlerType: (*SLAMServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPosition", + Handler: _SLAMService_GetPosition_Handler, + }, + { + MethodName: "GetMap", + Handler: _SLAMService_GetMap_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service/slam/v1/slam.proto", +} diff --git a/service/vision/v1/vision.pb.go b/service/vision/v1/vision.pb.go new file mode 100644 index 000000000..34e2de5a4 --- /dev/null +++ b/service/vision/v1/vision.pb.go @@ -0,0 +1,2740 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: service/vision/v1/vision.proto + +package v1 + +import ( + v1 "go.viam.com/api/common/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetModelParameterSchemaRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // name of the type of vision model + ModelType string `protobuf:"bytes,2,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` +} + +func (x *GetModelParameterSchemaRequest) Reset() { + *x = GetModelParameterSchemaRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetModelParameterSchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetModelParameterSchemaRequest) ProtoMessage() {} + +func (x *GetModelParameterSchemaRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetModelParameterSchemaRequest.ProtoReflect.Descriptor instead. +func (*GetModelParameterSchemaRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{0} +} + +func (x *GetModelParameterSchemaRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetModelParameterSchemaRequest) GetModelType() string { + if x != nil { + return x.ModelType + } + return "" +} + +type GetModelParameterSchemaResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the parameters as JSON bytes of a jsonschema.Schema + ModelParameterSchema []byte `protobuf:"bytes,1,opt,name=model_parameter_schema,json=modelParameterSchema,proto3" json:"model_parameter_schema,omitempty"` +} + +func (x *GetModelParameterSchemaResponse) Reset() { + *x = GetModelParameterSchemaResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetModelParameterSchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetModelParameterSchemaResponse) ProtoMessage() {} + +func (x *GetModelParameterSchemaResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetModelParameterSchemaResponse.ProtoReflect.Descriptor instead. +func (*GetModelParameterSchemaResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{1} +} + +func (x *GetModelParameterSchemaResponse) GetModelParameterSchema() []byte { + if x != nil { + return x.ModelParameterSchema + } + return nil +} + +type GetDetectorNamesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDetectorNamesRequest) Reset() { + *x = GetDetectorNamesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDetectorNamesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDetectorNamesRequest) ProtoMessage() {} + +func (x *GetDetectorNamesRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDetectorNamesRequest.ProtoReflect.Descriptor instead. +func (*GetDetectorNamesRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{2} +} + +func (x *GetDetectorNamesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetDetectorNamesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // detectors in the registry + DetectorNames []string `protobuf:"bytes,1,rep,name=detector_names,json=detectorNames,proto3" json:"detector_names,omitempty"` +} + +func (x *GetDetectorNamesResponse) Reset() { + *x = GetDetectorNamesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDetectorNamesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDetectorNamesResponse) ProtoMessage() {} + +func (x *GetDetectorNamesResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDetectorNamesResponse.ProtoReflect.Descriptor instead. +func (*GetDetectorNamesResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{3} +} + +func (x *GetDetectorNamesResponse) GetDetectorNames() []string { + if x != nil { + return x.DetectorNames + } + return nil +} + +type AddDetectorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + DetectorName string `protobuf:"bytes,2,opt,name=detector_name,json=detectorName,proto3" json:"detector_name,omitempty"` + DetectorModelType string `protobuf:"bytes,3,opt,name=detector_model_type,json=detectorModelType,proto3" json:"detector_model_type,omitempty"` + DetectorParameters *structpb.Struct `protobuf:"bytes,4,opt,name=detector_parameters,json=detectorParameters,proto3" json:"detector_parameters,omitempty"` +} + +func (x *AddDetectorRequest) Reset() { + *x = AddDetectorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddDetectorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddDetectorRequest) ProtoMessage() {} + +func (x *AddDetectorRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddDetectorRequest.ProtoReflect.Descriptor instead. +func (*AddDetectorRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{4} +} + +func (x *AddDetectorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AddDetectorRequest) GetDetectorName() string { + if x != nil { + return x.DetectorName + } + return "" +} + +func (x *AddDetectorRequest) GetDetectorModelType() string { + if x != nil { + return x.DetectorModelType + } + return "" +} + +func (x *AddDetectorRequest) GetDetectorParameters() *structpb.Struct { + if x != nil { + return x.DetectorParameters + } + return nil +} + +type AddDetectorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AddDetectorResponse) Reset() { + *x = AddDetectorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddDetectorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddDetectorResponse) ProtoMessage() {} + +func (x *AddDetectorResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddDetectorResponse.ProtoReflect.Descriptor instead. +func (*AddDetectorResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{5} +} + +type RemoveDetectorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // name of detector in registry + DetectorName string `protobuf:"bytes,2,opt,name=detector_name,json=detectorName,proto3" json:"detector_name,omitempty"` +} + +func (x *RemoveDetectorRequest) Reset() { + *x = RemoveDetectorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveDetectorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveDetectorRequest) ProtoMessage() {} + +func (x *RemoveDetectorRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveDetectorRequest.ProtoReflect.Descriptor instead. +func (*RemoveDetectorRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{6} +} + +func (x *RemoveDetectorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RemoveDetectorRequest) GetDetectorName() string { + if x != nil { + return x.DetectorName + } + return "" +} + +type RemoveDetectorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveDetectorResponse) Reset() { + *x = RemoveDetectorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveDetectorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveDetectorResponse) ProtoMessage() {} + +func (x *RemoveDetectorResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveDetectorResponse.ProtoReflect.Descriptor instead. +func (*RemoveDetectorResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{7} +} + +type GetDetectionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // the image, encoded as bytes + Image []byte `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + // the width of the image + Width int64 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` + // the height of the image + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + // the actual MIME type of image + MimeType string `protobuf:"bytes,5,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // name of the registered detector to use + DetectorName string `protobuf:"bytes,6,opt,name=detector_name,json=detectorName,proto3" json:"detector_name,omitempty"` +} + +func (x *GetDetectionsRequest) Reset() { + *x = GetDetectionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDetectionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDetectionsRequest) ProtoMessage() {} + +func (x *GetDetectionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDetectionsRequest.ProtoReflect.Descriptor instead. +func (*GetDetectionsRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{8} +} + +func (x *GetDetectionsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetDetectionsRequest) GetImage() []byte { + if x != nil { + return x.Image + } + return nil +} + +func (x *GetDetectionsRequest) GetWidth() int64 { + if x != nil { + return x.Width + } + return 0 +} + +func (x *GetDetectionsRequest) GetHeight() int64 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *GetDetectionsRequest) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *GetDetectionsRequest) GetDetectorName() string { + if x != nil { + return x.DetectorName + } + return "" +} + +type GetDetectionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the bounding boxes and labels + Detections []*Detection `protobuf:"bytes,1,rep,name=detections,proto3" json:"detections,omitempty"` +} + +func (x *GetDetectionsResponse) Reset() { + *x = GetDetectionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDetectionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDetectionsResponse) ProtoMessage() {} + +func (x *GetDetectionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDetectionsResponse.ProtoReflect.Descriptor instead. +func (*GetDetectionsResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{9} +} + +func (x *GetDetectionsResponse) GetDetections() []*Detection { + if x != nil { + return x.Detections + } + return nil +} + +type GetDetectionsFromCameraRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // name of camera source to use as input + CameraName string `protobuf:"bytes,2,opt,name=camera_name,json=cameraName,proto3" json:"camera_name,omitempty"` + // name of the registered detector to use + DetectorName string `protobuf:"bytes,3,opt,name=detector_name,json=detectorName,proto3" json:"detector_name,omitempty"` +} + +func (x *GetDetectionsFromCameraRequest) Reset() { + *x = GetDetectionsFromCameraRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDetectionsFromCameraRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDetectionsFromCameraRequest) ProtoMessage() {} + +func (x *GetDetectionsFromCameraRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDetectionsFromCameraRequest.ProtoReflect.Descriptor instead. +func (*GetDetectionsFromCameraRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{10} +} + +func (x *GetDetectionsFromCameraRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetDetectionsFromCameraRequest) GetCameraName() string { + if x != nil { + return x.CameraName + } + return "" +} + +func (x *GetDetectionsFromCameraRequest) GetDetectorName() string { + if x != nil { + return x.DetectorName + } + return "" +} + +type GetDetectionsFromCameraResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the bounding boxes and labels + Detections []*Detection `protobuf:"bytes,1,rep,name=detections,proto3" json:"detections,omitempty"` +} + +func (x *GetDetectionsFromCameraResponse) Reset() { + *x = GetDetectionsFromCameraResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDetectionsFromCameraResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDetectionsFromCameraResponse) ProtoMessage() {} + +func (x *GetDetectionsFromCameraResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDetectionsFromCameraResponse.ProtoReflect.Descriptor instead. +func (*GetDetectionsFromCameraResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{11} +} + +func (x *GetDetectionsFromCameraResponse) GetDetections() []*Detection { + if x != nil { + return x.Detections + } + return nil +} + +type Detection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the four corners of the box + XMin *int64 `protobuf:"varint,1,opt,name=x_min,json=xMin,proto3,oneof" json:"x_min,omitempty"` + YMin *int64 `protobuf:"varint,2,opt,name=y_min,json=yMin,proto3,oneof" json:"y_min,omitempty"` + XMax *int64 `protobuf:"varint,3,opt,name=x_max,json=xMax,proto3,oneof" json:"x_max,omitempty"` + YMax *int64 `protobuf:"varint,4,opt,name=y_max,json=yMax,proto3,oneof" json:"y_max,omitempty"` + // the confidence of the detection + Confidence float64 `protobuf:"fixed64,5,opt,name=confidence,proto3" json:"confidence,omitempty"` + // label associated with the detected object + ClassName string `protobuf:"bytes,6,opt,name=class_name,json=className,proto3" json:"class_name,omitempty"` +} + +func (x *Detection) Reset() { + *x = Detection{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Detection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Detection) ProtoMessage() {} + +func (x *Detection) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Detection.ProtoReflect.Descriptor instead. +func (*Detection) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{12} +} + +func (x *Detection) GetXMin() int64 { + if x != nil && x.XMin != nil { + return *x.XMin + } + return 0 +} + +func (x *Detection) GetYMin() int64 { + if x != nil && x.YMin != nil { + return *x.YMin + } + return 0 +} + +func (x *Detection) GetXMax() int64 { + if x != nil && x.XMax != nil { + return *x.XMax + } + return 0 +} + +func (x *Detection) GetYMax() int64 { + if x != nil && x.YMax != nil { + return *x.YMax + } + return 0 +} + +func (x *Detection) GetConfidence() float64 { + if x != nil { + return x.Confidence + } + return 0 +} + +func (x *Detection) GetClassName() string { + if x != nil { + return x.ClassName + } + return "" +} + +type GetClassifierNamesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetClassifierNamesRequest) Reset() { + *x = GetClassifierNamesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClassifierNamesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClassifierNamesRequest) ProtoMessage() {} + +func (x *GetClassifierNamesRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClassifierNamesRequest.ProtoReflect.Descriptor instead. +func (*GetClassifierNamesRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{13} +} + +func (x *GetClassifierNamesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetClassifierNamesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClassifierNames []string `protobuf:"bytes,1,rep,name=classifier_names,json=classifierNames,proto3" json:"classifier_names,omitempty"` +} + +func (x *GetClassifierNamesResponse) Reset() { + *x = GetClassifierNamesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClassifierNamesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClassifierNamesResponse) ProtoMessage() {} + +func (x *GetClassifierNamesResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClassifierNamesResponse.ProtoReflect.Descriptor instead. +func (*GetClassifierNamesResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{14} +} + +func (x *GetClassifierNamesResponse) GetClassifierNames() []string { + if x != nil { + return x.ClassifierNames + } + return nil +} + +type AddClassifierRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // name of classifier to add to registry + ClassifierName string `protobuf:"bytes,2,opt,name=classifier_name,json=classifierName,proto3" json:"classifier_name,omitempty"` + // the type of classifier + ClassifierModelType string `protobuf:"bytes,3,opt,name=classifier_model_type,json=classifierModelType,proto3" json:"classifier_model_type,omitempty"` + // additional parameters + ClassifierParameters *structpb.Struct `protobuf:"bytes,4,opt,name=classifier_parameters,json=classifierParameters,proto3" json:"classifier_parameters,omitempty"` +} + +func (x *AddClassifierRequest) Reset() { + *x = AddClassifierRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddClassifierRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddClassifierRequest) ProtoMessage() {} + +func (x *AddClassifierRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddClassifierRequest.ProtoReflect.Descriptor instead. +func (*AddClassifierRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{15} +} + +func (x *AddClassifierRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AddClassifierRequest) GetClassifierName() string { + if x != nil { + return x.ClassifierName + } + return "" +} + +func (x *AddClassifierRequest) GetClassifierModelType() string { + if x != nil { + return x.ClassifierModelType + } + return "" +} + +func (x *AddClassifierRequest) GetClassifierParameters() *structpb.Struct { + if x != nil { + return x.ClassifierParameters + } + return nil +} + +type AddClassifierResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AddClassifierResponse) Reset() { + *x = AddClassifierResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddClassifierResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddClassifierResponse) ProtoMessage() {} + +func (x *AddClassifierResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddClassifierResponse.ProtoReflect.Descriptor instead. +func (*AddClassifierResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{16} +} + +type RemoveClassifierRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // name of the classifier in registry + ClassifierName string `protobuf:"bytes,2,opt,name=classifier_name,json=classifierName,proto3" json:"classifier_name,omitempty"` +} + +func (x *RemoveClassifierRequest) Reset() { + *x = RemoveClassifierRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveClassifierRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveClassifierRequest) ProtoMessage() {} + +func (x *RemoveClassifierRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveClassifierRequest.ProtoReflect.Descriptor instead. +func (*RemoveClassifierRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{17} +} + +func (x *RemoveClassifierRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RemoveClassifierRequest) GetClassifierName() string { + if x != nil { + return x.ClassifierName + } + return "" +} + +type RemoveClassifierResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveClassifierResponse) Reset() { + *x = RemoveClassifierResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveClassifierResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveClassifierResponse) ProtoMessage() {} + +func (x *RemoveClassifierResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveClassifierResponse.ProtoReflect.Descriptor instead. +func (*RemoveClassifierResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{18} +} + +type GetClassificationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // the image encoded as bytes + Image []byte `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + // the width of the image + Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` + // the height of the image + Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + // the actual MIME type of image + MimeType string `protobuf:"bytes,5,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // the name of the registered classifier + ClassifierName string `protobuf:"bytes,6,opt,name=classifier_name,json=classifierName,proto3" json:"classifier_name,omitempty"` + // the number of classifications desired + N int32 `protobuf:"varint,7,opt,name=n,proto3" json:"n,omitempty"` +} + +func (x *GetClassificationsRequest) Reset() { + *x = GetClassificationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClassificationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClassificationsRequest) ProtoMessage() {} + +func (x *GetClassificationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClassificationsRequest.ProtoReflect.Descriptor instead. +func (*GetClassificationsRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{19} +} + +func (x *GetClassificationsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetClassificationsRequest) GetImage() []byte { + if x != nil { + return x.Image + } + return nil +} + +func (x *GetClassificationsRequest) GetWidth() int32 { + if x != nil { + return x.Width + } + return 0 +} + +func (x *GetClassificationsRequest) GetHeight() int32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *GetClassificationsRequest) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *GetClassificationsRequest) GetClassifierName() string { + if x != nil { + return x.ClassifierName + } + return "" +} + +func (x *GetClassificationsRequest) GetN() int32 { + if x != nil { + return x.N + } + return 0 +} + +type GetClassificationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Classifications []*Classification `protobuf:"bytes,1,rep,name=classifications,proto3" json:"classifications,omitempty"` +} + +func (x *GetClassificationsResponse) Reset() { + *x = GetClassificationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClassificationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClassificationsResponse) ProtoMessage() {} + +func (x *GetClassificationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClassificationsResponse.ProtoReflect.Descriptor instead. +func (*GetClassificationsResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{20} +} + +func (x *GetClassificationsResponse) GetClassifications() []*Classification { + if x != nil { + return x.Classifications + } + return nil +} + +type GetClassificationsFromCameraRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // the image encoded as bytes + CameraName string `protobuf:"bytes,2,opt,name=camera_name,json=cameraName,proto3" json:"camera_name,omitempty"` + // the name of the registered classifier + ClassifierName string `protobuf:"bytes,3,opt,name=classifier_name,json=classifierName,proto3" json:"classifier_name,omitempty"` + // the number of classifications desired + N int32 `protobuf:"varint,4,opt,name=n,proto3" json:"n,omitempty"` +} + +func (x *GetClassificationsFromCameraRequest) Reset() { + *x = GetClassificationsFromCameraRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClassificationsFromCameraRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClassificationsFromCameraRequest) ProtoMessage() {} + +func (x *GetClassificationsFromCameraRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClassificationsFromCameraRequest.ProtoReflect.Descriptor instead. +func (*GetClassificationsFromCameraRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{21} +} + +func (x *GetClassificationsFromCameraRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetClassificationsFromCameraRequest) GetCameraName() string { + if x != nil { + return x.CameraName + } + return "" +} + +func (x *GetClassificationsFromCameraRequest) GetClassifierName() string { + if x != nil { + return x.ClassifierName + } + return "" +} + +func (x *GetClassificationsFromCameraRequest) GetN() int32 { + if x != nil { + return x.N + } + return 0 +} + +type GetClassificationsFromCameraResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Classifications []*Classification `protobuf:"bytes,1,rep,name=classifications,proto3" json:"classifications,omitempty"` +} + +func (x *GetClassificationsFromCameraResponse) Reset() { + *x = GetClassificationsFromCameraResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetClassificationsFromCameraResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetClassificationsFromCameraResponse) ProtoMessage() {} + +func (x *GetClassificationsFromCameraResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetClassificationsFromCameraResponse.ProtoReflect.Descriptor instead. +func (*GetClassificationsFromCameraResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{22} +} + +func (x *GetClassificationsFromCameraResponse) GetClassifications() []*Classification { + if x != nil { + return x.Classifications + } + return nil +} + +// the general form of the output from a classifier +type Classification struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the class name + ClassName string `protobuf:"bytes,1,opt,name=class_name,json=className,proto3" json:"class_name,omitempty"` + // the confidence score of the classification + Confidence float64 `protobuf:"fixed64,2,opt,name=confidence,proto3" json:"confidence,omitempty"` +} + +func (x *Classification) Reset() { + *x = Classification{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Classification) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Classification) ProtoMessage() {} + +func (x *Classification) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Classification.ProtoReflect.Descriptor instead. +func (*Classification) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{23} +} + +func (x *Classification) GetClassName() string { + if x != nil { + return x.ClassName + } + return "" +} + +func (x *Classification) GetConfidence() float64 { + if x != nil { + return x.Confidence + } + return 0 +} + +type GetSegmenterNamesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSegmenterNamesRequest) Reset() { + *x = GetSegmenterNamesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSegmenterNamesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSegmenterNamesRequest) ProtoMessage() {} + +func (x *GetSegmenterNamesRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSegmenterNamesRequest.ProtoReflect.Descriptor instead. +func (*GetSegmenterNamesRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{24} +} + +func (x *GetSegmenterNamesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetSegmenterNamesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // segmenters in the registry + SegmenterNames []string `protobuf:"bytes,1,rep,name=segmenter_names,json=segmenterNames,proto3" json:"segmenter_names,omitempty"` +} + +func (x *GetSegmenterNamesResponse) Reset() { + *x = GetSegmenterNamesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSegmenterNamesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSegmenterNamesResponse) ProtoMessage() {} + +func (x *GetSegmenterNamesResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSegmenterNamesResponse.ProtoReflect.Descriptor instead. +func (*GetSegmenterNamesResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{25} +} + +func (x *GetSegmenterNamesResponse) GetSegmenterNames() []string { + if x != nil { + return x.SegmenterNames + } + return nil +} + +type AddSegmenterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // name of the segmenter + SegmenterName string `protobuf:"bytes,2,opt,name=segmenter_name,json=segmenterName,proto3" json:"segmenter_name,omitempty"` + // name of the segmenter model + SegmenterModelType string `protobuf:"bytes,3,opt,name=segmenter_model_type,json=segmenterModelType,proto3" json:"segmenter_model_type,omitempty"` + // parameters of the segmenter model + SegmenterParameters *structpb.Struct `protobuf:"bytes,4,opt,name=segmenter_parameters,json=segmenterParameters,proto3" json:"segmenter_parameters,omitempty"` +} + +func (x *AddSegmenterRequest) Reset() { + *x = AddSegmenterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSegmenterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSegmenterRequest) ProtoMessage() {} + +func (x *AddSegmenterRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddSegmenterRequest.ProtoReflect.Descriptor instead. +func (*AddSegmenterRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{26} +} + +func (x *AddSegmenterRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AddSegmenterRequest) GetSegmenterName() string { + if x != nil { + return x.SegmenterName + } + return "" +} + +func (x *AddSegmenterRequest) GetSegmenterModelType() string { + if x != nil { + return x.SegmenterModelType + } + return "" +} + +func (x *AddSegmenterRequest) GetSegmenterParameters() *structpb.Struct { + if x != nil { + return x.SegmenterParameters + } + return nil +} + +type AddSegmenterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AddSegmenterResponse) Reset() { + *x = AddSegmenterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSegmenterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSegmenterResponse) ProtoMessage() {} + +func (x *AddSegmenterResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddSegmenterResponse.ProtoReflect.Descriptor instead. +func (*AddSegmenterResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{27} +} + +type RemoveSegmenterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name of the vision service + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // name of segmenter in registry + SegmenterName string `protobuf:"bytes,2,opt,name=segmenter_name,json=segmenterName,proto3" json:"segmenter_name,omitempty"` +} + +func (x *RemoveSegmenterRequest) Reset() { + *x = RemoveSegmenterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveSegmenterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveSegmenterRequest) ProtoMessage() {} + +func (x *RemoveSegmenterRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveSegmenterRequest.ProtoReflect.Descriptor instead. +func (*RemoveSegmenterRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{28} +} + +func (x *RemoveSegmenterRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RemoveSegmenterRequest) GetSegmenterName() string { + if x != nil { + return x.SegmenterName + } + return "" +} + +type RemoveSegmenterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveSegmenterResponse) Reset() { + *x = RemoveSegmenterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveSegmenterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveSegmenterResponse) ProtoMessage() {} + +func (x *RemoveSegmenterResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveSegmenterResponse.ProtoReflect.Descriptor instead. +func (*RemoveSegmenterResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{29} +} + +type GetObjectPointCloudsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Name of a camera + CameraName string `protobuf:"bytes,2,opt,name=camera_name,json=cameraName,proto3" json:"camera_name,omitempty"` + // Name of the segmentation algorithm + SegmenterName string `protobuf:"bytes,3,opt,name=segmenter_name,json=segmenterName,proto3" json:"segmenter_name,omitempty"` + // Requested MIME type of response + MimeType string `protobuf:"bytes,4,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` +} + +func (x *GetObjectPointCloudsRequest) Reset() { + *x = GetObjectPointCloudsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetObjectPointCloudsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetObjectPointCloudsRequest) ProtoMessage() {} + +func (x *GetObjectPointCloudsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetObjectPointCloudsRequest.ProtoReflect.Descriptor instead. +func (*GetObjectPointCloudsRequest) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{30} +} + +func (x *GetObjectPointCloudsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetObjectPointCloudsRequest) GetCameraName() string { + if x != nil { + return x.CameraName + } + return "" +} + +func (x *GetObjectPointCloudsRequest) GetSegmenterName() string { + if x != nil { + return x.SegmenterName + } + return "" +} + +func (x *GetObjectPointCloudsRequest) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +type GetObjectPointCloudsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Actual MIME type of response + MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // List of objects in the scene + Objects []*v1.PointCloudObject `protobuf:"bytes,2,rep,name=objects,proto3" json:"objects,omitempty"` +} + +func (x *GetObjectPointCloudsResponse) Reset() { + *x = GetObjectPointCloudsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_vision_v1_vision_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetObjectPointCloudsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetObjectPointCloudsResponse) ProtoMessage() {} + +func (x *GetObjectPointCloudsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_vision_v1_vision_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetObjectPointCloudsResponse.ProtoReflect.Descriptor instead. +func (*GetObjectPointCloudsResponse) Descriptor() ([]byte, []int) { + return file_service_vision_v1_vision_proto_rawDescGZIP(), []int{31} +} + +func (x *GetObjectPointCloudsResponse) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *GetObjectPointCloudsResponse) GetObjects() []*v1.PointCloudObject { + if x != nil { + return x.Objects + } + return nil +} + +var File_service_vision_v1_vision_proto protoreflect.FileDescriptor + +var file_service_vision_v1_vision_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x16, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x1e, + 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x57, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x2d, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x41, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x64, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xc7, 0x01, 0x0a, + 0x12, 0x41, 0x64, 0x64, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x13, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x12, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x0a, + 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x18, 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, + 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x15, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x64, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7a, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x6d, + 0x65, 0x72, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x09, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x05, 0x78, 0x5f, 0x6d, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x04, 0x78, 0x4d, 0x69, 0x6e, 0x88, + 0x01, 0x01, 0x12, 0x18, 0x0a, 0x05, 0x79, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x01, 0x52, 0x04, 0x79, 0x4d, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x05, + 0x78, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, 0x52, 0x04, 0x78, + 0x4d, 0x61, 0x78, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x05, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x04, 0x79, 0x4d, 0x61, 0x78, 0x88, 0x01, 0x01, + 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x78, 0x5f, 0x6d, 0x69, 0x6e, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x79, 0x5f, + 0x6d, 0x69, 0x6e, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x78, 0x5f, 0x6d, 0x61, 0x78, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x22, 0x2f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x47, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x22, 0xd5, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, + 0x0a, 0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4c, 0x0a, 0x15, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x14, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x41, 0x64, 0x64, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x56, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, + 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x6e, + 0x22, 0x6e, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, + 0x0a, 0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x91, 0x01, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x6d, 0x65, 0x72, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, + 0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x01, 0x6e, 0x22, 0x78, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, + 0x6d, 0x65, 0x72, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4f, + 0x0a, 0x0e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x22, + 0x2e, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, + 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xce, 0x01, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, + 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x14, 0x73, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x13, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, + 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, + 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x96, + 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, + 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, + 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x77, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x32, 0xda, 0x15, 0x0a, 0x0d, 0x56, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0xcd, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x36, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0xb0, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x9f, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x64, 0x64, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2f, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x61, 0x64, 0x64, 0x5f, 0x64, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0xab, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2d, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x34, 0x22, 0x32, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0xc8, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x6d, 0x65, 0x72, + 0x61, 0x12, 0x36, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x6d, 0x65, + 0x72, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x76, 0x69, 0x61, 0x6d, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x34, 0x2f, 0x76, 0x69, 0x61, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, + 0x61, 0x6d, 0x65, 0x72, 0x61, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0xa3, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2d, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x64, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb8, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x31, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x32, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x76, + 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x12, 0xa7, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x22, 0x31, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x61, 0x64, 0x64, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0xb3, 0x01, 0x0a, 0x10, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x12, 0x2f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x30, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x34, 0x2f, 0x76, 0x69, + 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0xdc, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x6d, 0x65, + 0x72, 0x61, 0x12, 0x3b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, + 0x6f, 0x6d, 0x43, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x3c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x43, + 0x61, 0x6d, 0x65, 0x72, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22, 0x39, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0xb7, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x22, 0x32, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb4, 0x01, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x30, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, + 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x30, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x61, 0x64, 0x64, 0x5f, 0x73, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0xaf, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x35, 0x22, 0x33, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, + 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0xc1, 0x01, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x73, 0x12, 0x33, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x36, 0x2f, 0x76, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x73, 0x42, 0x3f, 0x0a, + 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x5a, 0x21, 0x67, 0x6f, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_vision_v1_vision_proto_rawDescOnce sync.Once + file_service_vision_v1_vision_proto_rawDescData = file_service_vision_v1_vision_proto_rawDesc +) + +func file_service_vision_v1_vision_proto_rawDescGZIP() []byte { + file_service_vision_v1_vision_proto_rawDescOnce.Do(func() { + file_service_vision_v1_vision_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_vision_v1_vision_proto_rawDescData) + }) + return file_service_vision_v1_vision_proto_rawDescData +} + +var file_service_vision_v1_vision_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_service_vision_v1_vision_proto_goTypes = []interface{}{ + (*GetModelParameterSchemaRequest)(nil), // 0: viam.service.vision.v1.GetModelParameterSchemaRequest + (*GetModelParameterSchemaResponse)(nil), // 1: viam.service.vision.v1.GetModelParameterSchemaResponse + (*GetDetectorNamesRequest)(nil), // 2: viam.service.vision.v1.GetDetectorNamesRequest + (*GetDetectorNamesResponse)(nil), // 3: viam.service.vision.v1.GetDetectorNamesResponse + (*AddDetectorRequest)(nil), // 4: viam.service.vision.v1.AddDetectorRequest + (*AddDetectorResponse)(nil), // 5: viam.service.vision.v1.AddDetectorResponse + (*RemoveDetectorRequest)(nil), // 6: viam.service.vision.v1.RemoveDetectorRequest + (*RemoveDetectorResponse)(nil), // 7: viam.service.vision.v1.RemoveDetectorResponse + (*GetDetectionsRequest)(nil), // 8: viam.service.vision.v1.GetDetectionsRequest + (*GetDetectionsResponse)(nil), // 9: viam.service.vision.v1.GetDetectionsResponse + (*GetDetectionsFromCameraRequest)(nil), // 10: viam.service.vision.v1.GetDetectionsFromCameraRequest + (*GetDetectionsFromCameraResponse)(nil), // 11: viam.service.vision.v1.GetDetectionsFromCameraResponse + (*Detection)(nil), // 12: viam.service.vision.v1.Detection + (*GetClassifierNamesRequest)(nil), // 13: viam.service.vision.v1.GetClassifierNamesRequest + (*GetClassifierNamesResponse)(nil), // 14: viam.service.vision.v1.GetClassifierNamesResponse + (*AddClassifierRequest)(nil), // 15: viam.service.vision.v1.AddClassifierRequest + (*AddClassifierResponse)(nil), // 16: viam.service.vision.v1.AddClassifierResponse + (*RemoveClassifierRequest)(nil), // 17: viam.service.vision.v1.RemoveClassifierRequest + (*RemoveClassifierResponse)(nil), // 18: viam.service.vision.v1.RemoveClassifierResponse + (*GetClassificationsRequest)(nil), // 19: viam.service.vision.v1.GetClassificationsRequest + (*GetClassificationsResponse)(nil), // 20: viam.service.vision.v1.GetClassificationsResponse + (*GetClassificationsFromCameraRequest)(nil), // 21: viam.service.vision.v1.GetClassificationsFromCameraRequest + (*GetClassificationsFromCameraResponse)(nil), // 22: viam.service.vision.v1.GetClassificationsFromCameraResponse + (*Classification)(nil), // 23: viam.service.vision.v1.Classification + (*GetSegmenterNamesRequest)(nil), // 24: viam.service.vision.v1.GetSegmenterNamesRequest + (*GetSegmenterNamesResponse)(nil), // 25: viam.service.vision.v1.GetSegmenterNamesResponse + (*AddSegmenterRequest)(nil), // 26: viam.service.vision.v1.AddSegmenterRequest + (*AddSegmenterResponse)(nil), // 27: viam.service.vision.v1.AddSegmenterResponse + (*RemoveSegmenterRequest)(nil), // 28: viam.service.vision.v1.RemoveSegmenterRequest + (*RemoveSegmenterResponse)(nil), // 29: viam.service.vision.v1.RemoveSegmenterResponse + (*GetObjectPointCloudsRequest)(nil), // 30: viam.service.vision.v1.GetObjectPointCloudsRequest + (*GetObjectPointCloudsResponse)(nil), // 31: viam.service.vision.v1.GetObjectPointCloudsResponse + (*structpb.Struct)(nil), // 32: google.protobuf.Struct + (*v1.PointCloudObject)(nil), // 33: viam.common.v1.PointCloudObject +} +var file_service_vision_v1_vision_proto_depIdxs = []int32{ + 32, // 0: viam.service.vision.v1.AddDetectorRequest.detector_parameters:type_name -> google.protobuf.Struct + 12, // 1: viam.service.vision.v1.GetDetectionsResponse.detections:type_name -> viam.service.vision.v1.Detection + 12, // 2: viam.service.vision.v1.GetDetectionsFromCameraResponse.detections:type_name -> viam.service.vision.v1.Detection + 32, // 3: viam.service.vision.v1.AddClassifierRequest.classifier_parameters:type_name -> google.protobuf.Struct + 23, // 4: viam.service.vision.v1.GetClassificationsResponse.classifications:type_name -> viam.service.vision.v1.Classification + 23, // 5: viam.service.vision.v1.GetClassificationsFromCameraResponse.classifications:type_name -> viam.service.vision.v1.Classification + 32, // 6: viam.service.vision.v1.AddSegmenterRequest.segmenter_parameters:type_name -> google.protobuf.Struct + 33, // 7: viam.service.vision.v1.GetObjectPointCloudsResponse.objects:type_name -> viam.common.v1.PointCloudObject + 0, // 8: viam.service.vision.v1.VisionService.GetModelParameterSchema:input_type -> viam.service.vision.v1.GetModelParameterSchemaRequest + 2, // 9: viam.service.vision.v1.VisionService.GetDetectorNames:input_type -> viam.service.vision.v1.GetDetectorNamesRequest + 4, // 10: viam.service.vision.v1.VisionService.AddDetector:input_type -> viam.service.vision.v1.AddDetectorRequest + 6, // 11: viam.service.vision.v1.VisionService.RemoveDetector:input_type -> viam.service.vision.v1.RemoveDetectorRequest + 10, // 12: viam.service.vision.v1.VisionService.GetDetectionsFromCamera:input_type -> viam.service.vision.v1.GetDetectionsFromCameraRequest + 8, // 13: viam.service.vision.v1.VisionService.GetDetections:input_type -> viam.service.vision.v1.GetDetectionsRequest + 13, // 14: viam.service.vision.v1.VisionService.GetClassifierNames:input_type -> viam.service.vision.v1.GetClassifierNamesRequest + 15, // 15: viam.service.vision.v1.VisionService.AddClassifier:input_type -> viam.service.vision.v1.AddClassifierRequest + 17, // 16: viam.service.vision.v1.VisionService.RemoveClassifier:input_type -> viam.service.vision.v1.RemoveClassifierRequest + 21, // 17: viam.service.vision.v1.VisionService.GetClassificationsFromCamera:input_type -> viam.service.vision.v1.GetClassificationsFromCameraRequest + 19, // 18: viam.service.vision.v1.VisionService.GetClassifications:input_type -> viam.service.vision.v1.GetClassificationsRequest + 24, // 19: viam.service.vision.v1.VisionService.GetSegmenterNames:input_type -> viam.service.vision.v1.GetSegmenterNamesRequest + 26, // 20: viam.service.vision.v1.VisionService.AddSegmenter:input_type -> viam.service.vision.v1.AddSegmenterRequest + 28, // 21: viam.service.vision.v1.VisionService.RemoveSegmenter:input_type -> viam.service.vision.v1.RemoveSegmenterRequest + 30, // 22: viam.service.vision.v1.VisionService.GetObjectPointClouds:input_type -> viam.service.vision.v1.GetObjectPointCloudsRequest + 1, // 23: viam.service.vision.v1.VisionService.GetModelParameterSchema:output_type -> viam.service.vision.v1.GetModelParameterSchemaResponse + 3, // 24: viam.service.vision.v1.VisionService.GetDetectorNames:output_type -> viam.service.vision.v1.GetDetectorNamesResponse + 5, // 25: viam.service.vision.v1.VisionService.AddDetector:output_type -> viam.service.vision.v1.AddDetectorResponse + 7, // 26: viam.service.vision.v1.VisionService.RemoveDetector:output_type -> viam.service.vision.v1.RemoveDetectorResponse + 11, // 27: viam.service.vision.v1.VisionService.GetDetectionsFromCamera:output_type -> viam.service.vision.v1.GetDetectionsFromCameraResponse + 9, // 28: viam.service.vision.v1.VisionService.GetDetections:output_type -> viam.service.vision.v1.GetDetectionsResponse + 14, // 29: viam.service.vision.v1.VisionService.GetClassifierNames:output_type -> viam.service.vision.v1.GetClassifierNamesResponse + 16, // 30: viam.service.vision.v1.VisionService.AddClassifier:output_type -> viam.service.vision.v1.AddClassifierResponse + 18, // 31: viam.service.vision.v1.VisionService.RemoveClassifier:output_type -> viam.service.vision.v1.RemoveClassifierResponse + 22, // 32: viam.service.vision.v1.VisionService.GetClassificationsFromCamera:output_type -> viam.service.vision.v1.GetClassificationsFromCameraResponse + 20, // 33: viam.service.vision.v1.VisionService.GetClassifications:output_type -> viam.service.vision.v1.GetClassificationsResponse + 25, // 34: viam.service.vision.v1.VisionService.GetSegmenterNames:output_type -> viam.service.vision.v1.GetSegmenterNamesResponse + 27, // 35: viam.service.vision.v1.VisionService.AddSegmenter:output_type -> viam.service.vision.v1.AddSegmenterResponse + 29, // 36: viam.service.vision.v1.VisionService.RemoveSegmenter:output_type -> viam.service.vision.v1.RemoveSegmenterResponse + 31, // 37: viam.service.vision.v1.VisionService.GetObjectPointClouds:output_type -> viam.service.vision.v1.GetObjectPointCloudsResponse + 23, // [23:38] is the sub-list for method output_type + 8, // [8:23] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_service_vision_v1_vision_proto_init() } +func file_service_vision_v1_vision_proto_init() { + if File_service_vision_v1_vision_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_vision_v1_vision_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetModelParameterSchemaRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetModelParameterSchemaResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDetectorNamesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDetectorNamesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddDetectorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddDetectorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDetectorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDetectorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDetectionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDetectionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDetectionsFromCameraRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDetectionsFromCameraResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Detection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClassifierNamesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClassifierNamesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddClassifierRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddClassifierResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveClassifierRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveClassifierResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClassificationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClassificationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClassificationsFromCameraRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetClassificationsFromCameraResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Classification); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSegmenterNamesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSegmenterNamesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSegmenterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSegmenterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveSegmenterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveSegmenterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetObjectPointCloudsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_vision_v1_vision_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetObjectPointCloudsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_service_vision_v1_vision_proto_msgTypes[12].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_vision_v1_vision_proto_rawDesc, + NumEnums: 0, + NumMessages: 32, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_vision_v1_vision_proto_goTypes, + DependencyIndexes: file_service_vision_v1_vision_proto_depIdxs, + MessageInfos: file_service_vision_v1_vision_proto_msgTypes, + }.Build() + File_service_vision_v1_vision_proto = out.File + file_service_vision_v1_vision_proto_rawDesc = nil + file_service_vision_v1_vision_proto_goTypes = nil + file_service_vision_v1_vision_proto_depIdxs = nil +} diff --git a/service/vision/v1/vision.pb.gw.go b/service/vision/v1/vision.pb.gw.go new file mode 100644 index 000000000..b556b41e0 --- /dev/null +++ b/service/vision/v1/vision.pb.gw.go @@ -0,0 +1,1817 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: service/vision/v1/vision.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_VisionService_GetModelParameterSchema_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_GetModelParameterSchema_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetModelParameterSchemaRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetModelParameterSchema_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetModelParameterSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetModelParameterSchema_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetModelParameterSchemaRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetModelParameterSchema_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetModelParameterSchema(ctx, &protoReq) + return msg, metadata, err + +} + +func request_VisionService_GetDetectorNames_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDetectorNamesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetDetectorNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetDetectorNames_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDetectorNamesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetDetectorNames(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_AddDetector_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_AddDetector_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddDetectorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_AddDetector_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddDetector(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_AddDetector_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddDetectorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_AddDetector_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddDetector(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_RemoveDetector_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_RemoveDetector_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveDetectorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_RemoveDetector_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RemoveDetector(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_RemoveDetector_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveDetectorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_RemoveDetector_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RemoveDetector(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_GetDetectionsFromCamera_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_GetDetectionsFromCamera_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDetectionsFromCameraRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetDetectionsFromCamera_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetDetectionsFromCamera(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetDetectionsFromCamera_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDetectionsFromCameraRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetDetectionsFromCamera_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetDetectionsFromCamera(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_GetDetections_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_GetDetections_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDetectionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetDetections_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetDetections(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetDetections_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDetectionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetDetections_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetDetections(ctx, &protoReq) + return msg, metadata, err + +} + +func request_VisionService_GetClassifierNames_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetClassifierNamesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetClassifierNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetClassifierNames_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetClassifierNamesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetClassifierNames(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_AddClassifier_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_AddClassifier_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddClassifierRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_AddClassifier_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddClassifier(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_AddClassifier_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddClassifierRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_AddClassifier_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddClassifier(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_RemoveClassifier_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_RemoveClassifier_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveClassifierRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_RemoveClassifier_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RemoveClassifier(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_RemoveClassifier_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveClassifierRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_RemoveClassifier_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RemoveClassifier(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_GetClassificationsFromCamera_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_GetClassificationsFromCamera_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetClassificationsFromCameraRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetClassificationsFromCamera_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetClassificationsFromCamera(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetClassificationsFromCamera_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetClassificationsFromCameraRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetClassificationsFromCamera_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetClassificationsFromCamera(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_GetClassifications_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_GetClassifications_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetClassificationsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetClassifications_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetClassifications(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetClassifications_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetClassificationsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetClassifications_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetClassifications(ctx, &protoReq) + return msg, metadata, err + +} + +func request_VisionService_GetSegmenterNames_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSegmenterNamesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetSegmenterNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetSegmenterNames_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSegmenterNamesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetSegmenterNames(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_AddSegmenter_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_AddSegmenter_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddSegmenterRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_AddSegmenter_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddSegmenter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_AddSegmenter_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddSegmenterRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_AddSegmenter_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddSegmenter(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_RemoveSegmenter_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_RemoveSegmenter_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveSegmenterRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_RemoveSegmenter_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RemoveSegmenter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_RemoveSegmenter_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveSegmenterRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_RemoveSegmenter_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RemoveSegmenter(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_VisionService_GetObjectPointClouds_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_VisionService_GetObjectPointClouds_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetObjectPointCloudsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetObjectPointClouds_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetObjectPointClouds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VisionService_GetObjectPointClouds_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetObjectPointCloudsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_VisionService_GetObjectPointClouds_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetObjectPointClouds(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterVisionServiceHandlerServer registers the http handlers for service VisionService to "mux". +// UnaryRPC :call VisionServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterVisionServiceHandlerFromEndpoint instead. +func RegisterVisionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VisionServiceServer) error { + + mux.Handle("GET", pattern_VisionService_GetModelParameterSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetModelParameterSchema", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/model_parameter_schema")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetModelParameterSchema_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetModelParameterSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_VisionService_GetDetectorNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetDetectorNames", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/detector_names")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetDetectorNames_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetDetectorNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_AddDetector_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/AddDetector", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/add_detector")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_AddDetector_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_AddDetector_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_RemoveDetector_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/RemoveDetector", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/remove_detector")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_RemoveDetector_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_RemoveDetector_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetDetectionsFromCamera_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetDetectionsFromCamera", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/camera_detections")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetDetectionsFromCamera_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetDetectionsFromCamera_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetDetections_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetDetections", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/detections")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetDetections_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetDetections_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_VisionService_GetClassifierNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetClassifierNames", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/classifier_names")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetClassifierNames_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetClassifierNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_AddClassifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/AddClassifier", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/add_classifier")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_AddClassifier_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_AddClassifier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_RemoveClassifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/RemoveClassifier", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/remove_classifier")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_RemoveClassifier_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_RemoveClassifier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetClassificationsFromCamera_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetClassificationsFromCamera", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/camera_classifications")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetClassificationsFromCamera_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetClassificationsFromCamera_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetClassifications_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetClassifications", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/classifications")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetClassifications_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetClassifications_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_VisionService_GetSegmenterNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetSegmenterNames", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/segmenter_names")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetSegmenterNames_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetSegmenterNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_AddSegmenter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/AddSegmenter", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/add_segmenter")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_AddSegmenter_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_AddSegmenter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_RemoveSegmenter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/RemoveSegmenter", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/remove_segmenter")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_RemoveSegmenter_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_RemoveSegmenter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetObjectPointClouds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetObjectPointClouds", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/object_point_clouds")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VisionService_GetObjectPointClouds_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetObjectPointClouds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterVisionServiceHandlerFromEndpoint is same as RegisterVisionServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterVisionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterVisionServiceHandler(ctx, mux, conn) +} + +// RegisterVisionServiceHandler registers the http handlers for service VisionService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterVisionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterVisionServiceHandlerClient(ctx, mux, NewVisionServiceClient(conn)) +} + +// RegisterVisionServiceHandlerClient registers the http handlers for service VisionService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VisionServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VisionServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "VisionServiceClient" to call the correct interceptors. +func RegisterVisionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VisionServiceClient) error { + + mux.Handle("GET", pattern_VisionService_GetModelParameterSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetModelParameterSchema", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/model_parameter_schema")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetModelParameterSchema_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetModelParameterSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_VisionService_GetDetectorNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetDetectorNames", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/detector_names")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetDetectorNames_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetDetectorNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_AddDetector_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/AddDetector", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/add_detector")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_AddDetector_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_AddDetector_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_RemoveDetector_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/RemoveDetector", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/remove_detector")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_RemoveDetector_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_RemoveDetector_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetDetectionsFromCamera_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetDetectionsFromCamera", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/camera_detections")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetDetectionsFromCamera_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetDetectionsFromCamera_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetDetections_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetDetections", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/detections")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetDetections_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetDetections_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_VisionService_GetClassifierNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetClassifierNames", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/classifier_names")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetClassifierNames_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetClassifierNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_AddClassifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/AddClassifier", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/add_classifier")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_AddClassifier_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_AddClassifier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_RemoveClassifier_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/RemoveClassifier", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/remove_classifier")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_RemoveClassifier_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_RemoveClassifier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetClassificationsFromCamera_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetClassificationsFromCamera", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/camera_classifications")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetClassificationsFromCamera_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetClassificationsFromCamera_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetClassifications_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetClassifications", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/classifications")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetClassifications_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetClassifications_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_VisionService_GetSegmenterNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetSegmenterNames", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/segmenter_names")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetSegmenterNames_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetSegmenterNames_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_AddSegmenter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/AddSegmenter", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/add_segmenter")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_AddSegmenter_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_AddSegmenter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_RemoveSegmenter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/RemoveSegmenter", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/remove_segmenter")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_RemoveSegmenter_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_RemoveSegmenter_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_VisionService_GetObjectPointClouds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/viam.service.vision.v1.VisionService/GetObjectPointClouds", runtime.WithHTTPPathPattern("/viam/api/v1/service/vision/{name}/object_point_clouds")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VisionService_GetObjectPointClouds_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_VisionService_GetObjectPointClouds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_VisionService_GetModelParameterSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "model_parameter_schema"}, "")) + + pattern_VisionService_GetDetectorNames_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "detector_names"}, "")) + + pattern_VisionService_AddDetector_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "add_detector"}, "")) + + pattern_VisionService_RemoveDetector_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "remove_detector"}, "")) + + pattern_VisionService_GetDetectionsFromCamera_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "camera_detections"}, "")) + + pattern_VisionService_GetDetections_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "detections"}, "")) + + pattern_VisionService_GetClassifierNames_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "classifier_names"}, "")) + + pattern_VisionService_AddClassifier_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "add_classifier"}, "")) + + pattern_VisionService_RemoveClassifier_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "remove_classifier"}, "")) + + pattern_VisionService_GetClassificationsFromCamera_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "camera_classifications"}, "")) + + pattern_VisionService_GetClassifications_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "classifications"}, "")) + + pattern_VisionService_GetSegmenterNames_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "segmenter_names"}, "")) + + pattern_VisionService_AddSegmenter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "add_segmenter"}, "")) + + pattern_VisionService_RemoveSegmenter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "remove_segmenter"}, "")) + + pattern_VisionService_GetObjectPointClouds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"viam", "api", "v1", "service", "vision", "name", "object_point_clouds"}, "")) +) + +var ( + forward_VisionService_GetModelParameterSchema_0 = runtime.ForwardResponseMessage + + forward_VisionService_GetDetectorNames_0 = runtime.ForwardResponseMessage + + forward_VisionService_AddDetector_0 = runtime.ForwardResponseMessage + + forward_VisionService_RemoveDetector_0 = runtime.ForwardResponseMessage + + forward_VisionService_GetDetectionsFromCamera_0 = runtime.ForwardResponseMessage + + forward_VisionService_GetDetections_0 = runtime.ForwardResponseMessage + + forward_VisionService_GetClassifierNames_0 = runtime.ForwardResponseMessage + + forward_VisionService_AddClassifier_0 = runtime.ForwardResponseMessage + + forward_VisionService_RemoveClassifier_0 = runtime.ForwardResponseMessage + + forward_VisionService_GetClassificationsFromCamera_0 = runtime.ForwardResponseMessage + + forward_VisionService_GetClassifications_0 = runtime.ForwardResponseMessage + + forward_VisionService_GetSegmenterNames_0 = runtime.ForwardResponseMessage + + forward_VisionService_AddSegmenter_0 = runtime.ForwardResponseMessage + + forward_VisionService_RemoveSegmenter_0 = runtime.ForwardResponseMessage + + forward_VisionService_GetObjectPointClouds_0 = runtime.ForwardResponseMessage +) diff --git a/service/vision/v1/vision_grpc.pb.go b/service/vision/v1/vision_grpc.pb.go new file mode 100644 index 000000000..f491547c4 --- /dev/null +++ b/service/vision/v1/vision_grpc.pb.go @@ -0,0 +1,639 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// VisionServiceClient is the client API for VisionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type VisionServiceClient interface { + // GetModelParameterSchema takes the model name and returns the parameters needed to add one to the vision registry. + GetModelParameterSchema(ctx context.Context, in *GetModelParameterSchemaRequest, opts ...grpc.CallOption) (*GetModelParameterSchemaResponse, error) + // GetDetectorNames returns the list of detectors in the registry. + GetDetectorNames(ctx context.Context, in *GetDetectorNamesRequest, opts ...grpc.CallOption) (*GetDetectorNamesResponse, error) + // AddDetector adds a new detector to the registry. + AddDetector(ctx context.Context, in *AddDetectorRequest, opts ...grpc.CallOption) (*AddDetectorResponse, error) + // RemoveDetector removes a detector from the registry. + RemoveDetector(ctx context.Context, in *RemoveDetectorRequest, opts ...grpc.CallOption) (*RemoveDetectorResponse, error) + // GetDetectionsFromCamera will return a list of detections in the next image given a camera and a detector + GetDetectionsFromCamera(ctx context.Context, in *GetDetectionsFromCameraRequest, opts ...grpc.CallOption) (*GetDetectionsFromCameraResponse, error) + // GetDetections will return a list of detections in the next image given the image bytes and a detector + GetDetections(ctx context.Context, in *GetDetectionsRequest, opts ...grpc.CallOption) (*GetDetectionsResponse, error) + // GetClassifierNames returns the list of classifiers in the registry. + GetClassifierNames(ctx context.Context, in *GetClassifierNamesRequest, opts ...grpc.CallOption) (*GetClassifierNamesResponse, error) + // AddClassifier adds a new classifier to the registry. + AddClassifier(ctx context.Context, in *AddClassifierRequest, opts ...grpc.CallOption) (*AddClassifierResponse, error) + // RemoveClassifier adds a new classifier to the registry. + RemoveClassifier(ctx context.Context, in *RemoveClassifierRequest, opts ...grpc.CallOption) (*RemoveClassifierResponse, error) + // GetClassificationsFromCamera will return a list of classifications in the next image given a camera and a classifier + GetClassificationsFromCamera(ctx context.Context, in *GetClassificationsFromCameraRequest, opts ...grpc.CallOption) (*GetClassificationsFromCameraResponse, error) + // GetClassifications will return a list of classifications in the next image given the image bytes and a classifier + GetClassifications(ctx context.Context, in *GetClassificationsRequest, opts ...grpc.CallOption) (*GetClassificationsResponse, error) + // GetSegmenterNames returns the list of segmenters in the registry. + GetSegmenterNames(ctx context.Context, in *GetSegmenterNamesRequest, opts ...grpc.CallOption) (*GetSegmenterNamesResponse, error) + // AddSegmenter adds a new segmenter to the registry. + AddSegmenter(ctx context.Context, in *AddSegmenterRequest, opts ...grpc.CallOption) (*AddSegmenterResponse, error) + // RemoveSegmenter removes a segmenter from the registry. + RemoveSegmenter(ctx context.Context, in *RemoveSegmenterRequest, opts ...grpc.CallOption) (*RemoveSegmenterResponse, error) + // GetObjectPointClouds returns all the found objects in a pointcloud from a camera of the underlying robot, + // as well as the 3-vector center of each of the found objects. + // A specific MIME type can be requested but may not necessarily be the same one returned. + GetObjectPointClouds(ctx context.Context, in *GetObjectPointCloudsRequest, opts ...grpc.CallOption) (*GetObjectPointCloudsResponse, error) +} + +type visionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewVisionServiceClient(cc grpc.ClientConnInterface) VisionServiceClient { + return &visionServiceClient{cc} +} + +func (c *visionServiceClient) GetModelParameterSchema(ctx context.Context, in *GetModelParameterSchemaRequest, opts ...grpc.CallOption) (*GetModelParameterSchemaResponse, error) { + out := new(GetModelParameterSchemaResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetModelParameterSchema", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) GetDetectorNames(ctx context.Context, in *GetDetectorNamesRequest, opts ...grpc.CallOption) (*GetDetectorNamesResponse, error) { + out := new(GetDetectorNamesResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetDetectorNames", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) AddDetector(ctx context.Context, in *AddDetectorRequest, opts ...grpc.CallOption) (*AddDetectorResponse, error) { + out := new(AddDetectorResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/AddDetector", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) RemoveDetector(ctx context.Context, in *RemoveDetectorRequest, opts ...grpc.CallOption) (*RemoveDetectorResponse, error) { + out := new(RemoveDetectorResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/RemoveDetector", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) GetDetectionsFromCamera(ctx context.Context, in *GetDetectionsFromCameraRequest, opts ...grpc.CallOption) (*GetDetectionsFromCameraResponse, error) { + out := new(GetDetectionsFromCameraResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetDetectionsFromCamera", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) GetDetections(ctx context.Context, in *GetDetectionsRequest, opts ...grpc.CallOption) (*GetDetectionsResponse, error) { + out := new(GetDetectionsResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetDetections", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) GetClassifierNames(ctx context.Context, in *GetClassifierNamesRequest, opts ...grpc.CallOption) (*GetClassifierNamesResponse, error) { + out := new(GetClassifierNamesResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetClassifierNames", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) AddClassifier(ctx context.Context, in *AddClassifierRequest, opts ...grpc.CallOption) (*AddClassifierResponse, error) { + out := new(AddClassifierResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/AddClassifier", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) RemoveClassifier(ctx context.Context, in *RemoveClassifierRequest, opts ...grpc.CallOption) (*RemoveClassifierResponse, error) { + out := new(RemoveClassifierResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/RemoveClassifier", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) GetClassificationsFromCamera(ctx context.Context, in *GetClassificationsFromCameraRequest, opts ...grpc.CallOption) (*GetClassificationsFromCameraResponse, error) { + out := new(GetClassificationsFromCameraResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetClassificationsFromCamera", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) GetClassifications(ctx context.Context, in *GetClassificationsRequest, opts ...grpc.CallOption) (*GetClassificationsResponse, error) { + out := new(GetClassificationsResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetClassifications", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) GetSegmenterNames(ctx context.Context, in *GetSegmenterNamesRequest, opts ...grpc.CallOption) (*GetSegmenterNamesResponse, error) { + out := new(GetSegmenterNamesResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetSegmenterNames", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) AddSegmenter(ctx context.Context, in *AddSegmenterRequest, opts ...grpc.CallOption) (*AddSegmenterResponse, error) { + out := new(AddSegmenterResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/AddSegmenter", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) RemoveSegmenter(ctx context.Context, in *RemoveSegmenterRequest, opts ...grpc.CallOption) (*RemoveSegmenterResponse, error) { + out := new(RemoveSegmenterResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/RemoveSegmenter", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *visionServiceClient) GetObjectPointClouds(ctx context.Context, in *GetObjectPointCloudsRequest, opts ...grpc.CallOption) (*GetObjectPointCloudsResponse, error) { + out := new(GetObjectPointCloudsResponse) + err := c.cc.Invoke(ctx, "/viam.service.vision.v1.VisionService/GetObjectPointClouds", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VisionServiceServer is the server API for VisionService service. +// All implementations must embed UnimplementedVisionServiceServer +// for forward compatibility +type VisionServiceServer interface { + // GetModelParameterSchema takes the model name and returns the parameters needed to add one to the vision registry. + GetModelParameterSchema(context.Context, *GetModelParameterSchemaRequest) (*GetModelParameterSchemaResponse, error) + // GetDetectorNames returns the list of detectors in the registry. + GetDetectorNames(context.Context, *GetDetectorNamesRequest) (*GetDetectorNamesResponse, error) + // AddDetector adds a new detector to the registry. + AddDetector(context.Context, *AddDetectorRequest) (*AddDetectorResponse, error) + // RemoveDetector removes a detector from the registry. + RemoveDetector(context.Context, *RemoveDetectorRequest) (*RemoveDetectorResponse, error) + // GetDetectionsFromCamera will return a list of detections in the next image given a camera and a detector + GetDetectionsFromCamera(context.Context, *GetDetectionsFromCameraRequest) (*GetDetectionsFromCameraResponse, error) + // GetDetections will return a list of detections in the next image given the image bytes and a detector + GetDetections(context.Context, *GetDetectionsRequest) (*GetDetectionsResponse, error) + // GetClassifierNames returns the list of classifiers in the registry. + GetClassifierNames(context.Context, *GetClassifierNamesRequest) (*GetClassifierNamesResponse, error) + // AddClassifier adds a new classifier to the registry. + AddClassifier(context.Context, *AddClassifierRequest) (*AddClassifierResponse, error) + // RemoveClassifier adds a new classifier to the registry. + RemoveClassifier(context.Context, *RemoveClassifierRequest) (*RemoveClassifierResponse, error) + // GetClassificationsFromCamera will return a list of classifications in the next image given a camera and a classifier + GetClassificationsFromCamera(context.Context, *GetClassificationsFromCameraRequest) (*GetClassificationsFromCameraResponse, error) + // GetClassifications will return a list of classifications in the next image given the image bytes and a classifier + GetClassifications(context.Context, *GetClassificationsRequest) (*GetClassificationsResponse, error) + // GetSegmenterNames returns the list of segmenters in the registry. + GetSegmenterNames(context.Context, *GetSegmenterNamesRequest) (*GetSegmenterNamesResponse, error) + // AddSegmenter adds a new segmenter to the registry. + AddSegmenter(context.Context, *AddSegmenterRequest) (*AddSegmenterResponse, error) + // RemoveSegmenter removes a segmenter from the registry. + RemoveSegmenter(context.Context, *RemoveSegmenterRequest) (*RemoveSegmenterResponse, error) + // GetObjectPointClouds returns all the found objects in a pointcloud from a camera of the underlying robot, + // as well as the 3-vector center of each of the found objects. + // A specific MIME type can be requested but may not necessarily be the same one returned. + GetObjectPointClouds(context.Context, *GetObjectPointCloudsRequest) (*GetObjectPointCloudsResponse, error) + mustEmbedUnimplementedVisionServiceServer() +} + +// UnimplementedVisionServiceServer must be embedded to have forward compatible implementations. +type UnimplementedVisionServiceServer struct { +} + +func (UnimplementedVisionServiceServer) GetModelParameterSchema(context.Context, *GetModelParameterSchemaRequest) (*GetModelParameterSchemaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetModelParameterSchema not implemented") +} +func (UnimplementedVisionServiceServer) GetDetectorNames(context.Context, *GetDetectorNamesRequest) (*GetDetectorNamesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDetectorNames not implemented") +} +func (UnimplementedVisionServiceServer) AddDetector(context.Context, *AddDetectorRequest) (*AddDetectorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddDetector not implemented") +} +func (UnimplementedVisionServiceServer) RemoveDetector(context.Context, *RemoveDetectorRequest) (*RemoveDetectorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveDetector not implemented") +} +func (UnimplementedVisionServiceServer) GetDetectionsFromCamera(context.Context, *GetDetectionsFromCameraRequest) (*GetDetectionsFromCameraResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDetectionsFromCamera not implemented") +} +func (UnimplementedVisionServiceServer) GetDetections(context.Context, *GetDetectionsRequest) (*GetDetectionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDetections not implemented") +} +func (UnimplementedVisionServiceServer) GetClassifierNames(context.Context, *GetClassifierNamesRequest) (*GetClassifierNamesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetClassifierNames not implemented") +} +func (UnimplementedVisionServiceServer) AddClassifier(context.Context, *AddClassifierRequest) (*AddClassifierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddClassifier not implemented") +} +func (UnimplementedVisionServiceServer) RemoveClassifier(context.Context, *RemoveClassifierRequest) (*RemoveClassifierResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveClassifier not implemented") +} +func (UnimplementedVisionServiceServer) GetClassificationsFromCamera(context.Context, *GetClassificationsFromCameraRequest) (*GetClassificationsFromCameraResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetClassificationsFromCamera not implemented") +} +func (UnimplementedVisionServiceServer) GetClassifications(context.Context, *GetClassificationsRequest) (*GetClassificationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetClassifications not implemented") +} +func (UnimplementedVisionServiceServer) GetSegmenterNames(context.Context, *GetSegmenterNamesRequest) (*GetSegmenterNamesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSegmenterNames not implemented") +} +func (UnimplementedVisionServiceServer) AddSegmenter(context.Context, *AddSegmenterRequest) (*AddSegmenterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddSegmenter not implemented") +} +func (UnimplementedVisionServiceServer) RemoveSegmenter(context.Context, *RemoveSegmenterRequest) (*RemoveSegmenterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveSegmenter not implemented") +} +func (UnimplementedVisionServiceServer) GetObjectPointClouds(context.Context, *GetObjectPointCloudsRequest) (*GetObjectPointCloudsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetObjectPointClouds not implemented") +} +func (UnimplementedVisionServiceServer) mustEmbedUnimplementedVisionServiceServer() {} + +// UnsafeVisionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to VisionServiceServer will +// result in compilation errors. +type UnsafeVisionServiceServer interface { + mustEmbedUnimplementedVisionServiceServer() +} + +func RegisterVisionServiceServer(s grpc.ServiceRegistrar, srv VisionServiceServer) { + s.RegisterService(&VisionService_ServiceDesc, srv) +} + +func _VisionService_GetModelParameterSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetModelParameterSchemaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetModelParameterSchema(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetModelParameterSchema", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetModelParameterSchema(ctx, req.(*GetModelParameterSchemaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_GetDetectorNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDetectorNamesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetDetectorNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetDetectorNames", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetDetectorNames(ctx, req.(*GetDetectorNamesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_AddDetector_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddDetectorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).AddDetector(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/AddDetector", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).AddDetector(ctx, req.(*AddDetectorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_RemoveDetector_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveDetectorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).RemoveDetector(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/RemoveDetector", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).RemoveDetector(ctx, req.(*RemoveDetectorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_GetDetectionsFromCamera_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDetectionsFromCameraRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetDetectionsFromCamera(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetDetectionsFromCamera", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetDetectionsFromCamera(ctx, req.(*GetDetectionsFromCameraRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_GetDetections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDetectionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetDetections(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetDetections", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetDetections(ctx, req.(*GetDetectionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_GetClassifierNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClassifierNamesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetClassifierNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetClassifierNames", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetClassifierNames(ctx, req.(*GetClassifierNamesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_AddClassifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddClassifierRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).AddClassifier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/AddClassifier", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).AddClassifier(ctx, req.(*AddClassifierRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_RemoveClassifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveClassifierRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).RemoveClassifier(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/RemoveClassifier", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).RemoveClassifier(ctx, req.(*RemoveClassifierRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_GetClassificationsFromCamera_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClassificationsFromCameraRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetClassificationsFromCamera(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetClassificationsFromCamera", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetClassificationsFromCamera(ctx, req.(*GetClassificationsFromCameraRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_GetClassifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetClassificationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetClassifications(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetClassifications", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetClassifications(ctx, req.(*GetClassificationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_GetSegmenterNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSegmenterNamesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetSegmenterNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetSegmenterNames", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetSegmenterNames(ctx, req.(*GetSegmenterNamesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_AddSegmenter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddSegmenterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).AddSegmenter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/AddSegmenter", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).AddSegmenter(ctx, req.(*AddSegmenterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_RemoveSegmenter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveSegmenterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).RemoveSegmenter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/RemoveSegmenter", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).RemoveSegmenter(ctx, req.(*RemoveSegmenterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VisionService_GetObjectPointClouds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetObjectPointCloudsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisionServiceServer).GetObjectPointClouds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.service.vision.v1.VisionService/GetObjectPointClouds", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisionServiceServer).GetObjectPointClouds(ctx, req.(*GetObjectPointCloudsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// VisionService_ServiceDesc is the grpc.ServiceDesc for VisionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var VisionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.service.vision.v1.VisionService", + HandlerType: (*VisionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetModelParameterSchema", + Handler: _VisionService_GetModelParameterSchema_Handler, + }, + { + MethodName: "GetDetectorNames", + Handler: _VisionService_GetDetectorNames_Handler, + }, + { + MethodName: "AddDetector", + Handler: _VisionService_AddDetector_Handler, + }, + { + MethodName: "RemoveDetector", + Handler: _VisionService_RemoveDetector_Handler, + }, + { + MethodName: "GetDetectionsFromCamera", + Handler: _VisionService_GetDetectionsFromCamera_Handler, + }, + { + MethodName: "GetDetections", + Handler: _VisionService_GetDetections_Handler, + }, + { + MethodName: "GetClassifierNames", + Handler: _VisionService_GetClassifierNames_Handler, + }, + { + MethodName: "AddClassifier", + Handler: _VisionService_AddClassifier_Handler, + }, + { + MethodName: "RemoveClassifier", + Handler: _VisionService_RemoveClassifier_Handler, + }, + { + MethodName: "GetClassificationsFromCamera", + Handler: _VisionService_GetClassificationsFromCamera_Handler, + }, + { + MethodName: "GetClassifications", + Handler: _VisionService_GetClassifications_Handler, + }, + { + MethodName: "GetSegmenterNames", + Handler: _VisionService_GetSegmenterNames_Handler, + }, + { + MethodName: "AddSegmenter", + Handler: _VisionService_AddSegmenter_Handler, + }, + { + MethodName: "RemoveSegmenter", + Handler: _VisionService_RemoveSegmenter_Handler, + }, + { + MethodName: "GetObjectPointClouds", + Handler: _VisionService_GetObjectPointClouds_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service/vision/v1/vision.proto", +} diff --git a/tagger/v1/tagger.pb.go b/tagger/v1/tagger.pb.go index dbc679b85..ceb92b0e6 100644 --- a/tagger/v1/tagger.pb.go +++ b/tagger/v1/tagger.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.28.1 // protoc (unknown) // source: tagger/v1/tagger.proto