UNPKG

echofi-client

Version:

A comprehensive TypeScript/JavaScript client library for EchoFi services with automatic gRPC-Web code generation, unified service access, and real-time WebSocket communication.

1,006 lines (871 loc) 31 kB
// source: auth/service.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)); var auth_account_pb = require('../auth/account_pb.js'); goog.object.extend(proto, auth_account_pb); var auth_session_pb = require('../auth/session_pb.js'); goog.object.extend(proto, auth_session_pb); var auth_verification_token_pb = require('../auth/verification_token_pb.js'); goog.object.extend(proto, auth_verification_token_pb); goog.exportSymbol('proto.auth.CreateSessionRequest', null, global); goog.exportSymbol('proto.auth.CreateSessionResponse', null, global); goog.exportSymbol('proto.auth.DeleteSessionRequest', null, global); goog.exportSymbol('proto.auth.DeleteSessionResponse', null, global); goog.exportSymbol('proto.auth.GetSessionRequest', null, global); goog.exportSymbol('proto.auth.GetSessionResponse', 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.auth.GetSessionRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.auth.GetSessionRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.auth.GetSessionRequest.displayName = 'proto.auth.GetSessionRequest'; } /** * 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.auth.GetSessionResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.auth.GetSessionResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.auth.GetSessionResponse.displayName = 'proto.auth.GetSessionResponse'; } /** * 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.auth.CreateSessionRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.auth.CreateSessionRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.auth.CreateSessionRequest.displayName = 'proto.auth.CreateSessionRequest'; } /** * 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.auth.CreateSessionResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.auth.CreateSessionResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.auth.CreateSessionResponse.displayName = 'proto.auth.CreateSessionResponse'; } /** * 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.auth.DeleteSessionRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.auth.DeleteSessionRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.auth.DeleteSessionRequest.displayName = 'proto.auth.DeleteSessionRequest'; } /** * 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.auth.DeleteSessionResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.auth.DeleteSessionResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.auth.DeleteSessionResponse.displayName = 'proto.auth.DeleteSessionResponse'; } 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.auth.GetSessionRequest.prototype.toObject = function(opt_includeInstance) { return proto.auth.GetSessionRequest.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.auth.GetSessionRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.GetSessionRequest.toObject = function(includeInstance, msg) { var f, obj = { sessionToken: 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.auth.GetSessionRequest} */ proto.auth.GetSessionRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.auth.GetSessionRequest; return proto.auth.GetSessionRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.auth.GetSessionRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.auth.GetSessionRequest} */ proto.auth.GetSessionRequest.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.setSessionToken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.auth.GetSessionRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.auth.GetSessionRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.auth.GetSessionRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.GetSessionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSessionToken(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string session_token = 1; * @return {string} */ proto.auth.GetSessionRequest.prototype.getSessionToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.auth.GetSessionRequest} returns this */ proto.auth.GetSessionRequest.prototype.setSessionToken = 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.auth.GetSessionResponse.prototype.toObject = function(opt_includeInstance) { return proto.auth.GetSessionResponse.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.auth.GetSessionResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.GetSessionResponse.toObject = function(includeInstance, msg) { var f, obj = { session: (f = msg.getSession()) && auth_session_pb.Session.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.auth.GetSessionResponse} */ proto.auth.GetSessionResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.auth.GetSessionResponse; return proto.auth.GetSessionResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.auth.GetSessionResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.auth.GetSessionResponse} */ proto.auth.GetSessionResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new auth_session_pb.Session; reader.readMessage(value,auth_session_pb.Session.deserializeBinaryFromReader); msg.setSession(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.auth.GetSessionResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.auth.GetSessionResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.auth.GetSessionResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.GetSessionResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSession(); if (f != null) { writer.writeMessage( 1, f, auth_session_pb.Session.serializeBinaryToWriter ); } }; /** * optional Session session = 1; * @return {?proto.auth.Session} */ proto.auth.GetSessionResponse.prototype.getSession = function() { return /** @type{?proto.auth.Session} */ ( jspb.Message.getWrapperField(this, auth_session_pb.Session, 1)); }; /** * @param {?proto.auth.Session|undefined} value * @return {!proto.auth.GetSessionResponse} returns this */ proto.auth.GetSessionResponse.prototype.setSession = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.auth.GetSessionResponse} returns this */ proto.auth.GetSessionResponse.prototype.clearSession = function() { return this.setSession(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.GetSessionResponse.prototype.hasSession = function() { return jspb.Message.getField(this, 1) != 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.auth.CreateSessionRequest.prototype.toObject = function(opt_includeInstance) { return proto.auth.CreateSessionRequest.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.auth.CreateSessionRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.CreateSessionRequest.toObject = function(includeInstance, msg) { var f, obj = { session: (f = msg.getSession()) && auth_session_pb.Session.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.auth.CreateSessionRequest} */ proto.auth.CreateSessionRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.auth.CreateSessionRequest; return proto.auth.CreateSessionRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.auth.CreateSessionRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.auth.CreateSessionRequest} */ proto.auth.CreateSessionRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new auth_session_pb.Session; reader.readMessage(value,auth_session_pb.Session.deserializeBinaryFromReader); msg.setSession(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.auth.CreateSessionRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.auth.CreateSessionRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.auth.CreateSessionRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.CreateSessionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSession(); if (f != null) { writer.writeMessage( 1, f, auth_session_pb.Session.serializeBinaryToWriter ); } }; /** * optional Session session = 1; * @return {?proto.auth.Session} */ proto.auth.CreateSessionRequest.prototype.getSession = function() { return /** @type{?proto.auth.Session} */ ( jspb.Message.getWrapperField(this, auth_session_pb.Session, 1)); }; /** * @param {?proto.auth.Session|undefined} value * @return {!proto.auth.CreateSessionRequest} returns this */ proto.auth.CreateSessionRequest.prototype.setSession = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.auth.CreateSessionRequest} returns this */ proto.auth.CreateSessionRequest.prototype.clearSession = function() { return this.setSession(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.CreateSessionRequest.prototype.hasSession = function() { return jspb.Message.getField(this, 1) != 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.auth.CreateSessionResponse.prototype.toObject = function(opt_includeInstance) { return proto.auth.CreateSessionResponse.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.auth.CreateSessionResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.CreateSessionResponse.toObject = function(includeInstance, msg) { var f, obj = { session: (f = msg.getSession()) && auth_session_pb.Session.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.auth.CreateSessionResponse} */ proto.auth.CreateSessionResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.auth.CreateSessionResponse; return proto.auth.CreateSessionResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.auth.CreateSessionResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.auth.CreateSessionResponse} */ proto.auth.CreateSessionResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new auth_session_pb.Session; reader.readMessage(value,auth_session_pb.Session.deserializeBinaryFromReader); msg.setSession(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.auth.CreateSessionResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.auth.CreateSessionResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.auth.CreateSessionResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.CreateSessionResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSession(); if (f != null) { writer.writeMessage( 1, f, auth_session_pb.Session.serializeBinaryToWriter ); } }; /** * optional Session session = 1; * @return {?proto.auth.Session} */ proto.auth.CreateSessionResponse.prototype.getSession = function() { return /** @type{?proto.auth.Session} */ ( jspb.Message.getWrapperField(this, auth_session_pb.Session, 1)); }; /** * @param {?proto.auth.Session|undefined} value * @return {!proto.auth.CreateSessionResponse} returns this */ proto.auth.CreateSessionResponse.prototype.setSession = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.auth.CreateSessionResponse} returns this */ proto.auth.CreateSessionResponse.prototype.clearSession = function() { return this.setSession(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.CreateSessionResponse.prototype.hasSession = function() { return jspb.Message.getField(this, 1) != 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.auth.DeleteSessionRequest.prototype.toObject = function(opt_includeInstance) { return proto.auth.DeleteSessionRequest.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.auth.DeleteSessionRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.DeleteSessionRequest.toObject = function(includeInstance, msg) { var f, obj = { sessionToken: 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.auth.DeleteSessionRequest} */ proto.auth.DeleteSessionRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.auth.DeleteSessionRequest; return proto.auth.DeleteSessionRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.auth.DeleteSessionRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.auth.DeleteSessionRequest} */ proto.auth.DeleteSessionRequest.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.setSessionToken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.auth.DeleteSessionRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.auth.DeleteSessionRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.auth.DeleteSessionRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.DeleteSessionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSessionToken(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string session_token = 1; * @return {string} */ proto.auth.DeleteSessionRequest.prototype.getSessionToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.auth.DeleteSessionRequest} returns this */ proto.auth.DeleteSessionRequest.prototype.setSessionToken = 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.auth.DeleteSessionResponse.prototype.toObject = function(opt_includeInstance) { return proto.auth.DeleteSessionResponse.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.auth.DeleteSessionResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.DeleteSessionResponse.toObject = function(includeInstance, msg) { var f, obj = { success: jspb.Message.getBooleanFieldWithDefault(msg, 1, 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.auth.DeleteSessionResponse} */ proto.auth.DeleteSessionResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.auth.DeleteSessionResponse; return proto.auth.DeleteSessionResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.auth.DeleteSessionResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.auth.DeleteSessionResponse} */ proto.auth.DeleteSessionResponse.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.setSuccess(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.auth.DeleteSessionResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.auth.DeleteSessionResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.auth.DeleteSessionResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.DeleteSessionResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSuccess(); if (f) { writer.writeBool( 1, f ); } }; /** * optional bool success = 1; * @return {boolean} */ proto.auth.DeleteSessionResponse.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value * @return {!proto.auth.DeleteSessionResponse} returns this */ proto.auth.DeleteSessionResponse.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(this, 1, value); }; goog.object.extend(exports, proto.auth);