// source: cc/arduino/cli/commands/v1/upload.proto
/**
 * @fileoverview
 * @enhanceable
 * @suppress {missingRequire} reports error on implicit type usages.
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck

var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

var cc_arduino_cli_commands_v1_common_pb = require('../../../../../cc/arduino/cli/commands/v1/common_pb.js');
goog.object.extend(proto, cc_arduino_cli_commands_v1_common_pb);
var cc_arduino_cli_commands_v1_port_pb = require('../../../../../cc/arduino/cli/commands/v1/port_pb.js');
goog.object.extend(proto, cc_arduino_cli_commands_v1_port_pb);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UploadRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UploadResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UserField', 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.cc.arduino.cli.commands.v1.UploadRequest = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.UploadRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.UploadRequest.displayName = 'proto.cc.arduino.cli.commands.v1.UploadRequest';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.UploadResponse = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.UploadResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.UploadResponse.displayName = 'proto.cc.arduino.cli.commands.v1.UploadResponse';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.displayName = 'proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.displayName = 'proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.displayName = 'proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.displayName = 'proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.displayName = 'proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.displayName = 'proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.repeatedFields_, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.displayName = 'proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.displayName = 'proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.UserField = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.UserField, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.UserField.displayName = 'proto.cc.arduino.cli.commands.v1.UserField';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.repeatedFields_, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.displayName = 'proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse';
}



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will 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.cc.arduino.cli.commands.v1.UploadRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.UploadRequest.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.UploadRequest} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.toObject = function(includeInstance, msg) {
  var f, obj = {
    instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
    fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""),
    sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""),
    port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f),
    verbose: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
    verify: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
    importFile: jspb.Message.getFieldWithDefault(msg, 7, ""),
    importDir: jspb.Message.getFieldWithDefault(msg, 8, ""),
    programmer: jspb.Message.getFieldWithDefault(msg, 9, ""),
    dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
    userFieldsMap: (f = msg.getUserFieldsMap()) ? f.toObject(includeInstance, undefined) : []
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.UploadRequest;
  return proto.cc.arduino.cli.commands.v1.UploadRequest.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.UploadRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new cc_arduino_cli_commands_v1_common_pb.Instance;
      reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader);
      msg.setInstance(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setFqbn(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setSketchPath(value);
      break;
    case 4:
      var value = new cc_arduino_cli_commands_v1_port_pb.Port;
      reader.readMessage(value,cc_arduino_cli_commands_v1_port_pb.Port.deserializeBinaryFromReader);
      msg.setPort(value);
      break;
    case 5:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setVerbose(value);
      break;
    case 6:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setVerify(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readString());
      msg.setImportFile(value);
      break;
    case 8:
      var value = /** @type {string} */ (reader.readString());
      msg.setImportDir(value);
      break;
    case 9:
      var value = /** @type {string} */ (reader.readString());
      msg.setProgrammer(value);
      break;
    case 10:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setDryRun(value);
      break;
    case 11:
      var value = msg.getUserFieldsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
         });
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.UploadRequest.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.UploadRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getInstance();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter
    );
  }
  f = message.getFqbn();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getSketchPath();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getPort();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      cc_arduino_cli_commands_v1_port_pb.Port.serializeBinaryToWriter
    );
  }
  f = message.getVerbose();
  if (f) {
    writer.writeBool(
      5,
      f
    );
  }
  f = message.getVerify();
  if (f) {
    writer.writeBool(
      6,
      f
    );
  }
  f = message.getImportFile();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
  f = message.getImportDir();
  if (f.length > 0) {
    writer.writeString(
      8,
      f
    );
  }
  f = message.getProgrammer();
  if (f.length > 0) {
    writer.writeString(
      9,
      f
    );
  }
  f = message.getDryRun();
  if (f) {
    writer.writeBool(
      10,
      f
    );
  }
  f = message.getUserFieldsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
};


