Skip to content

Instantly share code, notes, and snippets.

@alexeagle
Created August 22, 2018 17:25
Show Gist options
  • Save alexeagle/d6970383d64aa26861bfc6834ec2dbfa to your computer and use it in GitHub Desktop.
Save alexeagle/d6970383d64aa26861bfc6834ec2dbfa to your computer and use it in GitHub Desktop.
/**
* @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.com.google.startupos.tools.localserver.service.AuthDataRequest', null, global);
goog.exportSymbol('proto.com.google.startupos.tools.localserver.service.AuthDataResponse', 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.com.google.startupos.tools.localserver.service.AuthDataRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.com.google.startupos.tools.localserver.service.AuthDataRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.displayName = 'proto.com.google.startupos.tools.localserver.service.AuthDataRequest';
}
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.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.toObject = function(opt_includeInstance) {
return proto.com.google.startupos.tools.localserver.service.AuthDataRequest.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.com.google.startupos.tools.localserver.service.AuthDataRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.toObject = function(includeInstance, msg) {
var f, obj = {
projectid: jspb.Message.getFieldWithDefault(msg, 1, ""),
apikey: jspb.Message.getFieldWithDefault(msg, 2, ""),
jwttoken: jspb.Message.getFieldWithDefault(msg, 3, ""),
refreshtoken: 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.com.google.startupos.tools.localserver.service.AuthDataRequest}
*/
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.com.google.startupos.tools.localserver.service.AuthDataRequest;
return proto.com.google.startupos.tools.localserver.service.AuthDataRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.com.google.startupos.tools.localserver.service.AuthDataRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.com.google.startupos.tools.localserver.service.AuthDataRequest}
*/
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.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.setProjectid(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setApikey(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setJwttoken(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setRefreshtoken(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.com.google.startupos.tools.localserver.service.AuthDataRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getProjectid();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getApikey();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getJwttoken();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getRefreshtoken();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
};
/**
* optional string projectId = 1;
* @return {string}
*/
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.getProjectid = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.setProjectid = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string apiKey = 2;
* @return {string}
*/
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.getApikey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.setApikey = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string jwtToken = 3;
* @return {string}
*/
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.getJwttoken = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.setJwttoken = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string refreshToken = 6;
* @return {string}
*/
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.getRefreshtoken = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/** @param {string} value */
proto.com.google.startupos.tools.localserver.service.AuthDataRequest.prototype.setRefreshtoken = function(value) {
jspb.Message.setProto3StringField(this, 6, value);
};
/**
* 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.com.google.startupos.tools.localserver.service.AuthDataResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.com.google.startupos.tools.localserver.service.AuthDataResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.com.google.startupos.tools.localserver.service.AuthDataResponse.displayName = 'proto.com.google.startupos.tools.localserver.service.AuthDataResponse';
}
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.com.google.startupos.tools.localserver.service.AuthDataResponse.prototype.toObject = function(opt_includeInstance) {
return proto.com.google.startupos.tools.localserver.service.AuthDataResponse.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.com.google.startupos.tools.localserver.service.AuthDataResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.google.startupos.tools.localserver.service.AuthDataResponse.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.com.google.startupos.tools.localserver.service.AuthDataResponse}
*/
proto.com.google.startupos.tools.localserver.service.AuthDataResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.com.google.startupos.tools.localserver.service.AuthDataResponse;
return proto.com.google.startupos.tools.localserver.service.AuthDataResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.com.google.startupos.tools.localserver.service.AuthDataResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.com.google.startupos.tools.localserver.service.AuthDataResponse}
*/
proto.com.google.startupos.tools.localserver.service.AuthDataResponse.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.com.google.startupos.tools.localserver.service.AuthDataResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.com.google.startupos.tools.localserver.service.AuthDataResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.com.google.startupos.tools.localserver.service.AuthDataResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.google.startupos.tools.localserver.service.AuthDataResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
goog.object.extend(exports, proto.com.google.startupos.tools.localserver.service);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment