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.

737 lines (626 loc) 18.6 kB
// source: auth/account.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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.auth.Account', 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.Account = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.auth.Account, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.auth.Account.displayName = 'proto.auth.Account'; } 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.Account.prototype.toObject = function(opt_includeInstance) { return proto.auth.Account.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.Account} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.Account.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), userId: jspb.Message.getFieldWithDefault(msg, 2, ""), type: jspb.Message.getFieldWithDefault(msg, 3, ""), provider: jspb.Message.getFieldWithDefault(msg, 4, ""), providerAccountId: jspb.Message.getFieldWithDefault(msg, 5, ""), refreshToken: jspb.Message.getFieldWithDefault(msg, 6, ""), accessToken: jspb.Message.getFieldWithDefault(msg, 7, ""), expiresAt: jspb.Message.getFieldWithDefault(msg, 8, 0), tokenType: jspb.Message.getFieldWithDefault(msg, 9, ""), scope: jspb.Message.getFieldWithDefault(msg, 10, ""), idToken: jspb.Message.getFieldWithDefault(msg, 11, ""), sessionState: jspb.Message.getFieldWithDefault(msg, 12, ""), createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.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.Account} */ proto.auth.Account.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.auth.Account; return proto.auth.Account.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.auth.Account} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.auth.Account} */ proto.auth.Account.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; case 2: var value = /** @type {string} */ (reader.readString()); msg.setUserId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setType(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setProvider(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setProviderAccountId(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setRefreshToken(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setAccessToken(value); break; case 8: var value = /** @type {number} */ (reader.readInt64()); msg.setExpiresAt(value); break; case 9: var value = /** @type {string} */ (reader.readString()); msg.setTokenType(value); break; case 10: var value = /** @type {string} */ (reader.readString()); msg.setScope(value); break; case 11: var value = /** @type {string} */ (reader.readString()); msg.setIdToken(value); break; case 12: var value = /** @type {string} */ (reader.readString()); msg.setSessionState(value); break; case 13: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setCreatedAt(value); break; case 14: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setUpdatedAt(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.auth.Account.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.auth.Account.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.Account} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.auth.Account.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getUserId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getType(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getProvider(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getProviderAccountId(); if (f.length > 0) { writer.writeString( 5, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 6)); if (f != null) { writer.writeString( 6, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 7)); if (f != null) { writer.writeString( 7, f ); } f = /** @type {number} */ (jspb.Message.getField(message, 8)); if (f != null) { writer.writeInt64( 8, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 9)); if (f != null) { writer.writeString( 9, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 10)); if (f != null) { writer.writeString( 10, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 11)); if (f != null) { writer.writeString( 11, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 12)); if (f != null) { writer.writeString( 12, f ); } f = message.getCreatedAt(); if (f != null) { writer.writeMessage( 13, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getUpdatedAt(); if (f != null) { writer.writeMessage( 14, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** * optional string id = 1; * @return {string} */ proto.auth.Account.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string user_id = 2; * @return {string} */ proto.auth.Account.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string type = 3; * @return {string} */ proto.auth.Account.prototype.getType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setType = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string provider = 4; * @return {string} */ proto.auth.Account.prototype.getProvider = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setProvider = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string provider_account_id = 5; * @return {string} */ proto.auth.Account.prototype.getProviderAccountId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setProviderAccountId = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string refresh_token = 6; * @return {string} */ proto.auth.Account.prototype.getRefreshToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setRefreshToken = function(value) { return jspb.Message.setField(this, 6, value); }; /** * Clears the field making it undefined. * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.clearRefreshToken = function() { return jspb.Message.setField(this, 6, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.Account.prototype.hasRefreshToken = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional string access_token = 7; * @return {string} */ proto.auth.Account.prototype.getAccessToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setAccessToken = function(value) { return jspb.Message.setField(this, 7, value); }; /** * Clears the field making it undefined. * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.clearAccessToken = function() { return jspb.Message.setField(this, 7, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.Account.prototype.hasAccessToken = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional int64 expires_at = 8; * @return {number} */ proto.auth.Account.prototype.getExpiresAt = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** * @param {number} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setExpiresAt = function(value) { return jspb.Message.setField(this, 8, value); }; /** * Clears the field making it undefined. * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.clearExpiresAt = function() { return jspb.Message.setField(this, 8, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.Account.prototype.hasExpiresAt = function() { return jspb.Message.getField(this, 8) != null; }; /** * optional string token_type = 9; * @return {string} */ proto.auth.Account.prototype.getTokenType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setTokenType = function(value) { return jspb.Message.setField(this, 9, value); }; /** * Clears the field making it undefined. * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.clearTokenType = function() { return jspb.Message.setField(this, 9, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.Account.prototype.hasTokenType = function() { return jspb.Message.getField(this, 9) != null; }; /** * optional string scope = 10; * @return {string} */ proto.auth.Account.prototype.getScope = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setScope = function(value) { return jspb.Message.setField(this, 10, value); }; /** * Clears the field making it undefined. * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.clearScope = function() { return jspb.Message.setField(this, 10, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.Account.prototype.hasScope = function() { return jspb.Message.getField(this, 10) != null; }; /** * optional string id_token = 11; * @return {string} */ proto.auth.Account.prototype.getIdToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setIdToken = function(value) { return jspb.Message.setField(this, 11, value); }; /** * Clears the field making it undefined. * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.clearIdToken = function() { return jspb.Message.setField(this, 11, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.Account.prototype.hasIdToken = function() { return jspb.Message.getField(this, 11) != null; }; /** * optional string session_state = 12; * @return {string} */ proto.auth.Account.prototype.getSessionState = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** * @param {string} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setSessionState = function(value) { return jspb.Message.setField(this, 12, value); }; /** * Clears the field making it undefined. * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.clearSessionState = function() { return jspb.Message.setField(this, 12, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.Account.prototype.hasSessionState = function() { return jspb.Message.getField(this, 12) != null; }; /** * optional google.protobuf.Timestamp created_at = 13; * @return {?proto.google.protobuf.Timestamp} */ proto.auth.Account.prototype.getCreatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 13)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setCreatedAt = function(value) { return jspb.Message.setWrapperField(this, 13, value); }; /** * Clears the message field making it undefined. * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.clearCreatedAt = function() { return this.setCreatedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.Account.prototype.hasCreatedAt = function() { return jspb.Message.getField(this, 13) != null; }; /** * optional google.protobuf.Timestamp updated_at = 14; * @return {?proto.google.protobuf.Timestamp} */ proto.auth.Account.prototype.getUpdatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 14)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.setUpdatedAt = function(value) { return jspb.Message.setWrapperField(this, 14, value); }; /** * Clears the message field making it undefined. * @return {!proto.auth.Account} returns this */ proto.auth.Account.prototype.clearUpdatedAt = function() { return this.setUpdatedAt(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.auth.Account.prototype.hasUpdatedAt = function() { return jspb.Message.getField(this, 14) != null; }; goog.object.extend(exports, proto.auth);