Ejemplo n.º 1
0
 public override void ReadFrom(XElement xE)
 {
     base.ReadFrom(xE);
     SitelinkText                = null;
     SitelinkUrl                 = null;
     SitelinkLine2               = null;
     SitelinkLine3               = null;
     SitelinkFinalUrls           = null;
     SitelinkFinalMobileUrls     = null;
     SitelinkTrackingUrlTemplate = null;
     SitelinkUrlCustomParameters = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "sitelinkText")
         {
             SitelinkText = xItem.Value;
         }
         else if (localName == "sitelinkUrl")
         {
             SitelinkUrl = xItem.Value;
         }
         else if (localName == "sitelinkLine2")
         {
             SitelinkLine2 = xItem.Value;
         }
         else if (localName == "sitelinkLine3")
         {
             SitelinkLine3 = xItem.Value;
         }
         else if (localName == "sitelinkFinalUrls")
         {
             SitelinkFinalUrls = new UrlList();
             SitelinkFinalUrls.ReadFrom(xItem);
         }
         else if (localName == "sitelinkFinalMobileUrls")
         {
             SitelinkFinalMobileUrls = new UrlList();
             SitelinkFinalMobileUrls.ReadFrom(xItem);
         }
         else if (localName == "sitelinkTrackingUrlTemplate")
         {
             SitelinkTrackingUrlTemplate = xItem.Value;
         }
         else if (localName == "sitelinkUrlCustomParameters")
         {
             SitelinkUrlCustomParameters = new CustomParameters();
             SitelinkUrlCustomParameters.ReadFrom(xItem);
         }
     }
 }
Ejemplo n.º 2
0
 public override void ReadFrom(XElement xE)
 {
     base.ReadFrom(xE);
     AppStore               = null;
     AppId                  = null;
     AppLinkText            = null;
     AppUrl                 = null;
     AppFinalUrls           = null;
     AppFinalMobileUrls     = null;
     AppTrackingUrlTemplate = null;
     AppUrlCustomParameters = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "appStore")
         {
             AppStore = AppFeedItemAppStoreExtensions.Parse(xItem.Value);
         }
         else if (localName == "appId")
         {
             AppId = xItem.Value;
         }
         else if (localName == "appLinkText")
         {
             AppLinkText = xItem.Value;
         }
         else if (localName == "appUrl")
         {
             AppUrl = xItem.Value;
         }
         else if (localName == "appFinalUrls")
         {
             AppFinalUrls = new UrlList();
             AppFinalUrls.ReadFrom(xItem);
         }
         else if (localName == "appFinalMobileUrls")
         {
             AppFinalMobileUrls = new UrlList();
             AppFinalMobileUrls.ReadFrom(xItem);
         }
         else if (localName == "appTrackingUrlTemplate")
         {
             AppTrackingUrlTemplate = xItem.Value;
         }
         else if (localName == "appUrlCustomParameters")
         {
             AppUrlCustomParameters = new CustomParameters();
             AppUrlCustomParameters.ReadFrom(xItem);
         }
     }
 }
Ejemplo n.º 3
0
 public virtual void ReadFrom(XElement xE)
 {
     Id                  = null;
     Url                 = null;
     DisplayUrl          = null;
     FinalUrls           = null;
     FinalMobileUrls     = null;
     FinalAppUrls        = null;
     TrackingUrlTemplate = null;
     UrlCustomParameters = null;
     Type                = null;
     DevicePreference    = null;
     AdType              = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "id")
         {
             Id = long.Parse(xItem.Value);
         }
         else if (localName == "url")
         {
             Url = xItem.Value;
         }
         else if (localName == "displayUrl")
         {
             DisplayUrl = xItem.Value;
         }
         else if (localName == "finalUrls")
         {
             if (FinalUrls == null)
             {
                 FinalUrls = new List <string>();
             }
             FinalUrls.Add(xItem.Value);
         }
         else if (localName == "finalMobileUrls")
         {
             if (FinalMobileUrls == null)
             {
                 FinalMobileUrls = new List <string>();
             }
             FinalMobileUrls.Add(xItem.Value);
         }
         else if (localName == "finalAppUrls")
         {
             if (FinalAppUrls == null)
             {
                 FinalAppUrls = new List <AppUrl>();
             }
             var finalAppUrlsItem = new AppUrl();
             finalAppUrlsItem.ReadFrom(xItem);
             FinalAppUrls.Add(finalAppUrlsItem);
         }
         else if (localName == "trackingUrlTemplate")
         {
             TrackingUrlTemplate = xItem.Value;
         }
         else if (localName == "urlCustomParameters")
         {
             UrlCustomParameters = new CustomParameters();
             UrlCustomParameters.ReadFrom(xItem);
         }
         else if (localName == "type")
         {
             Type = AdTypeExtensions.Parse(xItem.Value);
         }
         else if (localName == "devicePreference")
         {
             DevicePreference = long.Parse(xItem.Value);
         }
         else if (localName == "Ad.Type")
         {
             AdType = xItem.Value;
         }
     }
 }
