UNPKG

@toitware/api

Version:
1,558 lines (1,392 loc) 131 kB
// source: toit/api/organization.proto /** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var toit_model_organization_pb = require('../../toit/model/organization_pb.js'); goog.object.extend(proto, toit_model_organization_pb); var toit_api_hardware_pb = require('../../toit/api/hardware_pb.js'); goog.object.extend(proto, toit_api_hardware_pb); goog.exportSymbol('proto.toit.api.CreateAPIKeyRequest', null, global); goog.exportSymbol('proto.toit.api.CreateAPIKeyResponse', null, global); goog.exportSymbol('proto.toit.api.CreateNewOrganizationRequest', null, global); goog.exportSymbol('proto.toit.api.CreateNewOrganizationResponse', null, global); goog.exportSymbol('proto.toit.api.CreateUserRequest', null, global); goog.exportSymbol('proto.toit.api.CreateUserResponse', null, global); goog.exportSymbol('proto.toit.api.DeleteAPIKeyRequest', null, global); goog.exportSymbol('proto.toit.api.DeleteAPIKeyResponse', null, global); goog.exportSymbol('proto.toit.api.DeleteUserRequest', null, global); goog.exportSymbol('proto.toit.api.DeleteUserResponse', null, global); goog.exportSymbol('proto.toit.api.GetAPIKeySecretRequest', null, global); goog.exportSymbol('proto.toit.api.GetAPIKeySecretResponse', null, global); goog.exportSymbol('proto.toit.api.GetUserRequest', null, global); goog.exportSymbol('proto.toit.api.GetUserResponse', null, global); goog.exportSymbol('proto.toit.api.ListAPIKeysRequest', null, global); goog.exportSymbol('proto.toit.api.ListAPIKeysResponse', null, global); goog.exportSymbol('proto.toit.api.ListUsersRequest', null, global); goog.exportSymbol('proto.toit.api.ListUsersResponse', null, global); goog.exportSymbol('proto.toit.api.OrganizationChange', null, global); goog.exportSymbol('proto.toit.api.OrganizationChange.ChangeCase', null, global); goog.exportSymbol('proto.toit.api.UpdateOrganizationRequest', null, global); goog.exportSymbol('proto.toit.api.UpdateOrganizationResponse', 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.toit.api.ListUsersRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.ListUsersRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.ListUsersRequest.displayName = 'proto.toit.api.ListUsersRequest'; } /** * 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.toit.api.ListUsersResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.toit.api.ListUsersResponse.repeatedFields_, null); }; goog.inherits(proto.toit.api.ListUsersResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.ListUsersResponse.displayName = 'proto.toit.api.ListUsersResponse'; } /** * 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.toit.api.CreateUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.CreateUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.CreateUserRequest.displayName = 'proto.toit.api.CreateUserRequest'; } /** * 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.toit.api.CreateUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.CreateUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.CreateUserResponse.displayName = 'proto.toit.api.CreateUserResponse'; } /** * 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.toit.api.DeleteUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.DeleteUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.DeleteUserRequest.displayName = 'proto.toit.api.DeleteUserRequest'; } /** * 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.toit.api.DeleteUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.DeleteUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.DeleteUserResponse.displayName = 'proto.toit.api.DeleteUserResponse'; } /** * 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.toit.api.GetUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.GetUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.GetUserRequest.displayName = 'proto.toit.api.GetUserRequest'; } /** * 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.toit.api.GetUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.GetUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.GetUserResponse.displayName = 'proto.toit.api.GetUserResponse'; } /** * 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.toit.api.CreateAPIKeyRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.CreateAPIKeyRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.CreateAPIKeyRequest.displayName = 'proto.toit.api.CreateAPIKeyRequest'; } /** * 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.toit.api.CreateAPIKeyResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.CreateAPIKeyResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.CreateAPIKeyResponse.displayName = 'proto.toit.api.CreateAPIKeyResponse'; } /** * 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.toit.api.ListAPIKeysRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.ListAPIKeysRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.ListAPIKeysRequest.displayName = 'proto.toit.api.ListAPIKeysRequest'; } /** * 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.toit.api.ListAPIKeysResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.ListAPIKeysResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.ListAPIKeysResponse.displayName = 'proto.toit.api.ListAPIKeysResponse'; } /** * 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.toit.api.DeleteAPIKeyRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.DeleteAPIKeyRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.DeleteAPIKeyRequest.displayName = 'proto.toit.api.DeleteAPIKeyRequest'; } /** * 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.toit.api.DeleteAPIKeyResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.DeleteAPIKeyResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.DeleteAPIKeyResponse.displayName = 'proto.toit.api.DeleteAPIKeyResponse'; } /** * 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.toit.api.GetAPIKeySecretRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.GetAPIKeySecretRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.GetAPIKeySecretRequest.displayName = 'proto.toit.api.GetAPIKeySecretRequest'; } /** * 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.toit.api.GetAPIKeySecretResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.GetAPIKeySecretResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.GetAPIKeySecretResponse.displayName = 'proto.toit.api.GetAPIKeySecretResponse'; } /** * 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.toit.api.OrganizationChange = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.toit.api.OrganizationChange.oneofGroups_); }; goog.inherits(proto.toit.api.OrganizationChange, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.OrganizationChange.displayName = 'proto.toit.api.OrganizationChange'; } /** * 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.toit.api.UpdateOrganizationRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.toit.api.UpdateOrganizationRequest.repeatedFields_, null); }; goog.inherits(proto.toit.api.UpdateOrganizationRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.UpdateOrganizationRequest.displayName = 'proto.toit.api.UpdateOrganizationRequest'; } /** * 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.toit.api.UpdateOrganizationResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.UpdateOrganizationResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.UpdateOrganizationResponse.displayName = 'proto.toit.api.UpdateOrganizationResponse'; } /** * 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.toit.api.CreateNewOrganizationRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.CreateNewOrganizationRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.CreateNewOrganizationRequest.displayName = 'proto.toit.api.CreateNewOrganizationRequest'; } /** * 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.toit.api.CreateNewOrganizationResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.toit.api.CreateNewOrganizationResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.toit.api.CreateNewOrganizationResponse.displayName = 'proto.toit.api.CreateNewOrganizationResponse'; } 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.toit.api.ListUsersRequest.prototype.toObject = function(opt_includeInstance) { return proto.toit.api.ListUsersRequest.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.toit.api.ListUsersRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.ListUsersRequest.toObject = function(includeInstance, msg) { var f, obj = { offset: msg.getOffset_asB64(), limit: jspb.Message.getFieldWithDefault(msg, 2, 0), orderBy: jspb.Message.getFieldWithDefault(msg, 3, ""), orderDesc: jspb.Message.getBooleanFieldWithDefault(msg, 4, 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.toit.api.ListUsersRequest} */ proto.toit.api.ListUsersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.toit.api.ListUsersRequest; return proto.toit.api.ListUsersRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.toit.api.ListUsersRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.toit.api.ListUsersRequest} */ proto.toit.api.ListUsersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOffset(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setLimit(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setOrderBy(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setOrderDesc(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.toit.api.ListUsersRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.toit.api.ListUsersRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.toit.api.ListUsersRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.ListUsersRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOffset_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = message.getLimit(); if (f !== 0) { writer.writeInt64( 2, f ); } f = message.getOrderBy(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getOrderDesc(); if (f) { writer.writeBool( 4, f ); } }; /** * optional bytes offset = 1; * @return {!(string|Uint8Array)} */ proto.toit.api.ListUsersRequest.prototype.getOffset = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * optional bytes offset = 1; * This is a type-conversion wrapper around `getOffset()` * @return {string} */ proto.toit.api.ListUsersRequest.prototype.getOffset_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOffset())); }; /** * optional bytes offset = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOffset()` * @return {!Uint8Array} */ proto.toit.api.ListUsersRequest.prototype.getOffset_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOffset())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.toit.api.ListUsersRequest} returns this */ proto.toit.api.ListUsersRequest.prototype.setOffset = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional int64 limit = 2; * @return {number} */ proto.toit.api.ListUsersRequest.prototype.getLimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.toit.api.ListUsersRequest} returns this */ proto.toit.api.ListUsersRequest.prototype.setLimit = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional string order_by = 3; * @return {string} */ proto.toit.api.ListUsersRequest.prototype.getOrderBy = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.toit.api.ListUsersRequest} returns this */ proto.toit.api.ListUsersRequest.prototype.setOrderBy = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional bool order_desc = 4; * @return {boolean} */ proto.toit.api.ListUsersRequest.prototype.getOrderDesc = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value * @return {!proto.toit.api.ListUsersRequest} returns this */ proto.toit.api.ListUsersRequest.prototype.setOrderDesc = function(value) { return jspb.Message.setProto3BooleanField(this, 4, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.toit.api.ListUsersResponse.repeatedFields_ = [1]; 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.toit.api.ListUsersResponse.prototype.toObject = function(opt_includeInstance) { return proto.toit.api.ListUsersResponse.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.toit.api.ListUsersResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.ListUsersResponse.toObject = function(includeInstance, msg) { var f, obj = { usersList: jspb.Message.toObjectList(msg.getUsersList(), toit_model_organization_pb.User.toObject, includeInstance), offset: msg.getOffset_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.toit.api.ListUsersResponse} */ proto.toit.api.ListUsersResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.toit.api.ListUsersResponse; return proto.toit.api.ListUsersResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.toit.api.ListUsersResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.toit.api.ListUsersResponse} */ proto.toit.api.ListUsersResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new toit_model_organization_pb.User; reader.readMessage(value,toit_model_organization_pb.User.deserializeBinaryFromReader); msg.addUsers(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOffset(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.toit.api.ListUsersResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.toit.api.ListUsersResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.toit.api.ListUsersResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.ListUsersResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUsersList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, toit_model_organization_pb.User.serializeBinaryToWriter ); } f = message.getOffset_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * repeated toit.model.User users = 1; * @return {!Array<!proto.toit.model.User>} */ proto.toit.api.ListUsersResponse.prototype.getUsersList = function() { return /** @type{!Array<!proto.toit.model.User>} */ ( jspb.Message.getRepeatedWrapperField(this, toit_model_organization_pb.User, 1)); }; /** * @param {!Array<!proto.toit.model.User>} value * @return {!proto.toit.api.ListUsersResponse} returns this */ proto.toit.api.ListUsersResponse.prototype.setUsersList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.toit.model.User=} opt_value * @param {number=} opt_index * @return {!proto.toit.model.User} */ proto.toit.api.ListUsersResponse.prototype.addUsers = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.toit.model.User, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.toit.api.ListUsersResponse} returns this */ proto.toit.api.ListUsersResponse.prototype.clearUsersList = function() { return this.setUsersList([]); }; /** * optional bytes offset = 2; * @return {!(string|Uint8Array)} */ proto.toit.api.ListUsersResponse.prototype.getOffset = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes offset = 2; * This is a type-conversion wrapper around `getOffset()` * @return {string} */ proto.toit.api.ListUsersResponse.prototype.getOffset_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOffset())); }; /** * optional bytes offset = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOffset()` * @return {!Uint8Array} */ proto.toit.api.ListUsersResponse.prototype.getOffset_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOffset())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.toit.api.ListUsersResponse} returns this */ proto.toit.api.ListUsersResponse.prototype.setOffset = function(value) { return jspb.Message.setProto3BytesField(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.toit.api.CreateUserRequest.prototype.toObject = function(opt_includeInstance) { return proto.toit.api.CreateUserRequest.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.toit.api.CreateUserRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.CreateUserRequest.toObject = function(includeInstance, msg) { var f, obj = { email: 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.toit.api.CreateUserRequest} */ proto.toit.api.CreateUserRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.toit.api.CreateUserRequest; return proto.toit.api.CreateUserRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.toit.api.CreateUserRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.toit.api.CreateUserRequest} */ proto.toit.api.CreateUserRequest.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.setEmail(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.toit.api.CreateUserRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.toit.api.CreateUserRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.toit.api.CreateUserRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.CreateUserRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getEmail(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string email = 1; * @return {string} */ proto.toit.api.CreateUserRequest.prototype.getEmail = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.toit.api.CreateUserRequest} returns this */ proto.toit.api.CreateUserRequest.prototype.setEmail = 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.toit.api.CreateUserResponse.prototype.toObject = function(opt_includeInstance) { return proto.toit.api.CreateUserResponse.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.toit.api.CreateUserResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.CreateUserResponse.toObject = function(includeInstance, msg) { var f, obj = { user: (f = msg.getUser()) && toit_model_organization_pb.User.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.toit.api.CreateUserResponse} */ proto.toit.api.CreateUserResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.toit.api.CreateUserResponse; return proto.toit.api.CreateUserResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.toit.api.CreateUserResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.toit.api.CreateUserResponse} */ proto.toit.api.CreateUserResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new toit_model_organization_pb.User; reader.readMessage(value,toit_model_organization_pb.User.deserializeBinaryFromReader); msg.setUser(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.toit.api.CreateUserResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.toit.api.CreateUserResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.toit.api.CreateUserResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.CreateUserResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUser(); if (f != null) { writer.writeMessage( 1, f, toit_model_organization_pb.User.serializeBinaryToWriter ); } }; /** * optional toit.model.User user = 1; * @return {?proto.toit.model.User} */ proto.toit.api.CreateUserResponse.prototype.getUser = function() { return /** @type{?proto.toit.model.User} */ ( jspb.Message.getWrapperField(this, toit_model_organization_pb.User, 1)); }; /** * @param {?proto.toit.model.User|undefined} value * @return {!proto.toit.api.CreateUserResponse} returns this */ proto.toit.api.CreateUserResponse.prototype.setUser = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.toit.api.CreateUserResponse} returns this */ proto.toit.api.CreateUserResponse.prototype.clearUser = function() { return this.setUser(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.toit.api.CreateUserResponse.prototype.hasUser = 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.toit.api.DeleteUserRequest.prototype.toObject = function(opt_includeInstance) { return proto.toit.api.DeleteUserRequest.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.toit.api.DeleteUserRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.DeleteUserRequest.toObject = function(includeInstance, msg) { var f, obj = { email: 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.toit.api.DeleteUserRequest} */ proto.toit.api.DeleteUserRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.toit.api.DeleteUserRequest; return proto.toit.api.DeleteUserRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.toit.api.DeleteUserRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.toit.api.DeleteUserRequest} */ proto.toit.api.DeleteUserRequest.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.setEmail(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.toit.api.DeleteUserRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.toit.api.DeleteUserRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.toit.api.DeleteUserRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.DeleteUserRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getEmail(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string email = 1; * @return {string} */ proto.toit.api.DeleteUserRequest.prototype.getEmail = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.toit.api.DeleteUserRequest} returns this */ proto.toit.api.DeleteUserRequest.prototype.setEmail = 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.toit.api.DeleteUserResponse.prototype.toObject = function(opt_includeInstance) { return proto.toit.api.DeleteUserResponse.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.toit.api.DeleteUserResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.DeleteUserResponse.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.toit.api.DeleteUserResponse} */ proto.toit.api.DeleteUserResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.toit.api.DeleteUserResponse; return proto.toit.api.DeleteUserResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.toit.api.DeleteUserResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.toit.api.DeleteUserResponse} */ proto.toit.api.DeleteUserResponse.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.toit.api.DeleteUserResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.toit.api.DeleteUserResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.toit.api.DeleteUserResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.DeleteUserResponse.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.toit.api.GetUserRequest.prototype.toObject = function(opt_includeInstance) { return proto.toit.api.GetUserRequest.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.toit.api.GetUserRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.GetUserRequest.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId_asB64(), email: 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.toit.api.GetUserRequest} */ proto.toit.api.GetUserRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.toit.api.GetUserRequest; return proto.toit.api.GetUserRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.toit.api.GetUserRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.toit.api.GetUserRequest} */ proto.toit.api.GetUserRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setEmail(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.toit.api.GetUserRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.toit.api.GetUserRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.toit.api.GetUserRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.toit.api.GetUserRequest.serializeBinaryToWriter = function(message, writer) { var f = undefi