2020/lib/eme/licenseRequestReader.js (462 lines of code) (raw):

/** * @license * Copyright 2019 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.yts_eme.LicenseRequest'); goog.provide('proto.yts_eme.Message'); goog.provide('proto.yts_eme.RequestId'); goog.provide('proto.yts_eme.RequestInfo'); goog.provide('proto.yts_eme.RequestInfo.Info'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); goog.require('jspb.Message'); /** * 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.yts_eme.Message = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.yts_eme.Message, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.yts_eme.Message.displayName = 'proto.yts_eme.Message'; } /** * 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.yts_eme.LicenseRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.yts_eme.LicenseRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.yts_eme.LicenseRequest.displayName = 'proto.yts_eme.LicenseRequest'; } /** * 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.yts_eme.RequestInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.yts_eme.RequestInfo.repeatedFields_, null); }; goog.inherits(proto.yts_eme.RequestInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.yts_eme.RequestInfo.displayName = 'proto.yts_eme.RequestInfo'; } /** * 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.yts_eme.RequestInfo.Info = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.yts_eme.RequestInfo.Info, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.yts_eme.RequestInfo.Info.displayName = 'proto.yts_eme.RequestInfo.Info'; } /** * 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.yts_eme.RequestId = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.yts_eme.RequestId, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.yts_eme.RequestId.displayName = 'proto.yts_eme.RequestId'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.yts_eme.Message.prototype.toObject = function(opt_includeInstance) { return proto.yts_eme.Message.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.yts_eme.Message} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.Message.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getField(msg, 1), msg: msg.getMsg_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.yts_eme.Message} */ proto.yts_eme.Message.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.yts_eme.Message; return proto.yts_eme.Message.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.yts_eme.Message} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.yts_eme.Message} */ proto.yts_eme.Message.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt32()); msg.setId(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setMsg(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.yts_eme.Message.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.yts_eme.Message.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.yts_eme.Message} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.Message.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {number} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeInt32( 1, f ); } f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeBytes( 2, f ); } }; /** * optional int32 id = 1; * @return {number} */ proto.yts_eme.Message.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ proto.yts_eme.Message.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. */ proto.yts_eme.Message.prototype.clearId = function() { jspb.Message.setField(this, 1, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.yts_eme.Message.prototype.hasId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional bytes msg = 2; * @return {!(string|Uint8Array)} */ proto.yts_eme.Message.prototype.getMsg = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes msg = 2; * This is a type-conversion wrapper around `getMsg()` * @return {string} */ proto.yts_eme.Message.prototype.getMsg_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getMsg())); }; /** * optional bytes msg = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getMsg()` * @return {!Uint8Array} */ proto.yts_eme.Message.prototype.getMsg_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getMsg())); }; /** @param {!(string|Uint8Array)} value */ proto.yts_eme.Message.prototype.setMsg = function(value) { jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. */ proto.yts_eme.Message.prototype.clearMsg = function() { jspb.Message.setField(this, 2, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.yts_eme.Message.prototype.hasMsg = function() { return jspb.Message.getField(this, 2) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.yts_eme.LicenseRequest.prototype.toObject = function(opt_includeInstance) { return proto.yts_eme.LicenseRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.yts_eme.LicenseRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.LicenseRequest.toObject = function(includeInstance, msg) { var f, obj = { requestInfo: (f = msg.getRequestInfo()) && proto.yts_eme.RequestInfo.toObject(includeInstance, f), requestId: (f = msg.getRequestId()) && proto.yts_eme.RequestId.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.yts_eme.LicenseRequest} */ proto.yts_eme.LicenseRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.yts_eme.LicenseRequest; return proto.yts_eme.LicenseRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.yts_eme.LicenseRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.yts_eme.LicenseRequest} */ proto.yts_eme.LicenseRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.yts_eme.RequestInfo; reader.readMessage(value,proto.yts_eme.RequestInfo.deserializeBinaryFromReader); msg.setRequestInfo(value); break; case 8: var value = new proto.yts_eme.RequestId; reader.readMessage(value,proto.yts_eme.RequestId.deserializeBinaryFromReader); msg.setRequestId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.yts_eme.LicenseRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.yts_eme.LicenseRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.yts_eme.LicenseRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.LicenseRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRequestInfo(); if (f != null) { writer.writeMessage( 1, f, proto.yts_eme.RequestInfo.serializeBinaryToWriter ); } f = message.getRequestId(); if (f != null) { writer.writeMessage( 8, f, proto.yts_eme.RequestId.serializeBinaryToWriter ); } }; /** * optional RequestInfo request_info = 1; * @return {?proto.yts_eme.RequestInfo} */ proto.yts_eme.LicenseRequest.prototype.getRequestInfo = function() { return /** @type{?proto.yts_eme.RequestInfo} */ ( jspb.Message.getWrapperField(this, proto.yts_eme.RequestInfo, 1)); }; /** @param {?proto.yts_eme.RequestInfo|undefined} value */ proto.yts_eme.LicenseRequest.prototype.setRequestInfo = function(value) { jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. */ proto.yts_eme.LicenseRequest.prototype.clearRequestInfo = function() { this.setRequestInfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.yts_eme.LicenseRequest.prototype.hasRequestInfo = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional RequestId request_id = 8; * @return {?proto.yts_eme.RequestId} */ proto.yts_eme.LicenseRequest.prototype.getRequestId = function() { return /** @type{?proto.yts_eme.RequestId} */ ( jspb.Message.getWrapperField(this, proto.yts_eme.RequestId, 8)); }; /** @param {?proto.yts_eme.RequestId|undefined} value */ proto.yts_eme.LicenseRequest.prototype.setRequestId = function(value) { jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. */ proto.yts_eme.LicenseRequest.prototype.clearRequestId = function() { this.setRequestId(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.yts_eme.LicenseRequest.prototype.hasRequestId = function() { return jspb.Message.getField(this, 8) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.yts_eme.RequestInfo.repeatedFields_ = [3]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.yts_eme.RequestInfo.prototype.toObject = function(opt_includeInstance) { return proto.yts_eme.RequestInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.yts_eme.RequestInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.RequestInfo.toObject = function(includeInstance, msg) { var f, obj = { infoList: jspb.Message.toObjectList(msg.getInfoList(), proto.yts_eme.RequestInfo.Info.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.yts_eme.RequestInfo} */ proto.yts_eme.RequestInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.yts_eme.RequestInfo; return proto.yts_eme.RequestInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.yts_eme.RequestInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.yts_eme.RequestInfo} */ proto.yts_eme.RequestInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 3: var value = new proto.yts_eme.RequestInfo.Info; reader.readMessage(value,proto.yts_eme.RequestInfo.Info.deserializeBinaryFromReader); msg.addInfo(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.yts_eme.RequestInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.yts_eme.RequestInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.yts_eme.RequestInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.RequestInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getInfoList(); if (f.length > 0) { writer.writeRepeatedMessage( 3, f, proto.yts_eme.RequestInfo.Info.serializeBinaryToWriter ); } }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.yts_eme.RequestInfo.Info.prototype.toObject = function(opt_includeInstance) { return proto.yts_eme.RequestInfo.Info.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.yts_eme.RequestInfo.Info} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.RequestInfo.Info.toObject = function(includeInstance, msg) { var f, obj = { key: jspb.Message.getField(msg, 1), value: jspb.Message.getField(msg, 2) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.yts_eme.RequestInfo.Info} */ proto.yts_eme.RequestInfo.Info.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.yts_eme.RequestInfo.Info; return proto.yts_eme.RequestInfo.Info.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.yts_eme.RequestInfo.Info} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.yts_eme.RequestInfo.Info} */ proto.yts_eme.RequestInfo.Info.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setKey(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setValue(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.yts_eme.RequestInfo.Info.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.yts_eme.RequestInfo.Info.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.yts_eme.RequestInfo.Info} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.RequestInfo.Info.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeString( 1, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeString( 2, f ); } }; /** * optional string key = 1; * @return {string} */ proto.yts_eme.RequestInfo.Info.prototype.getKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.yts_eme.RequestInfo.Info.prototype.setKey = function(value) { jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. */ proto.yts_eme.RequestInfo.Info.prototype.clearKey = function() { jspb.Message.setField(this, 1, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.yts_eme.RequestInfo.Info.prototype.hasKey = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string value = 2; * @return {string} */ proto.yts_eme.RequestInfo.Info.prototype.getValue = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.yts_eme.RequestInfo.Info.prototype.setValue = function(value) { jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. */ proto.yts_eme.RequestInfo.Info.prototype.clearValue = function() { jspb.Message.setField(this, 2, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.yts_eme.RequestInfo.Info.prototype.hasValue = function() { return jspb.Message.getField(this, 2) != null; }; /** * repeated Info info = 3; * @return {!Array<!proto.yts_eme.RequestInfo.Info>} */ proto.yts_eme.RequestInfo.prototype.getInfoList = function() { return /** @type{!Array<!proto.yts_eme.RequestInfo.Info>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.yts_eme.RequestInfo.Info, 3)); }; /** @param {!Array<!proto.yts_eme.RequestInfo.Info>} value */ proto.yts_eme.RequestInfo.prototype.setInfoList = function(value) { jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** * @param {!proto.yts_eme.RequestInfo.Info=} opt_value * @param {number=} opt_index * @return {!proto.yts_eme.RequestInfo.Info} */ proto.yts_eme.RequestInfo.prototype.addInfo = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.yts_eme.RequestInfo.Info, opt_index); }; /** * Clears the list making it empty but non-null. */ proto.yts_eme.RequestInfo.prototype.clearInfoList = function() { this.setInfoList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.yts_eme.RequestId.prototype.toObject = function(opt_includeInstance) { return proto.yts_eme.RequestId.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.yts_eme.RequestId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.RequestId.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId_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.yts_eme.RequestId} */ proto.yts_eme.RequestId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.yts_eme.RequestId; return proto.yts_eme.RequestId.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.yts_eme.RequestId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.yts_eme.RequestId} */ proto.yts_eme.RequestId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.yts_eme.RequestId.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.yts_eme.RequestId.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.yts_eme.RequestId} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.yts_eme.RequestId.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); if (f != null) { writer.writeBytes( 3, f ); } }; /** * optional bytes id = 3; * @return {!(string|Uint8Array)} */ proto.yts_eme.RequestId.prototype.getId = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * optional bytes id = 3; * This is a type-conversion wrapper around `getId()` * @return {string} */ proto.yts_eme.RequestId.prototype.getId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getId())); }; /** * optional bytes id = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getId()` * @return {!Uint8Array} */ proto.yts_eme.RequestId.prototype.getId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getId())); }; /** @param {!(string|Uint8Array)} value */ proto.yts_eme.RequestId.prototype.setId = function(value) { jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. */ proto.yts_eme.RequestId.prototype.clearId = function() { jspb.Message.setField(this, 3, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.yts_eme.RequestId.prototype.hasId = function() { return jspb.Message.getField(this, 3) != null; };