Ejemplo n.º 4
0
 public virtual void ReadFrom(XElement xE)
 {
     FeedId                  = null;
     FeedItemId              = null;
     Status                  = null;
     StartTime               = null;
     EndTime                 = null;
     AttributeValues         = null;
     PolicyData              = null;
     DevicePreference        = null;
     Scheduling              = null;
     CampaignTargeting       = null;
     AdGroupTargeting        = null;
     KeywordTargeting        = null;
     GeoTargeting            = null;
     GeoTargetingRestriction = null;
     UrlCustomParameters     = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "feedId")
         {
             FeedId = long.Parse(xItem.Value);
         }
         else if (localName == "feedItemId")
         {
             FeedItemId = long.Parse(xItem.Value);
         }
         else if (localName == "status")
         {
             Status = FeedItemStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "startTime")
         {
             StartTime = xItem.Value;
         }
         else if (localName == "endTime")
         {
             EndTime = xItem.Value;
         }
         else if (localName == "attributeValues")
         {
             if (AttributeValues == null)
             {
                 AttributeValues = new List <FeedItemAttributeValue>();
             }
             var attributeValuesItem = new FeedItemAttributeValue();
             attributeValuesItem.ReadFrom(xItem);
             AttributeValues.Add(attributeValuesItem);
         }
         else if (localName == "policyData")
         {
             if (PolicyData == null)
             {
                 PolicyData = new List <FeedItemPolicyData>();
             }
             var policyDataItem = new FeedItemPolicyData();
             policyDataItem.ReadFrom(xItem);
             PolicyData.Add(policyDataItem);
         }
         else if (localName == "devicePreference")
         {
             DevicePreference = new FeedItemDevicePreference();
             DevicePreference.ReadFrom(xItem);
         }
         else if (localName == "scheduling")
         {
             Scheduling = new FeedItemScheduling();
             Scheduling.ReadFrom(xItem);
         }
         else if (localName == "campaignTargeting")
         {
             CampaignTargeting = new FeedItemCampaignTargeting();
             CampaignTargeting.ReadFrom(xItem);
         }
         else if (localName == "adGroupTargeting")
         {
             AdGroupTargeting = new FeedItemAdGroupTargeting();
             AdGroupTargeting.ReadFrom(xItem);
         }
         else if (localName == "keywordTargeting")
         {
             KeywordTargeting = new Keyword();
             KeywordTargeting.ReadFrom(xItem);
         }
         else if (localName == "geoTargeting")
         {
             GeoTargeting = new Location();
             GeoTargeting.ReadFrom(xItem);
         }
         else if (localName == "geoTargetingRestriction")
         {
             GeoTargetingRestriction = new FeedItemGeoRestriction();
             GeoTargetingRestriction.ReadFrom(xItem);
         }
         else if (localName == "urlCustomParameters")
         {
             UrlCustomParameters = new CustomParameters();
             UrlCustomParameters.ReadFrom(xItem);
         }
     }
 }
