UNPKG

google-ads-node

Version:

Google Ads gRPC Client Library for Node

1 lines 6.66 kB
var jspb=require("google-protobuf"),goog=jspb,global=Function("return this")(),google_protobuf_wrappers_pb=require("google-protobuf/google/protobuf/wrappers_pb.js"),google_api_annotations_pb=require("../../../../../google/api/annotations_pb.js");goog.exportSymbol("proto.google.ads.googleads.v2.common.ClickLocation",null,global),proto.google.ads.googleads.v2.common.ClickLocation=function(opt_data){jspb.Message.initialize(this,opt_data,0,-1,null,null)},goog.inherits(proto.google.ads.googleads.v2.common.ClickLocation,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.google.ads.googleads.v2.common.ClickLocation.displayName="proto.google.ads.googleads.v2.common.ClickLocation"),jspb.Message.GENERATE_TO_OBJECT&&(proto.google.ads.googleads.v2.common.ClickLocation.prototype.toObject=function(opt_includeInstance){return proto.google.ads.googleads.v2.common.ClickLocation.toObject(opt_includeInstance,this)},proto.google.ads.googleads.v2.common.ClickLocation.toObject=function(includeInstance,msg){var f,obj={city:(f=msg.getCity())&&google_protobuf_wrappers_pb.StringValue.toObject(includeInstance,f),country:(f=msg.getCountry())&&google_protobuf_wrappers_pb.StringValue.toObject(includeInstance,f),metro:(f=msg.getMetro())&&google_protobuf_wrappers_pb.StringValue.toObject(includeInstance,f),mostSpecific:(f=msg.getMostSpecific())&&google_protobuf_wrappers_pb.StringValue.toObject(includeInstance,f),region:(f=msg.getRegion())&&google_protobuf_wrappers_pb.StringValue.toObject(includeInstance,f)};return includeInstance&&(obj.$jspbMessageInstance=msg),obj}),proto.google.ads.googleads.v2.common.ClickLocation.deserializeBinary=function(bytes){var reader=new jspb.BinaryReader(bytes),msg=new proto.google.ads.googleads.v2.common.ClickLocation;return proto.google.ads.googleads.v2.common.ClickLocation.deserializeBinaryFromReader(msg,reader)},proto.google.ads.googleads.v2.common.ClickLocation.deserializeBinaryFromReader=function(msg,reader){for(;reader.nextField()&&!reader.isEndGroup();){switch(reader.getFieldNumber()){case 1:var value=new google_protobuf_wrappers_pb.StringValue;reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader),msg.setCity(value);break;case 2:value=new google_protobuf_wrappers_pb.StringValue;reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader),msg.setCountry(value);break;case 3:value=new google_protobuf_wrappers_pb.StringValue;reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader),msg.setMetro(value);break;case 4:value=new google_protobuf_wrappers_pb.StringValue;reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader),msg.setMostSpecific(value);break;case 5:value=new google_protobuf_wrappers_pb.StringValue;reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader),msg.setRegion(value);break;default:reader.skipField()}}return msg},proto.google.ads.googleads.v2.common.ClickLocation.prototype.serializeBinary=function(){var writer=new jspb.BinaryWriter;return proto.google.ads.googleads.v2.common.ClickLocation.serializeBinaryToWriter(this,writer),writer.getResultBuffer()},proto.google.ads.googleads.v2.common.ClickLocation.serializeBinaryToWriter=function(message,writer){var f=void 0;null!=(f=message.getCity())&&writer.writeMessage(1,f,google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter),null!=(f=message.getCountry())&&writer.writeMessage(2,f,google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter),null!=(f=message.getMetro())&&writer.writeMessage(3,f,google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter),null!=(f=message.getMostSpecific())&&writer.writeMessage(4,f,google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter),null!=(f=message.getRegion())&&writer.writeMessage(5,f,google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.getCity=function(){return jspb.Message.getWrapperField(this,google_protobuf_wrappers_pb.StringValue,1)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.setCity=function(value){jspb.Message.setWrapperField(this,1,value)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.clearCity=function(){this.setCity(void 0)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.hasCity=function(){return null!=jspb.Message.getField(this,1)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.getCountry=function(){return jspb.Message.getWrapperField(this,google_protobuf_wrappers_pb.StringValue,2)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.setCountry=function(value){jspb.Message.setWrapperField(this,2,value)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.clearCountry=function(){this.setCountry(void 0)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.hasCountry=function(){return null!=jspb.Message.getField(this,2)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.getMetro=function(){return jspb.Message.getWrapperField(this,google_protobuf_wrappers_pb.StringValue,3)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.setMetro=function(value){jspb.Message.setWrapperField(this,3,value)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.clearMetro=function(){this.setMetro(void 0)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.hasMetro=function(){return null!=jspb.Message.getField(this,3)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.getMostSpecific=function(){return jspb.Message.getWrapperField(this,google_protobuf_wrappers_pb.StringValue,4)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.setMostSpecific=function(value){jspb.Message.setWrapperField(this,4,value)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.clearMostSpecific=function(){this.setMostSpecific(void 0)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.hasMostSpecific=function(){return null!=jspb.Message.getField(this,4)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.getRegion=function(){return jspb.Message.getWrapperField(this,google_protobuf_wrappers_pb.StringValue,5)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.setRegion=function(value){jspb.Message.setWrapperField(this,5,value)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.clearRegion=function(){this.setRegion(void 0)},proto.google.ads.googleads.v2.common.ClickLocation.prototype.hasRegion=function(){return null!=jspb.Message.getField(this,5)},goog.object.extend(exports,proto.google.ads.googleads.v2.common);