@ondewo/csi-client-nodejs
Version:
ONDEWO Communication System Integration (CSI) Client library for Nodejs
631 lines (548 loc) • 18.6 kB
JavaScript
// source: google/cloud/oslogin/common/common.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_api_annotations_pb = require('../../../../google/api/annotations_pb.js');
goog.object.extend(proto, google_api_annotations_pb);
goog.exportSymbol('proto.google.cloud.oslogin.common.PosixAccount', null, global);
goog.exportSymbol('proto.google.cloud.oslogin.common.SshPublicKey', 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.google.cloud.oslogin.common.PosixAccount = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.oslogin.common.PosixAccount, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.oslogin.common.PosixAccount.displayName = 'proto.google.cloud.oslogin.common.PosixAccount';
}
/**
* 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.google.cloud.oslogin.common.SshPublicKey = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.cloud.oslogin.common.SshPublicKey, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.cloud.oslogin.common.SshPublicKey.displayName = 'proto.google.cloud.oslogin.common.SshPublicKey';
}
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.google.cloud.oslogin.common.PosixAccount.prototype.toObject = function(opt_includeInstance) {
return proto.google.cloud.oslogin.common.PosixAccount.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.google.cloud.oslogin.common.PosixAccount} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.oslogin.common.PosixAccount.toObject = function(includeInstance, msg) {
var f, obj = {
primary: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
username: jspb.Message.getFieldWithDefault(msg, 2, ""),
uid: jspb.Message.getFieldWithDefault(msg, 3, 0),
gid: jspb.Message.getFieldWithDefault(msg, 4, 0),
homeDirectory: jspb.Message.getFieldWithDefault(msg, 5, ""),
shell: jspb.Message.getFieldWithDefault(msg, 6, ""),
gecos: jspb.Message.getFieldWithDefault(msg, 7, ""),
systemId: jspb.Message.getFieldWithDefault(msg, 8, ""),
accountId: jspb.Message.getFieldWithDefault(msg, 9, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.cloud.oslogin.common.PosixAccount}
*/
proto.google.cloud.oslogin.common.PosixAccount.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.cloud.oslogin.common.PosixAccount;
return proto.google.cloud.oslogin.common.PosixAccount.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.cloud.oslogin.common.PosixAccount} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.cloud.oslogin.common.PosixAccount}
*/
proto.google.cloud.oslogin.common.PosixAccount.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.setPrimary(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setUsername(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt64());
msg.setUid(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt64());
msg.setGid(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setHomeDirectory(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setShell(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setGecos(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setSystemId(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setAccountId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.cloud.oslogin.common.PosixAccount.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.google.cloud.oslogin.common.PosixAccount} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.oslogin.common.PosixAccount.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPrimary();
if (f) {
writer.writeBool(
1,
f
);
}
f = message.getUsername();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getUid();
if (f !== 0) {
writer.writeInt64(
3,
f
);
}
f = message.getGid();
if (f !== 0) {
writer.writeInt64(
4,
f
);
}
f = message.getHomeDirectory();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getShell();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getGecos();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getSystemId();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = message.getAccountId();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
};
/**
* optional bool primary = 1;
* @return {boolean}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.getPrimary = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
};
/**
* @param {boolean} value
* @return {!proto.google.cloud.oslogin.common.PosixAccount} returns this
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.setPrimary = function(value) {
return jspb.Message.setProto3BooleanField(this, 1, value);
};
/**
* optional string username = 2;
* @return {string}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.getUsername = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.oslogin.common.PosixAccount} returns this
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.setUsername = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional int64 uid = 3;
* @return {number}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.getUid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.google.cloud.oslogin.common.PosixAccount} returns this
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.setUid = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int64 gid = 4;
* @return {number}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.getGid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.google.cloud.oslogin.common.PosixAccount} returns this
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.setGid = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional string home_directory = 5;
* @return {string}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.getHomeDirectory = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.oslogin.common.PosixAccount} returns this
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.setHomeDirectory = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string shell = 6;
* @return {string}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.getShell = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.oslogin.common.PosixAccount} returns this
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.setShell = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string gecos = 7;
* @return {string}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.getGecos = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.oslogin.common.PosixAccount} returns this
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.setGecos = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string system_id = 8;
* @return {string}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.getSystemId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.oslogin.common.PosixAccount} returns this
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.setSystemId = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
/**
* optional string account_id = 9;
* @return {string}
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.getAccountId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.oslogin.common.PosixAccount} returns this
*/
proto.google.cloud.oslogin.common.PosixAccount.prototype.setAccountId = function(value) {
return jspb.Message.setProto3StringField(this, 9, 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.google.cloud.oslogin.common.SshPublicKey.prototype.toObject = function(opt_includeInstance) {
return proto.google.cloud.oslogin.common.SshPublicKey.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.google.cloud.oslogin.common.SshPublicKey} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.oslogin.common.SshPublicKey.toObject = function(includeInstance, msg) {
var f, obj = {
key: jspb.Message.getFieldWithDefault(msg, 1, ""),
expirationTimeUsec: jspb.Message.getFieldWithDefault(msg, 2, 0),
fingerprint: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.cloud.oslogin.common.SshPublicKey}
*/
proto.google.cloud.oslogin.common.SshPublicKey.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.cloud.oslogin.common.SshPublicKey;
return proto.google.cloud.oslogin.common.SshPublicKey.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.cloud.oslogin.common.SshPublicKey} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.cloud.oslogin.common.SshPublicKey}
*/
proto.google.cloud.oslogin.common.SshPublicKey.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.setKey(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setExpirationTimeUsec(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setFingerprint(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.cloud.oslogin.common.SshPublicKey.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.cloud.oslogin.common.SshPublicKey.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.google.cloud.oslogin.common.SshPublicKey} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.cloud.oslogin.common.SshPublicKey.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getKey();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getExpirationTimeUsec();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
f = message.getFingerprint();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string key = 1;
* @return {string}
*/
proto.google.cloud.oslogin.common.SshPublicKey.prototype.getKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.oslogin.common.SshPublicKey} returns this
*/
proto.google.cloud.oslogin.common.SshPublicKey.prototype.setKey = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional int64 expiration_time_usec = 2;
* @return {number}
*/
proto.google.cloud.oslogin.common.SshPublicKey.prototype.getExpirationTimeUsec = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.google.cloud.oslogin.common.SshPublicKey} returns this
*/
proto.google.cloud.oslogin.common.SshPublicKey.prototype.setExpirationTimeUsec = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional string fingerprint = 3;
* @return {string}
*/
proto.google.cloud.oslogin.common.SshPublicKey.prototype.getFingerprint = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.google.cloud.oslogin.common.SshPublicKey} returns this
*/
proto.google.cloud.oslogin.common.SshPublicKey.prototype.setFingerprint = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
goog.object.extend(exports, proto.google.cloud.oslogin.common);