@toitware/api
Version:
Toitware API library
1,778 lines (1,537 loc) • 67.2 kB
JavaScript
// source: toit/model/program.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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.toit.model.Compilation', null, global);
goog.exportSymbol('proto.toit.model.CompilationResult', null, global);
goog.exportSymbol('proto.toit.model.Program', null, global);
goog.exportSymbol('proto.toit.model.ReleaseLevel', null, global);
goog.exportSymbol('proto.toit.model.ReleaseLevel.Type', null, global);
goog.exportSymbol('proto.toit.model.SDK', null, global);
goog.exportSymbol('proto.toit.model.Source', 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.model.Source = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.model.Source, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.model.Source.displayName = 'proto.toit.model.Source';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed 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.model.Program = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.model.Program, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.model.Program.displayName = 'proto.toit.model.Program';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed 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.model.Compilation = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.toit.model.Compilation.repeatedFields_, null);
};
goog.inherits(proto.toit.model.Compilation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.model.Compilation.displayName = 'proto.toit.model.Compilation';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed 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.model.CompilationResult = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.model.CompilationResult, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.model.CompilationResult.displayName = 'proto.toit.model.CompilationResult';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed 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.model.SDK = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.toit.model.SDK.repeatedFields_, null);
};
goog.inherits(proto.toit.model.SDK, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.model.SDK.displayName = 'proto.toit.model.SDK';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed 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.model.ReleaseLevel = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.toit.model.ReleaseLevel, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.toit.model.ReleaseLevel.displayName = 'proto.toit.model.ReleaseLevel';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will 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.model.Source.prototype.toObject = function(opt_includeInstance) {
return proto.toit.model.Source.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} 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.model.Source} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.model.Source.toObject = function(includeInstance, msg) {
var f, obj = {
id: msg.getId_asB64(),
createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
organizationId: msg.getOrganizationId_asB64(),
creatorId: msg.getCreatorId_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.model.Source}
*/
proto.toit.model.Source.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.model.Source;
return proto.toit.model.Source.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.model.Source} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.model.Source}
*/
proto.toit.model.Source.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.setId(value);
break;
case 3:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setCreatedAt(value);
break;
case 4:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setOrganizationId(value);
break;
case 5:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setCreatorId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.toit.model.Source.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.model.Source.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.model.Source} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.model.Source.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getCreatedAt();
if (f != null) {
writer.writeMessage(
3,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getOrganizationId_asU8();
if (f.length > 0) {
writer.writeBytes(
4,
f
);
}
f = message.getCreatorId_asU8();
if (f.length > 0) {
writer.writeBytes(
5,
f
);
}
};
/**
* optional bytes id = 1;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Source.prototype.getId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes id = 1;
* This is a type-conversion wrapper around `getId()`
* @return {string}
*/
proto.toit.model.Source.prototype.getId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getId()));
};
/**
* optional bytes id = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getId()`
* @return {!Uint8Array}
*/
proto.toit.model.Source.prototype.getId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Source} returns this
*/
proto.toit.model.Source.prototype.setId = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional google.protobuf.Timestamp created_at = 3;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.toit.model.Source.prototype.getCreatedAt = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.toit.model.Source} returns this
*/
proto.toit.model.Source.prototype.setCreatedAt = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.toit.model.Source} returns this
*/
proto.toit.model.Source.prototype.clearCreatedAt = function() {
return this.setCreatedAt(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.toit.model.Source.prototype.hasCreatedAt = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional bytes organization_id = 4;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Source.prototype.getOrganizationId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* optional bytes organization_id = 4;
* This is a type-conversion wrapper around `getOrganizationId()`
* @return {string}
*/
proto.toit.model.Source.prototype.getOrganizationId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getOrganizationId()));
};
/**
* optional bytes organization_id = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getOrganizationId()`
* @return {!Uint8Array}
*/
proto.toit.model.Source.prototype.getOrganizationId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getOrganizationId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Source} returns this
*/
proto.toit.model.Source.prototype.setOrganizationId = function(value) {
return jspb.Message.setProto3BytesField(this, 4, value);
};
/**
* optional bytes creator_id = 5;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Source.prototype.getCreatorId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* optional bytes creator_id = 5;
* This is a type-conversion wrapper around `getCreatorId()`
* @return {string}
*/
proto.toit.model.Source.prototype.getCreatorId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getCreatorId()));
};
/**
* optional bytes creator_id = 5;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getCreatorId()`
* @return {!Uint8Array}
*/
proto.toit.model.Source.prototype.getCreatorId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getCreatorId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Source} returns this
*/
proto.toit.model.Source.prototype.setCreatorId = function(value) {
return jspb.Message.setProto3BytesField(this, 5, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<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.model.Program.prototype.toObject = function(opt_includeInstance) {
return proto.toit.model.Program.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} 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.model.Program} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.model.Program.toObject = function(includeInstance, msg) {
var f, obj = {
id: msg.getId_asB64(),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
temporary: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
sourceId: msg.getSourceId_asB64(),
source: (f = msg.getSource()) && proto.toit.model.Source.toObject(includeInstance, f),
organizationId: msg.getOrganizationId_asB64(),
creatorId: msg.getCreatorId_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.model.Program}
*/
proto.toit.model.Program.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.model.Program;
return proto.toit.model.Program.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.model.Program} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.model.Program}
*/
proto.toit.model.Program.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.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setTemporary(value);
break;
case 4:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setCreatedAt(value);
break;
case 5:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSourceId(value);
break;
case 6:
var value = new proto.toit.model.Source;
reader.readMessage(value,proto.toit.model.Source.deserializeBinaryFromReader);
msg.setSource(value);
break;
case 7:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setOrganizationId(value);
break;
case 8:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setCreatorId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.toit.model.Program.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.model.Program.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.model.Program} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.model.Program.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getTemporary();
if (f) {
writer.writeBool(
3,
f
);
}
f = message.getCreatedAt();
if (f != null) {
writer.writeMessage(
4,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getSourceId_asU8();
if (f.length > 0) {
writer.writeBytes(
5,
f
);
}
f = message.getSource();
if (f != null) {
writer.writeMessage(
6,
f,
proto.toit.model.Source.serializeBinaryToWriter
);
}
f = message.getOrganizationId_asU8();
if (f.length > 0) {
writer.writeBytes(
7,
f
);
}
f = message.getCreatorId_asU8();
if (f.length > 0) {
writer.writeBytes(
8,
f
);
}
};
/**
* optional bytes id = 1;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Program.prototype.getId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes id = 1;
* This is a type-conversion wrapper around `getId()`
* @return {string}
*/
proto.toit.model.Program.prototype.getId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getId()));
};
/**
* optional bytes id = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getId()`
* @return {!Uint8Array}
*/
proto.toit.model.Program.prototype.getId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.setId = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional string name = 2;
* @return {string}
*/
proto.toit.model.Program.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bool temporary = 3;
* @return {boolean}
*/
proto.toit.model.Program.prototype.getTemporary = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};
/**
* @param {boolean} value
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.setTemporary = function(value) {
return jspb.Message.setProto3BooleanField(this, 3, value);
};
/**
* optional google.protobuf.Timestamp created_at = 4;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.toit.model.Program.prototype.getCreatedAt = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.setCreatedAt = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.clearCreatedAt = function() {
return this.setCreatedAt(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.toit.model.Program.prototype.hasCreatedAt = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional bytes source_id = 5;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Program.prototype.getSourceId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* optional bytes source_id = 5;
* This is a type-conversion wrapper around `getSourceId()`
* @return {string}
*/
proto.toit.model.Program.prototype.getSourceId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSourceId()));
};
/**
* optional bytes source_id = 5;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSourceId()`
* @return {!Uint8Array}
*/
proto.toit.model.Program.prototype.getSourceId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSourceId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.setSourceId = function(value) {
return jspb.Message.setProto3BytesField(this, 5, value);
};
/**
* optional Source source = 6;
* @return {?proto.toit.model.Source}
*/
proto.toit.model.Program.prototype.getSource = function() {
return /** @type{?proto.toit.model.Source} */ (
jspb.Message.getWrapperField(this, proto.toit.model.Source, 6));
};
/**
* @param {?proto.toit.model.Source|undefined} value
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.setSource = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.clearSource = function() {
return this.setSource(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.toit.model.Program.prototype.hasSource = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional bytes organization_id = 7;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Program.prototype.getOrganizationId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* optional bytes organization_id = 7;
* This is a type-conversion wrapper around `getOrganizationId()`
* @return {string}
*/
proto.toit.model.Program.prototype.getOrganizationId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getOrganizationId()));
};
/**
* optional bytes organization_id = 7;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getOrganizationId()`
* @return {!Uint8Array}
*/
proto.toit.model.Program.prototype.getOrganizationId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getOrganizationId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.setOrganizationId = function(value) {
return jspb.Message.setProto3BytesField(this, 7, value);
};
/**
* optional bytes creator_id = 8;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Program.prototype.getCreatorId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* optional bytes creator_id = 8;
* This is a type-conversion wrapper around `getCreatorId()`
* @return {string}
*/
proto.toit.model.Program.prototype.getCreatorId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getCreatorId()));
};
/**
* optional bytes creator_id = 8;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getCreatorId()`
* @return {!Uint8Array}
*/
proto.toit.model.Program.prototype.getCreatorId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getCreatorId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Program} returns this
*/
proto.toit.model.Program.prototype.setCreatorId = function(value) {
return jspb.Message.setProto3BytesField(this, 8, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.toit.model.Compilation.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<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.model.Compilation.prototype.toObject = function(opt_includeInstance) {
return proto.toit.model.Compilation.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} 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.model.Compilation} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.model.Compilation.toObject = function(includeInstance, msg) {
var f, obj = {
id: msg.getId_asB64(),
sdk: jspb.Message.getFieldWithDefault(msg, 2, ""),
argumentsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
programId: msg.getProgramId_asB64(),
program: (f = msg.getProgram()) && proto.toit.model.Program.toObject(includeInstance, f),
result: (f = msg.getResult()) && proto.toit.model.CompilationResult.toObject(includeInstance, f),
createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
organizationId: msg.getOrganizationId_asB64(),
creatorId: msg.getCreatorId_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.model.Compilation}
*/
proto.toit.model.Compilation.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.model.Compilation;
return proto.toit.model.Compilation.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.model.Compilation} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.model.Compilation}
*/
proto.toit.model.Compilation.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.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setSdk(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.addArguments(value);
break;
case 4:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setProgramId(value);
break;
case 5:
var value = new proto.toit.model.Program;
reader.readMessage(value,proto.toit.model.Program.deserializeBinaryFromReader);
msg.setProgram(value);
break;
case 6:
var value = new proto.toit.model.CompilationResult;
reader.readMessage(value,proto.toit.model.CompilationResult.deserializeBinaryFromReader);
msg.setResult(value);
break;
case 7:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setCreatedAt(value);
break;
case 8:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setOrganizationId(value);
break;
case 9:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setCreatorId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.toit.model.Compilation.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.model.Compilation.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.model.Compilation} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.model.Compilation.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getSdk();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getArgumentsList();
if (f.length > 0) {
writer.writeRepeatedString(
3,
f
);
}
f = message.getProgramId_asU8();
if (f.length > 0) {
writer.writeBytes(
4,
f
);
}
f = message.getProgram();
if (f != null) {
writer.writeMessage(
5,
f,
proto.toit.model.Program.serializeBinaryToWriter
);
}
f = message.getResult();
if (f != null) {
writer.writeMessage(
6,
f,
proto.toit.model.CompilationResult.serializeBinaryToWriter
);
}
f = message.getCreatedAt();
if (f != null) {
writer.writeMessage(
7,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getOrganizationId_asU8();
if (f.length > 0) {
writer.writeBytes(
8,
f
);
}
f = message.getCreatorId_asU8();
if (f.length > 0) {
writer.writeBytes(
9,
f
);
}
};
/**
* optional bytes id = 1;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Compilation.prototype.getId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes id = 1;
* This is a type-conversion wrapper around `getId()`
* @return {string}
*/
proto.toit.model.Compilation.prototype.getId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getId()));
};
/**
* optional bytes id = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getId()`
* @return {!Uint8Array}
*/
proto.toit.model.Compilation.prototype.getId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.setId = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional string sdk = 2;
* @return {string}
*/
proto.toit.model.Compilation.prototype.getSdk = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.setSdk = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated string arguments = 3;
* @return {!Array<string>}
*/
proto.toit.model.Compilation.prototype.getArgumentsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
};
/**
* @param {!Array<string>} value
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.setArgumentsList = function(value) {
return jspb.Message.setField(this, 3, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.addArguments = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.clearArgumentsList = function() {
return this.setArgumentsList([]);
};
/**
* optional bytes program_id = 4;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Compilation.prototype.getProgramId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* optional bytes program_id = 4;
* This is a type-conversion wrapper around `getProgramId()`
* @return {string}
*/
proto.toit.model.Compilation.prototype.getProgramId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getProgramId()));
};
/**
* optional bytes program_id = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getProgramId()`
* @return {!Uint8Array}
*/
proto.toit.model.Compilation.prototype.getProgramId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getProgramId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.setProgramId = function(value) {
return jspb.Message.setProto3BytesField(this, 4, value);
};
/**
* optional Program program = 5;
* @return {?proto.toit.model.Program}
*/
proto.toit.model.Compilation.prototype.getProgram = function() {
return /** @type{?proto.toit.model.Program} */ (
jspb.Message.getWrapperField(this, proto.toit.model.Program, 5));
};
/**
* @param {?proto.toit.model.Program|undefined} value
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.setProgram = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.clearProgram = function() {
return this.setProgram(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.toit.model.Compilation.prototype.hasProgram = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional CompilationResult result = 6;
* @return {?proto.toit.model.CompilationResult}
*/
proto.toit.model.Compilation.prototype.getResult = function() {
return /** @type{?proto.toit.model.CompilationResult} */ (
jspb.Message.getWrapperField(this, proto.toit.model.CompilationResult, 6));
};
/**
* @param {?proto.toit.model.CompilationResult|undefined} value
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.setResult = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.clearResult = function() {
return this.setResult(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.toit.model.Compilation.prototype.hasResult = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional google.protobuf.Timestamp created_at = 7;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.toit.model.Compilation.prototype.getCreatedAt = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.setCreatedAt = function(value) {
return jspb.Message.setWrapperField(this, 7, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.clearCreatedAt = function() {
return this.setCreatedAt(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.toit.model.Compilation.prototype.hasCreatedAt = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional bytes organization_id = 8;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Compilation.prototype.getOrganizationId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* optional bytes organization_id = 8;
* This is a type-conversion wrapper around `getOrganizationId()`
* @return {string}
*/
proto.toit.model.Compilation.prototype.getOrganizationId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getOrganizationId()));
};
/**
* optional bytes organization_id = 8;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getOrganizationId()`
* @return {!Uint8Array}
*/
proto.toit.model.Compilation.prototype.getOrganizationId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getOrganizationId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.setOrganizationId = function(value) {
return jspb.Message.setProto3BytesField(this, 8, value);
};
/**
* optional bytes creator_id = 9;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.Compilation.prototype.getCreatorId = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/**
* optional bytes creator_id = 9;
* This is a type-conversion wrapper around `getCreatorId()`
* @return {string}
*/
proto.toit.model.Compilation.prototype.getCreatorId_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getCreatorId()));
};
/**
* optional bytes creator_id = 9;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getCreatorId()`
* @return {!Uint8Array}
*/
proto.toit.model.Compilation.prototype.getCreatorId_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getCreatorId()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.Compilation} returns this
*/
proto.toit.model.Compilation.prototype.setCreatorId = function(value) {
return jspb.Message.setProto3BytesField(this, 9, 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.model.CompilationResult.prototype.toObject = function(opt_includeInstance) {
return proto.toit.model.CompilationResult.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} 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.model.CompilationResult} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.model.CompilationResult.toObject = function(includeInstance, msg) {
var f, obj = {
error: jspb.Message.getFieldWithDefault(msg, 1, ""),
snapshotOut: msg.getSnapshotOut_asB64(),
snapshotErr: msg.getSnapshotErr_asB64(),
snapshotExitcode: jspb.Message.getFieldWithDefault(msg, 4, 0),
imageOut: msg.getImageOut_asB64(),
imageErr: msg.getImageErr_asB64(),
imageExitcode: jspb.Message.getFieldWithDefault(msg, 7, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.toit.model.CompilationResult}
*/
proto.toit.model.CompilationResult.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.toit.model.CompilationResult;
return proto.toit.model.CompilationResult.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.toit.model.CompilationResult} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.toit.model.CompilationResult}
*/
proto.toit.model.CompilationResult.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.setError(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSnapshotOut(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setSnapshotErr(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setSnapshotExitcode(value);
break;
case 5:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setImageOut(value);
break;
case 6:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setImageErr(value);
break;
case 7:
var value = /** @type {number} */ (reader.readInt32());
msg.setImageExitcode(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.toit.model.CompilationResult.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.toit.model.CompilationResult.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.model.CompilationResult} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.toit.model.CompilationResult.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getError();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSnapshotOut_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getSnapshotErr_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
f = message.getSnapshotExitcode();
if (f !== 0) {
writer.writeInt32(
4,
f
);
}
f = message.getImageOut_asU8();
if (f.length > 0) {
writer.writeBytes(
5,
f
);
}
f = message.getImageErr_asU8();
if (f.length > 0) {
writer.writeBytes(
6,
f
);
}
f = message.getImageExitcode();
if (f !== 0) {
writer.writeInt32(
7,
f
);
}
};
/**
* optional string error = 1;
* @return {string}
*/
proto.toit.model.CompilationResult.prototype.getError = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.toit.model.CompilationResult} returns this
*/
proto.toit.model.CompilationResult.prototype.setError = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional bytes snapshot_out = 2;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.CompilationResult.prototype.getSnapshotOut = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes snapshot_out = 2;
* This is a type-conversion wrapper around `getSnapshotOut()`
* @return {string}
*/
proto.toit.model.CompilationResult.prototype.getSnapshotOut_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSnapshotOut()));
};
/**
* optional bytes snapshot_out = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSnapshotOut()`
* @return {!Uint8Array}
*/
proto.toit.model.CompilationResult.prototype.getSnapshotOut_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSnapshotOut()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.CompilationResult} returns this
*/
proto.toit.model.CompilationResult.prototype.setSnapshotOut = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional bytes snapshot_err = 3;
* @return {!(string|Uint8Array)}
*/
proto.toit.model.CompilationResult.prototype.getSnapshotErr = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes snapshot_err = 3;
* This is a type-conversion wrapper around `getSnapshotErr()`
* @return {string}
*/
proto.toit.model.CompilationResult.prototype.getSnapshotErr_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSnapshotErr()));
};
/**
* optional bytes snapshot_err = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSnapshotErr()`
* @return {!Uint8Array}
*/
proto.toit.model.CompilationResult.prototype.getSnapshotErr_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSnapshotErr()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.toit.model.CompilationResult} returns this
*/
proto.toit.model.CompilationResult.prototype.setSnapshotErr = function(value) {
return jspb.Message.