// source: cc/arduino/cli/commands/v1/monitor.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.EnumerateMonitorPortSettingsRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortSetting', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.MonitorResponse', 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.MonitorRequest = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.MonitorRequest.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorRequest';
}
/**
 * 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.MonitorPortConfiguration = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.repeatedFields_, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration';
}
/**
 * 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.MonitorResponse = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorResponse.repeatedFields_, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.MonitorResponse.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorResponse';
}
/**
 * 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.MonitorPortSetting = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortSetting, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.MonitorPortSetting.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortSetting';
}
/**
 * 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.EnumerateMonitorPortSettingsRequest = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.displayName = 'proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest';
}
/**
 * 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.EnumerateMonitorPortSettingsResponse = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.repeatedFields_, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.displayName = 'proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse';
}
/**
 * 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.MonitorPortSettingDescriptor = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.repeatedFields_, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.displayName = 'proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor';
}



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.MonitorRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.MonitorRequest.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.MonitorRequest} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorRequest.toObject = function(includeInstance, msg) {
  var f, obj = {
    instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
    port: (f = msg.getPort()) && cc_arduino_cli_commands_v1_port_pb.Port.toObject(includeInstance, f),
    fqbn: jspb.Message.getFieldWithDefault(msg, 3, ""),
    txData: msg.getTxData_asB64(),
    portConfiguration: (f = msg.getPortConfiguration()) && proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject(includeInstance, f)
  };

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


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest}
 */
proto.cc.arduino.cli.commands.v1.MonitorRequest.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.MonitorRequest;
  return proto.cc.arduino.cli.commands.v1.MonitorRequest.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.MonitorRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest}
 */
proto.cc.arduino.cli.commands.v1.MonitorRequest.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 = 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 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setFqbn(value);
      break;
    case 4:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setTxData(value);
      break;
    case 5:
      var value = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration;
      reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinaryFromReader);
      msg.setPortConfiguration(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.MonitorRequest.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.MonitorRequest.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.MonitorRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorRequest.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.getPort();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      cc_arduino_cli_commands_v1_port_pb.Port.serializeBinaryToWriter
    );
  }
  f = message.getFqbn();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getTxData_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      4,
      f
    );
  }
  f = message.getPortConfiguration();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter
    );
  }
};


/**
 * optional Instance instance = 1;
 * @return {?proto.cc.arduino.cli.commands.v1.Instance}
 */
proto.cc.arduino.cli.commands.v1.MonitorRequest.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.MonitorRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorRequest.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.MonitorRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.clearInstance = function() {
  return this.setInstance(undefined);
};


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


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


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


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


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


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


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


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


/**
 * optional bytes tx_data = 4;
 * This is a type-conversion wrapper around `getTxData()`
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getTxData_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getTxData()));
};


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


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


/**
 * optional MonitorPortConfiguration port_configuration = 5;
 * @return {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration}
 */
proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.getPortConfiguration = function() {
  return /** @type{?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration} */ (
    jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration, 5));
};


/**
 * @param {?proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration|undefined} value
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorRequest.prototype.setPortConfiguration = function(value) {
  return jspb.Message.setWrapperField(this, 5, value);
};


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


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



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortConfiguration.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortConfiguration} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.toObject = function(includeInstance, msg) {
  var f, obj = {
    settingsList: jspb.Message.toObjectList(msg.getSettingsList(),
    proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.MonitorPortConfiguration}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration;
  return proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortConfiguration} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortSetting;
      reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader);
      msg.addSettings(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.MonitorPortConfiguration.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.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.MonitorPortConfiguration} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getSettingsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      1,
      f,
      proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter
    );
  }
};


/**
 * repeated MonitorPortSetting settings = 1;
 * @return {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortConfiguration.prototype.getSettingsList = function() {
  return /** @type{!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, 1));
};


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


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


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



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.cc.arduino.cli.commands.v1.MonitorResponse.repeatedFields_ = [3];



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.MonitorResponse.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.MonitorResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorResponse.toObject = function(includeInstance, msg) {
  var f, obj = {
    error: jspb.Message.getFieldWithDefault(msg, 1, ""),
    rxData: msg.getRxData_asB64(),
    appliedSettingsList: jspb.Message.toObjectList(msg.getAppliedSettingsList(),
    proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject, includeInstance),
    success: 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.MonitorResponse}
 */
proto.cc.arduino.cli.commands.v1.MonitorResponse.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.MonitorResponse;
  return proto.cc.arduino.cli.commands.v1.MonitorResponse.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.MonitorResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse}
 */