/**
 * optional Instance instance = 1;
 * @return {?proto.cc.arduino.cli.commands.v1.Instance}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getInstance = function() {
  return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ (
    jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1));
};


/**
 * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setInstance = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.clearInstance = function() {
  return this.setInstance(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.hasInstance = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional string fqbn = 2;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getFqbn = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setFqbn = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string sketch_path = 3;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getSketchPath = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setSketchPath = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional Port port = 4;
 * @return {?proto.cc.arduino.cli.commands.v1.Port}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getPort = function() {
  return /** @type{?proto.cc.arduino.cli.commands.v1.Port} */ (
    jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_port_pb.Port, 4));
};


/**
 * @param {?proto.cc.arduino.cli.commands.v1.Port|undefined} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setPort = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.clearPort = function() {
  return this.setPort(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.hasPort = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * optional bool verbose = 5;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getVerbose = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setVerbose = function(value) {
  return jspb.Message.setProto3BooleanField(this, 5, value);
};


/**
 * optional bool verify = 6;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getVerify = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setVerify = function(value) {
  return jspb.Message.setProto3BooleanField(this, 6, value);
};


/**
 * optional string import_file = 7;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getImportFile = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setImportFile = function(value) {
  return jspb.Message.setProto3StringField(this, 7, value);
};


/**
 * optional string import_dir = 8;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getImportDir = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setImportDir = function(value) {
  return jspb.Message.setProto3StringField(this, 8, value);
};


/**
 * optional string programmer = 9;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getProgrammer = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setProgrammer = function(value) {
  return jspb.Message.setProto3StringField(this, 9, value);
};


/**
 * optional bool dry_run = 10;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getDryRun = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.setDryRun = function(value) {
  return jspb.Message.setProto3BooleanField(this, 10, value);
};


/**
 * map<string, string> user_fields = 11;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.getUserFieldsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 11, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadRequest.prototype.clearUserFieldsMap = function() {
  this.getUserFieldsMap().clear();
  return this;};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<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.cc.arduino.cli.commands.v1.UploadResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.UploadResponse.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.UploadResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.toObject = function(includeInstance, msg) {
  var f, obj = {
    outStream: msg.getOutStream_asB64(),
    errStream: msg.getErrStream_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.cc.arduino.cli.commands.v1.UploadResponse}
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.UploadResponse;
  return proto.cc.arduino.cli.commands.v1.UploadResponse.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.UploadResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadResponse}
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.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.setOutStream(value);
      break;
    case 2:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setErrStream(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.UploadResponse.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.UploadResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getOutStream_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      1,
      f
    );
  }
  f = message.getErrStream_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      2,
      f
    );
  }
};


/**
 * optional bytes out_stream = 1;
 * @return {!(string|Uint8Array)}
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.prototype.getOutStream = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * optional bytes out_stream = 1;
 * This is a type-conversion wrapper around `getOutStream()`
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.prototype.getOutStream_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getOutStream()));
};


/**
 * optional bytes out_stream = 1;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getOutStream()`
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.prototype.getOutStream_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getOutStream()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadResponse} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.prototype.setOutStream = function(value) {
  return jspb.Message.setProto3BytesField(this, 1, value);
};


/**
 * optional bytes err_stream = 2;
 * @return {!(string|Uint8Array)}
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.prototype.getErrStream = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * optional bytes err_stream = 2;
 * This is a type-conversion wrapper around `getErrStream()`
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.prototype.getErrStream_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getErrStream()));
};


/**
 * optional bytes err_stream = 2;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getErrStream()`
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.prototype.getErrStream_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getErrStream()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadResponse} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadResponse.prototype.setErrStream = function(value) {
  return jspb.Message.setProto3BytesField(this, 2, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<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.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.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.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError}
 */
proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError;
  return proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError}
 */
proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.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.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.ProgrammerIsRequiredForUploadError.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.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.toObject = function(includeInstance, msg) {
  var f, obj = {
    instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
    fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""),
    sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""),
    port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f),
    verbose: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
    verify: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
    importFile: jspb.Message.getFieldWithDefault(msg, 7, ""),
    importDir: jspb.Message.getFieldWithDefault(msg, 8, ""),
    programmer: jspb.Message.getFieldWithDefault(msg, 9, ""),
    dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
    userFieldsMap: (f = msg.getUserFieldsMap()) ? f.toObject(includeInstance, undefined) : []
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest;
  return proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new cc_arduino_cli_commands_v1_common_pb.Instance;
      reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader);
      msg.setInstance(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setFqbn(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setSketchPath(value);
      break;
    case 4:
      var value = new cc_arduino_cli_commands_v1_port_pb.Port;
      reader.readMessage(value,cc_arduino_cli_commands_v1_port_pb.Port.deserializeBinaryFromReader);
      msg.setPort(value);
      break;
    case 5:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setVerbose(value);
      break;
    case 6:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setVerify(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readString());
      msg.setImportFile(value);
      break;
    case 8:
      var value = /** @type {string} */ (reader.readString());
      msg.setImportDir(value);
      break;
    case 9:
      var value = /** @type {string} */ (reader.readString());
      msg.setProgrammer(value);
      break;
    case 10:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setDryRun(value);
      break;
    case 11:
      var value = msg.getUserFieldsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
         });
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getInstance();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter
    );
  }
  f = message.getFqbn();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getSketchPath();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getPort();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      cc_arduino_cli_commands_v1_port_pb.Port.serializeBinaryToWriter
    );
  }
  f = message.getVerbose();
  if (f) {
    writer.writeBool(
      5,
      f
    );
  }
  f = message.getVerify();
  if (f) {
    writer.writeBool(
      6,
      f
    );
  }
  f = message.getImportFile();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
  f = message.getImportDir();
  if (f.length > 0) {
    writer.writeString(
      8,
      f
    );
  }
  f = message.getProgrammer();
  if (f.length > 0) {
    writer.writeString(
      9,
      f
    );
  }
  f = message.getDryRun();
  if (f) {
    writer.writeBool(
      10,
      f
    );
  }
  f = message.getUserFieldsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
};


/**
 * optional Instance instance = 1;
 * @return {?proto.cc.arduino.cli.commands.v1.Instance}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getInstance = function() {
  return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ (
    jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1));
};


/**
 * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setInstance = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.clearInstance = function() {
  return this.setInstance(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.hasInstance = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional string fqbn = 2;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getFqbn = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setFqbn = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string sketch_path = 3;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getSketchPath = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setSketchPath = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional Port port = 4;
 * @return {?proto.cc.arduino.cli.commands.v1.Port}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getPort = function() {
  return /** @type{?proto.cc.arduino.cli.commands.v1.Port} */ (
    jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_port_pb.Port, 4));
};


/**
 * @param {?proto.cc.arduino.cli.commands.v1.Port|undefined} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setPort = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.clearPort = function() {
  return this.setPort(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.hasPort = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * optional bool verbose = 5;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getVerbose = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setVerbose = function(value) {
  return jspb.Message.setProto3BooleanField(this, 5, value);
};


/**
 * optional bool verify = 6;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getVerify = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setVerify = function(value) {
  return jspb.Message.setProto3BooleanField(this, 6, value);
};


/**
 * optional string import_file = 7;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getImportFile = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setImportFile = function(value) {
  return jspb.Message.setProto3StringField(this, 7, value);
};


/**
 * optional string import_dir = 8;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getImportDir = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setImportDir = function(value) {
  return jspb.Message.setProto3StringField(this, 8, value);
};


/**
 * optional string programmer = 9;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getProgrammer = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setProgrammer = function(value) {
  return jspb.Message.setProto3StringField(this, 9, value);
};


/**
 * optional bool dry_run = 10;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getDryRun = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.setDryRun = function(value) {
  return jspb.Message.setProto3BooleanField(this, 10, value);
};


/**
 * map<string, string> user_fields = 11;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.getUserFieldsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 11, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerRequest.prototype.clearUserFieldsMap = function() {
  this.getUserFieldsMap().clear();
  return this;};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<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.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.toObject = function(includeInstance, msg) {
  var f, obj = {
    outStream: msg.getOutStream_asB64(),
    errStream: msg.getErrStream_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.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse;
  return proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.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.setOutStream(value);
      break;
    case 2:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setErrStream(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getOutStream_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      1,
      f
    );
  }
  f = message.getErrStream_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      2,
      f
    );
  }
};


/**
 * optional bytes out_stream = 1;
 * @return {!(string|Uint8Array)}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.getOutStream = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * optional bytes out_stream = 1;
 * This is a type-conversion wrapper around `getOutStream()`
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.getOutStream_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getOutStream()));
};


/**
 * optional bytes out_stream = 1;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getOutStream()`
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.getOutStream_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getOutStream()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.setOutStream = function(value) {
  return jspb.Message.setProto3BytesField(this, 1, value);
};


/**
 * optional bytes err_stream = 2;
 * @return {!(string|Uint8Array)}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.getErrStream = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * optional bytes err_stream = 2;
 * This is a type-conversion wrapper around `getErrStream()`
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.getErrStream_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getErrStream()));
};


/**
 * optional bytes err_stream = 2;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getErrStream()`
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.getErrStream_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getErrStream()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse} returns this
 */
