google-ads-node
Version:
Google Ads gRPC Client Library for Node
877 lines (747 loc) • 32.6 kB
JavaScript
/**
* @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_ads_googleads_v0_resources_billing_setup_pb = require('../../../../../google/ads/googleads/v0/resources/billing_setup_pb.js');
var google_api_annotations_pb = require('../../../../../google/api/annotations_pb.js');
goog.exportSymbol('proto.google.ads.googleads.v0.services.BillingSetupOperation', null, global);
goog.exportSymbol('proto.google.ads.googleads.v0.services.GetBillingSetupRequest', null, global);
goog.exportSymbol('proto.google.ads.googleads.v0.services.MutateBillingSetupRequest', null, global);
goog.exportSymbol('proto.google.ads.googleads.v0.services.MutateBillingSetupResponse', null, global);
goog.exportSymbol('proto.google.ads.googleads.v0.services.MutateBillingSetupResult', 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.services.GetBillingSetupRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.ads.googleads.v0.services.GetBillingSetupRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.ads.googleads.v0.services.GetBillingSetupRequest.displayName = 'proto.google.ads.googleads.v0.services.GetBillingSetupRequest';
}
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.services.GetBillingSetupRequest.prototype.toObject = function(opt_includeInstance) {
return proto.google.ads.googleads.v0.services.GetBillingSetupRequest.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.services.GetBillingSetupRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.GetBillingSetupRequest.toObject = function(includeInstance, msg) {
var f, obj = {
resourceName: 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.ads.googleads.v0.services.GetBillingSetupRequest}
*/
proto.google.ads.googleads.v0.services.GetBillingSetupRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.ads.googleads.v0.services.GetBillingSetupRequest;
return proto.google.ads.googleads.v0.services.GetBillingSetupRequest.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.services.GetBillingSetupRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.ads.googleads.v0.services.GetBillingSetupRequest}
*/
proto.google.ads.googleads.v0.services.GetBillingSetupRequest.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;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.ads.googleads.v0.services.GetBillingSetupRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.ads.googleads.v0.services.GetBillingSetupRequest.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.services.GetBillingSetupRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.GetBillingSetupRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getResourceName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string resource_name = 1;
* @return {string}
*/
proto.google.ads.googleads.v0.services.GetBillingSetupRequest.prototype.getResourceName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.google.ads.googleads.v0.services.GetBillingSetupRequest.prototype.setResourceName = 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.ads.googleads.v0.services.MutateBillingSetupRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.ads.googleads.v0.services.MutateBillingSetupRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.displayName = 'proto.google.ads.googleads.v0.services.MutateBillingSetupRequest';
}
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.services.MutateBillingSetupRequest.prototype.toObject = function(opt_includeInstance) {
return proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.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.services.MutateBillingSetupRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.toObject = function(includeInstance, msg) {
var f, obj = {
customerId: jspb.Message.getFieldWithDefault(msg, 1, ""),
operation: (f = msg.getOperation()) && proto.google.ads.googleads.v0.services.BillingSetupOperation.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.services.MutateBillingSetupRequest}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.ads.googleads.v0.services.MutateBillingSetupRequest;
return proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.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.services.MutateBillingSetupRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.ads.googleads.v0.services.MutateBillingSetupRequest}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.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.setCustomerId(value);
break;
case 2:
var value = new proto.google.ads.googleads.v0.services.BillingSetupOperation;
reader.readMessage(value,proto.google.ads.googleads.v0.services.BillingSetupOperation.deserializeBinaryFromReader);
msg.setOperation(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.services.MutateBillingSetupRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.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.services.MutateBillingSetupRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCustomerId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getOperation();
if (f != null) {
writer.writeMessage(
2,
f,
proto.google.ads.googleads.v0.services.BillingSetupOperation.serializeBinaryToWriter
);
}
};
/**
* optional string customer_id = 1;
* @return {string}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.prototype.getCustomerId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.prototype.setCustomerId = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional BillingSetupOperation operation = 2;
* @return {?proto.google.ads.googleads.v0.services.BillingSetupOperation}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.prototype.getOperation = function() {
return /** @type{?proto.google.ads.googleads.v0.services.BillingSetupOperation} */ (
jspb.Message.getWrapperField(this, proto.google.ads.googleads.v0.services.BillingSetupOperation, 2));
};
/** @param {?proto.google.ads.googleads.v0.services.BillingSetupOperation|undefined} value */
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.prototype.setOperation = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.prototype.clearOperation = function() {
this.setOperation(undefined);
};
/**
* Returns whether this field is set.
* @return {!boolean}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupRequest.prototype.hasOperation = function() {
return jspb.Message.getField(this, 2) != 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.services.BillingSetupOperation = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.ads.googleads.v0.services.BillingSetupOperation.oneofGroups_);
};
goog.inherits(proto.google.ads.googleads.v0.services.BillingSetupOperation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.ads.googleads.v0.services.BillingSetupOperation.displayName = 'proto.google.ads.googleads.v0.services.BillingSetupOperation';
}
/**
* 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.ads.googleads.v0.services.BillingSetupOperation.oneofGroups_ = [[2,1]];
/**
* @enum {number}
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.OperationCase = {
OPERATION_NOT_SET: 0,
CREATE: 2,
REMOVE: 1
};
/**
* @return {proto.google.ads.googleads.v0.services.BillingSetupOperation.OperationCase}
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.prototype.getOperationCase = function() {
return /** @type {proto.google.ads.googleads.v0.services.BillingSetupOperation.OperationCase} */(jspb.Message.computeOneofCase(this, proto.google.ads.googleads.v0.services.BillingSetupOperation.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.ads.googleads.v0.services.BillingSetupOperation.prototype.toObject = function(opt_includeInstance) {
return proto.google.ads.googleads.v0.services.BillingSetupOperation.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.services.BillingSetupOperation} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.toObject = function(includeInstance, msg) {
var f, obj = {
create: (f = msg.getCreate()) && google_ads_googleads_v0_resources_billing_setup_pb.BillingSetup.toObject(includeInstance, f),
remove: 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.ads.googleads.v0.services.BillingSetupOperation}
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.ads.googleads.v0.services.BillingSetupOperation;
return proto.google.ads.googleads.v0.services.BillingSetupOperation.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.services.BillingSetupOperation} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.ads.googleads.v0.services.BillingSetupOperation}
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = new google_ads_googleads_v0_resources_billing_setup_pb.BillingSetup;
reader.readMessage(value,google_ads_googleads_v0_resources_billing_setup_pb.BillingSetup.deserializeBinaryFromReader);
msg.setCreate(value);
break;
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setRemove(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.services.BillingSetupOperation.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.ads.googleads.v0.services.BillingSetupOperation.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.services.BillingSetupOperation} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCreate();
if (f != null) {
writer.writeMessage(
2,
f,
google_ads_googleads_v0_resources_billing_setup_pb.BillingSetup.serializeBinaryToWriter
);
}
f = /** @type {string} */ (jspb.Message.getField(message, 1));
if (f != null) {
writer.writeString(
1,
f
);
}
};
/**
* optional google.ads.googleads.v0.resources.BillingSetup create = 2;
* @return {?proto.google.ads.googleads.v0.resources.BillingSetup}
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.prototype.getCreate = function() {
return /** @type{?proto.google.ads.googleads.v0.resources.BillingSetup} */ (
jspb.Message.getWrapperField(this, google_ads_googleads_v0_resources_billing_setup_pb.BillingSetup, 2));
};
/** @param {?proto.google.ads.googleads.v0.resources.BillingSetup|undefined} value */
proto.google.ads.googleads.v0.services.BillingSetupOperation.prototype.setCreate = function(value) {
jspb.Message.setOneofWrapperField(this, 2, proto.google.ads.googleads.v0.services.BillingSetupOperation.oneofGroups_[0], value);
};
proto.google.ads.googleads.v0.services.BillingSetupOperation.prototype.clearCreate = function() {
this.setCreate(undefined);
};
/**
* Returns whether this field is set.
* @return {!boolean}
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.prototype.hasCreate = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string remove = 1;
* @return {string}
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.prototype.getRemove = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.google.ads.googleads.v0.services.BillingSetupOperation.prototype.setRemove = function(value) {
jspb.Message.setOneofField(this, 1, proto.google.ads.googleads.v0.services.BillingSetupOperation.oneofGroups_[0], value);
};
proto.google.ads.googleads.v0.services.BillingSetupOperation.prototype.clearRemove = function() {
jspb.Message.setOneofField(this, 1, proto.google.ads.googleads.v0.services.BillingSetupOperation.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {!boolean}
*/
proto.google.ads.googleads.v0.services.BillingSetupOperation.prototype.hasRemove = function() {
return jspb.Message.getField(this, 1) != 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.services.MutateBillingSetupResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.ads.googleads.v0.services.MutateBillingSetupResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.displayName = 'proto.google.ads.googleads.v0.services.MutateBillingSetupResponse';
}
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.services.MutateBillingSetupResponse.prototype.toObject = function(opt_includeInstance) {
return proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.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.services.MutateBillingSetupResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.toObject = function(includeInstance, msg) {
var f, obj = {
result: (f = msg.getResult()) && proto.google.ads.googleads.v0.services.MutateBillingSetupResult.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.services.MutateBillingSetupResponse}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.ads.googleads.v0.services.MutateBillingSetupResponse;
return proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.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.services.MutateBillingSetupResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.ads.googleads.v0.services.MutateBillingSetupResponse}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.ads.googleads.v0.services.MutateBillingSetupResult;
reader.readMessage(value,proto.google.ads.googleads.v0.services.MutateBillingSetupResult.deserializeBinaryFromReader);
msg.setResult(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.services.MutateBillingSetupResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.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.services.MutateBillingSetupResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getResult();
if (f != null) {
writer.writeMessage(
1,
f,
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.serializeBinaryToWriter
);
}
};
/**
* optional MutateBillingSetupResult result = 1;
* @return {?proto.google.ads.googleads.v0.services.MutateBillingSetupResult}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.prototype.getResult = function() {
return /** @type{?proto.google.ads.googleads.v0.services.MutateBillingSetupResult} */ (
jspb.Message.getWrapperField(this, proto.google.ads.googleads.v0.services.MutateBillingSetupResult, 1));
};
/** @param {?proto.google.ads.googleads.v0.services.MutateBillingSetupResult|undefined} value */
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.prototype.setResult = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.prototype.clearResult = function() {
this.setResult(undefined);
};
/**
* Returns whether this field is set.
* @return {!boolean}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResponse.prototype.hasResult = function() {
return jspb.Message.getField(this, 1) != 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.services.MutateBillingSetupResult = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.ads.googleads.v0.services.MutateBillingSetupResult, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.displayName = 'proto.google.ads.googleads.v0.services.MutateBillingSetupResult';
}
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.services.MutateBillingSetupResult.prototype.toObject = function(opt_includeInstance) {
return proto.google.ads.googleads.v0.services.MutateBillingSetupResult.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.services.MutateBillingSetupResult} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.toObject = function(includeInstance, msg) {
var f, obj = {
resourceName: 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.ads.googleads.v0.services.MutateBillingSetupResult}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.ads.googleads.v0.services.MutateBillingSetupResult;
return proto.google.ads.googleads.v0.services.MutateBillingSetupResult.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.services.MutateBillingSetupResult} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.ads.googleads.v0.services.MutateBillingSetupResult}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.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;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.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.services.MutateBillingSetupResult} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getResourceName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string resource_name = 1;
* @return {string}
*/
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.prototype.getResourceName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.google.ads.googleads.v0.services.MutateBillingSetupResult.prototype.setResourceName = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
goog.object.extend(exports, proto.google.ads.googleads.v0.services);