Start of 5.X work

This commit is contained in:
Sebastien L
2025-03-18 17:38:34 -04:00
parent c0ddf0a997
commit 73bd096f37
442 changed files with 227862 additions and 21075 deletions

View File

@@ -0,0 +1,281 @@
// source: google/protobuf/any.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 =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
goog.exportSymbol('proto.google.protobuf.Any', 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.protobuf.Any = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.protobuf.Any, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.protobuf.Any.displayName = 'proto.google.protobuf.Any';
}
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.protobuf.Any.prototype.toObject = function(opt_includeInstance) {
return proto.google.protobuf.Any.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.protobuf.Any} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Any.toObject = function(includeInstance, msg) {
var f, obj = {
typeUrl: jspb.Message.getFieldWithDefault(msg, 1, ""),
value: msg.getValue_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.google.protobuf.Any}
*/
proto.google.protobuf.Any.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.protobuf.Any;
return proto.google.protobuf.Any.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.protobuf.Any} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.protobuf.Any}
*/
proto.google.protobuf.Any.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.setTypeUrl(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.protobuf.Any.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.protobuf.Any.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.protobuf.Any} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Any.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTypeUrl();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getValue_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
};
/**
* optional string type_url = 1;
* @return {string}
*/
proto.google.protobuf.Any.prototype.getTypeUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.google.protobuf.Any} returns this
*/
proto.google.protobuf.Any.prototype.setTypeUrl = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional bytes value = 2;
* @return {!(string|Uint8Array)}
*/
proto.google.protobuf.Any.prototype.getValue = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes value = 2;
* This is a type-conversion wrapper around `getValue()`
* @return {string}
*/
proto.google.protobuf.Any.prototype.getValue_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getValue()));
};
/**
* optional bytes value = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getValue()`
* @return {!Uint8Array}
*/
proto.google.protobuf.Any.prototype.getValue_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getValue()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.google.protobuf.Any} returns this
*/
proto.google.protobuf.Any.prototype.setValue = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
goog.object.extend(exports, proto.google.protobuf);
/* This code will be inserted into generated code for
* google/protobuf/any.proto. */
/**
* Returns the type name contained in this instance, if any.
* @return {string|undefined}
*/
proto.google.protobuf.Any.prototype.getTypeName = function() {
return this.getTypeUrl().split('/').pop();
};
/**
* Packs the given message instance into this Any.
* For binary format usage only.
* @param {!Uint8Array} serialized The serialized data to pack.
* @param {string} name The type name of this message object.
* @param {string=} opt_typeUrlPrefix the type URL prefix.
*/
proto.google.protobuf.Any.prototype.pack = function(serialized, name,
opt_typeUrlPrefix) {
if (!opt_typeUrlPrefix) {
opt_typeUrlPrefix = 'type.googleapis.com/';
}
if (opt_typeUrlPrefix.substr(-1) != '/') {
this.setTypeUrl(opt_typeUrlPrefix + '/' + name);
} else {
this.setTypeUrl(opt_typeUrlPrefix + name);
}
this.setValue(serialized);
};
/**
* @template T
* Unpacks this Any into the given message object.
* @param {function(Uint8Array):T} deserialize Function that will deserialize
* the binary data properly.
* @param {string} name The expected type name of this message object.
* @return {?T} If the name matched the expected name, returns the deserialized
* object, otherwise returns null.
*/
proto.google.protobuf.Any.prototype.unpack = function(deserialize, name) {
if (this.getTypeName() == name) {
return deserialize(this.getValue_asU8());
} else {
return null;
}
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,206 @@
// source: google/protobuf/duration.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 =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
goog.exportSymbol('proto.google.protobuf.Duration', 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.protobuf.Duration = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.protobuf.Duration, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.protobuf.Duration.displayName = 'proto.google.protobuf.Duration';
}
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.protobuf.Duration.prototype.toObject = function(opt_includeInstance) {
return proto.google.protobuf.Duration.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.protobuf.Duration} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Duration.toObject = function(includeInstance, msg) {
var f, obj = {
seconds: jspb.Message.getFieldWithDefault(msg, 1, 0),
nanos: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
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.protobuf.Duration}
*/
proto.google.protobuf.Duration.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.protobuf.Duration;
return proto.google.protobuf.Duration.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.protobuf.Duration} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.protobuf.Duration}
*/
proto.google.protobuf.Duration.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt64());
msg.setSeconds(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setNanos(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.protobuf.Duration.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.protobuf.Duration.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.protobuf.Duration} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Duration.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSeconds();
if (f !== 0) {
writer.writeInt64(
1,
f
);
}
f = message.getNanos();
if (f !== 0) {
writer.writeInt32(
2,
f
);
}
};
/**
* optional int64 seconds = 1;
* @return {number}
*/
proto.google.protobuf.Duration.prototype.getSeconds = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.google.protobuf.Duration} returns this
*/
proto.google.protobuf.Duration.prototype.setSeconds = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional int32 nanos = 2;
* @return {number}
*/
proto.google.protobuf.Duration.prototype.getNanos = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.google.protobuf.Duration} returns this
*/
proto.google.protobuf.Duration.prototype.setNanos = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
goog.object.extend(exports, proto.google.protobuf);