proto.cc.arduino.cli.commands.v1.UploadUsingProgrammerResponse.prototype.setErrStream = function(value) {
  return jspb.Message.setProto3BytesField(this, 2, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<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.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.toObject = function(includeInstance, msg) {
  var f, obj = {
    instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
    fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""),
    port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f),
    verbose: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
    verify: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
    programmer: jspb.Message.getFieldWithDefault(msg, 6, ""),
    dryRun: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
    userFieldsMap: (f = msg.getUserFieldsMap()) ? f.toObject(includeInstance, undefined) : []
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest;
  return proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new cc_arduino_cli_commands_v1_common_pb.Instance;
      reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader);
      msg.setInstance(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setFqbn(value);
      break;
    case 3:
      var value = new cc_arduino_cli_commands_v1_port_pb.Port;
      reader.readMessage(value,cc_arduino_cli_commands_v1_port_pb.Port.deserializeBinaryFromReader);
      msg.setPort(value);
      break;
    case 4:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setVerbose(value);
      break;
    case 5:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setVerify(value);
      break;
    case 6:
      var value = /** @type {string} */ (reader.readString());
      msg.setProgrammer(value);
      break;
    case 7:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setDryRun(value);
      break;
    case 11:
      var value = msg.getUserFieldsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
         });
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getInstance();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter
    );
  }
  f = message.getFqbn();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getPort();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      cc_arduino_cli_commands_v1_port_pb.Port.serializeBinaryToWriter
    );
  }
  f = message.getVerbose();
  if (f) {
    writer.writeBool(
      4,
      f
    );
  }
  f = message.getVerify();
  if (f) {
    writer.writeBool(
      5,
      f
    );
  }
  f = message.getProgrammer();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
  f = message.getDryRun();
  if (f) {
    writer.writeBool(
      7,
      f
    );
  }
  f = message.getUserFieldsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
};


/**
 * optional Instance instance = 1;
 * @return {?proto.cc.arduino.cli.commands.v1.Instance}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.getInstance = function() {
  return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ (
    jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1));
};


/**
 * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.setInstance = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.clearInstance = function() {
  return this.setInstance(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.hasInstance = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional string fqbn = 2;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.getFqbn = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.setFqbn = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional Port port = 3;
 * @return {?proto.cc.arduino.cli.commands.v1.Port}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.getPort = function() {
  return /** @type{?proto.cc.arduino.cli.commands.v1.Port} */ (
    jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_port_pb.Port, 3));
};


