UNPKG

google-ads-node

Version:

Google Ads gRPC Client Library for Node

1,139 lines (948 loc) 40.1 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_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.exportSymbol('proto.google.ads.googleads.v0.resources.CallReportingSetting', null, global); goog.exportSymbol('proto.google.ads.googleads.v0.resources.ConversionTrackingSetting', null, global); goog.exportSymbol('proto.google.ads.googleads.v0.resources.Customer', 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.ads.googleads.v0.resources.Customer = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.ads.googleads.v0.resources.Customer, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.google.ads.googleads.v0.resources.Customer.displayName = 'proto.google.ads.googleads.v0.resources.Customer'; } 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.ads.googleads.v0.resources.Customer.prototype.toObject = function(opt_includeInstance) { return proto.google.ads.googleads.v0.resources.Customer.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.ads.googleads.v0.resources.Customer} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.ads.googleads.v0.resources.Customer.toObject = function(includeInstance, msg) { var f, obj = { resourceName: jspb.Message.getFieldWithDefault(msg, 1, ""), id: (f = msg.getId()) && google_protobuf_wrappers_pb.Int64Value.toObject(includeInstance, f), descriptiveName: (f = msg.getDescriptiveName()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f), currencyCode: (f = msg.getCurrencyCode()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f), timeZone: (f = msg.getTimeZone()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f), trackingUrlTemplate: (f = msg.getTrackingUrlTemplate()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f), finalUrlSuffix: (f = msg.getFinalUrlSuffix()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f), autoTaggingEnabled: (f = msg.getAutoTaggingEnabled()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f), hasPartnersBadge: (f = msg.getHasPartnersBadge()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f), manager: (f = msg.getManager()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f), testAccount: (f = msg.getTestAccount()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f), callReportingSetting: (f = msg.getCallReportingSetting()) && proto.google.ads.googleads.v0.resources.CallReportingSetting.toObject(includeInstance, f), conversionTrackingSetting: (f = msg.getConversionTrackingSetting()) && proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.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.ads.googleads.v0.resources.Customer} */ proto.google.ads.googleads.v0.resources.Customer.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.ads.googleads.v0.resources.Customer; return proto.google.ads.googleads.v0.resources.Customer.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.ads.googleads.v0.resources.Customer} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.ads.googleads.v0.resources.Customer} */ proto.google.ads.googleads.v0.resources.Customer.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.setResourceName(value); break; case 3: var value = new google_protobuf_wrappers_pb.Int64Value; reader.readMessage(value,google_protobuf_wrappers_pb.Int64Value.deserializeBinaryFromReader); msg.setId(value); break; case 4: var value = new google_protobuf_wrappers_pb.StringValue; reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader); msg.setDescriptiveName(value); break; case 5: var value = new google_protobuf_wrappers_pb.StringValue; reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader); msg.setCurrencyCode(value); break; case 6: var value = new google_protobuf_wrappers_pb.StringValue; reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader); msg.setTimeZone(value); break; case 7: var value = new google_protobuf_wrappers_pb.StringValue; reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader); msg.setTrackingUrlTemplate(value); break; case 11: var value = new google_protobuf_wrappers_pb.StringValue; reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader); msg.setFinalUrlSuffix(value); break; case 8: var value = new google_protobuf_wrappers_pb.BoolValue; reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader); msg.setAutoTaggingEnabled(value); break; case 9: var value = new google_protobuf_wrappers_pb.BoolValue; reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader); msg.setHasPartnersBadge(value); break; case 12: var value = new google_protobuf_wrappers_pb.BoolValue; reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader); msg.setManager(value); break; case 13: var value = new google_protobuf_wrappers_pb.BoolValue; reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader); msg.setTestAccount(value); break; case 10: var value = new proto.google.ads.googleads.v0.resources.CallReportingSetting; reader.readMessage(value,proto.google.ads.googleads.v0.resources.CallReportingSetting.deserializeBinaryFromReader); msg.setCallReportingSetting(value); break; case 14: var value = new proto.google.ads.googleads.v0.resources.ConversionTrackingSetting; reader.readMessage(value,proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.deserializeBinaryFromReader); msg.setConversionTrackingSetting(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.ads.googleads.v0.resources.Customer.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.ads.googleads.v0.resources.Customer.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.ads.googleads.v0.resources.Customer} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.ads.googleads.v0.resources.Customer.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getResourceName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getId(); if (f != null) { writer.writeMessage( 3, f, google_protobuf_wrappers_pb.Int64Value.serializeBinaryToWriter ); } f = message.getDescriptiveName(); if (f != null) { writer.writeMessage( 4, f, google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter ); } f = message.getCurrencyCode(); if (f != null) { writer.writeMessage( 5, f, google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter ); } f = message.getTimeZone(); if (f != null) { writer.writeMessage( 6, f, google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter ); } f = message.getTrackingUrlTemplate(); if (f != null) { writer.writeMessage( 7, f, google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter ); } f = message.getFinalUrlSuffix(); if (f != null) { writer.writeMessage( 11, f, google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter ); } f = message.getAutoTaggingEnabled(); if (f != null) { writer.writeMessage( 8, f, google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter ); } f = message.getHasPartnersBadge(); if (f != null) { writer.writeMessage( 9, f, google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter ); } f = message.getManager(); if (f != null) { writer.writeMessage( 12, f, google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter ); } f = message.getTestAccount(); if (f != null) { writer.writeMessage( 13, f, google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter ); } f = message.getCallReportingSetting(); if (f != null) { writer.writeMessage( 10, f, proto.google.ads.googleads.v0.resources.CallReportingSetting.serializeBinaryToWriter ); } f = message.getConversionTrackingSetting(); if (f != null) { writer.writeMessage( 14, f, proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.serializeBinaryToWriter ); } }; /** * optional string resource_name = 1; * @return {string} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getResourceName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setResourceName = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional google.protobuf.Int64Value id = 3; * @return {?proto.google.protobuf.Int64Value} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getId = function() { return /** @type{?proto.google.protobuf.Int64Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.Int64Value, 3)); }; /** @param {?proto.google.protobuf.Int64Value|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setId = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearId = function() { this.setId(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasId = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional google.protobuf.StringValue descriptive_name = 4; * @return {?proto.google.protobuf.StringValue} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getDescriptiveName = function() { return /** @type{?proto.google.protobuf.StringValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 4)); }; /** @param {?proto.google.protobuf.StringValue|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setDescriptiveName = function(value) { jspb.Message.setWrapperField(this, 4, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearDescriptiveName = function() { this.setDescriptiveName(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasDescriptiveName = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional google.protobuf.StringValue currency_code = 5; * @return {?proto.google.protobuf.StringValue} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getCurrencyCode = function() { return /** @type{?proto.google.protobuf.StringValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 5)); }; /** @param {?proto.google.protobuf.StringValue|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setCurrencyCode = function(value) { jspb.Message.setWrapperField(this, 5, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearCurrencyCode = function() { this.setCurrencyCode(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasCurrencyCode = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional google.protobuf.StringValue time_zone = 6; * @return {?proto.google.protobuf.StringValue} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getTimeZone = function() { return /** @type{?proto.google.protobuf.StringValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 6)); }; /** @param {?proto.google.protobuf.StringValue|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setTimeZone = function(value) { jspb.Message.setWrapperField(this, 6, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearTimeZone = function() { this.setTimeZone(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasTimeZone = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional google.protobuf.StringValue tracking_url_template = 7; * @return {?proto.google.protobuf.StringValue} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getTrackingUrlTemplate = function() { return /** @type{?proto.google.protobuf.StringValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 7)); }; /** @param {?proto.google.protobuf.StringValue|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setTrackingUrlTemplate = function(value) { jspb.Message.setWrapperField(this, 7, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearTrackingUrlTemplate = function() { this.setTrackingUrlTemplate(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasTrackingUrlTemplate = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional google.protobuf.StringValue final_url_suffix = 11; * @return {?proto.google.protobuf.StringValue} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getFinalUrlSuffix = function() { return /** @type{?proto.google.protobuf.StringValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 11)); }; /** @param {?proto.google.protobuf.StringValue|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setFinalUrlSuffix = function(value) { jspb.Message.setWrapperField(this, 11, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearFinalUrlSuffix = function() { this.setFinalUrlSuffix(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasFinalUrlSuffix = function() { return jspb.Message.getField(this, 11) != null; }; /** * optional google.protobuf.BoolValue auto_tagging_enabled = 8; * @return {?proto.google.protobuf.BoolValue} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getAutoTaggingEnabled = function() { return /** @type{?proto.google.protobuf.BoolValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 8)); }; /** @param {?proto.google.protobuf.BoolValue|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setAutoTaggingEnabled = function(value) { jspb.Message.setWrapperField(this, 8, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearAutoTaggingEnabled = function() { this.setAutoTaggingEnabled(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasAutoTaggingEnabled = function() { return jspb.Message.getField(this, 8) != null; }; /** * optional google.protobuf.BoolValue has_partners_badge = 9; * @return {?proto.google.protobuf.BoolValue} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getHasPartnersBadge = function() { return /** @type{?proto.google.protobuf.BoolValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 9)); }; /** @param {?proto.google.protobuf.BoolValue|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setHasPartnersBadge = function(value) { jspb.Message.setWrapperField(this, 9, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearHasPartnersBadge = function() { this.setHasPartnersBadge(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasHasPartnersBadge = function() { return jspb.Message.getField(this, 9) != null; }; /** * optional google.protobuf.BoolValue manager = 12; * @return {?proto.google.protobuf.BoolValue} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getManager = function() { return /** @type{?proto.google.protobuf.BoolValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 12)); }; /** @param {?proto.google.protobuf.BoolValue|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setManager = function(value) { jspb.Message.setWrapperField(this, 12, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearManager = function() { this.setManager(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasManager = function() { return jspb.Message.getField(this, 12) != null; }; /** * optional google.protobuf.BoolValue test_account = 13; * @return {?proto.google.protobuf.BoolValue} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getTestAccount = function() { return /** @type{?proto.google.protobuf.BoolValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 13)); }; /** @param {?proto.google.protobuf.BoolValue|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setTestAccount = function(value) { jspb.Message.setWrapperField(this, 13, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearTestAccount = function() { this.setTestAccount(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasTestAccount = function() { return jspb.Message.getField(this, 13) != null; }; /** * optional CallReportingSetting call_reporting_setting = 10; * @return {?proto.google.ads.googleads.v0.resources.CallReportingSetting} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getCallReportingSetting = function() { return /** @type{?proto.google.ads.googleads.v0.resources.CallReportingSetting} */ ( jspb.Message.getWrapperField(this, proto.google.ads.googleads.v0.resources.CallReportingSetting, 10)); }; /** @param {?proto.google.ads.googleads.v0.resources.CallReportingSetting|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setCallReportingSetting = function(value) { jspb.Message.setWrapperField(this, 10, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearCallReportingSetting = function() { this.setCallReportingSetting(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasCallReportingSetting = function() { return jspb.Message.getField(this, 10) != null; }; /** * optional ConversionTrackingSetting conversion_tracking_setting = 14; * @return {?proto.google.ads.googleads.v0.resources.ConversionTrackingSetting} */ proto.google.ads.googleads.v0.resources.Customer.prototype.getConversionTrackingSetting = function() { return /** @type{?proto.google.ads.googleads.v0.resources.ConversionTrackingSetting} */ ( jspb.Message.getWrapperField(this, proto.google.ads.googleads.v0.resources.ConversionTrackingSetting, 14)); }; /** @param {?proto.google.ads.googleads.v0.resources.ConversionTrackingSetting|undefined} value */ proto.google.ads.googleads.v0.resources.Customer.prototype.setConversionTrackingSetting = function(value) { jspb.Message.setWrapperField(this, 14, value); }; proto.google.ads.googleads.v0.resources.Customer.prototype.clearConversionTrackingSetting = function() { this.setConversionTrackingSetting(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.Customer.prototype.hasConversionTrackingSetting = function() { return jspb.Message.getField(this, 14) != 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.ads.googleads.v0.resources.CallReportingSetting = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.ads.googleads.v0.resources.CallReportingSetting, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.google.ads.googleads.v0.resources.CallReportingSetting.displayName = 'proto.google.ads.googleads.v0.resources.CallReportingSetting'; } 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.ads.googleads.v0.resources.CallReportingSetting.prototype.toObject = function(opt_includeInstance) { return proto.google.ads.googleads.v0.resources.CallReportingSetting.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.ads.googleads.v0.resources.CallReportingSetting} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.ads.googleads.v0.resources.CallReportingSetting.toObject = function(includeInstance, msg) { var f, obj = { callReportingEnabled: (f = msg.getCallReportingEnabled()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f), callConversionReportingEnabled: (f = msg.getCallConversionReportingEnabled()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f), callConversionAction: (f = msg.getCallConversionAction()) && google_protobuf_wrappers_pb.StringValue.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.ads.googleads.v0.resources.CallReportingSetting} */ proto.google.ads.googleads.v0.resources.CallReportingSetting.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.ads.googleads.v0.resources.CallReportingSetting; return proto.google.ads.googleads.v0.resources.CallReportingSetting.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.ads.googleads.v0.resources.CallReportingSetting} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.ads.googleads.v0.resources.CallReportingSetting} */ proto.google.ads.googleads.v0.resources.CallReportingSetting.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_protobuf_wrappers_pb.BoolValue; reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader); msg.setCallReportingEnabled(value); break; case 2: var value = new google_protobuf_wrappers_pb.BoolValue; reader.readMessage(value,google_protobuf_wrappers_pb.BoolValue.deserializeBinaryFromReader); msg.setCallConversionReportingEnabled(value); break; case 9: var value = new google_protobuf_wrappers_pb.StringValue; reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader); msg.setCallConversionAction(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.ads.googleads.v0.resources.CallReportingSetting.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.ads.googleads.v0.resources.CallReportingSetting} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.ads.googleads.v0.resources.CallReportingSetting.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCallReportingEnabled(); if (f != null) { writer.writeMessage( 1, f, google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter ); } f = message.getCallConversionReportingEnabled(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_wrappers_pb.BoolValue.serializeBinaryToWriter ); } f = message.getCallConversionAction(); if (f != null) { writer.writeMessage( 9, f, google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter ); } }; /** * optional google.protobuf.BoolValue call_reporting_enabled = 1; * @return {?proto.google.protobuf.BoolValue} */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.getCallReportingEnabled = function() { return /** @type{?proto.google.protobuf.BoolValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 1)); }; /** @param {?proto.google.protobuf.BoolValue|undefined} value */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.setCallReportingEnabled = function(value) { jspb.Message.setWrapperField(this, 1, value); }; proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.clearCallReportingEnabled = function() { this.setCallReportingEnabled(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.hasCallReportingEnabled = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional google.protobuf.BoolValue call_conversion_reporting_enabled = 2; * @return {?proto.google.protobuf.BoolValue} */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.getCallConversionReportingEnabled = function() { return /** @type{?proto.google.protobuf.BoolValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BoolValue, 2)); }; /** @param {?proto.google.protobuf.BoolValue|undefined} value */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.setCallConversionReportingEnabled = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.clearCallConversionReportingEnabled = function() { this.setCallConversionReportingEnabled(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.hasCallConversionReportingEnabled = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional google.protobuf.StringValue call_conversion_action = 9; * @return {?proto.google.protobuf.StringValue} */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.getCallConversionAction = function() { return /** @type{?proto.google.protobuf.StringValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 9)); }; /** @param {?proto.google.protobuf.StringValue|undefined} value */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.setCallConversionAction = function(value) { jspb.Message.setWrapperField(this, 9, value); }; proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.clearCallConversionAction = function() { this.setCallConversionAction(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.CallReportingSetting.prototype.hasCallConversionAction = function() { return jspb.Message.getField(this, 9) != 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.ads.googleads.v0.resources.ConversionTrackingSetting = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.ads.googleads.v0.resources.ConversionTrackingSetting, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.displayName = 'proto.google.ads.googleads.v0.resources.ConversionTrackingSetting'; } 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.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.toObject = function(opt_includeInstance) { return proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.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.ads.googleads.v0.resources.ConversionTrackingSetting} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.toObject = function(includeInstance, msg) { var f, obj = { conversionTrackingId: (f = msg.getConversionTrackingId()) && google_protobuf_wrappers_pb.Int64Value.toObject(includeInstance, f), crossAccountConversionTrackingId: (f = msg.getCrossAccountConversionTrackingId()) && google_protobuf_wrappers_pb.Int64Value.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.ads.googleads.v0.resources.ConversionTrackingSetting} */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.ads.googleads.v0.resources.ConversionTrackingSetting; return proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.ads.googleads.v0.resources.ConversionTrackingSetting} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.ads.googleads.v0.resources.ConversionTrackingSetting} */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_protobuf_wrappers_pb.Int64Value; reader.readMessage(value,google_protobuf_wrappers_pb.Int64Value.deserializeBinaryFromReader); msg.setConversionTrackingId(value); break; case 2: var value = new google_protobuf_wrappers_pb.Int64Value; reader.readMessage(value,google_protobuf_wrappers_pb.Int64Value.deserializeBinaryFromReader); msg.setCrossAccountConversionTrackingId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.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.ads.googleads.v0.resources.ConversionTrackingSetting} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getConversionTrackingId(); if (f != null) { writer.writeMessage( 1, f, google_protobuf_wrappers_pb.Int64Value.serializeBinaryToWriter ); } f = message.getCrossAccountConversionTrackingId(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_wrappers_pb.Int64Value.serializeBinaryToWriter ); } }; /** * optional google.protobuf.Int64Value conversion_tracking_id = 1; * @return {?proto.google.protobuf.Int64Value} */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.getConversionTrackingId = function() { return /** @type{?proto.google.protobuf.Int64Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.Int64Value, 1)); }; /** @param {?proto.google.protobuf.Int64Value|undefined} value */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.setConversionTrackingId = function(value) { jspb.Message.setWrapperField(this, 1, value); }; proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.clearConversionTrackingId = function() { this.setConversionTrackingId(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.hasConversionTrackingId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional google.protobuf.Int64Value cross_account_conversion_tracking_id = 2; * @return {?proto.google.protobuf.Int64Value} */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.getCrossAccountConversionTrackingId = function() { return /** @type{?proto.google.protobuf.Int64Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.Int64Value, 2)); }; /** @param {?proto.google.protobuf.Int64Value|undefined} value */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.setCrossAccountConversionTrackingId = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.clearCrossAccountConversionTrackingId = function() { this.setCrossAccountConversionTrackingId(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.google.ads.googleads.v0.resources.ConversionTrackingSetting.prototype.hasCrossAccountConversionTrackingId = function() { return jspb.Message.getField(this, 2) != null; }; goog.object.extend(exports, proto.google.ads.googleads.v0.resources);