UNPKG

@ondewo/csi-client-nodejs

Version:

ONDEWO Communication System Integration (CSI) Client library for Nodejs

1,333 lines (1,147 loc) 40.9 kB
// source: google/logging/v2/log_entry.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); var google_api_monitored_resource_pb = require('../../../google/api/monitored_resource_pb.js'); goog.object.extend(proto, google_api_monitored_resource_pb); var google_logging_type_http_request_pb = require('../../../google/logging/type/http_request_pb.js'); goog.object.extend(proto, google_logging_type_http_request_pb); var google_logging_type_log_severity_pb = require('../../../google/logging/type/log_severity_pb.js'); goog.object.extend(proto, google_logging_type_log_severity_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); goog.object.extend(proto, google_protobuf_struct_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.google.logging.v2.LogEntry', null, global); goog.exportSymbol('proto.google.logging.v2.LogEntry.PayloadCase', null, global); goog.exportSymbol('proto.google.logging.v2.LogEntryOperation', null, global); goog.exportSymbol('proto.google.logging.v2.LogEntrySourceLocation', 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.logging.v2.LogEntry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.logging.v2.LogEntry.oneofGroups_); }; goog.inherits(proto.google.logging.v2.LogEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.logging.v2.LogEntry.displayName = 'proto.google.logging.v2.LogEntry'; } /** * 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.logging.v2.LogEntryOperation = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.logging.v2.LogEntryOperation, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.logging.v2.LogEntryOperation.displayName = 'proto.google.logging.v2.LogEntryOperation'; } /** * 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.logging.v2.LogEntrySourceLocation = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.logging.v2.LogEntrySourceLocation, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.logging.v2.LogEntrySourceLocation.displayName = 'proto.google.logging.v2.LogEntrySourceLocation'; } /** * 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.logging.v2.LogEntry.oneofGroups_ = [[2,3,6]]; /** * @enum {number} */ proto.google.logging.v2.LogEntry.PayloadCase = { PAYLOAD_NOT_SET: 0, PROTO_PAYLOAD: 2, TEXT_PAYLOAD: 3, JSON_PAYLOAD: 6 }; /** * @return {proto.google.logging.v2.LogEntry.PayloadCase} */ proto.google.logging.v2.LogEntry.prototype.getPayloadCase = function() { return /** @type {proto.google.logging.v2.LogEntry.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.google.logging.v2.LogEntry.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.logging.v2.LogEntry.prototype.toObject = function(opt_includeInstance) { return proto.google.logging.v2.LogEntry.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.logging.v2.LogEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.logging.v2.LogEntry.toObject = function(includeInstance, msg) { var f, obj = { logName: jspb.Message.getFieldWithDefault(msg, 12, ""), resource: (f = msg.getResource()) && google_api_monitored_resource_pb.MonitoredResource.toObject(includeInstance, f), protoPayload: (f = msg.getProtoPayload()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), textPayload: jspb.Message.getFieldWithDefault(msg, 3, ""), jsonPayload: (f = msg.getJsonPayload()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), receiveTimestamp: (f = msg.getReceiveTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), severity: jspb.Message.getFieldWithDefault(msg, 10, 0), insertId: jspb.Message.getFieldWithDefault(msg, 4, ""), httpRequest: (f = msg.getHttpRequest()) && google_logging_type_http_request_pb.HttpRequest.toObject(includeInstance, f), labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [], metadata: (f = msg.getMetadata()) && google_api_monitored_resource_pb.MonitoredResourceMetadata.toObject(includeInstance, f), operation: (f = msg.getOperation()) && proto.google.logging.v2.LogEntryOperation.toObject(includeInstance, f), trace: jspb.Message.getFieldWithDefault(msg, 22, ""), spanId: jspb.Message.getFieldWithDefault(msg, 27, ""), sourceLocation: (f = msg.getSourceLocation()) && proto.google.logging.v2.LogEntrySourceLocation.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.logging.v2.LogEntry} */ proto.google.logging.v2.LogEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.logging.v2.LogEntry; return proto.google.logging.v2.LogEntry.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.logging.v2.LogEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.logging.v2.LogEntry} */ proto.google.logging.v2.LogEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 12: var value = /** @type {string} */ (reader.readString()); msg.setLogName(value); break; case 8: var value = new google_api_monitored_resource_pb.MonitoredResource; reader.readMessage(value,google_api_monitored_resource_pb.MonitoredResource.deserializeBinaryFromReader); msg.setResource(value); break; case 2: var value = new google_protobuf_any_pb.Any; reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); msg.setProtoPayload(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setTextPayload(value); break; case 6: var value = new google_protobuf_struct_pb.Struct; reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); msg.setJsonPayload(value); break; case 9: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setTimestamp(value); break; case 24: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setReceiveTimestamp(value); break; case 10: var value = /** @type {!proto.google.logging.type.LogSeverity} */ (reader.readEnum()); msg.setSeverity(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setInsertId(value); break; case 7: var value = new google_logging_type_http_request_pb.HttpRequest; reader.readMessage(value,google_logging_type_http_request_pb.HttpRequest.deserializeBinaryFromReader); msg.setHttpRequest(value); break; case 11: var value = msg.getLabelsMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; case 25: var value = new google_api_monitored_resource_pb.MonitoredResourceMetadata; reader.readMessage(value,google_api_monitored_resource_pb.MonitoredResourceMetadata.deserializeBinaryFromReader); msg.setMetadata(value); break; case 15: var value = new proto.google.logging.v2.LogEntryOperation; reader.readMessage(value,proto.google.logging.v2.LogEntryOperation.deserializeBinaryFromReader); msg.setOperation(value); break; case 22: var value = /** @type {string} */ (reader.readString()); msg.setTrace(value); break; case 27: var value = /** @type {string} */ (reader.readString()); msg.setSpanId(value); break; case 23: var value = new proto.google.logging.v2.LogEntrySourceLocation; reader.readMessage(value,proto.google.logging.v2.LogEntrySourceLocation.deserializeBinaryFromReader); msg.setSourceLocation(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.logging.v2.LogEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.logging.v2.LogEntry.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.logging.v2.LogEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.logging.v2.LogEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getLogName(); if (f.length > 0) { writer.writeString( 12, f ); } f = message.getResource(); if (f != null) { writer.writeMessage( 8, f, google_api_monitored_resource_pb.MonitoredResource.serializeBinaryToWriter ); } f = message.getProtoPayload(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_any_pb.Any.serializeBinaryToWriter ); } f = /** @type {string} */ (jspb.Message.getField(message, 3)); if (f != null) { writer.writeString( 3, f ); } f = message.getJsonPayload(); if (f != null) { writer.writeMessage( 6, f, google_protobuf_struct_pb.Struct.serializeBinaryToWriter ); } f = message.getTimestamp(); if (f != null) { writer.writeMessage( 9, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getReceiveTimestamp(); if (f != null) { writer.writeMessage( 24, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } f = message.getSeverity(); if (f !== 0.0) { writer.writeEnum( 10, f ); } f = message.getInsertId(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getHttpRequest(); if (f != null) { writer.writeMessage( 7, f, google_logging_type_http_request_pb.HttpRequest.serializeBinaryToWriter ); } f = message.getLabelsMap(true); if (f && f.getLength() > 0) { f.serializeBinary(11, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getMetadata(); if (f != null) { writer.writeMessage( 25, f, google_api_monitored_resource_pb.MonitoredResourceMetadata.serializeBinaryToWriter ); } f = message.getOperation(); if (f != null) { writer.writeMessage( 15, f, proto.google.logging.v2.LogEntryOperation.serializeBinaryToWriter ); } f = message.getTrace(); if (f.length > 0) { writer.writeString( 22, f ); } f = message.getSpanId(); if (f.length > 0) { writer.writeString( 27, f ); } f = message.getSourceLocation(); if (f != null) { writer.writeMessage( 23, f, proto.google.logging.v2.LogEntrySourceLocation.serializeBinaryToWriter ); } }; /** * optional string log_name = 12; * @return {string} */ proto.google.logging.v2.LogEntry.prototype.getLogName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** * @param {string} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setLogName = function(value) { return jspb.Message.setProto3StringField(this, 12, value); }; /** * optional google.api.MonitoredResource resource = 8; * @return {?proto.google.api.MonitoredResource} */ proto.google.logging.v2.LogEntry.prototype.getResource = function() { return /** @type{?proto.google.api.MonitoredResource} */ ( jspb.Message.getWrapperField(this, google_api_monitored_resource_pb.MonitoredResource, 8)); }; /** * @param {?proto.google.api.MonitoredResource|undefined} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setResource = function(value) { return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearResource = function() { return this.setResource(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasResource = function() { return jspb.Message.getField(this, 8) != null; }; /** * optional google.protobuf.Any proto_payload = 2; * @return {?proto.google.protobuf.Any} */ proto.google.logging.v2.LogEntry.prototype.getProtoPayload = function() { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); }; /** * @param {?proto.google.protobuf.Any|undefined} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setProtoPayload = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.google.logging.v2.LogEntry.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearProtoPayload = function() { return this.setProtoPayload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasProtoPayload = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional string text_payload = 3; * @return {string} */ proto.google.logging.v2.LogEntry.prototype.getTextPayload = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setTextPayload = function(value) { return jspb.Message.setOneofField(this, 3, proto.google.logging.v2.LogEntry.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearTextPayload = function() { return jspb.Message.setOneofField(this, 3, proto.google.logging.v2.LogEntry.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasTextPayload = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional google.protobuf.Struct json_payload = 6; * @return {?proto.google.protobuf.Struct} */ proto.google.logging.v2.LogEntry.prototype.getJsonPayload = function() { return /** @type{?proto.google.protobuf.Struct} */ ( jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 6)); }; /** * @param {?proto.google.protobuf.Struct|undefined} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setJsonPayload = function(value) { return jspb.Message.setOneofWrapperField(this, 6, proto.google.logging.v2.LogEntry.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearJsonPayload = function() { return this.setJsonPayload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasJsonPayload = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional google.protobuf.Timestamp timestamp = 9; * @return {?proto.google.protobuf.Timestamp} */ proto.google.logging.v2.LogEntry.prototype.getTimestamp = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setTimestamp = function(value) { return jspb.Message.setWrapperField(this, 9, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearTimestamp = function() { return this.setTimestamp(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasTimestamp = function() { return jspb.Message.getField(this, 9) != null; }; /** * optional google.protobuf.Timestamp receive_timestamp = 24; * @return {?proto.google.protobuf.Timestamp} */ proto.google.logging.v2.LogEntry.prototype.getReceiveTimestamp = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 24)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setReceiveTimestamp = function(value) { return jspb.Message.setWrapperField(this, 24, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearReceiveTimestamp = function() { return this.setReceiveTimestamp(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasReceiveTimestamp = function() { return jspb.Message.getField(this, 24) != null; }; /** * optional google.logging.type.LogSeverity severity = 10; * @return {!proto.google.logging.type.LogSeverity} */ proto.google.logging.v2.LogEntry.prototype.getSeverity = function() { return /** @type {!proto.google.logging.type.LogSeverity} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** * @param {!proto.google.logging.type.LogSeverity} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setSeverity = function(value) { return jspb.Message.setProto3EnumField(this, 10, value); }; /** * optional string insert_id = 4; * @return {string} */ proto.google.logging.v2.LogEntry.prototype.getInsertId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setInsertId = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional google.logging.type.HttpRequest http_request = 7; * @return {?proto.google.logging.type.HttpRequest} */ proto.google.logging.v2.LogEntry.prototype.getHttpRequest = function() { return /** @type{?proto.google.logging.type.HttpRequest} */ ( jspb.Message.getWrapperField(this, google_logging_type_http_request_pb.HttpRequest, 7)); }; /** * @param {?proto.google.logging.type.HttpRequest|undefined} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setHttpRequest = function(value) { return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearHttpRequest = function() { return this.setHttpRequest(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasHttpRequest = function() { return jspb.Message.getField(this, 7) != null; }; /** * map<string, string> labels = 11; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<string,string>} */ proto.google.logging.v2.LogEntry.prototype.getLabelsMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<string,string>} */ ( jspb.Message.getMapField(this, 11, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearLabelsMap = function() { this.getLabelsMap().clear(); return this;}; /** * optional google.api.MonitoredResourceMetadata metadata = 25; * @return {?proto.google.api.MonitoredResourceMetadata} */ proto.google.logging.v2.LogEntry.prototype.getMetadata = function() { return /** @type{?proto.google.api.MonitoredResourceMetadata} */ ( jspb.Message.getWrapperField(this, google_api_monitored_resource_pb.MonitoredResourceMetadata, 25)); }; /** * @param {?proto.google.api.MonitoredResourceMetadata|undefined} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setMetadata = function(value) { return jspb.Message.setWrapperField(this, 25, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasMetadata = function() { return jspb.Message.getField(this, 25) != null; }; /** * optional LogEntryOperation operation = 15; * @return {?proto.google.logging.v2.LogEntryOperation} */ proto.google.logging.v2.LogEntry.prototype.getOperation = function() { return /** @type{?proto.google.logging.v2.LogEntryOperation} */ ( jspb.Message.getWrapperField(this, proto.google.logging.v2.LogEntryOperation, 15)); }; /** * @param {?proto.google.logging.v2.LogEntryOperation|undefined} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setOperation = function(value) { return jspb.Message.setWrapperField(this, 15, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearOperation = function() { return this.setOperation(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasOperation = function() { return jspb.Message.getField(this, 15) != null; }; /** * optional string trace = 22; * @return {string} */ proto.google.logging.v2.LogEntry.prototype.getTrace = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 22, "")); }; /** * @param {string} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setTrace = function(value) { return jspb.Message.setProto3StringField(this, 22, value); }; /** * optional string span_id = 27; * @return {string} */ proto.google.logging.v2.LogEntry.prototype.getSpanId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, "")); }; /** * @param {string} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setSpanId = function(value) { return jspb.Message.setProto3StringField(this, 27, value); }; /** * optional LogEntrySourceLocation source_location = 23; * @return {?proto.google.logging.v2.LogEntrySourceLocation} */ proto.google.logging.v2.LogEntry.prototype.getSourceLocation = function() { return /** @type{?proto.google.logging.v2.LogEntrySourceLocation} */ ( jspb.Message.getWrapperField(this, proto.google.logging.v2.LogEntrySourceLocation, 23)); }; /** * @param {?proto.google.logging.v2.LogEntrySourceLocation|undefined} value * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.setSourceLocation = function(value) { return jspb.Message.setWrapperField(this, 23, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.logging.v2.LogEntry} returns this */ proto.google.logging.v2.LogEntry.prototype.clearSourceLocation = function() { return this.setSourceLocation(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.logging.v2.LogEntry.prototype.hasSourceLocation = function() { return jspb.Message.getField(this, 23) != 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.google.logging.v2.LogEntryOperation.prototype.toObject = function(opt_includeInstance) { return proto.google.logging.v2.LogEntryOperation.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.logging.v2.LogEntryOperation} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.logging.v2.LogEntryOperation.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), producer: jspb.Message.getFieldWithDefault(msg, 2, ""), first: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), last: 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.google.logging.v2.LogEntryOperation} */ proto.google.logging.v2.LogEntryOperation.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.logging.v2.LogEntryOperation; return proto.google.logging.v2.LogEntryOperation.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.logging.v2.LogEntryOperation} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.logging.v2.LogEntryOperation} */ proto.google.logging.v2.LogEntryOperation.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setProducer(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setFirst(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setLast(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.logging.v2.LogEntryOperation.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.logging.v2.LogEntryOperation.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.logging.v2.LogEntryOperation} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.logging.v2.LogEntryOperation.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getProducer(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getFirst(); if (f) { writer.writeBool( 3, f ); } f = message.getLast(); if (f) { writer.writeBool( 4, f ); } }; /** * optional string id = 1; * @return {string} */ proto.google.logging.v2.LogEntryOperation.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.logging.v2.LogEntryOperation} returns this */ proto.google.logging.v2.LogEntryOperation.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string producer = 2; * @return {string} */ proto.google.logging.v2.LogEntryOperation.prototype.getProducer = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.logging.v2.LogEntryOperation} returns this */ proto.google.logging.v2.LogEntryOperation.prototype.setProducer = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional bool first = 3; * @return {boolean} */ proto.google.logging.v2.LogEntryOperation.prototype.getFirst = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value * @return {!proto.google.logging.v2.LogEntryOperation} returns this */ proto.google.logging.v2.LogEntryOperation.prototype.setFirst = function(value) { return jspb.Message.setProto3BooleanField(this, 3, value); }; /** * optional bool last = 4; * @return {boolean} */ proto.google.logging.v2.LogEntryOperation.prototype.getLast = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value * @return {!proto.google.logging.v2.LogEntryOperation} returns this */ proto.google.logging.v2.LogEntryOperation.prototype.setLast = function(value) { return jspb.Message.setProto3BooleanField(this, 4, 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.logging.v2.LogEntrySourceLocation.prototype.toObject = function(opt_includeInstance) { return proto.google.logging.v2.LogEntrySourceLocation.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.logging.v2.LogEntrySourceLocation} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.logging.v2.LogEntrySourceLocation.toObject = function(includeInstance, msg) { var f, obj = { file: jspb.Message.getFieldWithDefault(msg, 1, ""), line: jspb.Message.getFieldWithDefault(msg, 2, 0), pb_function: 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.logging.v2.LogEntrySourceLocation} */ proto.google.logging.v2.LogEntrySourceLocation.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.logging.v2.LogEntrySourceLocation; return proto.google.logging.v2.LogEntrySourceLocation.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.logging.v2.LogEntrySourceLocation} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.logging.v2.LogEntrySourceLocation} */ proto.google.logging.v2.LogEntrySourceLocation.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.setFile(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setLine(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setFunction(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.logging.v2.LogEntrySourceLocation.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.logging.v2.LogEntrySourceLocation.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.logging.v2.LogEntrySourceLocation} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.logging.v2.LogEntrySourceLocation.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFile(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getLine(); if (f !== 0) { writer.writeInt64( 2, f ); } f = message.getFunction(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional string file = 1; * @return {string} */ proto.google.logging.v2.LogEntrySourceLocation.prototype.getFile = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.logging.v2.LogEntrySourceLocation} returns this */ proto.google.logging.v2.LogEntrySourceLocation.prototype.setFile = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional int64 line = 2; * @return {number} */ proto.google.logging.v2.LogEntrySourceLocation.prototype.getLine = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.google.logging.v2.LogEntrySourceLocation} returns this */ proto.google.logging.v2.LogEntrySourceLocation.prototype.setLine = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional string function = 3; * @return {string} */ proto.google.logging.v2.LogEntrySourceLocation.prototype.getFunction = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.google.logging.v2.LogEntrySourceLocation} returns this */ proto.google.logging.v2.LogEntrySourceLocation.prototype.setFunction = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; goog.object.extend(exports, proto.google.logging.v2);