spot-sdk-ts
Version:
TypeScript bindings based on protobufs (proto3) provided by Boston Dynamics
1,062 lines • 76.2 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetRecordStatusResponse = exports.GetRecordStatusRequest = exports.CreateEdgeResponse = exports.CreateEdgeRequest = exports.CreateWaypointResponse = exports.CreateWaypointRequest = exports.StopRecordingResponse = exports.StopRecordingRequest = exports.StartRecordingResponse = exports.StartRecordingRequest = exports.SetRecordingEnvironmentResponse = exports.SetRecordingEnvironmentRequest = exports.RecordingEnvironment = exports.getRecordStatusResponse_MapStateToJSON = exports.getRecordStatusResponse_MapStateFromJSON = exports.GetRecordStatusResponse_MapState = exports.createEdgeResponse_StatusToJSON = exports.createEdgeResponse_StatusFromJSON = exports.CreateEdgeResponse_Status = exports.createWaypointResponse_StatusToJSON = exports.createWaypointResponse_StatusFromJSON = exports.CreateWaypointResponse_Status = exports.stopRecordingResponse_StatusToJSON = exports.stopRecordingResponse_StatusFromJSON = exports.StopRecordingResponse_Status = exports.startRecordingResponse_StatusToJSON = exports.startRecordingResponse_StatusFromJSON = exports.StartRecordingResponse_Status = exports.protobufPackage = void 0;
/* eslint-disable */
const license_1 = require("../license");
const map_1 = require("./map");
const header_1 = require("../header");
const lease_1 = require("../lease");
const world_object_1 = require("../world_object");
const minimal_1 = __importDefault(require("protobufjs/minimal"));
exports.protobufPackage = "bosdyn.api.graph_nav";
var StartRecordingResponse_Status;
(function (StartRecordingResponse_Status) {
/** STATUS_UNKNOWN - Status is unknown/unset. */
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_UNKNOWN"] = 0] = "STATUS_UNKNOWN";
/** STATUS_OK - Recording has been started. */
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_OK"] = 1] = "STATUS_OK";
/**
* STATUS_COULD_NOT_CREATE_WAYPOINT - In this case we tried to start recording, but GraphNav was internally still waiting for
* some data from the robot.
*/
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_COULD_NOT_CREATE_WAYPOINT"] = 2] = "STATUS_COULD_NOT_CREATE_WAYPOINT";
/** STATUS_FOLLOWING_ROUTE - Can't start recording because the robot is following a route. */
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_FOLLOWING_ROUTE"] = 3] = "STATUS_FOLLOWING_ROUTE";
/**
* STATUS_NOT_LOCALIZED_TO_EXISTING_MAP - When recording branches, the robot is not localized to the existing map before starting
* to record a new branch.
*/
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_NOT_LOCALIZED_TO_EXISTING_MAP"] = 4] = "STATUS_NOT_LOCALIZED_TO_EXISTING_MAP";
/** STATUS_MISSING_FIDUCIALS - Can't start recording because the robot doesn't see the required fiducials. */
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_MISSING_FIDUCIALS"] = 5] = "STATUS_MISSING_FIDUCIALS";
/** STATUS_MAP_TOO_LARGE_LICENSE - Can't start recording because the map was too large for the license. */
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_MAP_TOO_LARGE_LICENSE"] = 6] = "STATUS_MAP_TOO_LARGE_LICENSE";
/** STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY - A required remote cloud did not exist in the service directory. */
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY"] = 7] = "STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY";
/** STATUS_REMOTE_CLOUD_FAILURE_NO_DATA - A required remote cloud did not have data. */
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_REMOTE_CLOUD_FAILURE_NO_DATA"] = 8] = "STATUS_REMOTE_CLOUD_FAILURE_NO_DATA";
/** STATUS_FIDUCIAL_POSE_NOT_OK - All fiducials are visible but at least one pose could not be determined accurately. */
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_FIDUCIAL_POSE_NOT_OK"] = 9] = "STATUS_FIDUCIAL_POSE_NOT_OK";
/**
* STATUS_TOO_FAR_FROM_EXISTING_MAP - When recording branches, the robot is too far from the existing map when starting
* to record a new branch.
*/
StartRecordingResponse_Status[StartRecordingResponse_Status["STATUS_TOO_FAR_FROM_EXISTING_MAP"] = 10] = "STATUS_TOO_FAR_FROM_EXISTING_MAP";
StartRecordingResponse_Status[StartRecordingResponse_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(StartRecordingResponse_Status = exports.StartRecordingResponse_Status || (exports.StartRecordingResponse_Status = {}));
function startRecordingResponse_StatusFromJSON(object) {
switch (object) {
case 0:
case "STATUS_UNKNOWN":
return StartRecordingResponse_Status.STATUS_UNKNOWN;
case 1:
case "STATUS_OK":
return StartRecordingResponse_Status.STATUS_OK;
case 2:
case "STATUS_COULD_NOT_CREATE_WAYPOINT":
return StartRecordingResponse_Status.STATUS_COULD_NOT_CREATE_WAYPOINT;
case 3:
case "STATUS_FOLLOWING_ROUTE":
return StartRecordingResponse_Status.STATUS_FOLLOWING_ROUTE;
case 4:
case "STATUS_NOT_LOCALIZED_TO_EXISTING_MAP":
return StartRecordingResponse_Status.STATUS_NOT_LOCALIZED_TO_EXISTING_MAP;
case 5:
case "STATUS_MISSING_FIDUCIALS":
return StartRecordingResponse_Status.STATUS_MISSING_FIDUCIALS;
case 6:
case "STATUS_MAP_TOO_LARGE_LICENSE":
return StartRecordingResponse_Status.STATUS_MAP_TOO_LARGE_LICENSE;
case 7:
case "STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY":
return StartRecordingResponse_Status.STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY;
case 8:
case "STATUS_REMOTE_CLOUD_FAILURE_NO_DATA":
return StartRecordingResponse_Status.STATUS_REMOTE_CLOUD_FAILURE_NO_DATA;
case 9:
case "STATUS_FIDUCIAL_POSE_NOT_OK":
return StartRecordingResponse_Status.STATUS_FIDUCIAL_POSE_NOT_OK;
case 10:
case "STATUS_TOO_FAR_FROM_EXISTING_MAP":
return StartRecordingResponse_Status.STATUS_TOO_FAR_FROM_EXISTING_MAP;
case -1:
case "UNRECOGNIZED":
default:
return StartRecordingResponse_Status.UNRECOGNIZED;
}
}
exports.startRecordingResponse_StatusFromJSON = startRecordingResponse_StatusFromJSON;
function startRecordingResponse_StatusToJSON(object) {
switch (object) {
case StartRecordingResponse_Status.STATUS_UNKNOWN:
return "STATUS_UNKNOWN";
case StartRecordingResponse_Status.STATUS_OK:
return "STATUS_OK";
case StartRecordingResponse_Status.STATUS_COULD_NOT_CREATE_WAYPOINT:
return "STATUS_COULD_NOT_CREATE_WAYPOINT";
case StartRecordingResponse_Status.STATUS_FOLLOWING_ROUTE:
return "STATUS_FOLLOWING_ROUTE";
case StartRecordingResponse_Status.STATUS_NOT_LOCALIZED_TO_EXISTING_MAP:
return "STATUS_NOT_LOCALIZED_TO_EXISTING_MAP";
case StartRecordingResponse_Status.STATUS_MISSING_FIDUCIALS:
return "STATUS_MISSING_FIDUCIALS";
case StartRecordingResponse_Status.STATUS_MAP_TOO_LARGE_LICENSE:
return "STATUS_MAP_TOO_LARGE_LICENSE";
case StartRecordingResponse_Status.STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY:
return "STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY";
case StartRecordingResponse_Status.STATUS_REMOTE_CLOUD_FAILURE_NO_DATA:
return "STATUS_REMOTE_CLOUD_FAILURE_NO_DATA";
case StartRecordingResponse_Status.STATUS_FIDUCIAL_POSE_NOT_OK:
return "STATUS_FIDUCIAL_POSE_NOT_OK";
case StartRecordingResponse_Status.STATUS_TOO_FAR_FROM_EXISTING_MAP:
return "STATUS_TOO_FAR_FROM_EXISTING_MAP";
case StartRecordingResponse_Status.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
exports.startRecordingResponse_StatusToJSON = startRecordingResponse_StatusToJSON;
var StopRecordingResponse_Status;
(function (StopRecordingResponse_Status) {
/** STATUS_UNKNOWN - Status is unknown/unset. */
StopRecordingResponse_Status[StopRecordingResponse_Status["STATUS_UNKNOWN"] = 0] = "STATUS_UNKNOWN";
/** STATUS_OK - Recording is stopped. */
StopRecordingResponse_Status[StopRecordingResponse_Status["STATUS_OK"] = 1] = "STATUS_OK";
/**
* STATUS_NOT_LOCALIZED_TO_END - In this case we tried to stop recording, but had an incorrect localization.
* graph_nav is expected to be localized to the final waypoint in the chain before
* we stop recording.
*/
StopRecordingResponse_Status[StopRecordingResponse_Status["STATUS_NOT_LOCALIZED_TO_END"] = 2] = "STATUS_NOT_LOCALIZED_TO_END";
/**
* STATUS_NOT_READY_YET - The robot is still processing the map it created to where the robot is currently located.
* You can't stop recording until that processing is finished. You should not move
* the robot, then try to stop recording again after 1-2 seconds.
*/
StopRecordingResponse_Status[StopRecordingResponse_Status["STATUS_NOT_READY_YET"] = 3] = "STATUS_NOT_READY_YET";
StopRecordingResponse_Status[StopRecordingResponse_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(StopRecordingResponse_Status = exports.StopRecordingResponse_Status || (exports.StopRecordingResponse_Status = {}));
function stopRecordingResponse_StatusFromJSON(object) {
switch (object) {
case 0:
case "STATUS_UNKNOWN":
return StopRecordingResponse_Status.STATUS_UNKNOWN;
case 1:
case "STATUS_OK":
return StopRecordingResponse_Status.STATUS_OK;
case 2:
case "STATUS_NOT_LOCALIZED_TO_END":
return StopRecordingResponse_Status.STATUS_NOT_LOCALIZED_TO_END;
case 3:
case "STATUS_NOT_READY_YET":
return StopRecordingResponse_Status.STATUS_NOT_READY_YET;
case -1:
case "UNRECOGNIZED":
default:
return StopRecordingResponse_Status.UNRECOGNIZED;
}
}
exports.stopRecordingResponse_StatusFromJSON = stopRecordingResponse_StatusFromJSON;
function stopRecordingResponse_StatusToJSON(object) {
switch (object) {
case StopRecordingResponse_Status.STATUS_UNKNOWN:
return "STATUS_UNKNOWN";
case StopRecordingResponse_Status.STATUS_OK:
return "STATUS_OK";
case StopRecordingResponse_Status.STATUS_NOT_LOCALIZED_TO_END:
return "STATUS_NOT_LOCALIZED_TO_END";
case StopRecordingResponse_Status.STATUS_NOT_READY_YET:
return "STATUS_NOT_READY_YET";
case StopRecordingResponse_Status.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
exports.stopRecordingResponse_StatusToJSON = stopRecordingResponse_StatusToJSON;
var CreateWaypointResponse_Status;
(function (CreateWaypointResponse_Status) {
/** STATUS_UNKNOWN - Status is unknown/unset. */
CreateWaypointResponse_Status[CreateWaypointResponse_Status["STATUS_UNKNOWN"] = 0] = "STATUS_UNKNOWN";
/** STATUS_OK - The waypoint was successfully created. */
CreateWaypointResponse_Status[CreateWaypointResponse_Status["STATUS_OK"] = 1] = "STATUS_OK";
/** STATUS_NOT_RECORDING - Clients can only create waypoints when recording. */
CreateWaypointResponse_Status[CreateWaypointResponse_Status["STATUS_NOT_RECORDING"] = 2] = "STATUS_NOT_RECORDING";
/** STATUS_COULD_NOT_CREATE_WAYPOINT - An internal server error prevented the creation of the waypoint. */
CreateWaypointResponse_Status[CreateWaypointResponse_Status["STATUS_COULD_NOT_CREATE_WAYPOINT"] = 3] = "STATUS_COULD_NOT_CREATE_WAYPOINT";
/** STATUS_MISSING_FIDUCIALS - Could not see the required fiducials. */
CreateWaypointResponse_Status[CreateWaypointResponse_Status["STATUS_MISSING_FIDUCIALS"] = 4] = "STATUS_MISSING_FIDUCIALS";
/** STATUS_MAP_TOO_LARGE_LICENSE - The map was too big to create a waypoint based on the license. */
CreateWaypointResponse_Status[CreateWaypointResponse_Status["STATUS_MAP_TOO_LARGE_LICENSE"] = 5] = "STATUS_MAP_TOO_LARGE_LICENSE";
/** STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY - A required remote cloud did not exist in the service directory. */
CreateWaypointResponse_Status[CreateWaypointResponse_Status["STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY"] = 6] = "STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY";
/** STATUS_REMOTE_CLOUD_FAILURE_NO_DATA - A required remote cloud did not have data. */
CreateWaypointResponse_Status[CreateWaypointResponse_Status["STATUS_REMOTE_CLOUD_FAILURE_NO_DATA"] = 7] = "STATUS_REMOTE_CLOUD_FAILURE_NO_DATA";
/** STATUS_FIDUCIAL_POSE_NOT_OK - All fiducials are visible but their pose could not be determined accurately. */
CreateWaypointResponse_Status[CreateWaypointResponse_Status["STATUS_FIDUCIAL_POSE_NOT_OK"] = 8] = "STATUS_FIDUCIAL_POSE_NOT_OK";
CreateWaypointResponse_Status[CreateWaypointResponse_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(CreateWaypointResponse_Status = exports.CreateWaypointResponse_Status || (exports.CreateWaypointResponse_Status = {}));
function createWaypointResponse_StatusFromJSON(object) {
switch (object) {
case 0:
case "STATUS_UNKNOWN":
return CreateWaypointResponse_Status.STATUS_UNKNOWN;
case 1:
case "STATUS_OK":
return CreateWaypointResponse_Status.STATUS_OK;
case 2:
case "STATUS_NOT_RECORDING":
return CreateWaypointResponse_Status.STATUS_NOT_RECORDING;
case 3:
case "STATUS_COULD_NOT_CREATE_WAYPOINT":
return CreateWaypointResponse_Status.STATUS_COULD_NOT_CREATE_WAYPOINT;
case 4:
case "STATUS_MISSING_FIDUCIALS":
return CreateWaypointResponse_Status.STATUS_MISSING_FIDUCIALS;
case 5:
case "STATUS_MAP_TOO_LARGE_LICENSE":
return CreateWaypointResponse_Status.STATUS_MAP_TOO_LARGE_LICENSE;
case 6:
case "STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY":
return CreateWaypointResponse_Status.STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY;
case 7:
case "STATUS_REMOTE_CLOUD_FAILURE_NO_DATA":
return CreateWaypointResponse_Status.STATUS_REMOTE_CLOUD_FAILURE_NO_DATA;
case 8:
case "STATUS_FIDUCIAL_POSE_NOT_OK":
return CreateWaypointResponse_Status.STATUS_FIDUCIAL_POSE_NOT_OK;
case -1:
case "UNRECOGNIZED":
default:
return CreateWaypointResponse_Status.UNRECOGNIZED;
}
}
exports.createWaypointResponse_StatusFromJSON = createWaypointResponse_StatusFromJSON;
function createWaypointResponse_StatusToJSON(object) {
switch (object) {
case CreateWaypointResponse_Status.STATUS_UNKNOWN:
return "STATUS_UNKNOWN";
case CreateWaypointResponse_Status.STATUS_OK:
return "STATUS_OK";
case CreateWaypointResponse_Status.STATUS_NOT_RECORDING:
return "STATUS_NOT_RECORDING";
case CreateWaypointResponse_Status.STATUS_COULD_NOT_CREATE_WAYPOINT:
return "STATUS_COULD_NOT_CREATE_WAYPOINT";
case CreateWaypointResponse_Status.STATUS_MISSING_FIDUCIALS:
return "STATUS_MISSING_FIDUCIALS";
case CreateWaypointResponse_Status.STATUS_MAP_TOO_LARGE_LICENSE:
return "STATUS_MAP_TOO_LARGE_LICENSE";
case CreateWaypointResponse_Status.STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY:
return "STATUS_REMOTE_CLOUD_FAILURE_NOT_IN_DIRECTORY";
case CreateWaypointResponse_Status.STATUS_REMOTE_CLOUD_FAILURE_NO_DATA:
return "STATUS_REMOTE_CLOUD_FAILURE_NO_DATA";
case CreateWaypointResponse_Status.STATUS_FIDUCIAL_POSE_NOT_OK:
return "STATUS_FIDUCIAL_POSE_NOT_OK";
case CreateWaypointResponse_Status.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
exports.createWaypointResponse_StatusToJSON = createWaypointResponse_StatusToJSON;
var CreateEdgeResponse_Status;
(function (CreateEdgeResponse_Status) {
/** STATUS_UNKNOWN - Status is unknown/unset. */
CreateEdgeResponse_Status[CreateEdgeResponse_Status["STATUS_UNKNOWN"] = 0] = "STATUS_UNKNOWN";
/** STATUS_OK - The edge was successfully created. */
CreateEdgeResponse_Status[CreateEdgeResponse_Status["STATUS_OK"] = 1] = "STATUS_OK";
/** STATUS_EXISTS - Edge already exists with the given ID. */
CreateEdgeResponse_Status[CreateEdgeResponse_Status["STATUS_EXISTS"] = 2] = "STATUS_EXISTS";
/** STATUS_NOT_RECORDING - Clients can only create edges when recording. */
CreateEdgeResponse_Status[CreateEdgeResponse_Status["STATUS_NOT_RECORDING"] = 3] = "STATUS_NOT_RECORDING";
/** STATUS_UNKNOWN_WAYPOINT - One or more of the specified waypoints aren't in the map. */
CreateEdgeResponse_Status[CreateEdgeResponse_Status["STATUS_UNKNOWN_WAYPOINT"] = 4] = "STATUS_UNKNOWN_WAYPOINT";
/** STATUS_MISSING_TRANSFORM - Specified edge did not include a transform. */
CreateEdgeResponse_Status[CreateEdgeResponse_Status["STATUS_MISSING_TRANSFORM"] = 5] = "STATUS_MISSING_TRANSFORM";
CreateEdgeResponse_Status[CreateEdgeResponse_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(CreateEdgeResponse_Status = exports.CreateEdgeResponse_Status || (exports.CreateEdgeResponse_Status = {}));
function createEdgeResponse_StatusFromJSON(object) {
switch (object) {
case 0:
case "STATUS_UNKNOWN":
return CreateEdgeResponse_Status.STATUS_UNKNOWN;
case 1:
case "STATUS_OK":
return CreateEdgeResponse_Status.STATUS_OK;
case 2:
case "STATUS_EXISTS":
return CreateEdgeResponse_Status.STATUS_EXISTS;
case 3:
case "STATUS_NOT_RECORDING":
return CreateEdgeResponse_Status.STATUS_NOT_RECORDING;
case 4:
case "STATUS_UNKNOWN_WAYPOINT":
return CreateEdgeResponse_Status.STATUS_UNKNOWN_WAYPOINT;
case 5:
case "STATUS_MISSING_TRANSFORM":
return CreateEdgeResponse_Status.STATUS_MISSING_TRANSFORM;
case -1:
case "UNRECOGNIZED":
default:
return CreateEdgeResponse_Status.UNRECOGNIZED;
}
}
exports.createEdgeResponse_StatusFromJSON = createEdgeResponse_StatusFromJSON;
function createEdgeResponse_StatusToJSON(object) {
switch (object) {
case CreateEdgeResponse_Status.STATUS_UNKNOWN:
return "STATUS_UNKNOWN";
case CreateEdgeResponse_Status.STATUS_OK:
return "STATUS_OK";
case CreateEdgeResponse_Status.STATUS_EXISTS:
return "STATUS_EXISTS";
case CreateEdgeResponse_Status.STATUS_NOT_RECORDING:
return "STATUS_NOT_RECORDING";
case CreateEdgeResponse_Status.STATUS_UNKNOWN_WAYPOINT:
return "STATUS_UNKNOWN_WAYPOINT";
case CreateEdgeResponse_Status.STATUS_MISSING_TRANSFORM:
return "STATUS_MISSING_TRANSFORM";
case CreateEdgeResponse_Status.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
exports.createEdgeResponse_StatusToJSON = createEdgeResponse_StatusToJSON;
var GetRecordStatusResponse_MapState;
(function (GetRecordStatusResponse_MapState) {
GetRecordStatusResponse_MapState[GetRecordStatusResponse_MapState["MAP_STATE_UNKNOWN"] = 0] = "MAP_STATE_UNKNOWN";
/** MAP_STATE_OK - Successfully started recording. */
GetRecordStatusResponse_MapState[GetRecordStatusResponse_MapState["MAP_STATE_OK"] = 1] = "MAP_STATE_OK";
/** MAP_STATE_TOO_LARGE_FOR_LICENSE - Unable to continue recording because a larger map requires an upgraded license. */
GetRecordStatusResponse_MapState[GetRecordStatusResponse_MapState["MAP_STATE_TOO_LARGE_FOR_LICENSE"] = 2] = "MAP_STATE_TOO_LARGE_FOR_LICENSE";
GetRecordStatusResponse_MapState[GetRecordStatusResponse_MapState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(GetRecordStatusResponse_MapState = exports.GetRecordStatusResponse_MapState || (exports.GetRecordStatusResponse_MapState = {}));
function getRecordStatusResponse_MapStateFromJSON(object) {
switch (object) {
case 0:
case "MAP_STATE_UNKNOWN":
return GetRecordStatusResponse_MapState.MAP_STATE_UNKNOWN;
case 1:
case "MAP_STATE_OK":
return GetRecordStatusResponse_MapState.MAP_STATE_OK;
case 2:
case "MAP_STATE_TOO_LARGE_FOR_LICENSE":
return GetRecordStatusResponse_MapState.MAP_STATE_TOO_LARGE_FOR_LICENSE;
case -1:
case "UNRECOGNIZED":
default:
return GetRecordStatusResponse_MapState.UNRECOGNIZED;
}
}
exports.getRecordStatusResponse_MapStateFromJSON = getRecordStatusResponse_MapStateFromJSON;
function getRecordStatusResponse_MapStateToJSON(object) {
switch (object) {
case GetRecordStatusResponse_MapState.MAP_STATE_UNKNOWN:
return "MAP_STATE_UNKNOWN";
case GetRecordStatusResponse_MapState.MAP_STATE_OK:
return "MAP_STATE_OK";
case GetRecordStatusResponse_MapState.MAP_STATE_TOO_LARGE_FOR_LICENSE:
return "MAP_STATE_TOO_LARGE_FOR_LICENSE";
case GetRecordStatusResponse_MapState.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
exports.getRecordStatusResponse_MapStateToJSON = getRecordStatusResponse_MapStateToJSON;
function createBaseRecordingEnvironment() {
return {
namePrefix: "",
waypointEnvironment: undefined,
edgeEnvironment: undefined,
};
}
exports.RecordingEnvironment = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.namePrefix !== "") {
writer.uint32(10).string(message.namePrefix);
}
if (message.waypointEnvironment !== undefined) {
map_1.Waypoint_Annotations.encode(message.waypointEnvironment, writer.uint32(18).fork()).ldelim();
}
if (message.edgeEnvironment !== undefined) {
map_1.Edge_Annotations.encode(message.edgeEnvironment, writer.uint32(26).fork()).ldelim();
}
return writer;
},
decode(input, length) {
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRecordingEnvironment();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.namePrefix = reader.string();
break;
case 2:
message.waypointEnvironment = map_1.Waypoint_Annotations.decode(reader, reader.uint32());
break;
case 3:
message.edgeEnvironment = map_1.Edge_Annotations.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
namePrefix: isSet(object.namePrefix) ? String(object.namePrefix) : "",
waypointEnvironment: isSet(object.waypointEnvironment)
? map_1.Waypoint_Annotations.fromJSON(object.waypointEnvironment)
: undefined,
edgeEnvironment: isSet(object.edgeEnvironment)
? map_1.Edge_Annotations.fromJSON(object.edgeEnvironment)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.namePrefix !== undefined && (obj.namePrefix = message.namePrefix);
message.waypointEnvironment !== undefined &&
(obj.waypointEnvironment = message.waypointEnvironment
? map_1.Waypoint_Annotations.toJSON(message.waypointEnvironment)
: undefined);
message.edgeEnvironment !== undefined &&
(obj.edgeEnvironment = message.edgeEnvironment
? map_1.Edge_Annotations.toJSON(message.edgeEnvironment)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseRecordingEnvironment();
message.namePrefix = object.namePrefix ?? "";
message.waypointEnvironment =
object.waypointEnvironment !== undefined &&
object.waypointEnvironment !== null
? map_1.Waypoint_Annotations.fromPartial(object.waypointEnvironment)
: undefined;
message.edgeEnvironment =
object.edgeEnvironment !== undefined && object.edgeEnvironment !== null
? map_1.Edge_Annotations.fromPartial(object.edgeEnvironment)
: undefined;
return message;
},
};
function createBaseSetRecordingEnvironmentRequest() {
return { header: undefined, environment: undefined, lease: undefined };
}
exports.SetRecordingEnvironmentRequest = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.header !== undefined) {
header_1.RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.environment !== undefined) {
exports.RecordingEnvironment.encode(message.environment, writer.uint32(18).fork()).ldelim();
}
if (message.lease !== undefined) {
lease_1.Lease.encode(message.lease, writer.uint32(26).fork()).ldelim();
}
return writer;
},
decode(input, length) {
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetRecordingEnvironmentRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.header = header_1.RequestHeader.decode(reader, reader.uint32());
break;
case 2:
message.environment = exports.RecordingEnvironment.decode(reader, reader.uint32());
break;
case 3:
message.lease = lease_1.Lease.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
header: isSet(object.header)
? header_1.RequestHeader.fromJSON(object.header)
: undefined,
environment: isSet(object.environment)
? exports.RecordingEnvironment.fromJSON(object.environment)
: undefined,
lease: isSet(object.lease) ? lease_1.Lease.fromJSON(object.lease) : undefined,
};
},
toJSON(message) {
const obj = {};
message.header !== undefined &&
(obj.header = message.header
? header_1.RequestHeader.toJSON(message.header)
: undefined);
message.environment !== undefined &&
(obj.environment = message.environment
? exports.RecordingEnvironment.toJSON(message.environment)
: undefined);
message.lease !== undefined &&
(obj.lease = message.lease ? lease_1.Lease.toJSON(message.lease) : undefined);
return obj;
},
fromPartial(object) {
const message = createBaseSetRecordingEnvironmentRequest();
message.header =
object.header !== undefined && object.header !== null
? header_1.RequestHeader.fromPartial(object.header)
: undefined;
message.environment =
object.environment !== undefined && object.environment !== null
? exports.RecordingEnvironment.fromPartial(object.environment)
: undefined;
message.lease =
object.lease !== undefined && object.lease !== null
? lease_1.Lease.fromPartial(object.lease)
: undefined;
return message;
},
};
function createBaseSetRecordingEnvironmentResponse() {
return { header: undefined, leaseUseResult: undefined };
}
exports.SetRecordingEnvironmentResponse = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.header !== undefined) {
header_1.ResponseHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.leaseUseResult !== undefined) {
lease_1.LeaseUseResult.encode(message.leaseUseResult, writer.uint32(18).fork()).ldelim();
}
return writer;
},
decode(input, length) {
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetRecordingEnvironmentResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.header = header_1.ResponseHeader.decode(reader, reader.uint32());
break;
case 2:
message.leaseUseResult = lease_1.LeaseUseResult.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
header: isSet(object.header)
? header_1.ResponseHeader.fromJSON(object.header)
: undefined,
leaseUseResult: isSet(object.leaseUseResult)
? lease_1.LeaseUseResult.fromJSON(object.leaseUseResult)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.header !== undefined &&
(obj.header = message.header
? header_1.ResponseHeader.toJSON(message.header)
: undefined);
message.leaseUseResult !== undefined &&
(obj.leaseUseResult = message.leaseUseResult
? lease_1.LeaseUseResult.toJSON(message.leaseUseResult)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseSetRecordingEnvironmentResponse();
message.header =
object.header !== undefined && object.header !== null
? header_1.ResponseHeader.fromPartial(object.header)
: undefined;
message.leaseUseResult =
object.leaseUseResult !== undefined && object.leaseUseResult !== null
? lease_1.LeaseUseResult.fromPartial(object.leaseUseResult)
: undefined;
return message;
},
};
function createBaseStartRecordingRequest() {
return {
header: undefined,
lease: undefined,
recordingEnvironment: undefined,
requireFiducials: [],
};
}
exports.StartRecordingRequest = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.header !== undefined) {
header_1.RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.lease !== undefined) {
lease_1.Lease.encode(message.lease, writer.uint32(18).fork()).ldelim();
}
if (message.recordingEnvironment !== undefined) {
exports.RecordingEnvironment.encode(message.recordingEnvironment, writer.uint32(26).fork()).ldelim();
}
writer.uint32(34).fork();
for (const v of message.requireFiducials) {
writer.int32(v);
}
writer.ldelim();
return writer;
},
decode(input, length) {
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseStartRecordingRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.header = header_1.RequestHeader.decode(reader, reader.uint32());
break;
case 2:
message.lease = lease_1.Lease.decode(reader, reader.uint32());
break;
case 3:
message.recordingEnvironment = exports.RecordingEnvironment.decode(reader, reader.uint32());
break;
case 4:
if ((tag & 7) === 2) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
message.requireFiducials.push(reader.int32());
}
}
else {
message.requireFiducials.push(reader.int32());
}
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
header: isSet(object.header)
? header_1.RequestHeader.fromJSON(object.header)
: undefined,
lease: isSet(object.lease) ? lease_1.Lease.fromJSON(object.lease) : undefined,
recordingEnvironment: isSet(object.recordingEnvironment)
? exports.RecordingEnvironment.fromJSON(object.recordingEnvironment)
: undefined,
requireFiducials: Array.isArray(object?.requireFiducials)
? object.requireFiducials.map((e) => Number(e))
: [],
};
},
toJSON(message) {
const obj = {};
message.header !== undefined &&
(obj.header = message.header
? header_1.RequestHeader.toJSON(message.header)
: undefined);
message.lease !== undefined &&
(obj.lease = message.lease ? lease_1.Lease.toJSON(message.lease) : undefined);
message.recordingEnvironment !== undefined &&
(obj.recordingEnvironment = message.recordingEnvironment
? exports.RecordingEnvironment.toJSON(message.recordingEnvironment)
: undefined);
if (message.requireFiducials) {
obj.requireFiducials = message.requireFiducials.map((e) => Math.round(e));
}
else {
obj.requireFiducials = [];
}
return obj;
},
fromPartial(object) {
const message = createBaseStartRecordingRequest();
message.header =
object.header !== undefined && object.header !== null
? header_1.RequestHeader.fromPartial(object.header)
: undefined;
message.lease =
object.lease !== undefined && object.lease !== null
? lease_1.Lease.fromPartial(object.lease)
: undefined;
message.recordingEnvironment =
object.recordingEnvironment !== undefined &&
object.recordingEnvironment !== null
? exports.RecordingEnvironment.fromPartial(object.recordingEnvironment)
: undefined;
message.requireFiducials = object.requireFiducials?.map((e) => e) || [];
return message;
},
};
function createBaseStartRecordingResponse() {
return {
header: undefined,
createdWaypoint: undefined,
leaseUseResult: undefined,
status: 0,
missingFiducials: [],
badPoseFiducials: [],
licenseStatus: 0,
};
}
exports.StartRecordingResponse = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.header !== undefined) {
header_1.ResponseHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.createdWaypoint !== undefined) {
map_1.Waypoint.encode(message.createdWaypoint, writer.uint32(18).fork()).ldelim();
}
if (message.leaseUseResult !== undefined) {
lease_1.LeaseUseResult.encode(message.leaseUseResult, writer.uint32(26).fork()).ldelim();
}
if (message.status !== 0) {
writer.uint32(32).int32(message.status);
}
writer.uint32(42).fork();
for (const v of message.missingFiducials) {
writer.int32(v);
}
writer.ldelim();
writer.uint32(58).fork();
for (const v of message.badPoseFiducials) {
writer.int32(v);
}
writer.ldelim();
if (message.licenseStatus !== 0) {
writer.uint32(48).int32(message.licenseStatus);
}
return writer;
},
decode(input, length) {
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseStartRecordingResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.header = header_1.ResponseHeader.decode(reader, reader.uint32());
break;
case 2:
message.createdWaypoint = map_1.Waypoint.decode(reader, reader.uint32());
break;
case 3:
message.leaseUseResult = lease_1.LeaseUseResult.decode(reader, reader.uint32());
break;
case 4:
message.status = reader.int32();
break;
case 5:
if ((tag & 7) === 2) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
message.missingFiducials.push(reader.int32());
}
}
else {
message.missingFiducials.push(reader.int32());
}
break;
case 7:
if ((tag & 7) === 2) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
message.badPoseFiducials.push(reader.int32());
}
}
else {
message.badPoseFiducials.push(reader.int32());
}
break;
case 6:
message.licenseStatus = reader.int32();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
header: isSet(object.header)
? header_1.ResponseHeader.fromJSON(object.header)
: undefined,
createdWaypoint: isSet(object.createdWaypoint)
? map_1.Waypoint.fromJSON(object.createdWaypoint)
: undefined,
leaseUseResult: isSet(object.leaseUseResult)
? lease_1.LeaseUseResult.fromJSON(object.leaseUseResult)
: undefined,
status: isSet(object.status)
? startRecordingResponse_StatusFromJSON(object.status)
: 0,
missingFiducials: Array.isArray(object?.missingFiducials)
? object.missingFiducials.map((e) => Number(e))
: [],
badPoseFiducials: Array.isArray(object?.badPoseFiducials)
? object.badPoseFiducials.map((e) => Number(e))
: [],
licenseStatus: isSet(object.licenseStatus)
? (0, license_1.licenseInfo_StatusFromJSON)(object.licenseStatus)
: 0,
};
},
toJSON(message) {
const obj = {};
message.header !== undefined &&
(obj.header = message.header
? header_1.ResponseHeader.toJSON(message.header)
: undefined);
message.createdWaypoint !== undefined &&
(obj.createdWaypoint = message.createdWaypoint
? map_1.Waypoint.toJSON(message.createdWaypoint)
: undefined);
message.leaseUseResult !== undefined &&
(obj.leaseUseResult = message.leaseUseResult
? lease_1.LeaseUseResult.toJSON(message.leaseUseResult)
: undefined);
message.status !== undefined &&
(obj.status = startRecordingResponse_StatusToJSON(message.status));
if (message.missingFiducials) {
obj.missingFiducials = message.missingFiducials.map((e) => Math.round(e));
}
else {
obj.missingFiducials = [];
}
if (message.badPoseFiducials) {
obj.badPoseFiducials = message.badPoseFiducials.map((e) => Math.round(e));
}
else {
obj.badPoseFiducials = [];
}
message.licenseStatus !== undefined &&
(obj.licenseStatus = (0, license_1.licenseInfo_StatusToJSON)(message.licenseStatus));
return obj;
},
fromPartial(object) {
const message = createBaseStartRecordingResponse();
message.header =
object.header !== undefined && object.header !== null
? header_1.ResponseHeader.fromPartial(object.header)
: undefined;
message.createdWaypoint =
object.createdWaypoint !== undefined && object.createdWaypoint !== null
? map_1.Waypoint.fromPartial(object.createdWaypoint)
: undefined;
message.leaseUseResult =
object.leaseUseResult !== undefined && object.leaseUseResult !== null
? lease_1.LeaseUseResult.fromPartial(object.leaseUseResult)
: undefined;
message.status = object.status ?? 0;
message.missingFiducials = object.missingFiducials?.map((e) => e) || [];
message.badPoseFiducials = object.badPoseFiducials?.map((e) => e) || [];
message.licenseStatus = object.licenseStatus ?? 0;
return message;
},
};
function createBaseStopRecordingRequest() {
return { header: undefined, lease: undefined };
}
exports.StopRecordingRequest = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.header !== undefined) {
header_1.RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.lease !== undefined) {
lease_1.Lease.encode(message.lease, writer.uint32(18).fork()).ldelim();
}
return writer;
},
decode(input, length) {
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseStopRecordingRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.header = header_1.RequestHeader.decode(reader, reader.uint32());
break;
case 2:
message.lease = lease_1.Lease.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
header: isSet(object.header)
? header_1.RequestHeader.fromJSON(object.header)
: undefined,
lease: isSet(object.lease) ? lease_1.Lease.fromJSON(object.lease) : undefined,
};
},
toJSON(message) {
const obj = {};
message.header !== undefined &&
(obj.header = message.header
? header_1.RequestHeader.toJSON(message.header)
: undefined);
message.lease !== undefined &&
(obj.lease = message.lease ? lease_1.Lease.toJSON(message.lease) : undefined);
return obj;
},
fromPartial(object) {
const message = createBaseStopRecordingRequest();
message.header =
object.header !== undefined && object.header !== null
? header_1.RequestHeader.fromPartial(object.header)
: undefined;
message.lease =
object.lease !== undefined && object.lease !== null
? lease_1.Lease.fromPartial(object.lease)
: undefined;
return message;
},
};
function createBaseStopRecordingResponse() {
return {
header: undefined,
status: 0,
errorWaypointLocalizedId: "",
leaseUseResult: undefined,
};
}
exports.StopRecordingResponse = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.header !== undefined) {
header_1.ResponseHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.status !== 0) {
writer.uint32(16).int32(message.status);
}
if (message.errorWaypointLocalizedId !== "") {
writer.uint32(26).string(message.errorWaypointLocalizedId);
}
if (message.leaseUseResult !== undefined) {
lease_1.LeaseUseResult.encode(message.leaseUseResult, writer.uint32(34).fork()).ldelim();
}
return writer;
},
decode(input, length) {
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseStopRecordingResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.header = header_1.ResponseHeader.decode(reader, reader.uint32());
break;
case 2:
message.status = reader.int32();
break;
case 3:
message.errorWaypointLocalizedId = reader.string();
break;
case 4:
message.leaseUseResult = lease_1.LeaseUseResult.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromJSON(object) {
return {
header: isSet(object.header)
? header_1.ResponseHeader.fromJSON(object.header)
: undefined,
status: isSet(object.status)
? stopRecordingResponse_StatusFromJSON(object.status)
: 0,
errorWaypointLocalizedId: isSet(object.errorWaypointLocalizedId)
? String(object.errorWaypointLocalizedId)
: "",
leaseUseResult: isSet(object.leaseUseResult)
? lease_1.LeaseUseResult.fromJSON(object.leaseUseResult)
: undefined,
};
},
toJSON(message) {
const obj = {};
message.header !== undefined &&
(obj.header = message.header
? header_1.ResponseHeader.toJSON(message.header)
: undefined);
message.status !== undefined &&
(obj.status = stopRecordingResponse_StatusToJSON(message.status));
message.errorWaypointLocalizedId !== undefined &&
(obj.errorWaypointLocalizedId = message.errorWaypointLocalizedId);
message.leaseUseResult !== undefined &&
(obj.leaseUseResult = message.leaseUseResult
? lease_1.LeaseUseResult.toJSON(message.leaseUseResult)
: undefined);
return obj;
},
fromPartial(object) {
const message = createBaseStopRecordingResponse();
message.header =
object.header !== undefined && object.header !== null
? header_1.ResponseHeader.fromPartial(object.header)
: undefined;
message.status = object.status ?? 0;
message.errorWaypointLocalizedId = object.errorWaypointLocalizedId ?? "";
message.leaseUseResult =
object.leaseUseResult !== undefined && object.leaseUseResult !== null
? lease_1.LeaseUseResult.fromPartial(object.leaseUseResult)
: undefined;
return message;
},
};
function createBaseCreateWaypointRequest() {
return {
header: undefined,
waypointName: "",
recordingEnvironment: undefined,
lease: undefined,
requireFiducials: [],
worldObjects: [],
};
}
exports.CreateWaypointRequest = {
encode(message, writer = minimal_1.default.Writer.create()) {
if (message.header !== undefined) {
header_1.RequestHeader.encode(message.header, writer.uint32(10).fork()).ldelim();
}
if (message.waypointName !== "") {
writer.uint32(18).string(message.waypointName);
}
if (message.recordingEnvironment !== undefined) {
exports.RecordingEnvironment.encode(message.recordingEnvironment, writer.uint32(26).fork()).ldelim();
}
i