proto.cc.arduino.cli.commands.v1.MonitorResponse.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {string} */ (reader.readString());
      msg.setError(value);
      break;
    case 2:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setRxData(value);
      break;
    case 3:
      var value = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting;
      reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader);
      msg.addAppliedSettings(value);
      break;
    case 4:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setSuccess(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.MonitorResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.MonitorResponse.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.MonitorResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getError();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getRxData_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      2,
      f
    );
  }
  f = message.getAppliedSettingsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      3,
      f,
      proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter
    );
  }
  f = message.getSuccess();
  if (f) {
    writer.writeBool(
      4,
      f
    );
  }
};


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


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


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


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


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


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


/**
 * repeated MonitorPortSetting applied_settings = 3;
 * @return {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>}
 */
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getAppliedSettingsList = function() {
  return /** @type{!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, 3));
};


/**
 * @param {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSetting>} value
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setAppliedSettingsList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 3, value);
};


/**
 * @param {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting=} opt_value
 * @param {number=} opt_index
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting}
 */
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.addAppliedSettings = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cc.arduino.cli.commands.v1.MonitorPortSetting, opt_index);
};


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


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


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





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.MonitorPortSetting} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject = function(includeInstance, msg) {
  var f, obj = {
    settingId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    value: 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.MonitorPortSetting}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortSetting;
  return proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.MonitorPortSetting} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.setSettingId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setValue(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.MonitorPortSetting.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.MonitorPortSetting.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.MonitorPortSetting} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getSettingId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getValue();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
};


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


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


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


/**
 * @param {string} value
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSetting} returns this
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.prototype.setValue = function(value) {
  return jspb.Message.setProto3StringField(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.EnumerateMonitorPortSettingsRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.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.EnumerateMonitorPortSettingsRequest} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.toObject = function(includeInstance, msg) {
  var f, obj = {
    instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
    portProtocol: jspb.Message.getFieldWithDefault(msg, 2, ""),
    fqbn: 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.EnumerateMonitorPortSettingsRequest}
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest;
  return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.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.EnumerateMonitorPortSettingsRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest}
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.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.setPortProtocol(value);
      break;
    case 3:
      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.EnumerateMonitorPortSettingsRequest.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.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.EnumerateMonitorPortSettingsRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.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.getPortProtocol();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getFqbn();
  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.EnumerateMonitorPortSettingsRequest.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.EnumerateMonitorPortSettingsRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.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.EnumerateMonitorPortSettingsRequest} returns this
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsRequest.prototype.clearInstance = function() {
  return this.setInstance(undefined);
};


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


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


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


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


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



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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.EnumerateMonitorPortSettingsResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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.EnumerateMonitorPortSettingsResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.toObject = function(includeInstance, msg) {
  var f, obj = {
    settingsList: jspb.Message.toObjectList(msg.getSettingsList(),
    proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.EnumerateMonitorPortSettingsResponse}
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse;
  return proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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.EnumerateMonitorPortSettingsResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse}
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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.MonitorPortSettingDescriptor;
      reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.deserializeBinaryFromReader);
      msg.addSettings(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.EnumerateMonitorPortSettingsResponse.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.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.EnumerateMonitorPortSettingsResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getSettingsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      1,
      f,
      proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.serializeBinaryToWriter
    );
  }
};


/**
 * repeated MonitorPortSettingDescriptor settings = 1;
 * @return {!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor>}
 */
proto.cc.arduino.cli.commands.v1.EnumerateMonitorPortSettingsResponse.prototype.getSettingsList = function() {
  return /** @type{!Array<!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor, 1));
};


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


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


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



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.repeatedFields_ = [4];



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.MonitorPortSettingDescriptor.prototype.toObject = function(opt_includeInstance) {
  return proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.MonitorPortSettingDescriptor} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.toObject = function(includeInstance, msg) {
  var f, obj = {
    settingId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    label: jspb.Message.getFieldWithDefault(msg, 2, ""),
    type: jspb.Message.getFieldWithDefault(msg, 3, ""),
    enumValuesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
    value: jspb.Message.getFieldWithDefault(msg, 5, "")
  };

  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.MonitorPortSettingDescriptor}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor;
  return proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.MonitorPortSettingDescriptor} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.setSettingId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setLabel(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setType(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.addEnumValues(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setValue(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.MonitorPortSettingDescriptor.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.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.MonitorPortSettingDescriptor} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getSettingId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getLabel();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getType();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getEnumValuesList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      4,
      f
    );
  }
  f = message.getValue();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
};


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


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


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


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


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


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


/**
 * repeated string enum_values = 4;
 * @return {!Array<string>}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getEnumValuesList = function() {
  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
};


/**
 * @param {!Array<string>} value
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.setEnumValuesList = function(value) {
  return jspb.Message.setField(this, 4, value || []);
};


/**
 * @param {string} value
 * @param {number=} opt_index
 * @return {!proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor} returns this
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.addEnumValues = function(value, opt_index) {
  return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};


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


/**
 * optional string value = 5;
 * @return {string}
 */
proto.cc.arduino.cli.commands.v1.MonitorPortSettingDescriptor.prototype.getValue = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


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


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