View File

@@ -0,0 +1,147 @@
// source: google/protobuf/empty.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 =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
goog.exportSymbol('proto.google.protobuf.Empty', 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.protobuf.Empty = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.protobuf.Empty, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.protobuf.Empty.displayName = 'proto.google.protobuf.Empty';
}
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.protobuf.Empty.prototype.toObject = function(opt_includeInstance) {
return proto.google.protobuf.Empty.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.protobuf.Empty} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Empty.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.google.protobuf.Empty}
*/
proto.google.protobuf.Empty.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.protobuf.Empty;
return proto.google.protobuf.Empty.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.protobuf.Empty} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.protobuf.Empty}
*/
proto.google.protobuf.Empty.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.google.protobuf.Empty.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.protobuf.Empty.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.protobuf.Empty} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Empty.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
goog.object.extend(exports, proto.google.protobuf);

View File

@@ -0,0 +1,202 @@
// source: google/protobuf/field_mask.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 =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
goog.exportSymbol('proto.google.protobuf.FieldMask', 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.protobuf.FieldMask = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FieldMask.repeatedFields_, null);
};
goog.inherits(proto.google.protobuf.FieldMask, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.protobuf.FieldMask.displayName = 'proto.google.protobuf.FieldMask';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.protobuf.FieldMask.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.google.protobuf.FieldMask.prototype.toObject = function(opt_includeInstance) {
return proto.google.protobuf.FieldMask.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.protobuf.FieldMask} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.FieldMask.toObject = function(includeInstance, msg) {
var f, obj = {
pathsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.google.protobuf.FieldMask}
*/
proto.google.protobuf.FieldMask.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.protobuf.FieldMask;
return proto.google.protobuf.FieldMask.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.protobuf.FieldMask} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.protobuf.FieldMask}
*/
proto.google.protobuf.FieldMask.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.addPaths(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.protobuf.FieldMask.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.protobuf.FieldMask.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.protobuf.FieldMask} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.FieldMask.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPathsList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
f
);
}
};
/**
* repeated string paths = 1;
* @return {!Array<string>}
*/
proto.google.protobuf.FieldMask.prototype.getPathsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/**
* @param {!Array<string>} value
* @return {!proto.google.protobuf.FieldMask} returns this
*/
proto.google.protobuf.FieldMask.prototype.setPathsList = function(value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.google.protobuf.FieldMask} returns this
*/
proto.google.protobuf.FieldMask.prototype.addPaths = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.protobuf.FieldMask} returns this
*/
proto.google.protobuf.FieldMask.prototype.clearPathsList = function() {
return this.setPathsList([]);
};
goog.object.extend(exports, proto.google.protobuf);

View File

@@ -0,0 +1,176 @@
// source: google/protobuf/source_context.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 =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
goog.exportSymbol('proto.google.protobuf.SourceContext', 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.protobuf.SourceContext = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.protobuf.SourceContext, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.protobuf.SourceContext.displayName = 'proto.google.protobuf.SourceContext';
}
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.protobuf.SourceContext.prototype.toObject = function(opt_includeInstance) {
return proto.google.protobuf.SourceContext.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.protobuf.SourceContext} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.SourceContext.toObject = function(includeInstance, msg) {
var f, obj = {
fileName: 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.google.protobuf.SourceContext}
*/
proto.google.protobuf.SourceContext.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.protobuf.SourceContext;
return proto.google.protobuf.SourceContext.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.protobuf.SourceContext} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.protobuf.SourceContext}
*/
proto.google.protobuf.SourceContext.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.setFileName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.protobuf.SourceContext.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.protobuf.SourceContext.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.protobuf.SourceContext} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.SourceContext.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFileName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string file_name = 1;
* @return {string}
*/
proto.google.protobuf.SourceContext.prototype.getFileName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.google.protobuf.SourceContext} returns this
*/
proto.google.protobuf.SourceContext.prototype.setFileName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
goog.object.extend(exports, proto.google.protobuf);

