UNPKG

google-ads-node

Version:

Google Ads gRPC Client Library for Node

1,198 lines (1,023 loc) 38.7 kB
/** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); var google_rpc_status_pb = require('../../google/rpc/status_pb.js'); goog.exportSymbol('proto.google.longrunning.CancelOperationRequest', null, global); goog.exportSymbol('proto.google.longrunning.DeleteOperationRequest', null, global); goog.exportSymbol('proto.google.longrunning.GetOperationRequest', null, global); goog.exportSymbol('proto.google.longrunning.ListOperationsRequest', null, global); goog.exportSymbol('proto.google.longrunning.ListOperationsResponse', null, global); goog.exportSymbol('proto.google.longrunning.Operation', 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.longrunning.Operation = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.longrunning.Operation.oneofGroups_); }; goog.inherits(proto.google.longrunning.Operation, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.google.longrunning.Operation.displayName = 'proto.google.longrunning.Operation'; } /** * 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.longrunning.Operation.oneofGroups_ = [[4,5]]; /** * @enum {number} */ proto.google.longrunning.Operation.ResultCase = { RESULT_NOT_SET: 0, ERROR: 4, RESPONSE: 5 }; /** * @return {proto.google.longrunning.Operation.ResultCase} */ proto.google.longrunning.Operation.prototype.getResultCase = function() { return /** @type {proto.google.longrunning.Operation.ResultCase} */(jspb.Message.computeOneofCase(this, proto.google.longrunning.Operation.oneofGroups_[0])); }; 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.google.longrunning.Operation.prototype.toObject = function(opt_includeInstance) { return proto.google.longrunning.Operation.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.google.longrunning.Operation} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.Operation.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), metadata: (f = msg.getMetadata()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), done: jspb.Message.getFieldWithDefault(msg, 3, false), error: (f = msg.getError()) && google_rpc_status_pb.Status.toObject(includeInstance, f), response: (f = msg.getResponse()) && google_protobuf_any_pb.Any.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.longrunning.Operation} */ proto.google.longrunning.Operation.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.longrunning.Operation; return proto.google.longrunning.Operation.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.longrunning.Operation} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.longrunning.Operation} */ proto.google.longrunning.Operation.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.setName(value); break; case 2: var value = new google_protobuf_any_pb.Any; reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); msg.setMetadata(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setDone(value); break; case 4: var value = new google_rpc_status_pb.Status; reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); msg.setError(value); break; case 5: var value = new google_protobuf_any_pb.Any; reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); msg.setResponse(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.longrunning.Operation.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.longrunning.Operation.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.longrunning.Operation} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.Operation.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getMetadata(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_any_pb.Any.serializeBinaryToWriter ); } f = message.getDone(); if (f) { writer.writeBool( 3, f ); } f = message.getError(); if (f != null) { writer.writeMessage( 4, f, google_rpc_status_pb.Status.serializeBinaryToWriter ); } f = message.getResponse(); if (f != null) { writer.writeMessage( 5, f, google_protobuf_any_pb.Any.serializeBinaryToWriter ); } }; /** * optional string name = 1; * @return {string} */ proto.google.longrunning.Operation.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.google.longrunning.Operation.prototype.setName = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional google.protobuf.Any metadata = 2; * @return {?proto.google.protobuf.Any} */ proto.google.longrunning.Operation.prototype.getMetadata = function() { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)); }; /** @param {?proto.google.protobuf.Any|undefined} value */ proto.google.longrunning.Operation.prototype.setMetadata = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.google.longrunning.Operation.prototype.clearMetadata = function() { this.setMetadata(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.longrunning.Operation.prototype.hasMetadata = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional bool done = 3; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.google.longrunning.Operation.prototype.getDone = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); }; /** @param {boolean} value */ proto.google.longrunning.Operation.prototype.setDone = function(value) { jspb.Message.setProto3BooleanField(this, 3, value); }; /** * optional google.rpc.Status error = 4; * @return {?proto.google.rpc.Status} */ proto.google.longrunning.Operation.prototype.getError = function() { return /** @type{?proto.google.rpc.Status} */ ( jspb.Message.getWrapperField(this, google_rpc_status_pb.Status, 4)); }; /** @param {?proto.google.rpc.Status|undefined} value */ proto.google.longrunning.Operation.prototype.setError = function(value) { jspb.Message.setOneofWrapperField(this, 4, proto.google.longrunning.Operation.oneofGroups_[0], value); }; proto.google.longrunning.Operation.prototype.clearError = function() { this.setError(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.longrunning.Operation.prototype.hasError = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional google.protobuf.Any response = 5; * @return {?proto.google.protobuf.Any} */ proto.google.longrunning.Operation.prototype.getResponse = function() { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 5)); }; /** @param {?proto.google.protobuf.Any|undefined} value */ proto.google.longrunning.Operation.prototype.setResponse = function(value) { jspb.Message.setOneofWrapperField(this, 5, proto.google.longrunning.Operation.oneofGroups_[0], value); }; proto.google.longrunning.Operation.prototype.clearResponse = function() { this.setResponse(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.longrunning.Operation.prototype.hasResponse = function() { return jspb.Message.getField(this, 5) != null; }; /** * 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.longrunning.GetOperationRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.longrunning.GetOperationRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.google.longrunning.GetOperationRequest.displayName = 'proto.google.longrunning.GetOperationRequest'; } 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.google.longrunning.GetOperationRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.longrunning.GetOperationRequest.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.google.longrunning.GetOperationRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.GetOperationRequest.toObject = function(includeInstance, msg) { var f, obj = { name: 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.longrunning.GetOperationRequest} */ proto.google.longrunning.GetOperationRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.longrunning.GetOperationRequest; return proto.google.longrunning.GetOperationRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.longrunning.GetOperationRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.longrunning.GetOperationRequest} */ proto.google.longrunning.GetOperationRequest.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.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.longrunning.GetOperationRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.longrunning.GetOperationRequest.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.longrunning.GetOperationRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.GetOperationRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string name = 1; * @return {string} */ proto.google.longrunning.GetOperationRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.google.longrunning.GetOperationRequest.prototype.setName = function(value) { jspb.Message.setProto3StringField(this, 1, 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.longrunning.ListOperationsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.longrunning.ListOperationsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.google.longrunning.ListOperationsRequest.displayName = 'proto.google.longrunning.ListOperationsRequest'; } 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.google.longrunning.ListOperationsRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.longrunning.ListOperationsRequest.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.google.longrunning.ListOperationsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.ListOperationsRequest.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 4, ""), filter: jspb.Message.getFieldWithDefault(msg, 1, ""), pageSize: jspb.Message.getFieldWithDefault(msg, 2, 0), pageToken: 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.longrunning.ListOperationsRequest} */ proto.google.longrunning.ListOperationsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.longrunning.ListOperationsRequest; return proto.google.longrunning.ListOperationsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.longrunning.ListOperationsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.longrunning.ListOperationsRequest} */ proto.google.longrunning.ListOperationsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 4: var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; case 1: var value = /** @type {string} */ (reader.readString()); msg.setFilter(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setPageSize(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setPageToken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.longrunning.ListOperationsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.longrunning.ListOperationsRequest.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.longrunning.ListOperationsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.ListOperationsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getFilter(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getPageSize(); if (f !== 0) { writer.writeInt32( 2, f ); } f = message.getPageToken(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional string name = 4; * @return {string} */ proto.google.longrunning.ListOperationsRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** @param {string} value */ proto.google.longrunning.ListOperationsRequest.prototype.setName = function(value) { jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string filter = 1; * @return {string} */ proto.google.longrunning.ListOperationsRequest.prototype.getFilter = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.google.longrunning.ListOperationsRequest.prototype.setFilter = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional int32 page_size = 2; * @return {number} */ proto.google.longrunning.ListOperationsRequest.prototype.getPageSize = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ proto.google.longrunning.ListOperationsRequest.prototype.setPageSize = function(value) { jspb.Message.setProto3IntField(this, 2, value); }; /** * optional string page_token = 3; * @return {string} */ proto.google.longrunning.ListOperationsRequest.prototype.getPageToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** @param {string} value */ proto.google.longrunning.ListOperationsRequest.prototype.setPageToken = function(value) { jspb.Message.setProto3StringField(this, 3, 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.longrunning.ListOperationsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.longrunning.ListOperationsResponse.repeatedFields_, null); }; goog.inherits(proto.google.longrunning.ListOperationsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.google.longrunning.ListOperationsResponse.displayName = 'proto.google.longrunning.ListOperationsResponse'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.google.longrunning.ListOperationsResponse.repeatedFields_ = [1]; 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.google.longrunning.ListOperationsResponse.prototype.toObject = function(opt_includeInstance) { return proto.google.longrunning.ListOperationsResponse.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.google.longrunning.ListOperationsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.ListOperationsResponse.toObject = function(includeInstance, msg) { var f, obj = { operationsList: jspb.Message.toObjectList(msg.getOperationsList(), proto.google.longrunning.Operation.toObject, includeInstance), nextPageToken: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.google.longrunning.ListOperationsResponse} */ proto.google.longrunning.ListOperationsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.longrunning.ListOperationsResponse; return proto.google.longrunning.ListOperationsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.longrunning.ListOperationsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.longrunning.ListOperationsResponse} */ proto.google.longrunning.ListOperationsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.google.longrunning.Operation; reader.readMessage(value,proto.google.longrunning.Operation.deserializeBinaryFromReader); msg.addOperations(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setNextPageToken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.longrunning.ListOperationsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.longrunning.ListOperationsResponse.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.longrunning.ListOperationsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.ListOperationsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOperationsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.google.longrunning.Operation.serializeBinaryToWriter ); } f = message.getNextPageToken(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * repeated Operation operations = 1; * @return {!Array<!proto.google.longrunning.Operation>} */ proto.google.longrunning.ListOperationsResponse.prototype.getOperationsList = function() { return /** @type{!Array<!proto.google.longrunning.Operation>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.google.longrunning.Operation, 1)); }; /** @param {!Array<!proto.google.longrunning.Operation>} value */ proto.google.longrunning.ListOperationsResponse.prototype.setOperationsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.google.longrunning.Operation=} opt_value * @param {number=} opt_index * @return {!proto.google.longrunning.Operation} */ proto.google.longrunning.ListOperationsResponse.prototype.addOperations = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.longrunning.Operation, opt_index); }; proto.google.longrunning.ListOperationsResponse.prototype.clearOperationsList = function() { this.setOperationsList([]); }; /** * optional string next_page_token = 2; * @return {string} */ proto.google.longrunning.ListOperationsResponse.prototype.getNextPageToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.google.longrunning.ListOperationsResponse.prototype.setNextPageToken = function(value) { jspb.Message.setProto3StringField(this, 2, 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.longrunning.CancelOperationRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.longrunning.CancelOperationRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.google.longrunning.CancelOperationRequest.displayName = 'proto.google.longrunning.CancelOperationRequest'; } 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.google.longrunning.CancelOperationRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.longrunning.CancelOperationRequest.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.google.longrunning.CancelOperationRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.CancelOperationRequest.toObject = function(includeInstance, msg) { var f, obj = { name: 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.longrunning.CancelOperationRequest} */ proto.google.longrunning.CancelOperationRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.longrunning.CancelOperationRequest; return proto.google.longrunning.CancelOperationRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.longrunning.CancelOperationRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.longrunning.CancelOperationRequest} */ proto.google.longrunning.CancelOperationRequest.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.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.longrunning.CancelOperationRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.longrunning.CancelOperationRequest.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.longrunning.CancelOperationRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.CancelOperationRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string name = 1; * @return {string} */ proto.google.longrunning.CancelOperationRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.google.longrunning.CancelOperationRequest.prototype.setName = function(value) { jspb.Message.setProto3StringField(this, 1, 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.longrunning.DeleteOperationRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.longrunning.DeleteOperationRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.google.longrunning.DeleteOperationRequest.displayName = 'proto.google.longrunning.DeleteOperationRequest'; } 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.google.longrunning.DeleteOperationRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.longrunning.DeleteOperationRequest.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.google.longrunning.DeleteOperationRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.DeleteOperationRequest.toObject = function(includeInstance, msg) { var f, obj = { name: 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.longrunning.DeleteOperationRequest} */ proto.google.longrunning.DeleteOperationRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.longrunning.DeleteOperationRequest; return proto.google.longrunning.DeleteOperationRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.longrunning.DeleteOperationRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.longrunning.DeleteOperationRequest} */ proto.google.longrunning.DeleteOperationRequest.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.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.longrunning.DeleteOperationRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.longrunning.DeleteOperationRequest.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.longrunning.DeleteOperationRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.longrunning.DeleteOperationRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string name = 1; * @return {string} */ proto.google.longrunning.DeleteOperationRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.google.longrunning.DeleteOperationRequest.prototype.setName = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; goog.object.extend(exports, proto.google.longrunning);