google-ads-node
Version:
Google Ads gRPC Client Library for Node
1 lines • 11.2 kB
JavaScript
var jspb=require("google-protobuf"),goog=jspb,global=Function("return this")(),google_ads_googleads_v2_common_simulation_pb=require("../../../../../google/ads/googleads/v2/common/simulation_pb.js"),google_ads_googleads_v2_enums_simulation_modification_method_pb=require("../../../../../google/ads/googleads/v2/enums/simulation_modification_method_pb.js"),google_ads_googleads_v2_enums_simulation_type_pb=require("../../../../../google/ads/googleads/v2/enums/simulation_type_pb.js"),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.resources.AdGroupSimulation",null,global),proto.google.ads.googleads.v2.resources.AdGroupSimulation=function(opt_data){jspb.Message.initialize(this,opt_data,0,-1,null,proto.google.ads.googleads.v2.resources.AdGroupSimulation.oneofGroups_)},goog.inherits(proto.google.ads.googleads.v2.resources.AdGroupSimulation,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.google.ads.googleads.v2.resources.AdGroupSimulation.displayName="proto.google.ads.googleads.v2.resources.AdGroupSimulation"),proto.google.ads.googleads.v2.resources.AdGroupSimulation.oneofGroups_=[[8,10,9]],proto.google.ads.googleads.v2.resources.AdGroupSimulation.PointListCase={POINT_LIST_NOT_SET:0,CPC_BID_POINT_LIST:8,CPV_BID_POINT_LIST:10,TARGET_CPA_POINT_LIST:9},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getPointListCase=function(){return jspb.Message.computeOneofCase(this,proto.google.ads.googleads.v2.resources.AdGroupSimulation.oneofGroups_[0])},jspb.Message.GENERATE_TO_OBJECT&&(proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.toObject=function(opt_includeInstance){return proto.google.ads.googleads.v2.resources.AdGroupSimulation.toObject(opt_includeInstance,this)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.toObject=function(includeInstance,msg){var f,obj={resourceName:jspb.Message.getFieldWithDefault(msg,1,""),adGroupId:(f=msg.getAdGroupId())&&google_protobuf_wrappers_pb.Int64Value.toObject(includeInstance,f),type:jspb.Message.getFieldWithDefault(msg,3,0),modificationMethod:jspb.Message.getFieldWithDefault(msg,4,0),startDate:(f=msg.getStartDate())&&google_protobuf_wrappers_pb.StringValue.toObject(includeInstance,f),endDate:(f=msg.getEndDate())&&google_protobuf_wrappers_pb.StringValue.toObject(includeInstance,f),cpcBidPointList:(f=msg.getCpcBidPointList())&&google_ads_googleads_v2_common_simulation_pb.CpcBidSimulationPointList.toObject(includeInstance,f),cpvBidPointList:(f=msg.getCpvBidPointList())&&google_ads_googleads_v2_common_simulation_pb.CpvBidSimulationPointList.toObject(includeInstance,f),targetCpaPointList:(f=msg.getTargetCpaPointList())&&google_ads_googleads_v2_common_simulation_pb.TargetCpaSimulationPointList.toObject(includeInstance,f)};return includeInstance&&(obj.$jspbMessageInstance=msg),obj}),proto.google.ads.googleads.v2.resources.AdGroupSimulation.deserializeBinary=function(bytes){var reader=new jspb.BinaryReader(bytes),msg=new proto.google.ads.googleads.v2.resources.AdGroupSimulation;return proto.google.ads.googleads.v2.resources.AdGroupSimulation.deserializeBinaryFromReader(msg,reader)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.deserializeBinaryFromReader=function(msg,reader){for(;reader.nextField()&&!reader.isEndGroup();){switch(reader.getFieldNumber()){case 1:var value=reader.readString();msg.setResourceName(value);break;case 2:value=new google_protobuf_wrappers_pb.Int64Value;reader.readMessage(value,google_protobuf_wrappers_pb.Int64Value.deserializeBinaryFromReader),msg.setAdGroupId(value);break;case 3:value=reader.readEnum();msg.setType(value);break;case 4:value=reader.readEnum();msg.setModificationMethod(value);break;case 5:value=new google_protobuf_wrappers_pb.StringValue;reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader),msg.setStartDate(value);break;case 6:value=new google_protobuf_wrappers_pb.StringValue;reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader),msg.setEndDate(value);break;case 8:value=new google_ads_googleads_v2_common_simulation_pb.CpcBidSimulationPointList;reader.readMessage(value,google_ads_googleads_v2_common_simulation_pb.CpcBidSimulationPointList.deserializeBinaryFromReader),msg.setCpcBidPointList(value);break;case 10:value=new google_ads_googleads_v2_common_simulation_pb.CpvBidSimulationPointList;reader.readMessage(value,google_ads_googleads_v2_common_simulation_pb.CpvBidSimulationPointList.deserializeBinaryFromReader),msg.setCpvBidPointList(value);break;case 9:value=new google_ads_googleads_v2_common_simulation_pb.TargetCpaSimulationPointList;reader.readMessage(value,google_ads_googleads_v2_common_simulation_pb.TargetCpaSimulationPointList.deserializeBinaryFromReader),msg.setTargetCpaPointList(value);break;default:reader.skipField()}}return msg},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.serializeBinary=function(){var writer=new jspb.BinaryWriter;return proto.google.ads.googleads.v2.resources.AdGroupSimulation.serializeBinaryToWriter(this,writer),writer.getResultBuffer()},proto.google.ads.googleads.v2.resources.AdGroupSimulation.serializeBinaryToWriter=function(message,writer){var f=void 0;0<(f=message.getResourceName()).length&&writer.writeString(1,f),null!=(f=message.getAdGroupId())&&writer.writeMessage(2,f,google_protobuf_wrappers_pb.Int64Value.serializeBinaryToWriter),0!==(f=message.getType())&&writer.writeEnum(3,f),0!==(f=message.getModificationMethod())&&writer.writeEnum(4,f),null!=(f=message.getStartDate())&&writer.writeMessage(5,f,google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter),null!=(f=message.getEndDate())&&writer.writeMessage(6,f,google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter),null!=(f=message.getCpcBidPointList())&&writer.writeMessage(8,f,google_ads_googleads_v2_common_simulation_pb.CpcBidSimulationPointList.serializeBinaryToWriter),null!=(f=message.getCpvBidPointList())&&writer.writeMessage(10,f,google_ads_googleads_v2_common_simulation_pb.CpvBidSimulationPointList.serializeBinaryToWriter),null!=(f=message.getTargetCpaPointList())&&writer.writeMessage(9,f,google_ads_googleads_v2_common_simulation_pb.TargetCpaSimulationPointList.serializeBinaryToWriter)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getResourceName=function(){return jspb.Message.getFieldWithDefault(this,1,"")},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.setResourceName=function(value){jspb.Message.setProto3StringField(this,1,value)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getAdGroupId=function(){return jspb.Message.getWrapperField(this,google_protobuf_wrappers_pb.Int64Value,2)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.setAdGroupId=function(value){jspb.Message.setWrapperField(this,2,value)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.clearAdGroupId=function(){this.setAdGroupId(void 0)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.hasAdGroupId=function(){return null!=jspb.Message.getField(this,2)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getType=function(){return jspb.Message.getFieldWithDefault(this,3,0)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.setType=function(value){jspb.Message.setProto3EnumField(this,3,value)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getModificationMethod=function(){return jspb.Message.getFieldWithDefault(this,4,0)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.setModificationMethod=function(value){jspb.Message.setProto3EnumField(this,4,value)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getStartDate=function(){return jspb.Message.getWrapperField(this,google_protobuf_wrappers_pb.StringValue,5)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.setStartDate=function(value){jspb.Message.setWrapperField(this,5,value)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.clearStartDate=function(){this.setStartDate(void 0)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.hasStartDate=function(){return null!=jspb.Message.getField(this,5)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getEndDate=function(){return jspb.Message.getWrapperField(this,google_protobuf_wrappers_pb.StringValue,6)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.setEndDate=function(value){jspb.Message.setWrapperField(this,6,value)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.clearEndDate=function(){this.setEndDate(void 0)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.hasEndDate=function(){return null!=jspb.Message.getField(this,6)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getCpcBidPointList=function(){return jspb.Message.getWrapperField(this,google_ads_googleads_v2_common_simulation_pb.CpcBidSimulationPointList,8)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.setCpcBidPointList=function(value){jspb.Message.setOneofWrapperField(this,8,proto.google.ads.googleads.v2.resources.AdGroupSimulation.oneofGroups_[0],value)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.clearCpcBidPointList=function(){this.setCpcBidPointList(void 0)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.hasCpcBidPointList=function(){return null!=jspb.Message.getField(this,8)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getCpvBidPointList=function(){return jspb.Message.getWrapperField(this,google_ads_googleads_v2_common_simulation_pb.CpvBidSimulationPointList,10)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.setCpvBidPointList=function(value){jspb.Message.setOneofWrapperField(this,10,proto.google.ads.googleads.v2.resources.AdGroupSimulation.oneofGroups_[0],value)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.clearCpvBidPointList=function(){this.setCpvBidPointList(void 0)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.hasCpvBidPointList=function(){return null!=jspb.Message.getField(this,10)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.getTargetCpaPointList=function(){return jspb.Message.getWrapperField(this,google_ads_googleads_v2_common_simulation_pb.TargetCpaSimulationPointList,9)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.setTargetCpaPointList=function(value){jspb.Message.setOneofWrapperField(this,9,proto.google.ads.googleads.v2.resources.AdGroupSimulation.oneofGroups_[0],value)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.clearTargetCpaPointList=function(){this.setTargetCpaPointList(void 0)},proto.google.ads.googleads.v2.resources.AdGroupSimulation.prototype.hasTargetCpaPointList=function(){return null!=jspb.Message.getField(this,9)},goog.object.extend(exports,proto.google.ads.googleads.v2.resources);