/**
 * @param {?proto.cc.arduino.cli.commands.v1.Port|undefined} value
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.setPort = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.clearPort = function() {
  return this.setPort(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.hasPort = function() {
  return jspb.Message.getField(this, 3) != null;
};


/**
 * optional bool verbose = 4;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.getVerbose = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.setVerbose = function(value) {
  return jspb.Message.setProto3BooleanField(this, 4, value);
};


/**
 * optional bool verify = 5;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.getVerify = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.setVerify = function(value) {
  return jspb.Message.setProto3BooleanField(this, 5, value);
};


/**
 * optional string programmer = 6;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.getProgrammer = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.setProgrammer = function(value) {
  return jspb.Message.setProto3StringField(this, 6, value);
};


/**
 * optional bool dry_run = 7;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.getDryRun = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.setDryRun = function(value) {
  return jspb.Message.setProto3BooleanField(this, 7, value);
};


/**
 * map<string, string> user_fields = 11;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.getUserFieldsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 11, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderRequest.prototype.clearUserFieldsMap = function() {
  this.getUserFieldsMap().clear();
  return this;};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<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.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.toObject = function(includeInstance, msg) {
  var f, obj = {
    outStream: msg.getOutStream_asB64(),
    errStream: msg.getErrStream_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.cc.arduino.cli.commands.v1.BurnBootloaderResponse}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse;
  return proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.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.setOutStream(value);
      break;
    case 2:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setErrStream(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getOutStream_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      1,
      f
    );
  }
  f = message.getErrStream_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      2,
      f
    );
  }
};


/**
 * optional bytes out_stream = 1;
 * @return {!(string|Uint8Array)}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.getOutStream = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * optional bytes out_stream = 1;
 * This is a type-conversion wrapper around `getOutStream()`
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.getOutStream_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getOutStream()));
};


/**
 * optional bytes out_stream = 1;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getOutStream()`
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.getOutStream_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getOutStream()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.setOutStream = function(value) {
  return jspb.Message.setProto3BytesField(this, 1, value);
};


/**
 * optional bytes err_stream = 2;
 * @return {!(string|Uint8Array)}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.getErrStream = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * optional bytes err_stream = 2;
 * This is a type-conversion wrapper around `getErrStream()`
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.getErrStream_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getErrStream()));
};


/**
 * optional bytes err_stream = 2;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getErrStream()`
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.getErrStream_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getErrStream()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse} returns this
 */
proto.cc.arduino.cli.commands.v1.BurnBootloaderResponse.prototype.setErrStream = function(value) {
  return jspb.Message.setProto3BytesField(this, 2, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<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.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.toObject = function(includeInstance, msg) {
  var f, obj = {
    instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
    fqbn: jspb.Message.getFieldWithDefault(msg, 2, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest;
  return proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new cc_arduino_cli_commands_v1_common_pb.Instance;
      reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader);
      msg.setInstance(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setFqbn(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getInstance();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter
    );
  }
  f = message.getFqbn();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
};


/**
 * optional Instance instance = 1;
 * @return {?proto.cc.arduino.cli.commands.v1.Instance}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.prototype.getInstance = function() {
  return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ (
    jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1));
};


/**
 * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value
 * @return {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.prototype.setInstance = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.prototype.clearInstance = function() {
  return this.setInstance(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.prototype.hasInstance = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional string fqbn = 2;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.prototype.getFqbn = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadRequest.prototype.setFqbn = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.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.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.toObject = function(includeInstance, msg) {
  var f, obj = {
    programmersList: jspb.Message.toObjectList(msg.getProgrammersList(),
    cc_arduino_cli_commands_v1_common_pb.Programmer.toObject, includeInstance)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse;
  return proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new cc_arduino_cli_commands_v1_common_pb.Programmer;
      reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Programmer.deserializeBinaryFromReader);
      msg.addProgrammers(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getProgrammersList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      1,
      f,
      cc_arduino_cli_commands_v1_common_pb.Programmer.serializeBinaryToWriter
    );
  }
};


/**
 * repeated Programmer programmers = 1;
 * @return {!Array<!proto.cc.arduino.cli.commands.v1.Programmer>}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.prototype.getProgrammersList = function() {
  return /** @type{!Array<!proto.cc.arduino.cli.commands.v1.Programmer>} */ (
    jspb.Message.getRepeatedWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Programmer, 1));
};


/**
 * @param {!Array<!proto.cc.arduino.cli.commands.v1.Programmer>} value
 * @return {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.prototype.setProgrammersList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.cc.arduino.cli.commands.v1.Programmer=} opt_value
 * @param {number=} opt_index
 * @return {!proto.cc.arduino.cli.commands.v1.Programmer}
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.prototype.addProgrammers = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.v1.Programmer, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse} returns this
 */
proto.cc.arduino.cli.commands.v1.ListProgrammersAvailableForUploadResponse.prototype.clearProgrammersList = function() {
  return this.setProgrammersList([]);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will 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.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.toObject = function(includeInstance, msg) {
  var f, obj = {
    instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
    fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""),
    protocol: 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.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest;
  return proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new cc_arduino_cli_commands_v1_common_pb.Instance;
      reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader);
      msg.setInstance(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setFqbn(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setProtocol(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getInstance();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter
    );
  }
  f = message.getFqbn();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getProtocol();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
};


/**
 * optional Instance instance = 1;
 * @return {?proto.cc.arduino.cli.commands.v1.Instance}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.getInstance = function() {
  return /** @type{?proto.cc.arduino.cli.commands.v1.Instance} */ (
    jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Instance, 1));
};


/**
 * @param {?proto.cc.arduino.cli.commands.v1.Instance|undefined} value
 * @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.setInstance = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.clearInstance = function() {
  return this.setInstance(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.hasInstance = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional string fqbn = 2;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.getFqbn = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.setFqbn = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string protocol = 3;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.getProtocol = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.setProtocol = 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.cc.arduino.cli.commands.v1.UserField.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.UserField.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.UserField} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UserField.toObject = function(includeInstance, msg) {
  var f, obj = {
    toolId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    name: jspb.Message.getFieldWithDefault(msg, 2, ""),
    label: jspb.Message.getFieldWithDefault(msg, 3, ""),
    secret: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.cc.arduino.cli.commands.v1.UserField}
 */
proto.cc.arduino.cli.commands.v1.UserField.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.UserField;
  return proto.cc.arduino.cli.commands.v1.UserField.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.UserField} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.UserField}
 */
proto.cc.arduino.cli.commands.v1.UserField.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.setToolId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setLabel(value);
      break;
    case 4:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setSecret(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.UserField.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.UserField.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.UserField} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.UserField.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getToolId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getLabel();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getSecret();
  if (f) {
    writer.writeBool(
      4,
      f
    );
  }
};


/**
 * optional string tool_id = 1;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UserField.prototype.getToolId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UserField} returns this
 */
proto.cc.arduino.cli.commands.v1.UserField.prototype.setToolId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string name = 2;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UserField.prototype.getName = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UserField} returns this
 */
proto.cc.arduino.cli.commands.v1.UserField.prototype.setName = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string label = 3;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.UserField.prototype.getLabel = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.UserField} returns this
 */
proto.cc.arduino.cli.commands.v1.UserField.prototype.setLabel = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional bool secret = 4;
 * @return {boolean}
 */
proto.cc.arduino.cli.commands.v1.UserField.prototype.getSecret = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};


/**
 * @param {boolean} value
 * @return {!proto.cc.arduino.cli.commands.v1.UserField} returns this
 */
proto.cc.arduino.cli.commands.v1.UserField.prototype.setSecret = function(value) {
  return jspb.Message.setProto3BooleanField(this, 4, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.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.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.toObject = function(includeInstance, msg) {
  var f, obj = {
    userFieldsList: jspb.Message.toObjectList(msg.getUserFieldsList(),
    proto.cc.arduino.cli.commands.v1.UserField.toObject, includeInstance)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse;
  return proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.cc.arduino.cli.commands.v1.UserField;
      reader.readMessage(value,proto.cc.arduino.cli.commands.v1.UserField.deserializeBinaryFromReader);
      msg.addUserFields(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getUserFieldsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      1,
      f,
      proto.cc.arduino.cli.commands.v1.UserField.serializeBinaryToWriter
    );
  }
};


/**
 * repeated UserField user_fields = 1;
 * @return {!Array<!proto.cc.arduino.cli.commands.v1.UserField>}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.prototype.getUserFieldsList = function() {
  return /** @type{!Array<!proto.cc.arduino.cli.commands.v1.UserField>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.UserField, 1));
};


/**
 * @param {!Array<!proto.cc.arduino.cli.commands.v1.UserField>} value
 * @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.prototype.setUserFieldsList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.cc.arduino.cli.commands.v1.UserField=} opt_value
 * @param {number=} opt_index
 * @return {!proto.cc.arduino.cli.commands.v1.UserField}
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.prototype.addUserFields = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cc.arduino.cli.commands.v1.UserField, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse} returns this
 */
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsResponse.prototype.clearUserFieldsList = function() {
  return this.setUserFieldsList([]);
};


goog.object.extend(exports, proto.cc.arduino.cli.commands.v1);