Ejemplo n.º 5
0
 public virtual void ReadFrom(XElement xE)
 {
     Id                           = null;
     CampaignId                   = null;
     CampaignName                 = null;
     Name                         = null;
     Status                       = null;
     Settings                     = null;
     Labels                       = null;
     ForwardCompatibilityMap      = null;
     BiddingStrategyConfiguration = null;
     ContentBidCriterionTypeGroup = null;
     BaseCampaignId               = null;
     BaseAdGroupId                = null;
     TrackingUrlTemplate          = null;
     UrlCustomParameters          = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "id")
         {
             Id = long.Parse(xItem.Value);
         }
         else if (localName == "campaignId")
         {
             CampaignId = long.Parse(xItem.Value);
         }
         else if (localName == "campaignName")
         {
             CampaignName = xItem.Value;
         }
         else if (localName == "name")
         {
             Name = xItem.Value;
         }
         else if (localName == "status")
         {
             Status = AdGroupStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "settings")
         {
             if (Settings == null)
             {
                 Settings = new List <Setting>();
             }
             var settingsItem = InstanceCreator.CreateSetting(xItem);
             settingsItem.ReadFrom(xItem);
             Settings.Add(settingsItem);
         }
         else if (localName == "labels")
         {
             if (Labels == null)
             {
                 Labels = new List <Label>();
             }
             var labelsItem = InstanceCreator.CreateLabel(xItem);
             labelsItem.ReadFrom(xItem);
             Labels.Add(labelsItem);
         }
         else if (localName == "forwardCompatibilityMap")
         {
             if (ForwardCompatibilityMap == null)
             {
                 ForwardCompatibilityMap = new List <String_StringMapEntry>();
             }
             var forwardCompatibilityMapItem = new String_StringMapEntry();
             forwardCompatibilityMapItem.ReadFrom(xItem);
             ForwardCompatibilityMap.Add(forwardCompatibilityMapItem);
         }
         else if (localName == "biddingStrategyConfiguration")
         {
             BiddingStrategyConfiguration = new BiddingStrategyConfiguration();
             BiddingStrategyConfiguration.ReadFrom(xItem);
         }
         else if (localName == "contentBidCriterionTypeGroup")
         {
             ContentBidCriterionTypeGroup = CriterionTypeGroupExtensions.Parse(xItem.Value);
         }
         else if (localName == "baseCampaignId")
         {
             BaseCampaignId = long.Parse(xItem.Value);
         }
         else if (localName == "baseAdGroupId")
         {
             BaseAdGroupId = long.Parse(xItem.Value);
         }
         else if (localName == "trackingUrlTemplate")
         {
             TrackingUrlTemplate = xItem.Value;
         }
         else if (localName == "urlCustomParameters")
         {
             UrlCustomParameters = new CustomParameters();
             UrlCustomParameters.ReadFrom(xItem);
         }
     }
 }
Ejemplo n.º 6
0
 public override void ReadFrom(XElement xE)
 {
     base.ReadFrom(xE);
     UserStatus                   = null;
     SystemServingStatus          = null;
     ApprovalStatus               = null;
     DisapprovalReasons           = null;
     DestinationUrl               = null;
     FirstPageCpc                 = null;
     TopOfPageCpc                 = null;
     FirstPositionCpc             = null;
     QualityInfo                  = null;
     BiddingStrategyConfiguration = null;
     BidModifier                  = null;
     FinalUrls           = null;
     FinalMobileUrls     = null;
     FinalAppUrls        = null;
     TrackingUrlTemplate = null;
     UrlCustomParameters = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "userStatus")
         {
             UserStatus = UserStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "systemServingStatus")
         {
             SystemServingStatus = SystemServingStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "approvalStatus")
         {
             ApprovalStatus = ApprovalStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "disapprovalReasons")
         {
             if (DisapprovalReasons == null)
             {
                 DisapprovalReasons = new List <string>();
             }
             DisapprovalReasons.Add(xItem.Value);
         }
         else if (localName == "destinationUrl")
         {
             DestinationUrl = xItem.Value;
         }
         else if (localName == "firstPageCpc")
         {
             FirstPageCpc = new Bid();
             FirstPageCpc.ReadFrom(xItem);
         }
         else if (localName == "topOfPageCpc")
         {
             TopOfPageCpc = new Bid();
             TopOfPageCpc.ReadFrom(xItem);
         }
         else if (localName == "firstPositionCpc")
         {
             FirstPositionCpc = new Bid();
             FirstPositionCpc.ReadFrom(xItem);
         }
         else if (localName == "qualityInfo")
         {
             QualityInfo = new QualityInfo();
             QualityInfo.ReadFrom(xItem);
         }
         else if (localName == "biddingStrategyConfiguration")
         {
             BiddingStrategyConfiguration = new BiddingStrategyConfiguration();
             BiddingStrategyConfiguration.ReadFrom(xItem);
         }
         else if (localName == "bidModifier")
         {
             BidModifier = double.Parse(xItem.Value);
         }
         else if (localName == "finalUrls")
         {
             FinalUrls = new UrlList();
             FinalUrls.ReadFrom(xItem);
         }
         else if (localName == "finalMobileUrls")
         {
             FinalMobileUrls = new UrlList();
             FinalMobileUrls.ReadFrom(xItem);
         }
         else if (localName == "finalAppUrls")
         {
             FinalAppUrls = new AppUrlList();
             FinalAppUrls.ReadFrom(xItem);
         }
         else if (localName == "trackingUrlTemplate")
         {
             TrackingUrlTemplate = xItem.Value;
         }
         else if (localName == "urlCustomParameters")
         {
             UrlCustomParameters = new CustomParameters();
             UrlCustomParameters.ReadFrom(xItem);
         }
     }
 }
