@emeraldpay/api
Version:
Common code for Emerald gRPC APIs
1,690 lines (1,481 loc) • 85.1 kB
JavaScript
// source: auth.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() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));
goog.exportSymbol('proto.emerald.AuthRequest', null, global);
goog.exportSymbol('proto.emerald.AuthRequest.AuthTypeCase', null, global);
goog.exportSymbol('proto.emerald.AuthResponse', null, global);
goog.exportSymbol('proto.emerald.DeleteTokenRequest', null, global);
goog.exportSymbol('proto.emerald.DeleteTokenResponse', null, global);
goog.exportSymbol('proto.emerald.IssueTokenRequest', null, global);
goog.exportSymbol('proto.emerald.IssueTokenRequest.TokenType', null, global);
goog.exportSymbol('proto.emerald.IssuedTokenResponse', null, global);
goog.exportSymbol('proto.emerald.ListTokensRequest', null, global);
goog.exportSymbol('proto.emerald.ListTokensResponse', null, global);
goog.exportSymbol('proto.emerald.RefreshRequest', null, global);
goog.exportSymbol('proto.emerald.TempAuth', null, global);
goog.exportSymbol('proto.emerald.TokenDetails', null, global);
goog.exportSymbol('proto.emerald.WhoAmIRequest', null, global);
goog.exportSymbol('proto.emerald.WhoAmIResponse', 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.emerald.AuthRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.emerald.AuthRequest.repeatedFields_, proto.emerald.AuthRequest.oneofGroups_);
};
goog.inherits(proto.emerald.AuthRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.AuthRequest.displayName = 'proto.emerald.AuthRequest';
}
/**
* 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.emerald.TempAuth = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.TempAuth, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.TempAuth.displayName = 'proto.emerald.TempAuth';
}
/**
* 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.emerald.AuthResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.AuthResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.AuthResponse.displayName = 'proto.emerald.AuthResponse';
}
/**
* 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.emerald.RefreshRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.RefreshRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.RefreshRequest.displayName = 'proto.emerald.RefreshRequest';
}
/**
* 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.emerald.WhoAmIRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.WhoAmIRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.WhoAmIRequest.displayName = 'proto.emerald.WhoAmIRequest';
}
/**
* 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.emerald.WhoAmIResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.WhoAmIResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.WhoAmIResponse.displayName = 'proto.emerald.WhoAmIResponse';
}
/**
* 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.emerald.ListTokensRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.ListTokensRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.ListTokensRequest.displayName = 'proto.emerald.ListTokensRequest';
}
/**
* 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.emerald.ListTokensResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.emerald.ListTokensResponse.repeatedFields_, null);
};
goog.inherits(proto.emerald.ListTokensResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.ListTokensResponse.displayName = 'proto.emerald.ListTokensResponse';
}
/**
* 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.emerald.TokenDetails = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.TokenDetails, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.TokenDetails.displayName = 'proto.emerald.TokenDetails';
}
/**
* 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.emerald.IssueTokenRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.emerald.IssueTokenRequest.repeatedFields_, null);
};
goog.inherits(proto.emerald.IssueTokenRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.IssueTokenRequest.displayName = 'proto.emerald.IssueTokenRequest';
}
/**
* 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.emerald.IssuedTokenResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.IssuedTokenResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.IssuedTokenResponse.displayName = 'proto.emerald.IssuedTokenResponse';
}
/**
* 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.emerald.DeleteTokenRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.DeleteTokenRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.DeleteTokenRequest.displayName = 'proto.emerald.DeleteTokenRequest';
}
/**
* 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.emerald.DeleteTokenResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.emerald.DeleteTokenResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.emerald.DeleteTokenResponse.displayName = 'proto.emerald.DeleteTokenResponse';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.emerald.AuthRequest.repeatedFields_ = [1,2,3];
/**
* 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.emerald.AuthRequest.oneofGroups_ = [[4,5]];
/**
* @enum {number}
*/
proto.emerald.AuthRequest.AuthTypeCase = {
AUTH_TYPE_NOT_SET: 0,
TEMP_AUTH: 4,
AUTH_SECRET: 5
};
/**
* @return {proto.emerald.AuthRequest.AuthTypeCase}
*/
proto.emerald.AuthRequest.prototype.getAuthTypeCase = function() {
return /** @type {proto.emerald.AuthRequest.AuthTypeCase} */(jspb.Message.computeOneofCase(this, proto.emerald.AuthRequest.oneofGroups_[0]));
};
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.emerald.AuthRequest.prototype.toObject = function(opt_includeInstance) {
return proto.emerald.AuthRequest.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.emerald.AuthRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.AuthRequest.toObject = function(includeInstance, msg) {
var f, obj = {
agentDetailsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
capabilitiesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
scopesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
tempAuth: (f = msg.getTempAuth()) && proto.emerald.TempAuth.toObject(includeInstance, f),
authSecret: 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.emerald.AuthRequest}
*/
proto.emerald.AuthRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.emerald.AuthRequest;
return proto.emerald.AuthRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.emerald.AuthRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.emerald.AuthRequest}
*/
proto.emerald.AuthRequest.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.addAgentDetails(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.addCapabilities(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.addScopes(value);
break;
case 4:
var value = new proto.emerald.TempAuth;
reader.readMessage(value,proto.emerald.TempAuth.deserializeBinaryFromReader);
msg.setTempAuth(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setAuthSecret(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.emerald.AuthRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.emerald.AuthRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.emerald.AuthRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.AuthRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAgentDetailsList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
f
);
}
f = message.getCapabilitiesList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = message.getScopesList();
if (f.length > 0) {
writer.writeRepeatedString(
3,
f
);
}
f = message.getTempAuth();
if (f != null) {
writer.writeMessage(
4,
f,
proto.emerald.TempAuth.serializeBinaryToWriter
);
}
f = /** @type {string} */ (jspb.Message.getField(message, 5));
if (f != null) {
writer.writeString(
5,
f
);
}
};
/**
* repeated string agent_details = 1;
* @return {!Array<string>}
*/
proto.emerald.AuthRequest.prototype.getAgentDetailsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/**
* @param {!Array<string>} value
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.setAgentDetailsList = function(value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.addAgentDetails = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.clearAgentDetailsList = function() {
return this.setAgentDetailsList([]);
};
/**
* repeated string capabilities = 2;
* @return {!Array<string>}
*/
proto.emerald.AuthRequest.prototype.getCapabilitiesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/**
* @param {!Array<string>} value
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.setCapabilitiesList = function(value) {
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.addCapabilities = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.clearCapabilitiesList = function() {
return this.setCapabilitiesList([]);
};
/**
* repeated string scopes = 3;
* @return {!Array<string>}
*/
proto.emerald.AuthRequest.prototype.getScopesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
};
/**
* @param {!Array<string>} value
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.setScopesList = function(value) {
return jspb.Message.setField(this, 3, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.addScopes = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.clearScopesList = function() {
return this.setScopesList([]);
};
/**
* optional TempAuth temp_auth = 4;
* @return {?proto.emerald.TempAuth}
*/
proto.emerald.AuthRequest.prototype.getTempAuth = function() {
return /** @type{?proto.emerald.TempAuth} */ (
jspb.Message.getWrapperField(this, proto.emerald.TempAuth, 4));
};
/**
* @param {?proto.emerald.TempAuth|undefined} value
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.setTempAuth = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.emerald.AuthRequest.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.clearTempAuth = function() {
return this.setTempAuth(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.emerald.AuthRequest.prototype.hasTempAuth = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional string auth_secret = 5;
* @return {string}
*/
proto.emerald.AuthRequest.prototype.getAuthSecret = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.setAuthSecret = function(value) {
return jspb.Message.setOneofField(this, 5, proto.emerald.AuthRequest.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.emerald.AuthRequest} returns this
*/
proto.emerald.AuthRequest.prototype.clearAuthSecret = function() {
return jspb.Message.setOneofField(this, 5, proto.emerald.AuthRequest.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.emerald.AuthRequest.prototype.hasAuthSecret = function() {
return jspb.Message.getField(this, 5) != null;
};
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.emerald.TempAuth.prototype.toObject = function(opt_includeInstance) {
return proto.emerald.TempAuth.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.emerald.TempAuth} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.TempAuth.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.emerald.TempAuth}
*/
proto.emerald.TempAuth.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.emerald.TempAuth;
return proto.emerald.TempAuth.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.emerald.TempAuth} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.emerald.TempAuth}
*/
proto.emerald.TempAuth.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.setId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.emerald.TempAuth.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.emerald.TempAuth.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.emerald.TempAuth} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.TempAuth.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.emerald.TempAuth.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.TempAuth} returns this
*/
proto.emerald.TempAuth.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, 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.emerald.AuthResponse.prototype.toObject = function(opt_includeInstance) {
return proto.emerald.AuthResponse.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.emerald.AuthResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.AuthResponse.toObject = function(includeInstance, msg) {
var f, obj = {
succeed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
status: jspb.Message.getFieldWithDefault(msg, 2, 0),
denyMessage: jspb.Message.getFieldWithDefault(msg, 3, ""),
accessToken: jspb.Message.getFieldWithDefault(msg, 10, ""),
refreshToken: jspb.Message.getFieldWithDefault(msg, 11, ""),
expiresAt: jspb.Message.getFieldWithDefault(msg, 12, 0),
type: jspb.Message.getFieldWithDefault(msg, 13, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.emerald.AuthResponse}
*/
proto.emerald.AuthResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.emerald.AuthResponse;
return proto.emerald.AuthResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.emerald.AuthResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.emerald.AuthResponse}
*/
proto.emerald.AuthResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {boolean} */ (reader.readBool());
msg.setSucceed(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint32());
msg.setStatus(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDenyMessage(value);
break;
case 10:
var value = /** @type {string} */ (reader.readString());
msg.setAccessToken(value);
break;
case 11:
var value = /** @type {string} */ (reader.readString());
msg.setRefreshToken(value);
break;
case 12:
var value = /** @type {number} */ (reader.readUint64());
msg.setExpiresAt(value);
break;
case 13:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.emerald.AuthResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.emerald.AuthResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.emerald.AuthResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.AuthResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSucceed();
if (f) {
writer.writeBool(
1,
f
);
}
f = message.getStatus();
if (f !== 0) {
writer.writeUint32(
2,
f
);
}
f = message.getDenyMessage();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getAccessToken();
if (f.length > 0) {
writer.writeString(
10,
f
);
}
f = message.getRefreshToken();
if (f.length > 0) {
writer.writeString(
11,
f
);
}
f = message.getExpiresAt();
if (f !== 0) {
writer.writeUint64(
12,
f
);
}
f = message.getType();
if (f.length > 0) {
writer.writeString(
13,
f
);
}
};
/**
* optional bool succeed = 1;
* @return {boolean}
*/
proto.emerald.AuthResponse.prototype.getSucceed = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
};
/**
* @param {boolean} value
* @return {!proto.emerald.AuthResponse} returns this
*/
proto.emerald.AuthResponse.prototype.setSucceed = function(value) {
return jspb.Message.setProto3BooleanField(this, 1, value);
};
/**
* optional uint32 status = 2;
* @return {number}
*/
proto.emerald.AuthResponse.prototype.getStatus = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.emerald.AuthResponse} returns this
*/
proto.emerald.AuthResponse.prototype.setStatus = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional string deny_message = 3;
* @return {string}
*/
proto.emerald.AuthResponse.prototype.getDenyMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.AuthResponse} returns this
*/
proto.emerald.AuthResponse.prototype.setDenyMessage = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string access_token = 10;
* @return {string}
*/
proto.emerald.AuthResponse.prototype.getAccessToken = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.AuthResponse} returns this
*/
proto.emerald.AuthResponse.prototype.setAccessToken = function(value) {
return jspb.Message.setProto3StringField(this, 10, value);
};
/**
* optional string refresh_token = 11;
* @return {string}
*/
proto.emerald.AuthResponse.prototype.getRefreshToken = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.AuthResponse} returns this
*/
proto.emerald.AuthResponse.prototype.setRefreshToken = function(value) {
return jspb.Message.setProto3StringField(this, 11, value);
};
/**
* optional uint64 expires_at = 12;
* @return {number}
*/
proto.emerald.AuthResponse.prototype.getExpiresAt = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
};
/**
* @param {number} value
* @return {!proto.emerald.AuthResponse} returns this
*/
proto.emerald.AuthResponse.prototype.setExpiresAt = function(value) {
return jspb.Message.setProto3IntField(this, 12, value);
};
/**
* optional string type = 13;
* @return {string}
*/
proto.emerald.AuthResponse.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.AuthResponse} returns this
*/
proto.emerald.AuthResponse.prototype.setType = function(value) {
return jspb.Message.setProto3StringField(this, 13, 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.emerald.RefreshRequest.prototype.toObject = function(opt_includeInstance) {
return proto.emerald.RefreshRequest.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.emerald.RefreshRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.RefreshRequest.toObject = function(includeInstance, msg) {
var f, obj = {
authSecret: jspb.Message.getFieldWithDefault(msg, 1, ""),
refreshToken: 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.emerald.RefreshRequest}
*/
proto.emerald.RefreshRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.emerald.RefreshRequest;
return proto.emerald.RefreshRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.emerald.RefreshRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.emerald.RefreshRequest}
*/
proto.emerald.RefreshRequest.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.setAuthSecret(value);
break;
case 2:
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.emerald.RefreshRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.emerald.RefreshRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.emerald.RefreshRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.RefreshRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAuthSecret();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getRefreshToken();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string auth_secret = 1;
* @return {string}
*/
proto.emerald.RefreshRequest.prototype.getAuthSecret = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.RefreshRequest} returns this
*/
proto.emerald.RefreshRequest.prototype.setAuthSecret = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string refresh_token = 2;
* @return {string}
*/
proto.emerald.RefreshRequest.prototype.getRefreshToken = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.RefreshRequest} returns this
*/
proto.emerald.RefreshRequest.prototype.setRefreshToken = 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.emerald.WhoAmIRequest.prototype.toObject = function(opt_includeInstance) {
return proto.emerald.WhoAmIRequest.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.emerald.WhoAmIRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.WhoAmIRequest.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.emerald.WhoAmIRequest}
*/
proto.emerald.WhoAmIRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.emerald.WhoAmIRequest;
return proto.emerald.WhoAmIRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.emerald.WhoAmIRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.emerald.WhoAmIRequest}
*/
proto.emerald.WhoAmIRequest.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.emerald.WhoAmIRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.emerald.WhoAmIRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.emerald.WhoAmIRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.WhoAmIRequest.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.emerald.WhoAmIResponse.prototype.toObject = function(opt_includeInstance) {
return proto.emerald.WhoAmIResponse.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.emerald.WhoAmIResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.WhoAmIResponse.toObject = function(includeInstance, msg) {
var f, obj = {
isAuthenticated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
tokenId: jspb.Message.getFieldWithDefault(msg, 2, ""),
userId: 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.emerald.WhoAmIResponse}
*/
proto.emerald.WhoAmIResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.emerald.WhoAmIResponse;
return proto.emerald.WhoAmIResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.emerald.WhoAmIResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.emerald.WhoAmIResponse}
*/
proto.emerald.WhoAmIResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {boolean} */ (reader.readBool());
msg.setIsAuthenticated(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setTokenId(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setUserId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.emerald.WhoAmIResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.emerald.WhoAmIResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.emerald.WhoAmIResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.WhoAmIResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getIsAuthenticated();
if (f) {
writer.writeBool(
1,
f
);
}
f = message.getTokenId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getUserId();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional bool is_authenticated = 1;
* @return {boolean}
*/
proto.emerald.WhoAmIResponse.prototype.getIsAuthenticated = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
};
/**
* @param {boolean} value
* @return {!proto.emerald.WhoAmIResponse} returns this
*/
proto.emerald.WhoAmIResponse.prototype.setIsAuthenticated = function(value) {
return jspb.Message.setProto3BooleanField(this, 1, value);
};
/**
* optional string token_id = 2;
* @return {string}
*/
proto.emerald.WhoAmIResponse.prototype.getTokenId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.WhoAmIResponse} returns this
*/
proto.emerald.WhoAmIResponse.prototype.setTokenId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string user_id = 3;
* @return {string}
*/
proto.emerald.WhoAmIResponse.prototype.getUserId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.emerald.WhoAmIResponse} returns this
*/
proto.emerald.WhoAmIResponse.prototype.setUserId = 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.emerald.ListTokensRequest.prototype.toObject = function(opt_includeInstance) {
return proto.emerald.ListTokensRequest.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.emerald.ListTokensRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.ListTokensRequest.toObject = function(includeInstance, msg) {
var f, obj = {
organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
projectId: 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.emerald.ListTokensRequest}
*/
proto.emerald.ListTokensRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.emerald.ListTokensRequest;
return proto.emerald.ListTokensRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.emerald.ListTokensRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.emerald.ListTokensRequest}
*/
proto.emerald.ListTokensRequest.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.setOrganizationId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setProjectId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.emerald.ListTokensRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.emerald.ListTokensRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.emerald.ListTokensRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.emerald.ListTokensRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getOrganizationId();
if (f.length