View File

@@ -0,0 +1,955 @@
// source: google/protobuf/struct.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 =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
goog.exportSymbol('proto.google.protobuf.ListValue', null, global);
goog.exportSymbol('proto.google.protobuf.NullValue', null, global);
goog.exportSymbol('proto.google.protobuf.Struct', null, global);
goog.exportSymbol('proto.google.protobuf.Value', null, global);
goog.exportSymbol('proto.google.protobuf.Value.KindCase', 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.protobuf.Struct = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.protobuf.Struct, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.protobuf.Struct.displayName = 'proto.google.protobuf.Struct';
}
/**
* 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.protobuf.Value = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.protobuf.Value.oneofGroups_);
};
goog.inherits(proto.google.protobuf.Value, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.protobuf.Value.displayName = 'proto.google.protobuf.Value';
}
/**
* 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.protobuf.ListValue = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ListValue.repeatedFields_, null);
};
goog.inherits(proto.google.protobuf.ListValue, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.protobuf.ListValue.displayName = 'proto.google.protobuf.ListValue';
}
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.protobuf.Struct.prototype.toObject = function(opt_includeInstance) {
return proto.google.protobuf.Struct.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.protobuf.Struct} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Struct.toObject = function(includeInstance, msg) {
var f, obj = {
fieldsMap: (f = msg.getFieldsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []
};
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.protobuf.Struct}
*/
proto.google.protobuf.Struct.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.protobuf.Struct;
return proto.google.protobuf.Struct.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.protobuf.Struct} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.protobuf.Struct}
*/
proto.google.protobuf.Struct.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = msg.getFieldsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value());
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.protobuf.Struct.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.protobuf.Struct.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.protobuf.Struct} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Struct.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFieldsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter);
}
};
/**
* map<string, Value> fields = 1;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,!proto.google.protobuf.Value>}
*/
proto.google.protobuf.Struct.prototype.getFieldsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,!proto.google.protobuf.Value>} */ (
jspb.Message.getMapField(this, 1, opt_noLazyCreate,
proto.google.protobuf.Value));
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.google.protobuf.Struct} returns this
*/
proto.google.protobuf.Struct.prototype.clearFieldsMap = function() {
this.getFieldsMap().clear();
return this;
};
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.google.protobuf.Value.oneofGroups_ = [[1,2,3,4,5,6]];
/**
* @enum {number}
*/
proto.google.protobuf.Value.KindCase = {
KIND_NOT_SET: 0,
NULL_VALUE: 1,
NUMBER_VALUE: 2,
STRING_VALUE: 3,
BOOL_VALUE: 4,
STRUCT_VALUE: 5,
LIST_VALUE: 6
};
/**
* @return {proto.google.protobuf.Value.KindCase}
*/
proto.google.protobuf.Value.prototype.getKindCase = function() {
return /** @type {proto.google.protobuf.Value.KindCase} */(jspb.Message.computeOneofCase(this, proto.google.protobuf.Value.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.protobuf.Value.prototype.toObject = function(opt_includeInstance) {
return proto.google.protobuf.Value.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.protobuf.Value} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Value.toObject = function(includeInstance, msg) {
var f, obj = {
nullValue: jspb.Message.getFieldWithDefault(msg, 1, 0),
numberValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
stringValue: jspb.Message.getFieldWithDefault(msg, 3, ""),
boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
structValue: (f = msg.getStructValue()) && proto.google.protobuf.Struct.toObject(includeInstance, f),
listValue: (f = msg.getListValue()) && proto.google.protobuf.ListValue.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.google.protobuf.Value}
*/
proto.google.protobuf.Value.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.protobuf.Value;
return proto.google.protobuf.Value.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.protobuf.Value} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.protobuf.Value}
*/
proto.google.protobuf.Value.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum());
msg.setNullValue(value);
break;
case 2:
var value = /** @type {number} */ (reader.readDouble());
msg.setNumberValue(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setStringValue(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setBoolValue(value);
break;
case 5:
var value = new proto.google.protobuf.Struct;
reader.readMessage(value,proto.google.protobuf.Struct.deserializeBinaryFromReader);
msg.setStructValue(value);
break;
case 6:
var value = new proto.google.protobuf.ListValue;
reader.readMessage(value,proto.google.protobuf.ListValue.deserializeBinaryFromReader);
msg.setListValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.protobuf.Value.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.protobuf.Value.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.protobuf.Value} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Value.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 1));
if (f != null) {
writer.writeEnum(
1,
f
);
}
f = /** @type {number} */ (jspb.Message.getField(message, 2));
if (f != null) {
writer.writeDouble(
2,
f
);
}
f = /** @type {string} */ (jspb.Message.getField(message, 3));
if (f != null) {
writer.writeString(
3,
f
);
}
f = /** @type {boolean} */ (jspb.Message.getField(message, 4));
if (f != null) {
writer.writeBool(
4,
f
);
}
f = message.getStructValue();
if (f != null) {
writer.writeMessage(
5,
f,
proto.google.protobuf.Struct.serializeBinaryToWriter
);
}
f = message.getListValue();
if (f != null) {
writer.writeMessage(
6,
f,
proto.google.protobuf.ListValue.serializeBinaryToWriter
);
}
};
/**
* optional NullValue null_value = 1;
* @return {!proto.google.protobuf.NullValue}
*/
proto.google.protobuf.Value.prototype.getNullValue = function() {
return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.google.protobuf.NullValue} value
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.setNullValue = function(value) {
return jspb.Message.setOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.clearNullValue = function() {
return jspb.Message.setOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.protobuf.Value.prototype.hasNullValue = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional double number_value = 2;
* @return {number}
*/
proto.google.protobuf.Value.prototype.getNumberValue = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.setNumberValue = function(value) {
return jspb.Message.setOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.clearNumberValue = function() {
return jspb.Message.setOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.protobuf.Value.prototype.hasNumberValue = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string string_value = 3;
* @return {string}
*/
proto.google.protobuf.Value.prototype.getStringValue = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.setStringValue = function(value) {
return jspb.Message.setOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.clearStringValue = function() {
return jspb.Message.setOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.protobuf.Value.prototype.hasStringValue = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional bool bool_value = 4;
* @return {boolean}
*/
proto.google.protobuf.Value.prototype.getBoolValue = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};
/**
* @param {boolean} value
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.setBoolValue = function(value) {
return jspb.Message.setOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.clearBoolValue = function() {
return jspb.Message.setOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.protobuf.Value.prototype.hasBoolValue = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional Struct struct_value = 5;
* @return {?proto.google.protobuf.Struct}
*/
proto.google.protobuf.Value.prototype.getStructValue = function() {
return /** @type{?proto.google.protobuf.Struct} */ (
jspb.Message.getWrapperField(this, proto.google.protobuf.Struct, 5));
};
/**
* @param {?proto.google.protobuf.Struct|undefined} value
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.setStructValue = function(value) {
return jspb.Message.setOneofWrapperField(this, 5, proto.google.protobuf.Value.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.clearStructValue = function() {
return this.setStructValue(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.protobuf.Value.prototype.hasStructValue = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional ListValue list_value = 6;
* @return {?proto.google.protobuf.ListValue}
*/
proto.google.protobuf.Value.prototype.getListValue = function() {
return /** @type{?proto.google.protobuf.ListValue} */ (
jspb.Message.getWrapperField(this, proto.google.protobuf.ListValue, 6));
};
/**
* @param {?proto.google.protobuf.ListValue|undefined} value
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.setListValue = function(value) {
return jspb.Message.setOneofWrapperField(this, 6, proto.google.protobuf.Value.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.protobuf.Value} returns this
*/
proto.google.protobuf.Value.prototype.clearListValue = function() {
return this.setListValue(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.protobuf.Value.prototype.hasListValue = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.protobuf.ListValue.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.google.protobuf.ListValue.prototype.toObject = function(opt_includeInstance) {
return proto.google.protobuf.ListValue.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.protobuf.ListValue} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.ListValue.toObject = function(includeInstance, msg) {
var f, obj = {
valuesList: jspb.Message.toObjectList(msg.getValuesList(),
proto.google.protobuf.Value.toObject, includeInstance)
};
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.protobuf.ListValue}
*/
proto.google.protobuf.ListValue.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.protobuf.ListValue;
return proto.google.protobuf.ListValue.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.protobuf.ListValue} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.protobuf.ListValue}
*/
proto.google.protobuf.ListValue.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.protobuf.Value;
reader.readMessage(value,proto.google.protobuf.Value.deserializeBinaryFromReader);
msg.addValues(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.protobuf.ListValue.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.protobuf.ListValue.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.protobuf.ListValue} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.ListValue.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValuesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.google.protobuf.Value.serializeBinaryToWriter
);
}
};
/**
* repeated Value values = 1;
* @return {!Array<!proto.google.protobuf.Value>}
*/
proto.google.protobuf.ListValue.prototype.getValuesList = function() {
return /** @type{!Array<!proto.google.protobuf.Value>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.Value, 1));
};
/**
* @param {!Array<!proto.google.protobuf.Value>} value
* @return {!proto.google.protobuf.ListValue} returns this
*/
proto.google.protobuf.ListValue.prototype.setValuesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.google.protobuf.Value=} opt_value
* @param {number=} opt_index
* @return {!proto.google.protobuf.Value}
*/
proto.google.protobuf.ListValue.prototype.addValues = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.protobuf.ListValue} returns this
*/
proto.google.protobuf.ListValue.prototype.clearValuesList = function() {
return this.setValuesList([]);
};
/**
* @enum {number}
*/
proto.google.protobuf.NullValue = {
NULL_VALUE: 0
};
goog.object.extend(exports, proto.google.protobuf);
/* This code will be inserted into generated code for
* google/protobuf/struct.proto. */
/**
* Typedef representing plain JavaScript values that can go into a
* Struct.
* @typedef {null|number|string|boolean|Array|Object}
*/
proto.google.protobuf.JavaScriptValue;
/**
* Converts this Value object to a plain JavaScript value.
* @return {?proto.google.protobuf.JavaScriptValue} a plain JavaScript
* value representing this Struct.
*/
proto.google.protobuf.Value.prototype.toJavaScript = function() {
var kindCase = proto.google.protobuf.Value.KindCase;
switch (this.getKindCase()) {
case kindCase.NULL_VALUE:
return null;
case kindCase.NUMBER_VALUE:
return this.getNumberValue();
case kindCase.STRING_VALUE:
return this.getStringValue();
case kindCase.BOOL_VALUE:
return this.getBoolValue();
case kindCase.STRUCT_VALUE:
return this.getStructValue().toJavaScript();
case kindCase.LIST_VALUE:
return this.getListValue().toJavaScript();
default:
throw new Error('Unexpected struct type');
}
};
/**
* Converts this JavaScript value to a new Value proto.
* @param {!proto.google.protobuf.JavaScriptValue} value The value to
* convert.
* @return {!proto.google.protobuf.Value} The newly constructed value.
*/
proto.google.protobuf.Value.fromJavaScript = function(value) {
var ret = new proto.google.protobuf.Value();
switch (goog.typeOf(value)) {
case 'string':
ret.setStringValue(/** @type {string} */ (value));
break;
case 'number':
ret.setNumberValue(/** @type {number} */ (value));
break;
case 'boolean':
ret.setBoolValue(/** @type {boolean} */ (value));
break;
case 'null':
ret.setNullValue(proto.google.protobuf.NullValue.NULL_VALUE);
break;
case 'array':
ret.setListValue(proto.google.protobuf.ListValue.fromJavaScript(
/** @type{!Array} */ (value)));
break;
case 'object':
ret.setStructValue(proto.google.protobuf.Struct.fromJavaScript(
/** @type{!Object} */ (value)));
break;
default:
throw new Error('Unexpected struct type.');
}
return ret;
};
/**
* Converts this ListValue object to a plain JavaScript array.
* @return {!Array} a plain JavaScript array representing this List.
*/
proto.google.protobuf.ListValue.prototype.toJavaScript = function() {
var ret = [];
var values = this.getValuesList();
for (var i = 0; i < values.length; i++) {
ret[i] = values[i].toJavaScript();
}
return ret;
};
/**
* Constructs a ListValue protobuf from this plain JavaScript array.
* @param {!Array} array a plain JavaScript array
* @return {proto.google.protobuf.ListValue} a new ListValue object
*/
proto.google.protobuf.ListValue.fromJavaScript = function(array) {
var ret = new proto.google.protobuf.ListValue();
for (var i = 0; i < array.length; i++) {
ret.addValues(proto.google.protobuf.Value.fromJavaScript(array[i]));
}
return ret;
};
/**
* Converts this Struct object to a plain JavaScript object.
* @return {!Object<string, !proto.google.protobuf.JavaScriptValue>} a plain
* JavaScript object representing this Struct.
*/
proto.google.protobuf.Struct.prototype.toJavaScript = function() {
var ret = {};
this.getFieldsMap().forEach(function(value, key) {
ret[key] = value.toJavaScript();
});
return ret;
};
/**
* Constructs a Struct protobuf from this plain JavaScript object.
* @param {!Object} obj a plain JavaScript object
* @return {proto.google.protobuf.Struct} a new Struct object
*/
proto.google.protobuf.Struct.fromJavaScript = function(obj) {
var ret = new proto.google.protobuf.Struct();
var map = ret.getFieldsMap();
for (var property in obj) {
var val = obj[property];
map.set(property, proto.google.protobuf.Value.fromJavaScript(val));
}
return ret;
};

View File

@@ -0,0 +1,242 @@
// source: google/protobuf/timestamp.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 =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
goog.exportSymbol('proto.google.protobuf.Timestamp', 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.protobuf.Timestamp = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.protobuf.Timestamp, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.protobuf.Timestamp.displayName = 'proto.google.protobuf.Timestamp';
}
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.protobuf.Timestamp.prototype.toObject = function(opt_includeInstance) {
return proto.google.protobuf.Timestamp.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.protobuf.Timestamp} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Timestamp.toObject = function(includeInstance, msg) {
var f, obj = {
seconds: jspb.Message.getFieldWithDefault(msg, 1, 0),
nanos: jspb.Message.getFieldWithDefault(msg, 2, 0)
};
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.protobuf.Timestamp}
*/
proto.google.protobuf.Timestamp.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.protobuf.Timestamp;
return proto.google.protobuf.Timestamp.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.protobuf.Timestamp} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.protobuf.Timestamp}
*/
proto.google.protobuf.Timestamp.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt64());
msg.setSeconds(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setNanos(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.protobuf.Timestamp.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.protobuf.Timestamp.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.protobuf.Timestamp} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.protobuf.Timestamp.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSeconds();
if (f !== 0) {
writer.writeInt64(
1,
f
);
}
f = message.getNanos();
if (f !== 0) {
writer.writeInt32(
2,
f
);
}
};
/**
* optional int64 seconds = 1;
* @return {number}
*/
proto.google.protobuf.Timestamp.prototype.getSeconds = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.google.protobuf.Timestamp} returns this
*/
proto.google.protobuf.Timestamp.prototype.setSeconds = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional int32 nanos = 2;
* @return {number}
*/
proto.google.protobuf.Timestamp.prototype.getNanos = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.google.protobuf.Timestamp} returns this
*/
proto.google.protobuf.Timestamp.prototype.setNanos = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
goog.object.extend(exports, proto.google.protobuf);
/* This code will be inserted into generated code for
* google/protobuf/timestamp.proto. */
/**
* Returns a JavaScript 'Date' object corresponding to this Timestamp.
* @return {!Date}
*/
proto.google.protobuf.Timestamp.prototype.toDate = function() {
var seconds = this.getSeconds();
var nanos = this.getNanos();
return new Date((seconds * 1000) + (nanos / 1000000));
};
/**
* Sets the value of this Timestamp object to be the given Date.
* @param {!Date} value The value to set.
*/
proto.google.protobuf.Timestamp.prototype.fromDate = function(value) {
this.setSeconds(Math.floor(value.getTime() / 1000));
this.setNanos(value.getMilliseconds() * 1000000);
};
/**
* Factory method that returns a Timestamp object with value equal to
* the given Date.
* @param {!Date} value The value to set.
* @return {!proto.google.protobuf.Timestamp}
*/
proto.google.protobuf.Timestamp.fromDate = function(value) {
var timestamp = new proto.google.protobuf.Timestamp();
timestamp.fromDate(value);
return timestamp;
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff