From 811d84e90e803beb7a48003489480f97668031f4 Mon Sep 17 00:00:00 2001 From: Ale Paredes <1709578+ale7714@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:46:57 -0500 Subject: [PATCH] [APP-3742] Provisioning proto (#438) Co-authored-by: Ale Paredes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- component/arm/v1/arm.pb.gw.go | 14 +- component/base/v1/base.pb.gw.go | 10 +- component/board/v1/board.pb.gw.go | 10 +- component/camera/v1/camera.pb.gw.go | 10 +- component/encoder/v1/encoder.pb.gw.go | 10 +- component/gantry/v1/gantry.pb.gw.go | 10 +- .../v1/input_controller.pb.gw.go | 10 +- .../posetracker/v1/pose_tracker.pb.gw.go | 10 +- component/powersensor/v1/powersensor.pb.gw.go | 10 +- component/sensor/v1/sensor.pb.gw.go | 14 +- component/servo/v1/servo.pb.gw.go | 10 +- .../v1/provisioning_grpc_web_pb.js | 324 +++ gen/js/provisioning/v1/provisioning_pb.d.ts | 279 +++ gen/js/provisioning/v1/provisioning_pb.js | 2143 +++++++++++++++++ .../v1/provisioning_pb_service.d.ts | 120 + .../v1/provisioning_pb_service.js | 181 ++ proto/viam/provisioning/v1/provisioning.proto | 74 + provisioning/v1/provisioning.pb.go | 945 ++++++++ provisioning/v1/provisioning.pb.gw.go | 426 ++++ provisioning/v1/provisioning_grpc.pb.go | 221 ++ service/datamanager/v1/data_manager.pb.gw.go | 6 +- service/motion/v1/motion.pb.gw.go | 6 +- service/sensors/v1/sensors.pb.gw.go | 6 +- service/shell/v1/shell.pb.gw.go | 6 +- 24 files changed, 4784 insertions(+), 71 deletions(-) create mode 100644 gen/js/provisioning/v1/provisioning_grpc_web_pb.js create mode 100644 gen/js/provisioning/v1/provisioning_pb.d.ts create mode 100644 gen/js/provisioning/v1/provisioning_pb.js create mode 100644 gen/js/provisioning/v1/provisioning_pb_service.d.ts create mode 100644 gen/js/provisioning/v1/provisioning_pb_service.js create mode 100644 proto/viam/provisioning/v1/provisioning.proto create mode 100644 provisioning/v1/provisioning.pb.go create mode 100644 provisioning/v1/provisioning.pb.gw.go create mode 100644 provisioning/v1/provisioning_grpc.pb.go diff --git a/component/arm/v1/arm.pb.gw.go b/component/arm/v1/arm.pb.gw.go index e9d51a96f..90c742bb6 100644 --- a/component/arm/v1/arm.pb.gw.go +++ b/component/arm/v1/arm.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -439,7 +439,7 @@ var ( ) func request_ArmService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -472,7 +472,7 @@ func request_ArmService_DoCommand_0(ctx context.Context, marshaler runtime.Marsh } func local_request_ArmService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -509,7 +509,7 @@ var ( ) func request_ArmService_GetKinematics_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetKinematicsRequest + var protoReq v1_0.GetKinematicsRequest var metadata runtime.ServerMetadata var ( @@ -542,7 +542,7 @@ func request_ArmService_GetKinematics_0(ctx context.Context, marshaler runtime.M } func local_request_ArmService_GetKinematics_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetKinematicsRequest + var protoReq v1_0.GetKinematicsRequest var metadata runtime.ServerMetadata var ( @@ -579,7 +579,7 @@ var ( ) func request_ArmService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -612,7 +612,7 @@ func request_ArmService_GetGeometries_0(ctx context.Context, marshaler runtime.M } func local_request_ArmService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/base/v1/base.pb.gw.go b/component/base/v1/base.pb.gw.go index 185bd31aa..faa48e8b0 100644 --- a/component/base/v1/base.pb.gw.go +++ b/component/base/v1/base.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -439,7 +439,7 @@ var ( ) func request_BaseService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -472,7 +472,7 @@ func request_BaseService_DoCommand_0(ctx context.Context, marshaler runtime.Mars } func local_request_BaseService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -509,7 +509,7 @@ var ( ) func request_BaseService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -542,7 +542,7 @@ func request_BaseService_GetGeometries_0(ctx context.Context, marshaler runtime. } func local_request_BaseService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/board/v1/board.pb.gw.go b/component/board/v1/board.pb.gw.go index 84b5b756d..bbebd2fb5 100644 --- a/component/board/v1/board.pb.gw.go +++ b/component/board/v1/board.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -527,7 +527,7 @@ var ( ) func request_BoardService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -560,7 +560,7 @@ func request_BoardService_DoCommand_0(ctx context.Context, marshaler runtime.Mar } func local_request_BoardService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -917,7 +917,7 @@ var ( ) func request_BoardService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client BoardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -950,7 +950,7 @@ func request_BoardService_GetGeometries_0(ctx context.Context, marshaler runtime } func local_request_BoardService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server BoardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/camera/v1/camera.pb.gw.go b/component/camera/v1/camera.pb.gw.go index b97fe7000..b329ca959 100644 --- a/component/camera/v1/camera.pb.gw.go +++ b/component/camera/v1/camera.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -351,7 +351,7 @@ var ( ) func request_CameraService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client CameraServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -384,7 +384,7 @@ func request_CameraService_DoCommand_0(ctx context.Context, marshaler runtime.Ma } func local_request_CameraService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server CameraServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -421,7 +421,7 @@ var ( ) func request_CameraService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client CameraServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -454,7 +454,7 @@ func request_CameraService_GetGeometries_0(ctx context.Context, marshaler runtim } func local_request_CameraService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server CameraServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/encoder/v1/encoder.pb.gw.go b/component/encoder/v1/encoder.pb.gw.go index ef911f15d..4fa63db37 100644 --- a/component/encoder/v1/encoder.pb.gw.go +++ b/component/encoder/v1/encoder.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -247,7 +247,7 @@ var ( ) func request_EncoderService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client EncoderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -280,7 +280,7 @@ func request_EncoderService_DoCommand_0(ctx context.Context, marshaler runtime.M } func local_request_EncoderService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server EncoderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -317,7 +317,7 @@ var ( ) func request_EncoderService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client EncoderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -350,7 +350,7 @@ func request_EncoderService_GetGeometries_0(ctx context.Context, marshaler runti } func local_request_EncoderService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server EncoderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/gantry/v1/gantry.pb.gw.go b/component/gantry/v1/gantry.pb.gw.go index 13a62b8f4..e78f11c29 100644 --- a/component/gantry/v1/gantry.pb.gw.go +++ b/component/gantry/v1/gantry.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -439,7 +439,7 @@ var ( ) func request_GantryService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client GantryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -472,7 +472,7 @@ func request_GantryService_DoCommand_0(ctx context.Context, marshaler runtime.Ma } func local_request_GantryService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server GantryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -509,7 +509,7 @@ var ( ) func request_GantryService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client GantryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -542,7 +542,7 @@ func request_GantryService_GetGeometries_0(ctx context.Context, marshaler runtim } func local_request_GantryService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server GantryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/inputcontroller/v1/input_controller.pb.gw.go b/component/inputcontroller/v1/input_controller.pb.gw.go index 199f00f1d..65d0cf631 100644 --- a/component/inputcontroller/v1/input_controller.pb.gw.go +++ b/component/inputcontroller/v1/input_controller.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -292,7 +292,7 @@ var ( ) func request_InputControllerService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client InputControllerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -325,7 +325,7 @@ func request_InputControllerService_DoCommand_0(ctx context.Context, marshaler r } func local_request_InputControllerService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server InputControllerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -362,7 +362,7 @@ var ( ) func request_InputControllerService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client InputControllerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -395,7 +395,7 @@ func request_InputControllerService_GetGeometries_0(ctx context.Context, marshal } func local_request_InputControllerService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server InputControllerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/posetracker/v1/pose_tracker.pb.gw.go b/component/posetracker/v1/pose_tracker.pb.gw.go index 0007c002d..7eda59b7b 100644 --- a/component/posetracker/v1/pose_tracker.pb.gw.go +++ b/component/posetracker/v1/pose_tracker.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -107,7 +107,7 @@ var ( ) func request_PoseTrackerService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client PoseTrackerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -140,7 +140,7 @@ func request_PoseTrackerService_DoCommand_0(ctx context.Context, marshaler runti } func local_request_PoseTrackerService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server PoseTrackerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -177,7 +177,7 @@ var ( ) func request_PoseTrackerService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client PoseTrackerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -210,7 +210,7 @@ func request_PoseTrackerService_GetGeometries_0(ctx context.Context, marshaler r } func local_request_PoseTrackerService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server PoseTrackerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/powersensor/v1/powersensor.pb.gw.go b/component/powersensor/v1/powersensor.pb.gw.go index c60c7e312..9a80a7e4a 100644 --- a/component/powersensor/v1/powersensor.pb.gw.go +++ b/component/powersensor/v1/powersensor.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -247,7 +247,7 @@ var ( ) func request_PowerSensorService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, client PowerSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetReadingsRequest + var protoReq v1_0.GetReadingsRequest var metadata runtime.ServerMetadata var ( @@ -280,7 +280,7 @@ func request_PowerSensorService_GetReadings_0(ctx context.Context, marshaler run } func local_request_PowerSensorService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, server PowerSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetReadingsRequest + var protoReq v1_0.GetReadingsRequest var metadata runtime.ServerMetadata var ( @@ -317,7 +317,7 @@ var ( ) func request_PowerSensorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client PowerSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -350,7 +350,7 @@ func request_PowerSensorService_DoCommand_0(ctx context.Context, marshaler runti } func local_request_PowerSensorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server PowerSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/component/sensor/v1/sensor.pb.gw.go b/component/sensor/v1/sensor.pb.gw.go index 66681c369..b45747050 100644 --- a/component/sensor/v1/sensor.pb.gw.go +++ b/component/sensor/v1/sensor.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -37,7 +37,7 @@ var ( ) 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 v1.GetReadingsRequest + var protoReq v1_0.GetReadingsRequest var metadata runtime.ServerMetadata var ( @@ -70,7 +70,7 @@ func request_SensorService_GetReadings_0(ctx context.Context, marshaler runtime. } 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 v1.GetReadingsRequest + var protoReq v1_0.GetReadingsRequest var metadata runtime.ServerMetadata var ( @@ -107,7 +107,7 @@ var ( ) func request_SensorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client SensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -140,7 +140,7 @@ func request_SensorService_DoCommand_0(ctx context.Context, marshaler runtime.Ma } func local_request_SensorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server SensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -177,7 +177,7 @@ var ( ) func request_SensorService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client SensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -210,7 +210,7 @@ func request_SensorService_GetGeometries_0(ctx context.Context, marshaler runtim } func local_request_SensorService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server SensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/servo/v1/servo.pb.gw.go b/component/servo/v1/servo.pb.gw.go index fd6e0a9d1..75e698cc0 100644 --- a/component/servo/v1/servo.pb.gw.go +++ b/component/servo/v1/servo.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -299,7 +299,7 @@ var ( ) func request_ServoService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client ServoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -332,7 +332,7 @@ func request_ServoService_DoCommand_0(ctx context.Context, marshaler runtime.Mar } func local_request_ServoService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server ServoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -369,7 +369,7 @@ var ( ) func request_ServoService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client ServoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -402,7 +402,7 @@ func request_ServoService_GetGeometries_0(ctx context.Context, marshaler runtime } func local_request_ServoService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server ServoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/gen/js/provisioning/v1/provisioning_grpc_web_pb.js b/gen/js/provisioning/v1/provisioning_grpc_web_pb.js new file mode 100644 index 000000000..ef91f2ee3 --- /dev/null +++ b/gen/js/provisioning/v1/provisioning_grpc_web_pb.js @@ -0,0 +1,324 @@ +/** + * @fileoverview gRPC-Web generated client stub for viam.provisioning.v1 + * @enhanceable + * @public + */ + +// Code generated by protoc-gen-grpc-web. DO NOT EDIT. +// versions: +// protoc-gen-grpc-web v1.4.2 +// protoc v0.0.0 +// source: provisioning/v1/provisioning.proto + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + +const proto = {}; +proto.viam = {}; +proto.viam.provisioning = {}; +proto.viam.provisioning.v1 = require('./provisioning_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.provisioning.v1.ProvisioningServiceClient = + 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.replace(/\/+$/, ''); + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.viam.provisioning.v1.ProvisioningServicePromiseClient = + 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.replace(/\/+$/, ''); + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.provisioning.v1.GetSmartMachineStatusRequest, + * !proto.viam.provisioning.v1.GetSmartMachineStatusResponse>} + */ +const methodDescriptor_ProvisioningService_GetSmartMachineStatus = new grpc.web.MethodDescriptor( + '/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus', + grpc.web.MethodType.UNARY, + proto.viam.provisioning.v1.GetSmartMachineStatusRequest, + proto.viam.provisioning.v1.GetSmartMachineStatusResponse, + /** + * @param {!proto.viam.provisioning.v1.GetSmartMachineStatusRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.provisioning.v1.GetSmartMachineStatusResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.provisioning.v1.GetSmartMachineStatusRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.provisioning.v1.GetSmartMachineStatusResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.provisioning.v1.ProvisioningServiceClient.prototype.getSmartMachineStatus = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus', + request, + metadata || {}, + methodDescriptor_ProvisioningService_GetSmartMachineStatus, + callback); +}; + + +/** + * @param {!proto.viam.provisioning.v1.GetSmartMachineStatusRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.provisioning.v1.ProvisioningServicePromiseClient.prototype.getSmartMachineStatus = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus', + request, + metadata || {}, + methodDescriptor_ProvisioningService_GetSmartMachineStatus); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.provisioning.v1.SetNetworkCredentialsRequest, + * !proto.viam.provisioning.v1.SetNetworkCredentialsResponse>} + */ +const methodDescriptor_ProvisioningService_SetNetworkCredentials = new grpc.web.MethodDescriptor( + '/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials', + grpc.web.MethodType.UNARY, + proto.viam.provisioning.v1.SetNetworkCredentialsRequest, + proto.viam.provisioning.v1.SetNetworkCredentialsResponse, + /** + * @param {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.provisioning.v1.SetNetworkCredentialsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.provisioning.v1.SetNetworkCredentialsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.provisioning.v1.ProvisioningServiceClient.prototype.setNetworkCredentials = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials', + request, + metadata || {}, + methodDescriptor_ProvisioningService_SetNetworkCredentials, + callback); +}; + + +/** + * @param {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.provisioning.v1.ProvisioningServicePromiseClient.prototype.setNetworkCredentials = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials', + request, + metadata || {}, + methodDescriptor_ProvisioningService_SetNetworkCredentials); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest, + * !proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse>} + */ +const methodDescriptor_ProvisioningService_SetSmartMachineCredentials = new grpc.web.MethodDescriptor( + '/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials', + grpc.web.MethodType.UNARY, + proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest, + proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse, + /** + * @param {!proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.provisioning.v1.ProvisioningServiceClient.prototype.setSmartMachineCredentials = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials', + request, + metadata || {}, + methodDescriptor_ProvisioningService_SetSmartMachineCredentials, + callback); +}; + + +/** + * @param {!proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.provisioning.v1.ProvisioningServicePromiseClient.prototype.setSmartMachineCredentials = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials', + request, + metadata || {}, + methodDescriptor_ProvisioningService_SetSmartMachineCredentials); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.viam.provisioning.v1.GetNetworkListRequest, + * !proto.viam.provisioning.v1.GetNetworkListResponse>} + */ +const methodDescriptor_ProvisioningService_GetNetworkList = new grpc.web.MethodDescriptor( + '/viam.provisioning.v1.ProvisioningService/GetNetworkList', + grpc.web.MethodType.UNARY, + proto.viam.provisioning.v1.GetNetworkListRequest, + proto.viam.provisioning.v1.GetNetworkListResponse, + /** + * @param {!proto.viam.provisioning.v1.GetNetworkListRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.viam.provisioning.v1.GetNetworkListResponse.deserializeBinary +); + + +/** + * @param {!proto.viam.provisioning.v1.GetNetworkListRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.viam.provisioning.v1.GetNetworkListResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.viam.provisioning.v1.ProvisioningServiceClient.prototype.getNetworkList = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/viam.provisioning.v1.ProvisioningService/GetNetworkList', + request, + metadata || {}, + methodDescriptor_ProvisioningService_GetNetworkList, + callback); +}; + + +/** + * @param {!proto.viam.provisioning.v1.GetNetworkListRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.viam.provisioning.v1.ProvisioningServicePromiseClient.prototype.getNetworkList = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/viam.provisioning.v1.ProvisioningService/GetNetworkList', + request, + metadata || {}, + methodDescriptor_ProvisioningService_GetNetworkList); +}; + + +module.exports = proto.viam.provisioning.v1; + diff --git a/gen/js/provisioning/v1/provisioning_pb.d.ts b/gen/js/provisioning/v1/provisioning_pb.d.ts new file mode 100644 index 000000000..756ed604c --- /dev/null +++ b/gen/js/provisioning/v1/provisioning_pb.d.ts @@ -0,0 +1,279 @@ +// package: viam.provisioning.v1 +// file: provisioning/v1/provisioning.proto + +import * as jspb from "google-protobuf"; + +export class GetSmartMachineStatusRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSmartMachineStatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetSmartMachineStatusRequest): GetSmartMachineStatusRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSmartMachineStatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSmartMachineStatusRequest; + static deserializeBinaryFromReader(message: GetSmartMachineStatusRequest, reader: jspb.BinaryReader): GetSmartMachineStatusRequest; +} + +export namespace GetSmartMachineStatusRequest { + export type AsObject = { + } +} + +export class GetSmartMachineStatusResponse extends jspb.Message { + hasProvisioningInfo(): boolean; + clearProvisioningInfo(): void; + getProvisioningInfo(): ProvisioningInfo | undefined; + setProvisioningInfo(value?: ProvisioningInfo): void; + + getHasSmartMachineCredentials(): boolean; + setHasSmartMachineCredentials(value: boolean): void; + + getIsOnline(): boolean; + setIsOnline(value: boolean): void; + + hasLatestConnectionAttempt(): boolean; + clearLatestConnectionAttempt(): void; + getLatestConnectionAttempt(): NetworkInfo | undefined; + setLatestConnectionAttempt(value?: NetworkInfo): void; + + clearErrorsList(): void; + getErrorsList(): Array; + setErrorsList(value: Array): void; + addErrors(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetSmartMachineStatusResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetSmartMachineStatusResponse): GetSmartMachineStatusResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetSmartMachineStatusResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetSmartMachineStatusResponse; + static deserializeBinaryFromReader(message: GetSmartMachineStatusResponse, reader: jspb.BinaryReader): GetSmartMachineStatusResponse; +} + +export namespace GetSmartMachineStatusResponse { + export type AsObject = { + provisioningInfo?: ProvisioningInfo.AsObject, + hasSmartMachineCredentials: boolean, + isOnline: boolean, + latestConnectionAttempt?: NetworkInfo.AsObject, + errorsList: Array, + } +} + +export class SetNetworkCredentialsRequest extends jspb.Message { + getType(): string; + setType(value: string): void; + + getSsid(): string; + setSsid(value: string): void; + + getPsk(): string; + setPsk(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetNetworkCredentialsRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetNetworkCredentialsRequest): SetNetworkCredentialsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetNetworkCredentialsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetNetworkCredentialsRequest; + static deserializeBinaryFromReader(message: SetNetworkCredentialsRequest, reader: jspb.BinaryReader): SetNetworkCredentialsRequest; +} + +export namespace SetNetworkCredentialsRequest { + export type AsObject = { + type: string, + ssid: string, + psk: string, + } +} + +export class SetNetworkCredentialsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetNetworkCredentialsResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetNetworkCredentialsResponse): SetNetworkCredentialsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetNetworkCredentialsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetNetworkCredentialsResponse; + static deserializeBinaryFromReader(message: SetNetworkCredentialsResponse, reader: jspb.BinaryReader): SetNetworkCredentialsResponse; +} + +export namespace SetNetworkCredentialsResponse { + export type AsObject = { + } +} + +export class SetSmartMachineCredentialsRequest extends jspb.Message { + hasCloud(): boolean; + clearCloud(): void; + getCloud(): CloudConfig | undefined; + setCloud(value?: CloudConfig): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetSmartMachineCredentialsRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetSmartMachineCredentialsRequest): SetSmartMachineCredentialsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetSmartMachineCredentialsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetSmartMachineCredentialsRequest; + static deserializeBinaryFromReader(message: SetSmartMachineCredentialsRequest, reader: jspb.BinaryReader): SetSmartMachineCredentialsRequest; +} + +export namespace SetSmartMachineCredentialsRequest { + export type AsObject = { + cloud?: CloudConfig.AsObject, + } +} + +export class SetSmartMachineCredentialsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetSmartMachineCredentialsResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetSmartMachineCredentialsResponse): SetSmartMachineCredentialsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetSmartMachineCredentialsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetSmartMachineCredentialsResponse; + static deserializeBinaryFromReader(message: SetSmartMachineCredentialsResponse, reader: jspb.BinaryReader): SetSmartMachineCredentialsResponse; +} + +export namespace SetSmartMachineCredentialsResponse { + export type AsObject = { + } +} + +export class GetNetworkListRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetNetworkListRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetNetworkListRequest): GetNetworkListRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetNetworkListRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetNetworkListRequest; + static deserializeBinaryFromReader(message: GetNetworkListRequest, reader: jspb.BinaryReader): GetNetworkListRequest; +} + +export namespace GetNetworkListRequest { + export type AsObject = { + } +} + +export class GetNetworkListResponse extends jspb.Message { + clearNetworksList(): void; + getNetworksList(): Array; + setNetworksList(value: Array): void; + addNetworks(value?: NetworkInfo, index?: number): NetworkInfo; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetNetworkListResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetNetworkListResponse): GetNetworkListResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetNetworkListResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetNetworkListResponse; + static deserializeBinaryFromReader(message: GetNetworkListResponse, reader: jspb.BinaryReader): GetNetworkListResponse; +} + +export namespace GetNetworkListResponse { + export type AsObject = { + networksList: Array, + } +} + +export class ProvisioningInfo extends jspb.Message { + getFragmentId(): string; + setFragmentId(value: string): void; + + getModel(): string; + setModel(value: string): void; + + getManufacturer(): string; + setManufacturer(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ProvisioningInfo.AsObject; + static toObject(includeInstance: boolean, msg: ProvisioningInfo): ProvisioningInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ProvisioningInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ProvisioningInfo; + static deserializeBinaryFromReader(message: ProvisioningInfo, reader: jspb.BinaryReader): ProvisioningInfo; +} + +export namespace ProvisioningInfo { + export type AsObject = { + fragmentId: string, + model: string, + manufacturer: string, + } +} + +export class NetworkInfo extends jspb.Message { + getType(): string; + setType(value: string): void; + + getSsid(): string; + setSsid(value: string): void; + + getSecurity(): string; + setSecurity(value: string): void; + + getSignal(): number; + setSignal(value: number): void; + + getConnected(): boolean; + setConnected(value: boolean): void; + + getLastError(): string; + setLastError(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NetworkInfo.AsObject; + static toObject(includeInstance: boolean, msg: NetworkInfo): NetworkInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NetworkInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NetworkInfo; + static deserializeBinaryFromReader(message: NetworkInfo, reader: jspb.BinaryReader): NetworkInfo; +} + +export namespace NetworkInfo { + export type AsObject = { + type: string, + ssid: string, + security: string, + signal: number, + connected: boolean, + lastError: string, + } +} + +export class CloudConfig extends jspb.Message { + getId(): string; + setId(value: string): void; + + getSecret(): string; + setSecret(value: string): void; + + getAppAddress(): string; + setAppAddress(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, + secret: string, + appAddress: string, + } +} + diff --git a/gen/js/provisioning/v1/provisioning_pb.js b/gen/js/provisioning/v1/provisioning_pb.js new file mode 100644 index 000000000..5f798a8a8 --- /dev/null +++ b/gen/js/provisioning/v1/provisioning_pb.js @@ -0,0 +1,2143 @@ +// source: provisioning/v1/provisioning.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.provisioning.v1.CloudConfig', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.GetNetworkListRequest', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.GetNetworkListResponse', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.GetSmartMachineStatusRequest', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.GetSmartMachineStatusResponse', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.NetworkInfo', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.ProvisioningInfo', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.SetNetworkCredentialsRequest', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.SetNetworkCredentialsResponse', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest', null, global); +goog.exportSymbol('proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse', 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.provisioning.v1.GetSmartMachineStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.provisioning.v1.GetSmartMachineStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.GetSmartMachineStatusRequest.displayName = 'proto.viam.provisioning.v1.GetSmartMachineStatusRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.provisioning.v1.GetSmartMachineStatusResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.provisioning.v1.GetSmartMachineStatusResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.GetSmartMachineStatusResponse.displayName = 'proto.viam.provisioning.v1.GetSmartMachineStatusResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.provisioning.v1.SetNetworkCredentialsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.SetNetworkCredentialsRequest.displayName = 'proto.viam.provisioning.v1.SetNetworkCredentialsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.SetNetworkCredentialsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.provisioning.v1.SetNetworkCredentialsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.SetNetworkCredentialsResponse.displayName = 'proto.viam.provisioning.v1.SetNetworkCredentialsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.displayName = 'proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse.displayName = 'proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.GetNetworkListRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.provisioning.v1.GetNetworkListRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.GetNetworkListRequest.displayName = 'proto.viam.provisioning.v1.GetNetworkListRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.GetNetworkListResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.viam.provisioning.v1.GetNetworkListResponse.repeatedFields_, null); +}; +goog.inherits(proto.viam.provisioning.v1.GetNetworkListResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.GetNetworkListResponse.displayName = 'proto.viam.provisioning.v1.GetNetworkListResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.ProvisioningInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.provisioning.v1.ProvisioningInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.ProvisioningInfo.displayName = 'proto.viam.provisioning.v1.ProvisioningInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.NetworkInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.provisioning.v1.NetworkInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.NetworkInfo.displayName = 'proto.viam.provisioning.v1.NetworkInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.viam.provisioning.v1.CloudConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.viam.provisioning.v1.CloudConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.viam.provisioning.v1.CloudConfig.displayName = 'proto.viam.provisioning.v1.CloudConfig'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.GetSmartMachineStatusRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.GetSmartMachineStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.GetSmartMachineStatusRequest.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.provisioning.v1.GetSmartMachineStatusRequest} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.GetSmartMachineStatusRequest; + return proto.viam.provisioning.v1.GetSmartMachineStatusRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.GetSmartMachineStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusRequest} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusRequest.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.provisioning.v1.GetSmartMachineStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.GetSmartMachineStatusRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.GetSmartMachineStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.GetSmartMachineStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.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.provisioning.v1.GetSmartMachineStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.GetSmartMachineStatusResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.toObject = function(includeInstance, msg) { + var f, obj = { + provisioningInfo: (f = msg.getProvisioningInfo()) && proto.viam.provisioning.v1.ProvisioningInfo.toObject(includeInstance, f), + hasSmartMachineCredentials: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + isOnline: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + latestConnectionAttempt: (f = msg.getLatestConnectionAttempt()) && proto.viam.provisioning.v1.NetworkInfo.toObject(includeInstance, f), + errorsList: (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.viam.provisioning.v1.GetSmartMachineStatusResponse} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.GetSmartMachineStatusResponse; + return proto.viam.provisioning.v1.GetSmartMachineStatusResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.provisioning.v1.ProvisioningInfo; + reader.readMessage(value,proto.viam.provisioning.v1.ProvisioningInfo.deserializeBinaryFromReader); + msg.setProvisioningInfo(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHasSmartMachineCredentials(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsOnline(value); + break; + case 4: + var value = new proto.viam.provisioning.v1.NetworkInfo; + reader.readMessage(value,proto.viam.provisioning.v1.NetworkInfo.deserializeBinaryFromReader); + msg.setLatestConnectionAttempt(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addErrors(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.GetSmartMachineStatusResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvisioningInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.provisioning.v1.ProvisioningInfo.serializeBinaryToWriter + ); + } + f = message.getHasSmartMachineCredentials(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getIsOnline(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getLatestConnectionAttempt(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.viam.provisioning.v1.NetworkInfo.serializeBinaryToWriter + ); + } + f = message.getErrorsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } +}; + + +/** + * optional ProvisioningInfo provisioning_info = 1; + * @return {?proto.viam.provisioning.v1.ProvisioningInfo} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.getProvisioningInfo = function() { + return /** @type{?proto.viam.provisioning.v1.ProvisioningInfo} */ ( + jspb.Message.getWrapperField(this, proto.viam.provisioning.v1.ProvisioningInfo, 1)); +}; + + +/** + * @param {?proto.viam.provisioning.v1.ProvisioningInfo|undefined} value + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} returns this +*/ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.setProvisioningInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} returns this + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.clearProvisioningInfo = function() { + return this.setProvisioningInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.hasProvisioningInfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool has_smart_machine_credentials = 2; + * @return {boolean} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.getHasSmartMachineCredentials = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} returns this + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.setHasSmartMachineCredentials = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bool is_online = 3; + * @return {boolean} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.getIsOnline = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} returns this + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.setIsOnline = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional NetworkInfo latest_connection_attempt = 4; + * @return {?proto.viam.provisioning.v1.NetworkInfo} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.getLatestConnectionAttempt = function() { + return /** @type{?proto.viam.provisioning.v1.NetworkInfo} */ ( + jspb.Message.getWrapperField(this, proto.viam.provisioning.v1.NetworkInfo, 4)); +}; + + +/** + * @param {?proto.viam.provisioning.v1.NetworkInfo|undefined} value + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} returns this +*/ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.setLatestConnectionAttempt = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} returns this + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.clearLatestConnectionAttempt = function() { + return this.setLatestConnectionAttempt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.hasLatestConnectionAttempt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated string errors = 5; + * @return {!Array} + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.getErrorsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} returns this + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.setErrorsList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.viam.provisioning.v1.GetSmartMachineStatusResponse} returns this + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.addErrors = 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.provisioning.v1.GetSmartMachineStatusResponse} returns this + */ +proto.viam.provisioning.v1.GetSmartMachineStatusResponse.prototype.clearErrorsList = function() { + return this.setErrorsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.SetNetworkCredentialsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + ssid: jspb.Message.getFieldWithDefault(msg, 2, ""), + psk: 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.provisioning.v1.SetNetworkCredentialsRequest} + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.SetNetworkCredentialsRequest; + return proto.viam.provisioning.v1.SetNetworkCredentialsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.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.setSsid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPsk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.SetNetworkCredentialsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSsid(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPsk(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} returns this + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string ssid = 2; + * @return {string} + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.prototype.getSsid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} returns this + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.prototype.setSsid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string psk = 3; + * @return {string} + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.prototype.getPsk = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.SetNetworkCredentialsRequest} returns this + */ +proto.viam.provisioning.v1.SetNetworkCredentialsRequest.prototype.setPsk = 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.provisioning.v1.SetNetworkCredentialsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.SetNetworkCredentialsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.SetNetworkCredentialsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.SetNetworkCredentialsResponse.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.provisioning.v1.SetNetworkCredentialsResponse} + */ +proto.viam.provisioning.v1.SetNetworkCredentialsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.SetNetworkCredentialsResponse; + return proto.viam.provisioning.v1.SetNetworkCredentialsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.SetNetworkCredentialsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.SetNetworkCredentialsResponse} + */ +proto.viam.provisioning.v1.SetNetworkCredentialsResponse.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.provisioning.v1.SetNetworkCredentialsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.SetNetworkCredentialsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.SetNetworkCredentialsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.SetNetworkCredentialsResponse.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.provisioning.v1.SetSmartMachineCredentialsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + cloud: (f = msg.getCloud()) && proto.viam.provisioning.v1.CloudConfig.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.provisioning.v1.SetSmartMachineCredentialsRequest} + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest; + return proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest} + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.provisioning.v1.CloudConfig; + reader.readMessage(value,proto.viam.provisioning.v1.CloudConfig.deserializeBinaryFromReader); + msg.setCloud(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCloud(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.viam.provisioning.v1.CloudConfig.serializeBinaryToWriter + ); + } +}; + + +/** + * optional CloudConfig cloud = 1; + * @return {?proto.viam.provisioning.v1.CloudConfig} + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.prototype.getCloud = function() { + return /** @type{?proto.viam.provisioning.v1.CloudConfig} */ ( + jspb.Message.getWrapperField(this, proto.viam.provisioning.v1.CloudConfig, 1)); +}; + + +/** + * @param {?proto.viam.provisioning.v1.CloudConfig|undefined} value + * @return {!proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest} returns this +*/ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.prototype.setCloud = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest} returns this + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.prototype.clearCloud = function() { + return this.setCloud(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsRequest.prototype.hasCloud = 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.provisioning.v1.SetSmartMachineCredentialsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse.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.provisioning.v1.SetSmartMachineCredentialsResponse} + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse; + return proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse} + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse.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.provisioning.v1.SetSmartMachineCredentialsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.SetSmartMachineCredentialsResponse.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.provisioning.v1.GetNetworkListRequest.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.GetNetworkListRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.GetNetworkListRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.GetNetworkListRequest.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.provisioning.v1.GetNetworkListRequest} + */ +proto.viam.provisioning.v1.GetNetworkListRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.GetNetworkListRequest; + return proto.viam.provisioning.v1.GetNetworkListRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.GetNetworkListRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.GetNetworkListRequest} + */ +proto.viam.provisioning.v1.GetNetworkListRequest.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.provisioning.v1.GetNetworkListRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.GetNetworkListRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.GetNetworkListRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.GetNetworkListRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.viam.provisioning.v1.GetNetworkListResponse.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.provisioning.v1.GetNetworkListResponse.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.GetNetworkListResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.GetNetworkListResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.GetNetworkListResponse.toObject = function(includeInstance, msg) { + var f, obj = { + networksList: jspb.Message.toObjectList(msg.getNetworksList(), + proto.viam.provisioning.v1.NetworkInfo.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.provisioning.v1.GetNetworkListResponse} + */ +proto.viam.provisioning.v1.GetNetworkListResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.GetNetworkListResponse; + return proto.viam.provisioning.v1.GetNetworkListResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.GetNetworkListResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.GetNetworkListResponse} + */ +proto.viam.provisioning.v1.GetNetworkListResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.viam.provisioning.v1.NetworkInfo; + reader.readMessage(value,proto.viam.provisioning.v1.NetworkInfo.deserializeBinaryFromReader); + msg.addNetworks(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.provisioning.v1.GetNetworkListResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.GetNetworkListResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.GetNetworkListResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.GetNetworkListResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNetworksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.viam.provisioning.v1.NetworkInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated NetworkInfo networks = 1; + * @return {!Array} + */ +proto.viam.provisioning.v1.GetNetworkListResponse.prototype.getNetworksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.viam.provisioning.v1.NetworkInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.viam.provisioning.v1.GetNetworkListResponse} returns this +*/ +proto.viam.provisioning.v1.GetNetworkListResponse.prototype.setNetworksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.viam.provisioning.v1.NetworkInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.viam.provisioning.v1.NetworkInfo} + */ +proto.viam.provisioning.v1.GetNetworkListResponse.prototype.addNetworks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.viam.provisioning.v1.NetworkInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.viam.provisioning.v1.GetNetworkListResponse} returns this + */ +proto.viam.provisioning.v1.GetNetworkListResponse.prototype.clearNetworksList = function() { + return this.setNetworksList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.viam.provisioning.v1.ProvisioningInfo.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.ProvisioningInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.ProvisioningInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.ProvisioningInfo.toObject = function(includeInstance, msg) { + var f, obj = { + fragmentId: jspb.Message.getFieldWithDefault(msg, 1, ""), + model: jspb.Message.getFieldWithDefault(msg, 2, ""), + manufacturer: 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.provisioning.v1.ProvisioningInfo} + */ +proto.viam.provisioning.v1.ProvisioningInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.ProvisioningInfo; + return proto.viam.provisioning.v1.ProvisioningInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.ProvisioningInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.ProvisioningInfo} + */ +proto.viam.provisioning.v1.ProvisioningInfo.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.setFragmentId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setModel(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setManufacturer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.provisioning.v1.ProvisioningInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.ProvisioningInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.ProvisioningInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.ProvisioningInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFragmentId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getModel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getManufacturer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string fragment_id = 1; + * @return {string} + */ +proto.viam.provisioning.v1.ProvisioningInfo.prototype.getFragmentId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.ProvisioningInfo} returns this + */ +proto.viam.provisioning.v1.ProvisioningInfo.prototype.setFragmentId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string model = 2; + * @return {string} + */ +proto.viam.provisioning.v1.ProvisioningInfo.prototype.getModel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.ProvisioningInfo} returns this + */ +proto.viam.provisioning.v1.ProvisioningInfo.prototype.setModel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string manufacturer = 3; + * @return {string} + */ +proto.viam.provisioning.v1.ProvisioningInfo.prototype.getManufacturer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.ProvisioningInfo} returns this + */ +proto.viam.provisioning.v1.ProvisioningInfo.prototype.setManufacturer = 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.provisioning.v1.NetworkInfo.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.v1.NetworkInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.viam.provisioning.v1.NetworkInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.NetworkInfo.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + ssid: jspb.Message.getFieldWithDefault(msg, 2, ""), + security: jspb.Message.getFieldWithDefault(msg, 3, ""), + signal: jspb.Message.getFieldWithDefault(msg, 4, 0), + connected: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + lastError: 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.provisioning.v1.NetworkInfo} + */ +proto.viam.provisioning.v1.NetworkInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.NetworkInfo; + return proto.viam.provisioning.v1.NetworkInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.NetworkInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.NetworkInfo} + */ +proto.viam.provisioning.v1.NetworkInfo.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.setSsid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSecurity(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setSignal(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setConnected(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setLastError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.v1.NetworkInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.viam.provisioning.v1.NetworkInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.NetworkInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSsid(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSecurity(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSignal(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getConnected(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getLastError(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.NetworkInfo} returns this + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string ssid = 2; + * @return {string} + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.getSsid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.NetworkInfo} returns this + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.setSsid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string security = 3; + * @return {string} + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.getSecurity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.NetworkInfo} returns this + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.setSecurity = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 signal = 4; + * @return {number} + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.getSignal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.viam.provisioning.v1.NetworkInfo} returns this + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.setSignal = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool connected = 5; + * @return {boolean} + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.getConnected = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.viam.provisioning.v1.NetworkInfo} returns this + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.setConnected = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional string last_error = 6; + * @return {string} + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.getLastError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.NetworkInfo} returns this + */ +proto.viam.provisioning.v1.NetworkInfo.prototype.setLastError = 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.provisioning.v1.CloudConfig.prototype.toObject = function(opt_includeInstance) { + return proto.viam.provisioning.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.provisioning.v1.CloudConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.CloudConfig.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + secret: jspb.Message.getFieldWithDefault(msg, 2, ""), + appAddress: 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.provisioning.v1.CloudConfig} + */ +proto.viam.provisioning.v1.CloudConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.viam.provisioning.v1.CloudConfig; + return proto.viam.provisioning.v1.CloudConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.viam.provisioning.v1.CloudConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.viam.provisioning.v1.CloudConfig} + */ +proto.viam.provisioning.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.setSecret(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAppAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.viam.provisioning.v1.CloudConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.viam.provisioning.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.provisioning.v1.CloudConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.viam.provisioning.v1.CloudConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSecret(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAppAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.viam.provisioning.v1.CloudConfig.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.CloudConfig} returns this + */ +proto.viam.provisioning.v1.CloudConfig.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string secret = 2; + * @return {string} + */ +proto.viam.provisioning.v1.CloudConfig.prototype.getSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.CloudConfig} returns this + */ +proto.viam.provisioning.v1.CloudConfig.prototype.setSecret = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string app_address = 3; + * @return {string} + */ +proto.viam.provisioning.v1.CloudConfig.prototype.getAppAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.viam.provisioning.v1.CloudConfig} returns this + */ +proto.viam.provisioning.v1.CloudConfig.prototype.setAppAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.viam.provisioning.v1); diff --git a/gen/js/provisioning/v1/provisioning_pb_service.d.ts b/gen/js/provisioning/v1/provisioning_pb_service.d.ts new file mode 100644 index 000000000..99f701a97 --- /dev/null +++ b/gen/js/provisioning/v1/provisioning_pb_service.d.ts @@ -0,0 +1,120 @@ +// package: viam.provisioning.v1 +// file: provisioning/v1/provisioning.proto + +import * as provisioning_v1_provisioning_pb from "../../provisioning/v1/provisioning_pb"; +import {grpc} from "@improbable-eng/grpc-web"; + +type ProvisioningServiceGetSmartMachineStatus = { + readonly methodName: string; + readonly service: typeof ProvisioningService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof provisioning_v1_provisioning_pb.GetSmartMachineStatusRequest; + readonly responseType: typeof provisioning_v1_provisioning_pb.GetSmartMachineStatusResponse; +}; + +type ProvisioningServiceSetNetworkCredentials = { + readonly methodName: string; + readonly service: typeof ProvisioningService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof provisioning_v1_provisioning_pb.SetNetworkCredentialsRequest; + readonly responseType: typeof provisioning_v1_provisioning_pb.SetNetworkCredentialsResponse; +}; + +type ProvisioningServiceSetSmartMachineCredentials = { + readonly methodName: string; + readonly service: typeof ProvisioningService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof provisioning_v1_provisioning_pb.SetSmartMachineCredentialsRequest; + readonly responseType: typeof provisioning_v1_provisioning_pb.SetSmartMachineCredentialsResponse; +}; + +type ProvisioningServiceGetNetworkList = { + readonly methodName: string; + readonly service: typeof ProvisioningService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof provisioning_v1_provisioning_pb.GetNetworkListRequest; + readonly responseType: typeof provisioning_v1_provisioning_pb.GetNetworkListResponse; +}; + +export class ProvisioningService { + static readonly serviceName: string; + static readonly GetSmartMachineStatus: ProvisioningServiceGetSmartMachineStatus; + static readonly SetNetworkCredentials: ProvisioningServiceSetNetworkCredentials; + static readonly SetSmartMachineCredentials: ProvisioningServiceSetSmartMachineCredentials; + static readonly GetNetworkList: ProvisioningServiceGetNetworkList; +} + +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 ProvisioningServiceClient { + readonly serviceHost: string; + + constructor(serviceHost: string, options?: grpc.RpcOptions); + getSmartMachineStatus( + requestMessage: provisioning_v1_provisioning_pb.GetSmartMachineStatusRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: provisioning_v1_provisioning_pb.GetSmartMachineStatusResponse|null) => void + ): UnaryResponse; + getSmartMachineStatus( + requestMessage: provisioning_v1_provisioning_pb.GetSmartMachineStatusRequest, + callback: (error: ServiceError|null, responseMessage: provisioning_v1_provisioning_pb.GetSmartMachineStatusResponse|null) => void + ): UnaryResponse; + setNetworkCredentials( + requestMessage: provisioning_v1_provisioning_pb.SetNetworkCredentialsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: provisioning_v1_provisioning_pb.SetNetworkCredentialsResponse|null) => void + ): UnaryResponse; + setNetworkCredentials( + requestMessage: provisioning_v1_provisioning_pb.SetNetworkCredentialsRequest, + callback: (error: ServiceError|null, responseMessage: provisioning_v1_provisioning_pb.SetNetworkCredentialsResponse|null) => void + ): UnaryResponse; + setSmartMachineCredentials( + requestMessage: provisioning_v1_provisioning_pb.SetSmartMachineCredentialsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: provisioning_v1_provisioning_pb.SetSmartMachineCredentialsResponse|null) => void + ): UnaryResponse; + setSmartMachineCredentials( + requestMessage: provisioning_v1_provisioning_pb.SetSmartMachineCredentialsRequest, + callback: (error: ServiceError|null, responseMessage: provisioning_v1_provisioning_pb.SetSmartMachineCredentialsResponse|null) => void + ): UnaryResponse; + getNetworkList( + requestMessage: provisioning_v1_provisioning_pb.GetNetworkListRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: provisioning_v1_provisioning_pb.GetNetworkListResponse|null) => void + ): UnaryResponse; + getNetworkList( + requestMessage: provisioning_v1_provisioning_pb.GetNetworkListRequest, + callback: (error: ServiceError|null, responseMessage: provisioning_v1_provisioning_pb.GetNetworkListResponse|null) => void + ): UnaryResponse; +} + diff --git a/gen/js/provisioning/v1/provisioning_pb_service.js b/gen/js/provisioning/v1/provisioning_pb_service.js new file mode 100644 index 000000000..cf2f5a4c0 --- /dev/null +++ b/gen/js/provisioning/v1/provisioning_pb_service.js @@ -0,0 +1,181 @@ +// package: viam.provisioning.v1 +// file: provisioning/v1/provisioning.proto + +var provisioning_v1_provisioning_pb = require("../../provisioning/v1/provisioning_pb"); +var grpc = require("@improbable-eng/grpc-web").grpc; + +var ProvisioningService = (function () { + function ProvisioningService() {} + ProvisioningService.serviceName = "viam.provisioning.v1.ProvisioningService"; + return ProvisioningService; +}()); + +ProvisioningService.GetSmartMachineStatus = { + methodName: "GetSmartMachineStatus", + service: ProvisioningService, + requestStream: false, + responseStream: false, + requestType: provisioning_v1_provisioning_pb.GetSmartMachineStatusRequest, + responseType: provisioning_v1_provisioning_pb.GetSmartMachineStatusResponse +}; + +ProvisioningService.SetNetworkCredentials = { + methodName: "SetNetworkCredentials", + service: ProvisioningService, + requestStream: false, + responseStream: false, + requestType: provisioning_v1_provisioning_pb.SetNetworkCredentialsRequest, + responseType: provisioning_v1_provisioning_pb.SetNetworkCredentialsResponse +}; + +ProvisioningService.SetSmartMachineCredentials = { + methodName: "SetSmartMachineCredentials", + service: ProvisioningService, + requestStream: false, + responseStream: false, + requestType: provisioning_v1_provisioning_pb.SetSmartMachineCredentialsRequest, + responseType: provisioning_v1_provisioning_pb.SetSmartMachineCredentialsResponse +}; + +ProvisioningService.GetNetworkList = { + methodName: "GetNetworkList", + service: ProvisioningService, + requestStream: false, + responseStream: false, + requestType: provisioning_v1_provisioning_pb.GetNetworkListRequest, + responseType: provisioning_v1_provisioning_pb.GetNetworkListResponse +}; + +exports.ProvisioningService = ProvisioningService; + +function ProvisioningServiceClient(serviceHost, options) { + this.serviceHost = serviceHost; + this.options = options || {}; +} + +ProvisioningServiceClient.prototype.getSmartMachineStatus = function getSmartMachineStatus(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ProvisioningService.GetSmartMachineStatus, { + 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(); + } + }; +}; + +ProvisioningServiceClient.prototype.setNetworkCredentials = function setNetworkCredentials(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ProvisioningService.SetNetworkCredentials, { + 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(); + } + }; +}; + +ProvisioningServiceClient.prototype.setSmartMachineCredentials = function setSmartMachineCredentials(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ProvisioningService.SetSmartMachineCredentials, { + 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(); + } + }; +}; + +ProvisioningServiceClient.prototype.getNetworkList = function getNetworkList(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(ProvisioningService.GetNetworkList, { + 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.ProvisioningServiceClient = ProvisioningServiceClient; + diff --git a/proto/viam/provisioning/v1/provisioning.proto b/proto/viam/provisioning/v1/provisioning.proto new file mode 100644 index 000000000..35937c7d2 --- /dev/null +++ b/proto/viam/provisioning/v1/provisioning.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; + +package viam.provisioning.v1; + +option go_package = "go.viam.com/api/provisioning/v1"; + +// ProvisioningService is used by viam-agent to retrieve the smart machine info. +service ProvisioningService { + // GetSmartMachineStatus is for retrieving the status of the smart machine including networking. + rpc GetSmartMachineStatus(GetSmartMachineStatusRequest) returns (GetSmartMachineStatusResponse); + + // SetNetworkCredentials is to set the wifi credentials. + rpc SetNetworkCredentials(SetNetworkCredentialsRequest) returns (SetNetworkCredentialsResponse); + + // SetSmartMachineCredentials is to set the smart machine credentials. + rpc SetSmartMachineCredentials(SetSmartMachineCredentialsRequest) returns (SetSmartMachineCredentialsResponse); + + // GetNetworkList is to retrieve the list of networks that are visible to the smart machine. + rpc GetNetworkList(GetNetworkListRequest) returns (GetNetworkListResponse); +} + +message GetSmartMachineStatusRequest {} + +message GetSmartMachineStatusResponse { + ProvisioningInfo provisioning_info = 1; + bool has_smart_machine_credentials = 2; + bool is_online = 3; + NetworkInfo latest_connection_attempt = 4; + repeated string errors = 5; +} + +message SetNetworkCredentialsRequest { + string type = 1; + string ssid = 2; + string psk = 3; +} + +message SetNetworkCredentialsResponse {} + +message SetSmartMachineCredentialsRequest { + CloudConfig cloud = 1; +} + +message SetSmartMachineCredentialsResponse {} + +message GetNetworkListRequest {} + +message GetNetworkListResponse { + repeated NetworkInfo networks = 1; +} + +message ProvisioningInfo { + string fragment_id = 1; + string model = 2; + string manufacturer = 3; +} + +message NetworkInfo { + string type = 1; + string ssid = 2; + string security = 3; + int32 signal = 4; + bool connected = 5; + string last_error = 6; +} + +// minimal CloudConfig to create /etc/viam.json +message CloudConfig { + // SmartMachine part id + string id = 1; + // SmartMachine part secret + string secret = 2; + string app_address = 3; +} diff --git a/provisioning/v1/provisioning.pb.go b/provisioning/v1/provisioning.pb.go new file mode 100644 index 000000000..ac53769e1 --- /dev/null +++ b/provisioning/v1/provisioning.pb.go @@ -0,0 +1,945 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: provisioning/v1/provisioning.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 GetSmartMachineStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetSmartMachineStatusRequest) Reset() { + *x = GetSmartMachineStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSmartMachineStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSmartMachineStatusRequest) ProtoMessage() {} + +func (x *GetSmartMachineStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 GetSmartMachineStatusRequest.ProtoReflect.Descriptor instead. +func (*GetSmartMachineStatusRequest) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{0} +} + +type GetSmartMachineStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProvisioningInfo *ProvisioningInfo `protobuf:"bytes,1,opt,name=provisioning_info,json=provisioningInfo,proto3" json:"provisioning_info,omitempty"` + HasSmartMachineCredentials bool `protobuf:"varint,2,opt,name=has_smart_machine_credentials,json=hasSmartMachineCredentials,proto3" json:"has_smart_machine_credentials,omitempty"` + IsOnline bool `protobuf:"varint,3,opt,name=is_online,json=isOnline,proto3" json:"is_online,omitempty"` + LatestConnectionAttempt *NetworkInfo `protobuf:"bytes,4,opt,name=latest_connection_attempt,json=latestConnectionAttempt,proto3" json:"latest_connection_attempt,omitempty"` + Errors []string `protobuf:"bytes,5,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *GetSmartMachineStatusResponse) Reset() { + *x = GetSmartMachineStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSmartMachineStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSmartMachineStatusResponse) ProtoMessage() {} + +func (x *GetSmartMachineStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 GetSmartMachineStatusResponse.ProtoReflect.Descriptor instead. +func (*GetSmartMachineStatusResponse) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{1} +} + +func (x *GetSmartMachineStatusResponse) GetProvisioningInfo() *ProvisioningInfo { + if x != nil { + return x.ProvisioningInfo + } + return nil +} + +func (x *GetSmartMachineStatusResponse) GetHasSmartMachineCredentials() bool { + if x != nil { + return x.HasSmartMachineCredentials + } + return false +} + +func (x *GetSmartMachineStatusResponse) GetIsOnline() bool { + if x != nil { + return x.IsOnline + } + return false +} + +func (x *GetSmartMachineStatusResponse) GetLatestConnectionAttempt() *NetworkInfo { + if x != nil { + return x.LatestConnectionAttempt + } + return nil +} + +func (x *GetSmartMachineStatusResponse) GetErrors() []string { + if x != nil { + return x.Errors + } + return nil +} + +type SetNetworkCredentialsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Ssid string `protobuf:"bytes,2,opt,name=ssid,proto3" json:"ssid,omitempty"` + Psk string `protobuf:"bytes,3,opt,name=psk,proto3" json:"psk,omitempty"` +} + +func (x *SetNetworkCredentialsRequest) Reset() { + *x = SetNetworkCredentialsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetNetworkCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetNetworkCredentialsRequest) ProtoMessage() {} + +func (x *SetNetworkCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 SetNetworkCredentialsRequest.ProtoReflect.Descriptor instead. +func (*SetNetworkCredentialsRequest) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{2} +} + +func (x *SetNetworkCredentialsRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *SetNetworkCredentialsRequest) GetSsid() string { + if x != nil { + return x.Ssid + } + return "" +} + +func (x *SetNetworkCredentialsRequest) GetPsk() string { + if x != nil { + return x.Psk + } + return "" +} + +type SetNetworkCredentialsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetNetworkCredentialsResponse) Reset() { + *x = SetNetworkCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetNetworkCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetNetworkCredentialsResponse) ProtoMessage() {} + +func (x *SetNetworkCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 SetNetworkCredentialsResponse.ProtoReflect.Descriptor instead. +func (*SetNetworkCredentialsResponse) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{3} +} + +type SetSmartMachineCredentialsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Cloud *CloudConfig `protobuf:"bytes,1,opt,name=cloud,proto3" json:"cloud,omitempty"` +} + +func (x *SetSmartMachineCredentialsRequest) Reset() { + *x = SetSmartMachineCredentialsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSmartMachineCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSmartMachineCredentialsRequest) ProtoMessage() {} + +func (x *SetSmartMachineCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 SetSmartMachineCredentialsRequest.ProtoReflect.Descriptor instead. +func (*SetSmartMachineCredentialsRequest) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{4} +} + +func (x *SetSmartMachineCredentialsRequest) GetCloud() *CloudConfig { + if x != nil { + return x.Cloud + } + return nil +} + +type SetSmartMachineCredentialsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetSmartMachineCredentialsResponse) Reset() { + *x = SetSmartMachineCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSmartMachineCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSmartMachineCredentialsResponse) ProtoMessage() {} + +func (x *SetSmartMachineCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 SetSmartMachineCredentialsResponse.ProtoReflect.Descriptor instead. +func (*SetSmartMachineCredentialsResponse) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{5} +} + +type GetNetworkListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetNetworkListRequest) Reset() { + *x = GetNetworkListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkListRequest) ProtoMessage() {} + +func (x *GetNetworkListRequest) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 GetNetworkListRequest.ProtoReflect.Descriptor instead. +func (*GetNetworkListRequest) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{6} +} + +type GetNetworkListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Networks []*NetworkInfo `protobuf:"bytes,1,rep,name=networks,proto3" json:"networks,omitempty"` +} + +func (x *GetNetworkListResponse) Reset() { + *x = GetNetworkListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkListResponse) ProtoMessage() {} + +func (x *GetNetworkListResponse) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 GetNetworkListResponse.ProtoReflect.Descriptor instead. +func (*GetNetworkListResponse) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{7} +} + +func (x *GetNetworkListResponse) GetNetworks() []*NetworkInfo { + if x != nil { + return x.Networks + } + return nil +} + +type ProvisioningInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FragmentId string `protobuf:"bytes,1,opt,name=fragment_id,json=fragmentId,proto3" json:"fragment_id,omitempty"` + Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` + Manufacturer string `protobuf:"bytes,3,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` +} + +func (x *ProvisioningInfo) Reset() { + *x = ProvisioningInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProvisioningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProvisioningInfo) ProtoMessage() {} + +func (x *ProvisioningInfo) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 ProvisioningInfo.ProtoReflect.Descriptor instead. +func (*ProvisioningInfo) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{8} +} + +func (x *ProvisioningInfo) GetFragmentId() string { + if x != nil { + return x.FragmentId + } + return "" +} + +func (x *ProvisioningInfo) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +func (x *ProvisioningInfo) GetManufacturer() string { + if x != nil { + return x.Manufacturer + } + return "" +} + +type NetworkInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Ssid string `protobuf:"bytes,2,opt,name=ssid,proto3" json:"ssid,omitempty"` + Security string `protobuf:"bytes,3,opt,name=security,proto3" json:"security,omitempty"` + Signal int32 `protobuf:"varint,4,opt,name=signal,proto3" json:"signal,omitempty"` + Connected bool `protobuf:"varint,5,opt,name=connected,proto3" json:"connected,omitempty"` + LastError string `protobuf:"bytes,6,opt,name=last_error,json=lastError,proto3" json:"last_error,omitempty"` +} + +func (x *NetworkInfo) Reset() { + *x = NetworkInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInfo) ProtoMessage() {} + +func (x *NetworkInfo) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 NetworkInfo.ProtoReflect.Descriptor instead. +func (*NetworkInfo) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{9} +} + +func (x *NetworkInfo) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *NetworkInfo) GetSsid() string { + if x != nil { + return x.Ssid + } + return "" +} + +func (x *NetworkInfo) GetSecurity() string { + if x != nil { + return x.Security + } + return "" +} + +func (x *NetworkInfo) GetSignal() int32 { + if x != nil { + return x.Signal + } + return 0 +} + +func (x *NetworkInfo) GetConnected() bool { + if x != nil { + return x.Connected + } + return false +} + +func (x *NetworkInfo) GetLastError() string { + if x != nil { + return x.LastError + } + return "" +} + +// minimal CloudConfig to create /etc/viam.json +type CloudConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SmartMachine part id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // SmartMachine part secret + Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` + AppAddress string `protobuf:"bytes,3,opt,name=app_address,json=appAddress,proto3" json:"app_address,omitempty"` +} + +func (x *CloudConfig) Reset() { + *x = CloudConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_provisioning_v1_provisioning_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloudConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloudConfig) ProtoMessage() {} + +func (x *CloudConfig) ProtoReflect() protoreflect.Message { + mi := &file_provisioning_v1_provisioning_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 CloudConfig.ProtoReflect.Descriptor instead. +func (*CloudConfig) Descriptor() ([]byte, []int) { + return file_provisioning_v1_provisioning_proto_rawDescGZIP(), []int{10} +} + +func (x *CloudConfig) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CloudConfig) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +func (x *CloudConfig) GetAppAddress() string { + if x != nil { + return x.AppAddress + } + return "" +} + +var File_provisioning_v1_provisioning_proto protoreflect.FileDescriptor + +var file_provisioning_v1_provisioning_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, + 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xcb, 0x02, 0x0a, 0x1d, 0x47, + 0x65, 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x11, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x10, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x41, 0x0a, 0x1d, 0x68, 0x61, 0x73, 0x5f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x6d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x68, 0x61, 0x73, 0x53, 0x6d, 0x61, + 0x72, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x12, 0x5d, 0x0a, 0x19, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x17, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x58, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x73, 0x69, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x70, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, + 0x73, 0x6b, 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x0a, 0x21, 0x53, 0x65, 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x22, 0x24, 0x0a, 0x22, 0x53, 0x65, 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x4d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x57, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, + 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x22, 0x6d, 0x0a, 0x10, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x0a, + 0x0b, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, + 0x75, 0x72, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x75, + 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x22, 0xa6, 0x01, 0x0a, 0x0b, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x73, 0x69, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x22, 0x56, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, + 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x9a, 0x04, 0x0a, 0x13, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x4d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x32, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x33, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x32, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x53, + 0x6d, 0x61, 0x72, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x37, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x38, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x2e, 0x76, 0x69, + 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x21, 0x5a, 0x1f, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, + 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_provisioning_v1_provisioning_proto_rawDescOnce sync.Once + file_provisioning_v1_provisioning_proto_rawDescData = file_provisioning_v1_provisioning_proto_rawDesc +) + +func file_provisioning_v1_provisioning_proto_rawDescGZIP() []byte { + file_provisioning_v1_provisioning_proto_rawDescOnce.Do(func() { + file_provisioning_v1_provisioning_proto_rawDescData = protoimpl.X.CompressGZIP(file_provisioning_v1_provisioning_proto_rawDescData) + }) + return file_provisioning_v1_provisioning_proto_rawDescData +} + +var file_provisioning_v1_provisioning_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_provisioning_v1_provisioning_proto_goTypes = []interface{}{ + (*GetSmartMachineStatusRequest)(nil), // 0: viam.provisioning.v1.GetSmartMachineStatusRequest + (*GetSmartMachineStatusResponse)(nil), // 1: viam.provisioning.v1.GetSmartMachineStatusResponse + (*SetNetworkCredentialsRequest)(nil), // 2: viam.provisioning.v1.SetNetworkCredentialsRequest + (*SetNetworkCredentialsResponse)(nil), // 3: viam.provisioning.v1.SetNetworkCredentialsResponse + (*SetSmartMachineCredentialsRequest)(nil), // 4: viam.provisioning.v1.SetSmartMachineCredentialsRequest + (*SetSmartMachineCredentialsResponse)(nil), // 5: viam.provisioning.v1.SetSmartMachineCredentialsResponse + (*GetNetworkListRequest)(nil), // 6: viam.provisioning.v1.GetNetworkListRequest + (*GetNetworkListResponse)(nil), // 7: viam.provisioning.v1.GetNetworkListResponse + (*ProvisioningInfo)(nil), // 8: viam.provisioning.v1.ProvisioningInfo + (*NetworkInfo)(nil), // 9: viam.provisioning.v1.NetworkInfo + (*CloudConfig)(nil), // 10: viam.provisioning.v1.CloudConfig +} +var file_provisioning_v1_provisioning_proto_depIdxs = []int32{ + 8, // 0: viam.provisioning.v1.GetSmartMachineStatusResponse.provisioning_info:type_name -> viam.provisioning.v1.ProvisioningInfo + 9, // 1: viam.provisioning.v1.GetSmartMachineStatusResponse.latest_connection_attempt:type_name -> viam.provisioning.v1.NetworkInfo + 10, // 2: viam.provisioning.v1.SetSmartMachineCredentialsRequest.cloud:type_name -> viam.provisioning.v1.CloudConfig + 9, // 3: viam.provisioning.v1.GetNetworkListResponse.networks:type_name -> viam.provisioning.v1.NetworkInfo + 0, // 4: viam.provisioning.v1.ProvisioningService.GetSmartMachineStatus:input_type -> viam.provisioning.v1.GetSmartMachineStatusRequest + 2, // 5: viam.provisioning.v1.ProvisioningService.SetNetworkCredentials:input_type -> viam.provisioning.v1.SetNetworkCredentialsRequest + 4, // 6: viam.provisioning.v1.ProvisioningService.SetSmartMachineCredentials:input_type -> viam.provisioning.v1.SetSmartMachineCredentialsRequest + 6, // 7: viam.provisioning.v1.ProvisioningService.GetNetworkList:input_type -> viam.provisioning.v1.GetNetworkListRequest + 1, // 8: viam.provisioning.v1.ProvisioningService.GetSmartMachineStatus:output_type -> viam.provisioning.v1.GetSmartMachineStatusResponse + 3, // 9: viam.provisioning.v1.ProvisioningService.SetNetworkCredentials:output_type -> viam.provisioning.v1.SetNetworkCredentialsResponse + 5, // 10: viam.provisioning.v1.ProvisioningService.SetSmartMachineCredentials:output_type -> viam.provisioning.v1.SetSmartMachineCredentialsResponse + 7, // 11: viam.provisioning.v1.ProvisioningService.GetNetworkList:output_type -> viam.provisioning.v1.GetNetworkListResponse + 8, // [8:12] is the sub-list for method output_type + 4, // [4:8] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_provisioning_v1_provisioning_proto_init() } +func file_provisioning_v1_provisioning_proto_init() { + if File_provisioning_v1_provisioning_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_provisioning_v1_provisioning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSmartMachineStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSmartMachineStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetNetworkCredentialsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetNetworkCredentialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSmartMachineCredentialsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSmartMachineCredentialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNetworkListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProvisioningInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provisioning_v1_provisioning_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloudConfig); 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_provisioning_v1_provisioning_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_provisioning_v1_provisioning_proto_goTypes, + DependencyIndexes: file_provisioning_v1_provisioning_proto_depIdxs, + MessageInfos: file_provisioning_v1_provisioning_proto_msgTypes, + }.Build() + File_provisioning_v1_provisioning_proto = out.File + file_provisioning_v1_provisioning_proto_rawDesc = nil + file_provisioning_v1_provisioning_proto_goTypes = nil + file_provisioning_v1_provisioning_proto_depIdxs = nil +} diff --git a/provisioning/v1/provisioning.pb.gw.go b/provisioning/v1/provisioning.pb.gw.go new file mode 100644 index 000000000..5f30d6ba9 --- /dev/null +++ b/provisioning/v1/provisioning.pb.gw.go @@ -0,0 +1,426 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: provisioning/v1/provisioning.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_ProvisioningService_GetSmartMachineStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ProvisioningServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSmartMachineStatusRequest + 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) + } + + msg, err := client.GetSmartMachineStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ProvisioningService_GetSmartMachineStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ProvisioningServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSmartMachineStatusRequest + 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) + } + + msg, err := server.GetSmartMachineStatus(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ProvisioningService_SetNetworkCredentials_0(ctx context.Context, marshaler runtime.Marshaler, client ProvisioningServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetNetworkCredentialsRequest + 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) + } + + msg, err := client.SetNetworkCredentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ProvisioningService_SetNetworkCredentials_0(ctx context.Context, marshaler runtime.Marshaler, server ProvisioningServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetNetworkCredentialsRequest + 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) + } + + msg, err := server.SetNetworkCredentials(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ProvisioningService_SetSmartMachineCredentials_0(ctx context.Context, marshaler runtime.Marshaler, client ProvisioningServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetSmartMachineCredentialsRequest + 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) + } + + msg, err := client.SetSmartMachineCredentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ProvisioningService_SetSmartMachineCredentials_0(ctx context.Context, marshaler runtime.Marshaler, server ProvisioningServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetSmartMachineCredentialsRequest + 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) + } + + msg, err := server.SetSmartMachineCredentials(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ProvisioningService_GetNetworkList_0(ctx context.Context, marshaler runtime.Marshaler, client ProvisioningServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNetworkListRequest + 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) + } + + msg, err := client.GetNetworkList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ProvisioningService_GetNetworkList_0(ctx context.Context, marshaler runtime.Marshaler, server ProvisioningServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNetworkListRequest + 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) + } + + msg, err := server.GetNetworkList(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterProvisioningServiceHandlerServer registers the http handlers for service ProvisioningService to "mux". +// UnaryRPC :call ProvisioningServiceServer 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 RegisterProvisioningServiceHandlerFromEndpoint instead. +func RegisterProvisioningServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProvisioningServiceServer) error { + + mux.Handle("POST", pattern_ProvisioningService_GetSmartMachineStatus_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 + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus", runtime.WithHTTPPathPattern("/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ProvisioningService_GetSmartMachineStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProvisioningService_GetSmartMachineStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ProvisioningService_SetNetworkCredentials_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 + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials", runtime.WithHTTPPathPattern("/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ProvisioningService_SetNetworkCredentials_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProvisioningService_SetNetworkCredentials_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ProvisioningService_SetSmartMachineCredentials_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 + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials", runtime.WithHTTPPathPattern("/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ProvisioningService_SetSmartMachineCredentials_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProvisioningService_SetSmartMachineCredentials_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ProvisioningService_GetNetworkList_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 + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/viam.provisioning.v1.ProvisioningService/GetNetworkList", runtime.WithHTTPPathPattern("/viam.provisioning.v1.ProvisioningService/GetNetworkList")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ProvisioningService_GetNetworkList_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProvisioningService_GetNetworkList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterProvisioningServiceHandlerFromEndpoint is same as RegisterProvisioningServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterProvisioningServiceHandlerFromEndpoint(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 RegisterProvisioningServiceHandler(ctx, mux, conn) +} + +// RegisterProvisioningServiceHandler registers the http handlers for service ProvisioningService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterProvisioningServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterProvisioningServiceHandlerClient(ctx, mux, NewProvisioningServiceClient(conn)) +} + +// RegisterProvisioningServiceHandlerClient registers the http handlers for service ProvisioningService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProvisioningServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProvisioningServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ProvisioningServiceClient" to call the correct interceptors. +func RegisterProvisioningServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProvisioningServiceClient) error { + + mux.Handle("POST", pattern_ProvisioningService_GetSmartMachineStatus_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 + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus", runtime.WithHTTPPathPattern("/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ProvisioningService_GetSmartMachineStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProvisioningService_GetSmartMachineStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ProvisioningService_SetNetworkCredentials_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 + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials", runtime.WithHTTPPathPattern("/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ProvisioningService_SetNetworkCredentials_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProvisioningService_SetNetworkCredentials_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ProvisioningService_SetSmartMachineCredentials_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 + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials", runtime.WithHTTPPathPattern("/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ProvisioningService_SetSmartMachineCredentials_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProvisioningService_SetSmartMachineCredentials_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ProvisioningService_GetNetworkList_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 + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/viam.provisioning.v1.ProvisioningService/GetNetworkList", runtime.WithHTTPPathPattern("/viam.provisioning.v1.ProvisioningService/GetNetworkList")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ProvisioningService_GetNetworkList_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ProvisioningService_GetNetworkList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ProvisioningService_GetSmartMachineStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"viam.provisioning.v1.ProvisioningService", "GetSmartMachineStatus"}, "")) + + pattern_ProvisioningService_SetNetworkCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"viam.provisioning.v1.ProvisioningService", "SetNetworkCredentials"}, "")) + + pattern_ProvisioningService_SetSmartMachineCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"viam.provisioning.v1.ProvisioningService", "SetSmartMachineCredentials"}, "")) + + pattern_ProvisioningService_GetNetworkList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"viam.provisioning.v1.ProvisioningService", "GetNetworkList"}, "")) +) + +var ( + forward_ProvisioningService_GetSmartMachineStatus_0 = runtime.ForwardResponseMessage + + forward_ProvisioningService_SetNetworkCredentials_0 = runtime.ForwardResponseMessage + + forward_ProvisioningService_SetSmartMachineCredentials_0 = runtime.ForwardResponseMessage + + forward_ProvisioningService_GetNetworkList_0 = runtime.ForwardResponseMessage +) diff --git a/provisioning/v1/provisioning_grpc.pb.go b/provisioning/v1/provisioning_grpc.pb.go new file mode 100644 index 000000000..b015a1c86 --- /dev/null +++ b/provisioning/v1/provisioning_grpc.pb.go @@ -0,0 +1,221 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: provisioning/v1/provisioning.proto + +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 + +// ProvisioningServiceClient is the client API for ProvisioningService 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 ProvisioningServiceClient interface { + // GetSmartMachineStatus is for retrieving the status of the smart machine including networking. + GetSmartMachineStatus(ctx context.Context, in *GetSmartMachineStatusRequest, opts ...grpc.CallOption) (*GetSmartMachineStatusResponse, error) + // SetNetworkCredentials is to set the wifi credentials. + SetNetworkCredentials(ctx context.Context, in *SetNetworkCredentialsRequest, opts ...grpc.CallOption) (*SetNetworkCredentialsResponse, error) + // SetSmartMachineCredentials is to set the smart machine credentials. + SetSmartMachineCredentials(ctx context.Context, in *SetSmartMachineCredentialsRequest, opts ...grpc.CallOption) (*SetSmartMachineCredentialsResponse, error) + // GetNetworkList is to retrieve the list of networks that are visible to the smart machine. + GetNetworkList(ctx context.Context, in *GetNetworkListRequest, opts ...grpc.CallOption) (*GetNetworkListResponse, error) +} + +type provisioningServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewProvisioningServiceClient(cc grpc.ClientConnInterface) ProvisioningServiceClient { + return &provisioningServiceClient{cc} +} + +func (c *provisioningServiceClient) GetSmartMachineStatus(ctx context.Context, in *GetSmartMachineStatusRequest, opts ...grpc.CallOption) (*GetSmartMachineStatusResponse, error) { + out := new(GetSmartMachineStatusResponse) + err := c.cc.Invoke(ctx, "/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *provisioningServiceClient) SetNetworkCredentials(ctx context.Context, in *SetNetworkCredentialsRequest, opts ...grpc.CallOption) (*SetNetworkCredentialsResponse, error) { + out := new(SetNetworkCredentialsResponse) + err := c.cc.Invoke(ctx, "/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *provisioningServiceClient) SetSmartMachineCredentials(ctx context.Context, in *SetSmartMachineCredentialsRequest, opts ...grpc.CallOption) (*SetSmartMachineCredentialsResponse, error) { + out := new(SetSmartMachineCredentialsResponse) + err := c.cc.Invoke(ctx, "/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *provisioningServiceClient) GetNetworkList(ctx context.Context, in *GetNetworkListRequest, opts ...grpc.CallOption) (*GetNetworkListResponse, error) { + out := new(GetNetworkListResponse) + err := c.cc.Invoke(ctx, "/viam.provisioning.v1.ProvisioningService/GetNetworkList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProvisioningServiceServer is the server API for ProvisioningService service. +// All implementations must embed UnimplementedProvisioningServiceServer +// for forward compatibility +type ProvisioningServiceServer interface { + // GetSmartMachineStatus is for retrieving the status of the smart machine including networking. + GetSmartMachineStatus(context.Context, *GetSmartMachineStatusRequest) (*GetSmartMachineStatusResponse, error) + // SetNetworkCredentials is to set the wifi credentials. + SetNetworkCredentials(context.Context, *SetNetworkCredentialsRequest) (*SetNetworkCredentialsResponse, error) + // SetSmartMachineCredentials is to set the smart machine credentials. + SetSmartMachineCredentials(context.Context, *SetSmartMachineCredentialsRequest) (*SetSmartMachineCredentialsResponse, error) + // GetNetworkList is to retrieve the list of networks that are visible to the smart machine. + GetNetworkList(context.Context, *GetNetworkListRequest) (*GetNetworkListResponse, error) + mustEmbedUnimplementedProvisioningServiceServer() +} + +// UnimplementedProvisioningServiceServer must be embedded to have forward compatible implementations. +type UnimplementedProvisioningServiceServer struct { +} + +func (UnimplementedProvisioningServiceServer) GetSmartMachineStatus(context.Context, *GetSmartMachineStatusRequest) (*GetSmartMachineStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSmartMachineStatus not implemented") +} +func (UnimplementedProvisioningServiceServer) SetNetworkCredentials(context.Context, *SetNetworkCredentialsRequest) (*SetNetworkCredentialsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetNetworkCredentials not implemented") +} +func (UnimplementedProvisioningServiceServer) SetSmartMachineCredentials(context.Context, *SetSmartMachineCredentialsRequest) (*SetSmartMachineCredentialsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetSmartMachineCredentials not implemented") +} +func (UnimplementedProvisioningServiceServer) GetNetworkList(context.Context, *GetNetworkListRequest) (*GetNetworkListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNetworkList not implemented") +} +func (UnimplementedProvisioningServiceServer) mustEmbedUnimplementedProvisioningServiceServer() {} + +// UnsafeProvisioningServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProvisioningServiceServer will +// result in compilation errors. +type UnsafeProvisioningServiceServer interface { + mustEmbedUnimplementedProvisioningServiceServer() +} + +func RegisterProvisioningServiceServer(s grpc.ServiceRegistrar, srv ProvisioningServiceServer) { + s.RegisterService(&ProvisioningService_ServiceDesc, srv) +} + +func _ProvisioningService_GetSmartMachineStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSmartMachineStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProvisioningServiceServer).GetSmartMachineStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProvisioningServiceServer).GetSmartMachineStatus(ctx, req.(*GetSmartMachineStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProvisioningService_SetNetworkCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetNetworkCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProvisioningServiceServer).SetNetworkCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProvisioningServiceServer).SetNetworkCredentials(ctx, req.(*SetNetworkCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProvisioningService_SetSmartMachineCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetSmartMachineCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProvisioningServiceServer).SetSmartMachineCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProvisioningServiceServer).SetSmartMachineCredentials(ctx, req.(*SetSmartMachineCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProvisioningService_GetNetworkList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProvisioningServiceServer).GetNetworkList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/viam.provisioning.v1.ProvisioningService/GetNetworkList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProvisioningServiceServer).GetNetworkList(ctx, req.(*GetNetworkListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ProvisioningService_ServiceDesc is the grpc.ServiceDesc for ProvisioningService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ProvisioningService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "viam.provisioning.v1.ProvisioningService", + HandlerType: (*ProvisioningServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSmartMachineStatus", + Handler: _ProvisioningService_GetSmartMachineStatus_Handler, + }, + { + MethodName: "SetNetworkCredentials", + Handler: _ProvisioningService_SetNetworkCredentials_Handler, + }, + { + MethodName: "SetSmartMachineCredentials", + Handler: _ProvisioningService_SetSmartMachineCredentials_Handler, + }, + { + MethodName: "GetNetworkList", + Handler: _ProvisioningService_GetNetworkList_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "provisioning/v1/provisioning.proto", +} diff --git a/service/datamanager/v1/data_manager.pb.gw.go b/service/datamanager/v1/data_manager.pb.gw.go index 5a7e61ab2..5f497f653 100644 --- a/service/datamanager/v1/data_manager.pb.gw.go +++ b/service/datamanager/v1/data_manager.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -107,7 +107,7 @@ var ( ) func request_DataManagerService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client DataManagerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -140,7 +140,7 @@ func request_DataManagerService_DoCommand_0(ctx context.Context, marshaler runti } func local_request_DataManagerService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server DataManagerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/service/motion/v1/motion.pb.gw.go b/service/motion/v1/motion.pb.gw.go index 905c2c5ea..6fa5ecc02 100644 --- a/service/motion/v1/motion.pb.gw.go +++ b/service/motion/v1/motion.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -597,7 +597,7 @@ var ( ) func request_MotionService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client MotionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -630,7 +630,7 @@ func request_MotionService_DoCommand_0(ctx context.Context, marshaler runtime.Ma } func local_request_MotionService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server MotionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/service/sensors/v1/sensors.pb.gw.go b/service/sensors/v1/sensors.pb.gw.go index 9fc2a2808..b0c69d02f 100644 --- a/service/sensors/v1/sensors.pb.gw.go +++ b/service/sensors/v1/sensors.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -177,7 +177,7 @@ var ( ) func request_SensorsService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client SensorsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -210,7 +210,7 @@ func request_SensorsService_DoCommand_0(ctx context.Context, marshaler runtime.M } func local_request_SensorsService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server SensorsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/service/shell/v1/shell.pb.gw.go b/service/shell/v1/shell.pb.gw.go index 69eff6cda..ebf18f880 100644 --- a/service/shell/v1/shell.pb.gw.go +++ b/service/shell/v1/shell.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -80,7 +80,7 @@ var ( ) func request_ShellService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client ShellServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -113,7 +113,7 @@ func request_ShellService_DoCommand_0(ctx context.Context, marshaler runtime.Mar } func local_request_ShellService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server ShellServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var (