/**
 * Copyright (c) 2020 Gitpod GmbH. All rights reserved.
 * Licensed under the GNU Affero General Public License (AGPL).
 * See License-AGPL.txt in the project root for license information.
 */

/**
 * @fileoverview
 * @enhanceable
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!

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

goog.exportSymbol('proto.supervisor.WorkspaceInfoRequest', null, global);
goog.exportSymbol('proto.supervisor.WorkspaceInfoResponse', 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.supervisor.WorkspaceInfoRequest = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.supervisor.WorkspaceInfoRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.supervisor.WorkspaceInfoRequest.displayName = 'proto.supervisor.WorkspaceInfoRequest';
}
/**
 * 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.supervisor.WorkspaceInfoResponse = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.supervisor.WorkspaceInfoResponse.oneofGroups_);
};
goog.inherits(proto.supervisor.WorkspaceInfoResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.supervisor.WorkspaceInfoResponse.displayName = 'proto.supervisor.WorkspaceInfoResponse';
}



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto suitable for use in Soy templates.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
 *     for transitional soy proto support: http://goto/soy-param-migration
 * @return {!Object}
 */
proto.supervisor.WorkspaceInfoRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.supervisor.WorkspaceInfoRequest.toObject(opt_includeInstance, this);
};


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


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.supervisor.WorkspaceInfoRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.supervisor.WorkspaceInfoRequest.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
};



/**
 * Oneof group definitions for this message. Each group defines the field
 * numbers belonging to that group. When of these fields' value is set, all
 * other fields in the group are cleared. During deserialization, if multiple
 * fields are encountered for a group, only the last value seen will be kept.
 * @private {!Array<!Array<number>>}
 * @const
 */
proto.supervisor.WorkspaceInfoResponse.oneofGroups_ = [[4,5]];

/**
 * @enum {number}
 */
proto.supervisor.WorkspaceInfoResponse.WorkspaceLocationCase = {
  WORKSPACE_LOCATION_NOT_SET: 0,
  WORKSPACE_LOCATION_FILE: 4,
  WORKSPACE_LOCATION_FOLDER: 5
};

/**
 * @return {proto.supervisor.WorkspaceInfoResponse.WorkspaceLocationCase}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.getWorkspaceLocationCase = function() {
  return /** @type {proto.supervisor.WorkspaceInfoResponse.WorkspaceLocationCase} */(jspb.Message.computeOneofCase(this, proto.supervisor.WorkspaceInfoResponse.oneofGroups_[0]));
};



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto suitable for use in Soy templates.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
 *     for transitional soy proto support: http://goto/soy-param-migration
 * @return {!Object}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.toObject = function(opt_includeInstance) {
  return proto.supervisor.WorkspaceInfoResponse.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.supervisor.WorkspaceInfoResponse} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.supervisor.WorkspaceInfoResponse.toObject = function(includeInstance, msg) {
  var f, obj = {
    workspaceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    instanceId: jspb.Message.getFieldWithDefault(msg, 2, ""),
    checkoutLocation: jspb.Message.getFieldWithDefault(msg, 3, ""),
    workspaceLocationFile: jspb.Message.getFieldWithDefault(msg, 4, ""),
    workspaceLocationFolder: jspb.Message.getFieldWithDefault(msg, 5, ""),
    userHome: jspb.Message.getFieldWithDefault(msg, 6, "")
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.supervisor.WorkspaceInfoResponse} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.supervisor.WorkspaceInfoResponse}
 */
proto.supervisor.WorkspaceInfoResponse.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.setWorkspaceId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setInstanceId(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setCheckoutLocation(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setWorkspaceLocationFile(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setWorkspaceLocationFolder(value);
      break;
    case 6:
      var value = /** @type {string} */ (reader.readString());
      msg.setUserHome(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.supervisor.WorkspaceInfoResponse} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.supervisor.WorkspaceInfoResponse.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getWorkspaceId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getInstanceId();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getCheckoutLocation();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 4));
  if (f != null) {
    writer.writeString(
      4,
      f
    );
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 5));
  if (f != null) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getUserHome();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
};


/**
 * optional string workspace_id = 1;
 * @return {string}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.getWorkspaceId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/** @param {string} value */
proto.supervisor.WorkspaceInfoResponse.prototype.setWorkspaceId = function(value) {
  jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string instance_id = 2;
 * @return {string}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.getInstanceId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/** @param {string} value */
proto.supervisor.WorkspaceInfoResponse.prototype.setInstanceId = function(value) {
  jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string checkout_location = 3;
 * @return {string}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.getCheckoutLocation = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/** @param {string} value */
proto.supervisor.WorkspaceInfoResponse.prototype.setCheckoutLocation = function(value) {
  jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional string workspace_location_file = 4;
 * @return {string}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.getWorkspaceLocationFile = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/** @param {string} value */
proto.supervisor.WorkspaceInfoResponse.prototype.setWorkspaceLocationFile = function(value) {
  jspb.Message.setOneofField(this, 4, proto.supervisor.WorkspaceInfoResponse.oneofGroups_[0], value);
};


/**
 * Clears the field making it undefined.
 */
proto.supervisor.WorkspaceInfoResponse.prototype.clearWorkspaceLocationFile = function() {
  jspb.Message.setOneofField(this, 4, proto.supervisor.WorkspaceInfoResponse.oneofGroups_[0], undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.hasWorkspaceLocationFile = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * optional string workspace_location_folder = 5;
 * @return {string}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.getWorkspaceLocationFolder = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/** @param {string} value */
proto.supervisor.WorkspaceInfoResponse.prototype.setWorkspaceLocationFolder = function(value) {
  jspb.Message.setOneofField(this, 5, proto.supervisor.WorkspaceInfoResponse.oneofGroups_[0], value);
};


/**
 * Clears the field making it undefined.
 */
proto.supervisor.WorkspaceInfoResponse.prototype.clearWorkspaceLocationFolder = function() {
  jspb.Message.setOneofField(this, 5, proto.supervisor.WorkspaceInfoResponse.oneofGroups_[0], undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.hasWorkspaceLocationFolder = function() {
  return jspb.Message.getField(this, 5) != null;
};


/**
 * optional string user_home = 6;
 * @return {string}
 */
proto.supervisor.WorkspaceInfoResponse.prototype.getUserHome = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/** @param {string} value */
proto.supervisor.WorkspaceInfoResponse.prototype.setUserHome = function(value) {
  jspb.Message.setProto3StringField(this, 6, value);
};


goog.object.extend(exports, proto.supervisor);
