@toitware/api
Version:
Toitware API library
1,539 lines (1,324 loc) • 48.6 kB
JavaScript
// source: toit/api/simulator.proto
/**
* @fileoverview
* @enhanceable
* @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!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var toit_model_device_pb = require('../../toit/model/device_pb.js');
goog.object.extend(proto, toit_model_device_pb);
goog.exportSymbol('proto.toit.api.CreateHardwareIdentityRequest', null, global);
goog.exportSymbol('proto.toit.api.CreateHardwareIdentityResponse', null, global);
goog.exportSymbol('proto.toit.api.CreateSimulatorRequest', null, global);
goog.exportSymbol('proto.toit.api.CreateSimulatorResponse', null, global);
goog.exportSymbol('proto.toit.api.ListSimulatorsRequest', null, global);
goog.exportSymbol('proto.toit.api.ListSimulatorsResponse', null, global);
goog.exportSymbol('proto.toit.api.RemoveSimulatorRequest', null, global);
goog.exportSymbol('proto.toit.api.RemoveSimulatorResponse', 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.toit.api.CreateSimulatorRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.api.CreateSimulatorRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.api.CreateSimulatorRequest.displayName = 'proto.toit.api.CreateSimulatorRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.toit.api.CreateSimulatorResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.api.CreateSimulatorResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.api.CreateSimulatorResponse.displayName = 'proto.toit.api.CreateSimulatorResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.toit.api.RemoveSimulatorRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.api.RemoveSimulatorRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.api.RemoveSimulatorRequest.displayName = 'proto.toit.api.RemoveSimulatorRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.toit.api.RemoveSimulatorResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.api.RemoveSimulatorResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.api.RemoveSimulatorResponse.displayName = 'proto.toit.api.RemoveSimulatorResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.toit.api.ListSimulatorsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.api.ListSimulatorsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.api.ListSimulatorsRequest.displayName = 'proto.toit.api.ListSimulatorsRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.toit.api.ListSimulatorsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.toit.api.ListSimulatorsResponse.repeatedFields_, null);
};
goog.inherits(proto.toit.api.ListSimulatorsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.api.ListSimulatorsResponse.displayName = 'proto.toit.api.ListSimulatorsResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.toit.api.CreateHardwareIdentityRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.api.CreateHardwareIdentityRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.api.CreateHardwareIdentityRequest.displayName = 'proto.toit.api.CreateHardwareIdentityRequest';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.toit.api.CreateHardwareIdentityResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.api.CreateHardwareIdentityResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.api.CreateHardwareIdentityResponse.displayName = 'proto.toit.api.CreateHardwareIdentityResponse';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.toit.api.CreateSimulatorRequest.prototype.toObject = function(opt_includeInstance) {
return proto.toit.api.CreateSimulatorRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.toit.api.CreateSimulatorRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.CreateSimulatorRequest.toObject = function(includeInstance, msg) {
var f, obj = {
sdkName: jspb.Message.getFieldWithDefault(msg, 1, ""),
identity: (f = msg.getIdentity()) && toit_model_device_pb.HardwareIdentity.toObject(includeInstance, f),
deviceName: 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.toit.api.CreateSimulatorRequest}
*/
proto.toit.api.CreateSimulatorRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.api.CreateSimulatorRequest;
return proto.toit.api.CreateSimulatorRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.api.CreateSimulatorRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.api.CreateSimulatorRequest}
*/
proto.toit.api.CreateSimulatorRequest.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.setSdkName(value);
break;
case 2:
var value = new toit_model_device_pb.HardwareIdentity;
reader.readMessage(value,toit_model_device_pb.HardwareIdentity.deserializeBinaryFromReader);
msg.setIdentity(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDeviceName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.toit.api.CreateSimulatorRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.api.CreateSimulatorRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.toit.api.CreateSimulatorRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.CreateSimulatorRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSdkName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getIdentity();
if (f != null) {
writer.writeMessage(
2,
f,
toit_model_device_pb.HardwareIdentity.serializeBinaryToWriter
);
}
f = message.getDeviceName();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string sdk_name = 1;
* @return {string}
*/
proto.toit.api.CreateSimulatorRequest.prototype.getSdkName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.toit.api.CreateSimulatorRequest} returns this
*/
proto.toit.api.CreateSimulatorRequest.prototype.setSdkName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional toit.model.HardwareIdentity identity = 2;
* @return {?proto.toit.model.HardwareIdentity}
*/
proto.toit.api.CreateSimulatorRequest.prototype.getIdentity = function() {
return /** @type{?proto.toit.model.HardwareIdentity} */ (
jspb.Message.getWrapperField(this, toit_model_device_pb.HardwareIdentity, 2));
};
/**
* @param {?proto.toit.model.HardwareIdentity|undefined} value
* @return {!proto.toit.api.CreateSimulatorRequest} returns this
*/
proto.toit.api.CreateSimulatorRequest.prototype.setIdentity = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.toit.api.CreateSimulatorRequest} returns this
*/
proto.toit.api.CreateSimulatorRequest.prototype.clearIdentity = function() {
return this.setIdentity(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.toit.api.CreateSimulatorRequest.prototype.hasIdentity = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string device_name = 3;
* @return {string}
*/
proto.toit.api.CreateSimulatorRequest.prototype.getDeviceName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.toit.api.CreateSimulatorRequest} returns this
*/
proto.toit.api.CreateSimulatorRequest.prototype.setDeviceName = 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_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.toit.api.CreateSimulatorResponse.prototype.toObject = function(opt_includeInstance) {
return proto.toit.api.CreateSimulatorResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.toit.api.CreateSimulatorResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.CreateSimulatorResponse.toObject = function(includeInstance, msg) {
var f, obj = {
simulatorId: msg.getSimulatorId_asB64(),
hardwareId: msg.getHardwareId_asB64(),
deviceId: msg.getDeviceId_asB64(),
deviceName: jspb.Message.getFieldWithDefault(msg, 4, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.toit.api.CreateSimulatorResponse}
*/
proto.toit.api.CreateSimulatorResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.api.CreateSimulatorResponse;
return proto.toit.api.CreateSimulatorResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.api.CreateSimulatorResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.api.CreateSimulatorResponse}
*/
proto.toit.api.CreateSimulatorResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSimulatorId(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setHardwareId(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setDeviceId(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setDeviceName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.toit.api.CreateSimulatorResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.api.CreateSimulatorResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.toit.api.CreateSimulatorResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.CreateSimulatorResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSimulatorId_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getHardwareId_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getDeviceId_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
f = message.getDeviceName();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
/**
* optional bytes simulator_id = 1;
* @return {!(string|Uint8Array)}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getSimulatorId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes simulator_id = 1;
* This is a type-conversion wrapper around `getSimulatorId()`
* @return {string}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getSimulatorId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSimulatorId()));
};
/**
* optional bytes simulator_id = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSimulatorId()`
* @return {!Uint8Array}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getSimulatorId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSimulatorId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.api.CreateSimulatorResponse} returns this
*/
proto.toit.api.CreateSimulatorResponse.prototype.setSimulatorId = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional bytes hardware_id = 2;
* @return {!(string|Uint8Array)}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getHardwareId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes hardware_id = 2;
* This is a type-conversion wrapper around `getHardwareId()`
* @return {string}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getHardwareId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getHardwareId()));
};
/**
* optional bytes hardware_id = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getHardwareId()`
* @return {!Uint8Array}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getHardwareId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getHardwareId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.api.CreateSimulatorResponse} returns this
*/
proto.toit.api.CreateSimulatorResponse.prototype.setHardwareId = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional bytes device_id = 3;
* @return {!(string|Uint8Array)}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getDeviceId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes device_id = 3;
* This is a type-conversion wrapper around `getDeviceId()`
* @return {string}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getDeviceId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getDeviceId()));
};
/**
* optional bytes device_id = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getDeviceId()`
* @return {!Uint8Array}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getDeviceId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getDeviceId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.api.CreateSimulatorResponse} returns this
*/
proto.toit.api.CreateSimulatorResponse.prototype.setDeviceId = function(value) {
return jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* optional string device_name = 4;
* @return {string}
*/
proto.toit.api.CreateSimulatorResponse.prototype.getDeviceName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.toit.api.CreateSimulatorResponse} returns this
*/
proto.toit.api.CreateSimulatorResponse.prototype.setDeviceName = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.toit.api.RemoveSimulatorRequest.prototype.toObject = function(opt_includeInstance) {
return proto.toit.api.RemoveSimulatorRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.toit.api.RemoveSimulatorRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.RemoveSimulatorRequest.toObject = function(includeInstance, msg) {
var f, obj = {
simulatorId: msg.getSimulatorId_asB64(),
deviceId: msg.getDeviceId_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.toit.api.RemoveSimulatorRequest}
*/
proto.toit.api.RemoveSimulatorRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.api.RemoveSimulatorRequest;
return proto.toit.api.RemoveSimulatorRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.api.RemoveSimulatorRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.api.RemoveSimulatorRequest}
*/
proto.toit.api.RemoveSimulatorRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSimulatorId(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setDeviceId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.toit.api.RemoveSimulatorRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.api.RemoveSimulatorRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.toit.api.RemoveSimulatorRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.RemoveSimulatorRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSimulatorId_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getDeviceId_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
};
/**
* optional bytes simulator_id = 1;
* @return {!(string|Uint8Array)}
*/
proto.toit.api.RemoveSimulatorRequest.prototype.getSimulatorId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes simulator_id = 1;
* This is a type-conversion wrapper around `getSimulatorId()`
* @return {string}
*/
proto.toit.api.RemoveSimulatorRequest.prototype.getSimulatorId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSimulatorId()));
};
/**
* optional bytes simulator_id = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSimulatorId()`
* @return {!Uint8Array}
*/
proto.toit.api.RemoveSimulatorRequest.prototype.getSimulatorId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSimulatorId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.api.RemoveSimulatorRequest} returns this
*/
proto.toit.api.RemoveSimulatorRequest.prototype.setSimulatorId = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional bytes device_id = 3;
* @return {!(string|Uint8Array)}
*/
proto.toit.api.RemoveSimulatorRequest.prototype.getDeviceId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes device_id = 3;
* This is a type-conversion wrapper around `getDeviceId()`
* @return {string}
*/
proto.toit.api.RemoveSimulatorRequest.prototype.getDeviceId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getDeviceId()));
};
/**
* optional bytes device_id = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getDeviceId()`
* @return {!Uint8Array}
*/
proto.toit.api.RemoveSimulatorRequest.prototype.getDeviceId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getDeviceId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.api.RemoveSimulatorRequest} returns this
*/
proto.toit.api.RemoveSimulatorRequest.prototype.setDeviceId = function(value) {
return jspb.Message.setProto3BytesField(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_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.toit.api.RemoveSimulatorResponse.prototype.toObject = function(opt_includeInstance) {
return proto.toit.api.RemoveSimulatorResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.toit.api.RemoveSimulatorResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.RemoveSimulatorResponse.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.toit.api.RemoveSimulatorResponse}
*/
proto.toit.api.RemoveSimulatorResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.api.RemoveSimulatorResponse;
return proto.toit.api.RemoveSimulatorResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.api.RemoveSimulatorResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.api.RemoveSimulatorResponse}
*/
proto.toit.api.RemoveSimulatorResponse.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.toit.api.RemoveSimulatorResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.api.RemoveSimulatorResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.toit.api.RemoveSimulatorResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.RemoveSimulatorResponse.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_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.toit.api.ListSimulatorsRequest.prototype.toObject = function(opt_includeInstance) {
return proto.toit.api.ListSimulatorsRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.toit.api.ListSimulatorsRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.ListSimulatorsRequest.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.toit.api.ListSimulatorsRequest}
*/
proto.toit.api.ListSimulatorsRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.api.ListSimulatorsRequest;
return proto.toit.api.ListSimulatorsRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.api.ListSimulatorsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.api.ListSimulatorsRequest}
*/
proto.toit.api.ListSimulatorsRequest.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.toit.api.ListSimulatorsRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.api.ListSimulatorsRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.toit.api.ListSimulatorsRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.ListSimulatorsRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.toit.api.ListSimulatorsResponse.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_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.toit.api.ListSimulatorsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.toit.api.ListSimulatorsResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.toit.api.ListSimulatorsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.ListSimulatorsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
simulatorIdsList: msg.getSimulatorIdsList_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.toit.api.ListSimulatorsResponse}
*/
proto.toit.api.ListSimulatorsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.api.ListSimulatorsResponse;
return proto.toit.api.ListSimulatorsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.api.ListSimulatorsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.api.ListSimulatorsResponse}
*/
proto.toit.api.ListSimulatorsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.addSimulatorIds(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.toit.api.ListSimulatorsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.api.ListSimulatorsResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.toit.api.ListSimulatorsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.ListSimulatorsResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSimulatorIdsList_asU8();
if (f.length > 0) {
writer.writeRepeatedBytes(
1,
f
);
}
};
/**
* repeated bytes simulator_ids = 1;
* @return {!(Array<!Uint8Array>|Array<string>)}
*/
proto.toit.api.ListSimulatorsResponse.prototype.getSimulatorIdsList = function() {
return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 1));
};
/**
* repeated bytes simulator_ids = 1;
* This is a type-conversion wrapper around `getSimulatorIdsList()`
* @return {!Array<string>}
*/
proto.toit.api.ListSimulatorsResponse.prototype.getSimulatorIdsList_asB64 = function() {
return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64(
this.getSimulatorIdsList()));
};
/**
* repeated bytes simulator_ids = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSimulatorIdsList()`
* @return {!Array<!Uint8Array>}
*/
proto.toit.api.ListSimulatorsResponse.prototype.getSimulatorIdsList_asU8 = function() {
return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8(
this.getSimulatorIdsList()));
};
/**
* @param {!(Array<!Uint8Array>|Array<string>)} value
* @return {!proto.toit.api.ListSimulatorsResponse} returns this
*/
proto.toit.api.ListSimulatorsResponse.prototype.setSimulatorIdsList = function(value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {!(string|Uint8Array)} value
* @param {number=} opt_index
* @return {!proto.toit.api.ListSimulatorsResponse} returns this
*/
proto.toit.api.ListSimulatorsResponse.prototype.addSimulatorIds = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.toit.api.ListSimulatorsResponse} returns this
*/
proto.toit.api.ListSimulatorsResponse.prototype.clearSimulatorIdsList = function() {
return this.setSimulatorIdsList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.toit.api.CreateHardwareIdentityRequest.prototype.toObject = function(opt_includeInstance) {
return proto.toit.api.CreateHardwareIdentityRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.toit.api.CreateHardwareIdentityRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.CreateHardwareIdentityRequest.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.toit.api.CreateHardwareIdentityRequest}
*/
proto.toit.api.CreateHardwareIdentityRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.api.CreateHardwareIdentityRequest;
return proto.toit.api.CreateHardwareIdentityRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.api.CreateHardwareIdentityRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.api.CreateHardwareIdentityRequest}
*/
proto.toit.api.CreateHardwareIdentityRequest.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.toit.api.CreateHardwareIdentityRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.api.CreateHardwareIdentityRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.toit.api.CreateHardwareIdentityRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.CreateHardwareIdentityRequest.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_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.toit.api.CreateHardwareIdentityResponse.prototype.toObject = function(opt_includeInstance) {
return proto.toit.api.CreateHardwareIdentityResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.toit.api.CreateHardwareIdentityResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.CreateHardwareIdentityResponse.toObject = function(includeInstance, msg) {
var f, obj = {
identity: (f = msg.getIdentity()) && toit_model_device_pb.HardwareIdentity.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.toit.api.CreateHardwareIdentityResponse}
*/
proto.toit.api.CreateHardwareIdentityResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.api.CreateHardwareIdentityResponse;
return proto.toit.api.CreateHardwareIdentityResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.api.CreateHardwareIdentityResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.api.CreateHardwareIdentityResponse}
*/
proto.toit.api.CreateHardwareIdentityResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new toit_model_device_pb.HardwareIdentity;
reader.readMessage(value,toit_model_device_pb.HardwareIdentity.deserializeBinaryFromReader);
msg.setIdentity(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.toit.api.CreateHardwareIdentityResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.api.CreateHardwareIdentityResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.toit.api.CreateHardwareIdentityResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.api.CreateHardwareIdentityResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getIdentity();
if (f != null) {
writer.writeMessage(
1,
f,
toit_model_device_pb.HardwareIdentity.serializeBinaryToWriter
);
}
};
/**
* optional toit.model.HardwareIdentity identity = 1;
* @return {?proto.toit.model.HardwareIdentity}
*/
proto.toit.api.CreateHardwareIdentityResponse.prototype.getIdentity = function() {
return /** @type{?proto.toit.model.HardwareIdentity} */ (
jspb.Message.getWrapperField(this, toit_model_device_pb.HardwareIdentity, 1));
};
/**
* @param {?proto.toit.model.HardwareIdentity|undefined} value
* @return {!proto.toit.api.CreateHardwareIdentityResponse} returns this
*/
proto.toit.api.CreateHardwareIdentityResponse.prototype.setIdentity = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.toit.api.CreateHardwareIdentityResponse} returns this
*/
proto.toit.api.CreateHardwareIdentityResponse.prototype.clearIdentity = function() {
return this.setIdentity(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.toit.api.CreateHardwareIdentityResponse.prototype.hasIdentity = function() {
return jspb.Message.getField(this, 1) != null;
};
goog.object.extend(exports, proto.toit.api);