Ejemplo n.º 7
0
 public virtual void ReadFrom(XElement xE)
 {
     Id            = null;
     Name          = null;
     Status        = null;
     ServingStatus = null;
     StartDate     = null;
     EndDate       = null;
     Budget        = null;
     ConversionOptimizerEligibility = null;
     AdServingOptimizationStatus    = null;
     FrequencyCap              = null;
     Settings                  = null;
     AdvertisingChannelType    = null;
     AdvertisingChannelSubType = null;
     NetworkSetting            = null;
     Labels = null;
     BiddingStrategyConfiguration = null;
     CampaignTrialType            = null;
     BaseCampaignId          = null;
     ForwardCompatibilityMap = null;
     TrackingUrlTemplate     = null;
     UrlCustomParameters     = null;
     VanityPharma            = null;
     SelectiveOptimization   = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "id")
         {
             Id = long.Parse(xItem.Value);
         }
         else if (localName == "name")
         {
             Name = xItem.Value;
         }
         else if (localName == "status")
         {
             Status = CampaignStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "servingStatus")
         {
             ServingStatus = ServingStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "startDate")
         {
             StartDate = xItem.Value;
         }
         else if (localName == "endDate")
         {
             EndDate = xItem.Value;
         }
         else if (localName == "budget")
         {
             Budget = new Budget();
             Budget.ReadFrom(xItem);
         }
         else if (localName == "conversionOptimizerEligibility")
         {
             ConversionOptimizerEligibility = new ConversionOptimizerEligibility();
             ConversionOptimizerEligibility.ReadFrom(xItem);
         }
         else if (localName == "adServingOptimizationStatus")
         {
             AdServingOptimizationStatus = AdServingOptimizationStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "frequencyCap")
         {
             FrequencyCap = new FrequencyCap();
             FrequencyCap.ReadFrom(xItem);
         }
         else if (localName == "settings")
         {
             if (Settings == null)
             {
                 Settings = new List <Setting>();
             }
             var settingsItem = InstanceCreator.CreateSetting(xItem);
             settingsItem.ReadFrom(xItem);
             Settings.Add(settingsItem);
         }
         else if (localName == "advertisingChannelType")
         {
             AdvertisingChannelType = AdvertisingChannelTypeExtensions.Parse(xItem.Value);
         }
         else if (localName == "advertisingChannelSubType")
         {
             AdvertisingChannelSubType = AdvertisingChannelSubTypeExtensions.Parse(xItem.Value);
         }
         else if (localName == "networkSetting")
         {
             NetworkSetting = new NetworkSetting();
             NetworkSetting.ReadFrom(xItem);
         }
         else if (localName == "labels")
         {
             if (Labels == null)
             {
                 Labels = new List <Label>();
             }
             var labelsItem = InstanceCreator.CreateLabel(xItem);
             labelsItem.ReadFrom(xItem);
             Labels.Add(labelsItem);
         }
         else if (localName == "biddingStrategyConfiguration")
         {
             BiddingStrategyConfiguration = new BiddingStrategyConfiguration();
             BiddingStrategyConfiguration.ReadFrom(xItem);
         }
         else if (localName == "campaignTrialType")
         {
             CampaignTrialType = CampaignTrialTypeExtensions.Parse(xItem.Value);
         }
         else if (localName == "baseCampaignId")
         {
             BaseCampaignId = long.Parse(xItem.Value);
         }
         else if (localName == "forwardCompatibilityMap")
         {
             if (ForwardCompatibilityMap == null)
             {
                 ForwardCompatibilityMap = new List <String_StringMapEntry>();
             }
             var forwardCompatibilityMapItem = new String_StringMapEntry();
             forwardCompatibilityMapItem.ReadFrom(xItem);
             ForwardCompatibilityMap.Add(forwardCompatibilityMapItem);
         }
         else if (localName == "trackingUrlTemplate")
         {
             TrackingUrlTemplate = xItem.Value;
         }
         else if (localName == "urlCustomParameters")
         {
             UrlCustomParameters = new CustomParameters();
             UrlCustomParameters.ReadFrom(xItem);
         }
         else if (localName == "vanityPharma")
         {
             VanityPharma = new VanityPharma();
             VanityPharma.ReadFrom(xItem);
         }
         else if (localName == "selectiveOptimization")
         {
             SelectiveOptimization = new SelectiveOptimization();
             SelectiveOptimization.ReadFrom(xItem);
         }
     }
 }